From 02871eb76fc752b77efc4e6f92ee723e94977a2c Mon Sep 17 00:00:00 2001 From: da3dsoul Date: Sun, 27 Sep 2015 20:56:37 -0400 Subject: [PATCH] Fix crafting items stacking mismatches. Re-enable lighting in placeholder phase. --- .../remaininmotion/base/SimpleItemSet.java | 1 + .../drive/TileEntityCarriageDrive.java | 26 +++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/main/java/me/planetguy/remaininmotion/base/SimpleItemSet.java b/src/main/java/me/planetguy/remaininmotion/base/SimpleItemSet.java index e888900..856155d 100644 --- a/src/main/java/me/planetguy/remaininmotion/base/SimpleItemSet.java +++ b/src/main/java/me/planetguy/remaininmotion/base/SimpleItemSet.java @@ -20,6 +20,7 @@ public class SimpleItemSet extends ItemBase { public SimpleItemSet() { //for legacy compatibility... super("item."+ModRiM.Handle + "_SimpleItemSet"); + this.setHasSubtypes(true); setCreativeTab(CreativeTab.Instance); } diff --git a/src/main/java/me/planetguy/remaininmotion/drive/TileEntityCarriageDrive.java b/src/main/java/me/planetguy/remaininmotion/drive/TileEntityCarriageDrive.java index 5f5f7fe..7b36947 100644 --- a/src/main/java/me/planetguy/remaininmotion/drive/TileEntityCarriageDrive.java +++ b/src/main/java/me/planetguy/remaininmotion/drive/TileEntityCarriageDrive.java @@ -457,16 +457,16 @@ public void EstablishPlaceholders(CarriagePackage Package) { BlockRecordSet temp = new BlockRecordSet(); - /* + byte[] lightValues = new byte[Package.Body.size()]; byte[] lightOpacities = new byte[Package.Body.size()]; - */ + int i = 0; if(Package.MotionDirection != null) { for (BlockRecord Record : Package.Body) { - /* + try { lightValues[i] = (byte) Record.block.getLightValue(worldObj, Record.X, Record.Y, Record.Z); lightOpacities[i] = (byte) Record.block.getLightOpacity(worldObj, Record.X, Record.Y, Record.Z); @@ -474,7 +474,7 @@ public void EstablishPlaceholders(CarriagePackage Package) { lightValues[i] = (byte) Record.block.getLightValue(); lightOpacities[i] = (byte) Record.block.getLightOpacity(); } - */ + BlockRecord temp2 = Record.NextInDirection(Package.MotionDirection); temp2.block = Record.block; @@ -515,11 +515,11 @@ public void EstablishPlaceholders(CarriagePackage Package) { //if(worldObj.getBlock(Record.X, Record.Y, Record.Z).isBlockNormalCube() || worldObj.getBlock(Record.X, Record.Y, Record.Z).getCollisionBoundingBoxFromPool(worldObj, Record.X, Record.Y, Record.Z) == null) { SneakyWorldUtil.setBlock(worldObj, Record.X, Record.Y, Record.Z, RIMBlocks.Spectre, BlockSpectre.Types.SupportiveNoCollide.ordinal()); - //} else { - // AABBUtil.writeCollisionBoundingBoxesToNBT(worldObj, Record.X, Record.Y, Record.Z, nbt); - // SneakyWorldUtil.SetBlock(worldObj, Record.X, Record.Y, Record.Z, RIMBlocks.Spectre, - // BlockSpectre.Types.SupportiveNoCollide.ordinal()); - //} + /*} else { + AABBUtil.writeCollisionBoundingBoxesToNBT(worldObj, Record.X, Record.Y, Record.Z, nbt); + SneakyWorldUtil.SetBlock(worldObj, Record.X, Record.Y, Record.Z, RIMBlocks.Spectre, + BlockSpectre.Types.SupportiveNoCollide.ordinal()); + }*/ } else { //AABBUtil.writeCollisionBoundingBoxesToNBT(worldObj, Record.X, Record.Y, Record.Z, nbt); SneakyWorldUtil.setBlock(worldObj, Record.X, Record.Y, Record.Z, RIMBlocks.Spectre, @@ -534,7 +534,7 @@ public void EstablishPlaceholders(CarriagePackage Package) { // handle camo blocks TileEntitySupportiveSpectre tile = ((TileEntitySupportiveSpectre) worldObj.getTileEntity(Record.X, Record.Y, Record.Z)); - //tile.setLight(lightValues[i], lightOpacities[i]); + tile.setLight(lightValues[i], lightOpacities[i]); //tile.setBoundingBox(nbt); } @@ -559,10 +559,10 @@ public void EstablishPlaceholders(CarriagePackage Package) { SneakyWorldUtil.setBlock(worldObj, Record.X, Record.Y, Record.Z, RIMBlocks.Spectre, BlockSpectre.Types.SupportiveNoCollide.ordinal()); } - /*if (Package.MotionDirection.ordinal() != ForgeDirection.UNKNOWN.ordinal()) { - worldObj.setTileEntity(Record.X, Record.Y, Record.Z, new TileEntitySupportiveSpectre()); + if (Package.MotionDirection.ordinal() != ForgeDirection.UNKNOWN.ordinal()) { + // worldObj.setTileEntity(Record.X, Record.Y, Record.Z, new TileEntitySupportiveSpectre()); ((TileEntitySupportiveSpectre) worldObj.getTileEntity(Record.X, Record.Y, Record.Z)).setLight((byte)0,(byte)0); - }*/ + } Package.spectersToDestroy.add(new BlockRecord(Record)); }