mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-13 05:54:17 +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
@ -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")
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
||||||
|
|
||||||
@ -96,7 +98,7 @@ public class CrushingWheelControllerBlock extends Block implements IWithoutBlock
|
|||||||
|
|
||||||
public void updateSpeed(BlockState state, World world, BlockPos pos) {
|
public void updateSpeed(BlockState state, World world, BlockPos pos) {
|
||||||
CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) world.getTileEntity(pos);
|
CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) world.getTileEntity(pos);
|
||||||
|
|
||||||
if (te == null)
|
if (te == null)
|
||||||
return;
|
return;
|
||||||
if (!state.get(VALID) || CrushingWheelControllerTileEntity.isFrozen()) {
|
if (!state.get(VALID) || CrushingWheelControllerTileEntity.isFrozen()) {
|
||||||
|
@ -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;
|
||||||
@ -47,7 +48,7 @@ public class BuilderGunItemRenderer extends ItemStackTileEntityRenderer {
|
|||||||
// Block indicator
|
// Block indicator
|
||||||
if (mainModel.showBlock && stack.hasTag() && stack.getTag().contains("BlockUsed"))
|
if (mainModel.showBlock && stack.hasTag() && stack.getTag().contains("BlockUsed"))
|
||||||
renderBlockUsed(stack, itemRenderer);
|
renderBlockUsed(stack, itemRenderer);
|
||||||
|
|
||||||
ClientPlayerEntity player = Minecraft.getInstance().player;
|
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||||
boolean leftHanded = player.getPrimaryHand() == HandSide.LEFT;
|
boolean leftHanded = player.getPrimaryHand() == HandSide.LEFT;
|
||||||
boolean mainHand = player.getHeldItemMainhand() == stack;
|
boolean mainHand = player.getHeldItemMainhand() == stack;
|
||||||
@ -73,7 +74,7 @@ public class BuilderGunItemRenderer extends ItemStackTileEntityRenderer {
|
|||||||
|
|
||||||
// Accelerator spins
|
// Accelerator spins
|
||||||
float angle = worldTime * -25;
|
float angle = worldTime * -25;
|
||||||
if (mainHand || offHand)
|
if (mainHand || offHand)
|
||||||
angle += 360 * animation;
|
angle += 360 * animation;
|
||||||
|
|
||||||
angle %= 360;
|
angle %= 360;
|
||||||
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user