dont shadow fields in BlockMixin

This commit is contained in:
dfsek
2021-12-16 16:17:20 -07:00
parent 0aa10a631a
commit 909de9409b
@@ -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")