Search in sources :

Example 11 with ModuleCrafter

use of logisticspipes.modules.ModuleCrafter in project LogisticsPipes by RS485.

the class FluidCraftingPipeAdvancedSatelliteNextPacket method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    ModuleCrafter module = this.getLogisticsModule(player, ModuleCrafter.class);
    if (module == null) {
        return;
    }
    module.setNextFluidSatellite(player, getInteger());
}
Also used : ModuleCrafter(logisticspipes.modules.ModuleCrafter)

Example 12 with ModuleCrafter

use of logisticspipes.modules.ModuleCrafter in project LogisticsPipes by RS485.

the class FluidCraftingPipeAdvancedSatellitePrevPacket method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    ModuleCrafter module = this.getLogisticsModule(player, ModuleCrafter.class);
    if (module == null) {
        return;
    }
    module.setPrevFluidSatellite(player, getInteger());
}
Also used : ModuleCrafter(logisticspipes.modules.ModuleCrafter)

Example 13 with ModuleCrafter

use of logisticspipes.modules.ModuleCrafter in project LogisticsPipes by RS485.

the class CraftingPipePriorityDownPacket method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    ModuleCrafter module = this.getLogisticsModule(player, ModuleCrafter.class);
    if (module == null) {
        return;
    }
    module.priorityDown(player);
}
Also used : ModuleCrafter(logisticspipes.modules.ModuleCrafter)

Example 14 with ModuleCrafter

use of logisticspipes.modules.ModuleCrafter in project LogisticsPipes by RS485.

the class CraftingPipeUpdatePacket method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    ModuleCrafter module = this.getLogisticsModule(player, ModuleCrafter.class);
    if (module == null) {
        return;
    }
    module.handleCraftingUpdatePacket(this);
}
Also used : ModuleCrafter(logisticspipes.modules.ModuleCrafter)

Example 15 with ModuleCrafter

use of logisticspipes.modules.ModuleCrafter in project LogisticsPipes by RS485.

the class CraftingPipeSign method render.

@Override
@SideOnly(Side.CLIENT)
public void render(CoreRoutedPipe pipe, LogisticsRenderPipe renderer) {
    PipeItemsCraftingLogistics cpipe = (PipeItemsCraftingLogistics) pipe;
    FontRenderer var17 = renderer.func_147498_b();
    if (cpipe != null) {
        List<ItemIdentifierStack> craftables = cpipe.getCraftedItems();
        String name = "";
        if (craftables != null && craftables.size() > 0) {
            ItemStack itemstack = craftables.get(0).unsafeMakeNormalStack();
            renderer.renderItemStackOnSign(itemstack);
            Item item = itemstack.getItem();
            GL11.glDepthMask(false);
            GL11.glRotatef(-180.0F, 1.0F, 0.0F, 0.0F);
            GL11.glTranslatef(0.5F, +0.08F, 0.0F);
            GL11.glScalef(1.0F / 90.0F, 1.0F / 90.0F, 1.0F / 90.0F);
            try {
                name = item.getItemStackDisplayName(itemstack);
            } catch (Exception e) {
                try {
                    name = item.getUnlocalizedName();
                } catch (Exception e1) {
                }
            }
            var17.drawString("ID: " + String.valueOf(Item.getIdFromItem(item)), -var17.getStringWidth("ID: " + String.valueOf(Item.getIdFromItem(item))) / 2, 0 * 10 - 4 * 5, 0);
            ModuleCrafter logisticsMod = cpipe.getLogisticsModule();
            if (logisticsMod.satelliteId != 0) {
                var17.drawString("Sat ID: " + String.valueOf(logisticsMod.satelliteId), -var17.getStringWidth("Sat ID: " + String.valueOf(logisticsMod.satelliteId)) / 2, 1 * 10 - 4 * 5, 0);
            }
        } else {
            GL11.glRotatef(-180.0F, 1.0F, 0.0F, 0.0F);
            GL11.glTranslatef(0.5F, +0.08F, 0.0F);
            GL11.glScalef(1.0F / 90.0F, 1.0F / 90.0F, 1.0F / 90.0F);
            name = "Empty";
        }
        name = renderer.cut(name, var17);
        var17.drawString(name, -var17.getStringWidth(name) / 2 - 15, 3 * 10 - 4 * 5, 0);
        GL11.glDepthMask(true);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    }
}
Also used : PipeItemsCraftingLogistics(logisticspipes.pipes.PipeItemsCraftingLogistics) Item(net.minecraft.item.Item) FontRenderer(net.minecraft.client.gui.FontRenderer) ItemIdentifierStack(logisticspipes.utils.item.ItemIdentifierStack) ItemStack(net.minecraft.item.ItemStack) ModuleCrafter(logisticspipes.modules.ModuleCrafter) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

ModuleCrafter (logisticspipes.modules.ModuleCrafter)22 PipeItemsCraftingLogistics (logisticspipes.pipes.PipeItemsCraftingLogistics)2 ItemIdentifierStack (logisticspipes.utils.item.ItemIdentifierStack)2 SideOnly (cpw.mods.fml.relauncher.SideOnly)1 ClientSideOnlyMethodContent (logisticspipes.asm.ClientSideOnlyMethodContent)1 GuiCraftingPipe (logisticspipes.gui.GuiCraftingPipe)1 DummyContainer (logisticspipes.utils.gui.DummyContainer)1 DummyModuleContainer (logisticspipes.utils.gui.DummyModuleContainer)1 FontRenderer (net.minecraft.client.gui.FontRenderer)1 Item (net.minecraft.item.Item)1 ItemStack (net.minecraft.item.ItemStack)1