mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-25 22:46:26 +01:00
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:
parent
baba95e0eb
commit
00be0f57f0
4 changed files with 19 additions and 9 deletions
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue