use of com.teammoeg.frostedheart.util.IGantryShaft in project FrostedHeart by TeamMoegMC.
the class MixinGantryContraptionEntity method checkPinionShaft.
@Inject(at = @At("HEAD"), method = "checkPinionShaft", remap = false)
protected void checkPinionShaft(CallbackInfo cbi) {
Direction facing = ((GantryContraption) contraption).getFacing();
Vector3d currentPosition = getAnchorVec().add(.5, .5, .5);
BlockPos gantryShaftPos = new BlockPos(currentPosition).offset(facing.getOpposite());
TileEntity te = world.getTileEntity(gantryShaftPos);
if (te instanceof IGantryShaft) {
GantryShaftTileEntity gte = (GantryShaftTileEntity) te;
((IGantryShaft) gte).setEntity(this);
gte.networkDirty = true;
return;
}
}
Aggregations