Skip to content

Commit

Permalink
Fix crafting items stacking mismatches. Re-enable lighting in placeho…
Browse files Browse the repository at this point in the history
…lder phase.
  • Loading branch information
da3dsoul committed Sep 28, 2015
1 parent 6fa11aa commit 02871eb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,24 +457,24 @@ 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);
} catch (Exception e) {
lightValues[i] = (byte) Record.block.getLightValue();
lightOpacities[i] = (byte) Record.block.getLightOpacity();
}
*/


BlockRecord temp2 = Record.NextInDirection(Package.MotionDirection);
temp2.block = Record.block;
Expand Down Expand Up @@ -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,
Expand All @@ -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);
}
Expand All @@ -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));
}

Expand Down

0 comments on commit 02871eb

Please sign in to comment.