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'
// 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
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) {
if (facing.getAxis() == state.get(AXIS) || facing.getAxis().isVertical())
return;
if (world == null)
return;
BlockPos controllerPos = pos.offset(facing);
BlockPos otherWheelPos = pos.offset(facing, 2);

View file

@ -65,10 +65,12 @@ public class CrushingWheelControllerBlock extends Block implements IWithoutBlock
super.onLanded(worldIn, entityIn);
if (CrushingWheelControllerTileEntity.isFrozen())
return;
CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) worldIn
.getTileEntity(entityIn.getPosition().down());
if (te == null)
TileEntity tileEntity = worldIn.getTileEntity(entityIn.getPosition().down());
if (tileEntity == null)
return;
if (!(tileEntity instanceof CrushingWheelControllerTileEntity))
return;
CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) tileEntity;
if (te.isOccupied())
return;
@ -96,7 +98,7 @@ public class CrushingWheelControllerBlock extends Block implements IWithoutBlock
public void updateSpeed(BlockState state, World world, BlockPos pos) {
CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) world.getTileEntity(pos);
if (te == null)
return;
if (!state.get(VALID) || CrushingWheelControllerTileEntity.isFrozen()) {

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 net.minecraft.block.BlockState;
import net.minecraft.block.FourWayBlock;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.renderer.ItemRenderer;
@ -47,7 +48,7 @@ public class BuilderGunItemRenderer extends ItemStackTileEntityRenderer {
// Block indicator
if (mainModel.showBlock && stack.hasTag() && stack.getTag().contains("BlockUsed"))
renderBlockUsed(stack, itemRenderer);
ClientPlayerEntity player = Minecraft.getInstance().player;
boolean leftHanded = player.getPrimaryHand() == HandSide.LEFT;
boolean mainHand = player.getHeldItemMainhand() == stack;
@ -73,7 +74,7 @@ public class BuilderGunItemRenderer extends ItemStackTileEntityRenderer {
// Accelerator spins
float angle = worldTime * -25;
if (mainHand || offHand)
if (mainHand || offHand)
angle += 360 * animation;
angle %= 360;
@ -92,8 +93,13 @@ public class BuilderGunItemRenderer extends ItemStackTileEntityRenderer {
GlStateManager.pushMatrix();
GlStateManager.translatef(-0.8F, -0.7F, -0.5F);
GlStateManager.scalef(0.25F, 0.25F, 0.25F);
itemRenderer.renderItem(new ItemStack(state.getBlock()),
Minecraft.getInstance().getBlockRendererDispatcher().getModelForState(state));
IBakedModel modelForState = 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();
}