fix #2175
This commit is contained in:
parent
0fc902c3b7
commit
efdbeb31aa
7 changed files with 16 additions and 7 deletions
|
@ -8,7 +8,6 @@
|
||||||
*/
|
*/
|
||||||
package buildcraft;
|
package buildcraft;
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.network.Packet;
|
import net.minecraft.network.Packet;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
import cofh.api.energy.IEnergyHandler;
|
import cofh.api.energy.IEnergyHandler;
|
||||||
import buildcraft.BuildCraftCore;
|
import buildcraft.BuildCraftCore;
|
||||||
|
@ -168,7 +167,7 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return ((xCoord * 37 + yCoord) * 37 + zCoord);
|
return (xCoord * 37 + yCoord) * 37 + zCoord;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -12,7 +12,6 @@ import java.util.Map;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
import buildcraft.api.core.BlockIndex;
|
import buildcraft.api.core.BlockIndex;
|
||||||
import buildcraft.api.core.SafeTimeTracker;
|
import buildcraft.api.core.SafeTimeTracker;
|
||||||
|
|
|
@ -20,7 +20,6 @@ import buildcraft.api.power.IPowerEmitter;
|
||||||
import buildcraft.api.power.IPowerReceptor;
|
import buildcraft.api.power.IPowerReceptor;
|
||||||
import buildcraft.api.power.PowerHandler;
|
import buildcraft.api.power.PowerHandler;
|
||||||
import buildcraft.api.power.PowerHandler.PowerReceiver;
|
import buildcraft.api.power.PowerHandler.PowerReceiver;
|
||||||
import buildcraft.api.power.PowerHandler.Type;
|
|
||||||
import buildcraft.api.transport.IPipeConnection;
|
import buildcraft.api.transport.IPipeConnection;
|
||||||
import buildcraft.api.transport.IPipeTile;
|
import buildcraft.api.transport.IPipeTile;
|
||||||
import buildcraft.api.transport.IPipeTile.PipeType;
|
import buildcraft.api.transport.IPipeTile.PipeType;
|
||||||
|
|
|
@ -10,7 +10,6 @@ package buildcraft.factory;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import buildcraft.core.proxy.CoreProxy;
|
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -25,6 +24,7 @@ import buildcraft.api.transport.IPipeConnection;
|
||||||
import buildcraft.api.transport.IPipeTile.PipeType;
|
import buildcraft.api.transport.IPipeTile.PipeType;
|
||||||
import buildcraft.core.RFBattery;
|
import buildcraft.core.RFBattery;
|
||||||
import buildcraft.core.TileBuildCraft;
|
import buildcraft.core.TileBuildCraft;
|
||||||
|
import buildcraft.core.proxy.CoreProxy;
|
||||||
import buildcraft.core.utils.BlockUtil;
|
import buildcraft.core.utils.BlockUtil;
|
||||||
import buildcraft.core.utils.Utils;
|
import buildcraft.core.utils.Utils;
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||||
import net.minecraftforge.common.ForgeChunkManager.Type;
|
import net.minecraftforge.common.ForgeChunkManager.Type;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
import net.minecraftforge.event.world.BlockEvent;
|
||||||
import buildcraft.BuildCraftCore;
|
import buildcraft.BuildCraftCore;
|
||||||
import buildcraft.BuildCraftFactory;
|
import buildcraft.BuildCraftFactory;
|
||||||
import buildcraft.api.core.BuildCraftAPI;
|
import buildcraft.api.core.BuildCraftAPI;
|
||||||
|
@ -51,7 +52,6 @@ import buildcraft.core.network.PacketUpdate;
|
||||||
import buildcraft.core.proxy.CoreProxy;
|
import buildcraft.core.proxy.CoreProxy;
|
||||||
import buildcraft.core.utils.BlockUtil;
|
import buildcraft.core.utils.BlockUtil;
|
||||||
import buildcraft.core.utils.Utils;
|
import buildcraft.core.utils.Utils;
|
||||||
import net.minecraftforge.event.world.BlockEvent;
|
|
||||||
|
|
||||||
public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedInventory {
|
public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedInventory {
|
||||||
|
|
||||||
|
|
13
common/buildcraft/transport/ItemFacade.java
Executable file → Normal file
13
common/buildcraft/transport/ItemFacade.java
Executable file → Normal file
|
@ -250,6 +250,19 @@ public class ItemFacade extends ItemBuildCraft implements IFacadeItem {
|
||||||
|
|
||||||
ItemStack stack = new ItemStack(item, 1, i);
|
ItemStack stack = new ItemStack(item, 1, i);
|
||||||
|
|
||||||
|
// Check if all of these functions work correctly.
|
||||||
|
// If an exception is filed, or null is returned, this generally means that
|
||||||
|
// this block is invalid.
|
||||||
|
// We do not use getSubBlocks() to permit for rotated combinations of a given facade.
|
||||||
|
// TODO: Rewrite to use getSubBlocks
|
||||||
|
try {
|
||||||
|
if (stack.getUnlocalizedName() == null || stack.getDisplayName() == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} catch(Throwable t) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!Strings.isNullOrEmpty(stack.getUnlocalizedName())
|
if (!Strings.isNullOrEmpty(stack.getUnlocalizedName())
|
||||||
&& names.add(stack.getUnlocalizedName())) {
|
&& names.add(stack.getUnlocalizedName())) {
|
||||||
addFacade("buildcraft:facade{" + Block.blockRegistry.getNameForObject(block) + "#"
|
addFacade("buildcraft:facade{" + Block.blockRegistry.getNameForObject(block) + "#"
|
||||||
|
|
Loading…
Reference in a new issue