mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 10:18:36 +00:00
Migrate the logic for which pass a block goes into. Also updated it and made it use tags where possible.
This commit is contained in:
@ -56,24 +56,6 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
@Nullable
|
||||
private CompoundTag nbtData;
|
||||
|
||||
/**
|
||||
* Construct a block with the given ID and a data value of 0.
|
||||
*
|
||||
* @param id ID value
|
||||
*/
|
||||
@Deprecated
|
||||
public BaseBlock(int id) {
|
||||
try {
|
||||
this.blockState = LegacyMapper.getInstance().getBlockFromLegacy(id);
|
||||
if (this.blockState == null) {
|
||||
this.blockState = BlockTypes.AIR.getDefaultState();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println(id);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a block with a state.
|
||||
*
|
||||
@ -111,7 +93,15 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
*/
|
||||
@Deprecated
|
||||
public BaseBlock(int id, int data) {
|
||||
this(id);
|
||||
try {
|
||||
this.blockState = LegacyMapper.getInstance().getBlockFromLegacy(id, data);
|
||||
if (this.blockState == null) {
|
||||
this.blockState = BlockTypes.AIR.getDefaultState();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println(id);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user