@Override protected void updateElementInformation() { super.updateElementInformation(); slotInputHot.setVisible(myTile.hasSideType(INPUT_ALL) || baseTile.hasSideType(OMNI)); slotInputCold.setVisible(myTile.hasSideType(INPUT_ALL) || baseTile.hasSideType(OMNI)); slotOutput.setVisible(myTile.hasSideType(OUTPUT_ALL) || baseTile.hasSideType(OMNI)); progressHot.setSize(myTile.getScaledProgress(PROGRESS), myTile.augmentNoWater() ? 16 : 8); progressCold.setSize(myTile.getScaledProgress(PROGRESS), myTile.augmentNoWater() ? 0 : 8); progressOverlay.setQuantity(myTile.getScaledProgress(PROGRESS)); speed.setQuantity(myTile.getScaledSpeed(SPEED)); }
public static void initialize() { SIDE_CONFIGS[TYPE] = new SideConfig(); SIDE_CONFIGS[TYPE].numConfig = 5; SIDE_CONFIGS[TYPE].slotGroups = new int[][] { {}, {}, { 0 }, { 0 }, { 0 } }; SIDE_CONFIGS[TYPE].sideTypes = new int[] { NONE, INPUT_ALL, OUTPUT_ALL, OPEN, OMNI }; SIDE_CONFIGS[TYPE].defaultSides = new byte[] { 1, 1, 2, 2, 2, 2 }; ALT_SIDE_CONFIGS[TYPE] = new SideConfig(); ALT_SIDE_CONFIGS[TYPE].numConfig = 2; ALT_SIDE_CONFIGS[TYPE].slotGroups = new int[][] { {}, {}, { 0 }, { 0 }, { 0 } }; ALT_SIDE_CONFIGS[TYPE].sideTypes = new int[] { NONE, OPEN }; ALT_SIDE_CONFIGS[TYPE].defaultSides = new byte[] { 1, 1, 1, 1, 1, 1 }; SLOT_CONFIGS[TYPE] = new SlotConfig(); SLOT_CONFIGS[TYPE].allowInsertionSlot = new boolean[] { false, false }; SLOT_CONFIGS[TYPE].allowExtractionSlot = new boolean[] { true, false }; VALID_AUGMENTS[TYPE] = new HashSet<>(); VALID_AUGMENTS[TYPE].add(TEProps.MACHINE_EXTRUDER_NO_WATER); VALID_AUGMENTS[TYPE].add(TEProps.MACHINE_EXTRUDER_SEDIMENTARY); LIGHT_VALUES[TYPE] = 14; GameRegistry.registerTileEntity(TileExtruder.class, "thermalexpansion:machine_extruder"); config(); }
public TileExtruder() { super(); inventory = new ItemStack[1 + 1]; Arrays.fill(inventory, ItemStack.EMPTY); createAllSlots(inventory.length); outputItem[0] = ExtruderManager.getOutput(index, augmentSedimentary); outputItem[1] = outputItem[0].copy(); hotTank.setLock(FluidRegistry.LAVA); coldTank.setLock(FluidRegistry.WATER); }
@Override protected void transferOutput() { if (!getTransferOut()) { return; } if (inventory[0].isEmpty()) { return; } int side; for (int i = outputTracker + 1; i <= outputTracker + 6; i++) { side = i % 6; if (isPrimaryOutput(sideConfig.sideTypes[sideCache[side]])) { if (transferItem(0, ITEM_TRANSFER[level], EnumFacing.VALUES[side])) { outputTracker = side; break; } } } }
@Override public void initGui() { super.initGui(); slotInputHot = addElement(new ElementSlotOverlay(this, 32, 19).setSlotInfo(SlotColor.BLUE, SlotType.TANK_SHORT, SlotRender.FULL)); slotInputCold = addElement(new ElementSlotOverlay(this, 56, 19).setSlotInfo(SlotColor.BLUE, SlotType.TANK_SHORT, SlotRender.FULL)); slotOutput = addElement(new ElementSlotOverlay(this, 130, 22).setSlotInfo(SlotColor.ORANGE, SlotType.OUTPUT, SlotRender.FULL)); if (!myTile.smallStorage()) { addElement(new ElementEnergyStored(this, 8, 8, myTile.getEnergyStorage())); } hotTank = (ElementFluidTank) addElement(new ElementFluidTank(this, 32, 19, myTile.getTank(0)).setAlwaysShow(true).setSmall()); coldTank = (ElementFluidTank) addElement(new ElementFluidTank(this, 56, 19, myTile.getTank(1)).setAlwaysShow(true).setSmall()); progressHot = (ElementFluid) addElement(new ElementFluid(this, 85, 26).setFluid(FluidRegistry.LAVA).setSize(24, 8)); progressCold = (ElementFluid) addElement(new ElementFluid(this, 85, 34).setFluid(FluidRegistry.WATER).setSize(24, 8)); progressOverlay = (ElementDualScaled) addElement(new ElementDualScaled(this, 85, 26).setMode(1).setBackground(false).setSize(24, 16).setTexture(TEX_DROP_RIGHT, 64, 16)); speed = (ElementDualScaled) addElement(new ElementDualScaled(this, 44, 53).setSize(16, 16).setTexture(TEX_COMPACT, 32, 16)); prevOutput = new ElementButton(this, 72, 54, "PrevOutput", 176, 0, 176, 14, 176, 28, 14, 14, TEX_PATH).setToolTipLocalized(true); nextOutput = new ElementButton(this, 108, 54, "NextOutput", 190, 0, 190, 14, 190, 28, 14, 14, TEX_PATH).setToolTipLocalized(true); addElement(prevOutput); addElement(nextOutput); }
public ContainerExtruder(InventoryPlayer inventory, TileEntity tile) { super(inventory, tile); myTile = (TileExtruder) tile; addSlotToContainer(new SlotRemoveOnly(myTile, 0, 134, 26)); addSlotToContainer(new SlotEnergy(myTile, myTile.getChargeSlot(), 8, 53)); /* Custom Inventory */ addSlotToContainer(new SlotCustomInventory(myTile, 0, null, 0, 89, 53, false)); }
return new TilePrecipitator(); case EXTRUDER: return new TileExtruder(); default: return null;