Fix two multiblock crashes, closes #48

This commit is contained in:
Vincent Lee committed 2016-01-18 12:15:56 -06:00
1 parent 177f50ca61
commit cec10471fb
3 files changed
+2 -6

No files matched your search

@@ -86,7 +86,7 @@ public final class MultiblockRenderHandler {
public static void setMultiblock(MultiblockSet set) {
currentMultiblock = set;
anchor = null;
angle = EnumFacing.DOWN;
angle = EnumFacing.SOUTH;
Minecraft mc = Minecraft.getMinecraft();
if(mc.theWorld != null)
@@ -395,9 +395,6 @@ public class ClientProxy extends CommonProxy {
if((int) Math.floor(MathHelper.pointDistancePlane(xp, zp, x, z)) == (iradius - 1))
mb.addComponent(new AnyComponent(new BlockPos(xp - x, 1, zp - z), block.getDefaultState()));
if((int) Math.floor(MathHelper.pointDistancePlane(xp, zp, x, z)) == iradius - 1)
mb.addComponent(new AnyComponent(new BlockPos(xp - x, 1, zp - z), block.getDefaultState()));
}
MultiblockRenderHandler.setMultiblock(mb.makeSet());
@@ -171,11 +171,10 @@ public class ItemSextant extends ItemMod {
@Override
public Map<EnumFacing, Multiblock> createRotations() {
Map<EnumFacing, Multiblock> ret = new EnumMap<>(EnumFacing.class);
for (EnumFacing e : EnumFacing.HORIZONTALS) {
for (EnumFacing e : EnumFacing.VALUES) {
ret.put(e, this);
}
return ret;
// return new Multiblock[] { this }; todo 1.8 verify, this was only the first direction
}
}