mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-18 23:01:03 +00:00
dont shadow fields in BlockMixin
This commit is contained in:
+2
-5
@@ -33,20 +33,17 @@ import com.dfsek.terra.fabric.util.FabricAdapter;
|
|||||||
@Mixin(Block.class)
|
@Mixin(Block.class)
|
||||||
@Implements(@Interface(iface = BlockType.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
@Implements(@Interface(iface = BlockType.class, prefix = "terra$", remap = Interface.Remap.NONE))
|
||||||
public abstract class BlockMixin {
|
public abstract class BlockMixin {
|
||||||
@Shadow
|
|
||||||
private BlockState defaultState;
|
|
||||||
|
|
||||||
@Intrinsic
|
@Intrinsic
|
||||||
public Object terra$getHandle() {
|
public Object terra$getHandle() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public com.dfsek.terra.api.block.state.BlockState terra$getDefaultData() {
|
public com.dfsek.terra.api.block.state.BlockState terra$getDefaultData() {
|
||||||
return FabricAdapter.adapt(defaultState);
|
return FabricAdapter.adapt(((Block) (Object) this).getDefaultState());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean terra$isSolid() {
|
public boolean terra$isSolid() {
|
||||||
return defaultState.isOpaque();
|
return ((Block) (Object) this).getDefaultState().isOpaque();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("ConstantConditions")
|
@SuppressWarnings("ConstantConditions")
|
||||||
|
|||||||
Reference in New Issue
Block a user