fix facade item renderer crash

This commit is contained in:
asiekierka 2015-10-03 16:23:51 +02:00
parent 6b49bb6513
commit b318943e8f
6 changed files with 5 additions and 11 deletions

View file

@ -6,4 +6,5 @@ Bugs fixed:
* [#3050] Oil biome configs not changing from defaults (asie) * [#3050] Oil biome configs not changing from defaults (asie)
* Rare crash with engines (asie) * Rare crash with engines (asie)
* Rare crash with facade rendering (asie)
* Very rare rendering glitch with items in BC pipes (asie) * Very rare rendering glitch with items in BC pipes (asie)

View file

@ -9,7 +9,6 @@ import net.minecraft.world.World;
import buildcraft.core.lib.utils.ColorUtils; import buildcraft.core.lib.utils.ColorUtils;
public class PipeColoringRecipe implements IRecipe { public class PipeColoringRecipe implements IRecipe {
private ItemStack getResult(InventoryCrafting crafting) { private ItemStack getResult(InventoryCrafting crafting) {
ItemStack oneColorPipeStack = null; ItemStack oneColorPipeStack = null;
ItemStack pipeStack = null; ItemStack pipeStack = null;

View file

@ -170,7 +170,7 @@ public class FacadeItemRenderer implements IItemRenderer {
RenderUtils.setGLColorFromInt(0xFFFFFF); RenderUtils.setGLColorFromInt(0xFFFFFF);
// Render StructurePipe // Render StructurePipe
if (!hollow && block.getMaterial().isOpaque()) { if (!hollow && block != null && (block.getMaterial() == null || block.getMaterial().isOpaque())) {
block = BuildCraftTransport.genericPipeBlock; block = BuildCraftTransport.genericPipeBlock;
IIcon textureID = BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.PipeStructureCobblestone.ordinal()); // Structure pipe IIcon textureID = BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.PipeStructureCobblestone.ordinal()); // Structure pipe

View file

@ -14,9 +14,6 @@ import buildcraft.api.statements.containers.ISidedStatementContainer;
import buildcraft.core.lib.utils.StringUtils; import buildcraft.core.lib.utils.StringUtils;
import buildcraft.core.statements.BCStatement; import buildcraft.core.statements.BCStatement;
/**
* Created by asie on 3/14/15.
*/
public class TriggerLightSensor extends BCStatement implements ITriggerInternal { public class TriggerLightSensor extends BCStatement implements ITriggerInternal {
private final boolean bright; private final boolean bright;

View file

@ -26,9 +26,6 @@ import buildcraft.transport.TileGenericPipe;
import buildcraft.transport.TravelingItem; import buildcraft.transport.TravelingItem;
import buildcraft.transport.utils.TransportUtils; import buildcraft.transport.utils.TransportUtils;
/**
* Created by asie on 3/20/15.
*/
public class PipeExtensionListener { public class PipeExtensionListener {
private class PipeExtensionRequest { private class PipeExtensionRequest {
public ItemStack stack; public ItemStack stack;

View file

@ -50,12 +50,12 @@ public class StripesHandlerPipes implements IStripesHandler {
p.moveBackwards(1.0D); p.moveBackwards(1.0D);
Pipe<?> pipe = BlockGenericPipe.createPipe(stack.getItem()); Pipe<?> pipe = BlockGenericPipe.createPipe(stack.getItem());
if (pipe.transport instanceof PipeTransportItems) { if (pipe.transport instanceof PipeTransportItems) {
// Checks done, request extension // Item pipe: request extending on end of tick
BuildCraftTransport.pipeExtensionListener.requestPipeExtension(stack, world, (int) p.x, (int) p.y, (int) p.z, direction, activator); BuildCraftTransport.pipeExtensionListener.requestPipeExtension(stack, world, (int) p.x, (int) p.y, (int) p.z, direction, activator);
} else { } else {
// Fluid/power pipe, place in front instead // Non-item pipe: place in front of stripes (item) pipe
stack.getItem().onItemUse(stack, stack.getItem().onItemUse(stack,
CoreProxy.proxy.getBuildCraftPlayer((WorldServer) world, (int) p.x, (int) p.y, (int) p.z).get(), CoreProxy.proxy.getBuildCraftPlayer((WorldServer) world, (int) p.x, (int) p.y, (int) p.z).get(),
world, x, y, z, 1, 0, 0, 0); world, x, y, z, 1, 0, 0, 0);