Last Minute Fixes - 0.1.1a

- Added safety check for other Tile Entities blocking two Crushing Wheels, addresses #36
- Overwrote blockzapper preview renders of Fourway-blocks, addresses #21
- Added safety check for Crushing Wheels in null Worlds, addresses #38
This commit is contained in:
simibubi 2019-10-22 00:26:21 +02:00
parent baba95e0eb
commit 00be0f57f0
4 changed files with 19 additions and 9 deletions

View file

@ -74,7 +74,7 @@ dependencies {
minecraft 'net.minecraftforge:forge:1.14.4-28.1.61' minecraft 'net.minecraftforge:forge:1.14.4-28.1.61'
// compile against the JEI API but do not include it at runtime // compile against the JEI API but do not include it at runtime
compileOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.18:api") compileOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.10:api")
// at runtime, use the full JEI jar // at runtime, use the full JEI jar
runtimeOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.10") runtimeOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.10")
} }

View file

@ -76,6 +76,8 @@ public class CrushingWheelBlock extends RotatedPillarKineticBlock {
public void updateControllers(BlockState state, World world, BlockPos pos, Direction facing) { public void updateControllers(BlockState state, World world, BlockPos pos, Direction facing) {
if (facing.getAxis() == state.get(AXIS) || facing.getAxis().isVertical()) if (facing.getAxis() == state.get(AXIS) || facing.getAxis().isVertical())
return; return;
if (world == null)
return;
BlockPos controllerPos = pos.offset(facing); BlockPos controllerPos = pos.offset(facing);
BlockPos otherWheelPos = pos.offset(facing, 2); BlockPos otherWheelPos = pos.offset(facing, 2);

View file

@ -65,10 +65,12 @@ public class CrushingWheelControllerBlock extends Block implements IWithoutBlock
super.onLanded(worldIn, entityIn); super.onLanded(worldIn, entityIn);
if (CrushingWheelControllerTileEntity.isFrozen()) if (CrushingWheelControllerTileEntity.isFrozen())
return; return;
CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) worldIn TileEntity tileEntity = worldIn.getTileEntity(entityIn.getPosition().down());
.getTileEntity(entityIn.getPosition().down()); if (tileEntity == null)
if (te == null)
return; return;
if (!(tileEntity instanceof CrushingWheelControllerTileEntity))
return;
CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) tileEntity;
if (te.isOccupied()) if (te.isOccupied())
return; return;

View file

@ -12,6 +12,7 @@ import com.simibubi.create.modules.curiosities.placementHandgun.BuilderGunItem.C
import com.simibubi.create.modules.curiosities.placementHandgun.BuilderGunItem.Components; import com.simibubi.create.modules.curiosities.placementHandgun.BuilderGunItem.Components;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.FourWayBlock;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.ItemRenderer;
@ -92,8 +93,13 @@ public class BuilderGunItemRenderer extends ItemStackTileEntityRenderer {
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
GlStateManager.translatef(-0.8F, -0.7F, -0.5F); GlStateManager.translatef(-0.8F, -0.7F, -0.5F);
GlStateManager.scalef(0.25F, 0.25F, 0.25F); GlStateManager.scalef(0.25F, 0.25F, 0.25F);
itemRenderer.renderItem(new ItemStack(state.getBlock()), IBakedModel modelForState = Minecraft.getInstance().getBlockRendererDispatcher().getModelForState(state);
Minecraft.getInstance().getBlockRendererDispatcher().getModelForState(state));
if (state.getBlock() instanceof FourWayBlock)
modelForState = Minecraft.getInstance().getItemRenderer()
.getModelWithOverrides(new ItemStack(state.getBlock()));
itemRenderer.renderItem(new ItemStack(state.getBlock()), modelForState);
GlStateManager.popMatrix(); GlStateManager.popMatrix();
} }