mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
nuclear blast furnace IO config
This commit is contained in:
parent
8944744142
commit
a28156065f
@ -8,11 +8,12 @@ credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion al
|
||||
\ (chinese localization), Frooz (models), Minecreep (models), VT-6/24 (models, textures), Pheo (textures,\
|
||||
\ various machines, models, weapons), Vær (gas centrifuges, better worldgen, ZIRNOX, CP-1 parts, starter guide),\
|
||||
\ Adam29 (liquid petroleum, ethanol, electric furnace), Pashtet (russian localization), MartinTheDragon\
|
||||
\ (calculator, chunk-based fallout, bendable cranes), haru315 (spiral point algorithm), Sten89 (models), Pixelguru26\
|
||||
\ (textures), TheBlueHat (textures), Alcater (GUI textures, porting), impbk2002 (project settings), Nos (models),\
|
||||
\ Burningwater202 (laminate glass), OvermindDL1 (project settings), TehTemmie (reacher radiation function),\
|
||||
\ Toshayo (satellite loot system, project settings, gradle curse task), Silly541 (config for safe ME drives),\
|
||||
\ Voxelstice (OpenComputers integration, turbine spinup), BallOfEnergy1 (OpenComputers integration), martemen\
|
||||
\ (project settings), Pvndols (thorium fuel recipe, gas turbine), JamesH2 (blood mechanics, nitric acid,\
|
||||
\ particle emitter), sdddddf80 (recipe configs, chinese localization, custom machine holograms),\
|
||||
\ SuperCraftAlex (tooltips) LePeep (coilgun model, BDCL QC), 70k (textures), Maksymisio (polish localization)
|
||||
\ (calculator, chunk-based fallout, bendable cranes, pipe improvements), haru315 (spiral point algorithm),\
|
||||
\ Sten89 (models), Pixelguru26 (textures), TheBlueHat (textures), Alcater (GUI textures, porting), impbk2002\
|
||||
\ (project settings), Nos (models), Burningwater202 (laminate glass), OvermindDL1 (project settings), TehTemmie\
|
||||
\ (reacher radiation function), Toshayo (satellite loot system, project settings, gradle curse task), Silly541\
|
||||
\ (config for safe ME drives), Voxelstice (OpenComputers integration, turbine spinup), BallOfEnergy1\
|
||||
\ (OpenComputers integration), martemen (project settings), Pvndols (thorium fuel recipe, gas turbine),\
|
||||
\ JamesH2 (blood mechanics, nitric acid, particle emitter), sdddddf80 (recipe configs, chinese localization,\
|
||||
\ custom machine holograms, I18n improvements), SuperCraftAlex (tooltips) LePeep (coilgun model, BDCL QC),\
|
||||
\ 70k (textures), Maksymisio (polish localization) Ice-Arrow (research reactor tweaks)
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.inventory.fluid.Fluids;
|
||||
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
|
||||
import com.hbm.items.ItemEnums.EnumPlantType;
|
||||
import com.hbm.items.ItemGenericPart.EnumPartType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemBattery;
|
||||
@ -88,6 +89,7 @@ public class ToolRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.euphemium_stopper, 1), new Object[] { "I", "S", "S", 'I', EUPH.ingot(), 'S', KEY_STICK });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.crowbar, 1), new Object[] { "II", " I", " I", 'I', STEEL.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bottle_opener, 1), new Object[] { "S", "P", 'S', STEEL.plate(), 'P', KEY_PLANKS });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(Items.saddle, 1), new Object[] { "LLL", "LRL", " S ", 'S', STEEL.ingot(), 'L', Items.leather, 'R', DictFrame.fromOne(ModItems.plant_item, EnumPlantType.ROPE) });
|
||||
|
||||
//Matches
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.matchstick, 16), new Object[] { "I", "S", 'I', S.dust(), 'S', KEY_STICK });
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.tileentity.IRadioisotopeFuel;
|
||||
import com.hbm.items.machine.ItemRTGPellet;
|
||||
import com.hbm.tileentity.machine.TileEntityDiFurnaceRTG;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -45,6 +45,25 @@ public class ContainerMachineDiFurnaceRTG extends Container {
|
||||
return bFurnace.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack slotClick(int index, int button, int mode, EntityPlayer player) {
|
||||
|
||||
if(index >= 0 && index < 2 && button == 1 && mode == 0) {
|
||||
Slot slot = this.getSlot(index);
|
||||
if(!slot.getHasStack() && player.inventory.getItemStack() == null) {
|
||||
if(!player.worldObj.isRemote) {
|
||||
if(index == 0) bFurnace.sideUpper = (byte) ((bFurnace.sideUpper + 1) % 6);
|
||||
if(index == 1) bFurnace.sideLower = (byte) ((bFurnace.sideLower + 1) % 6);
|
||||
|
||||
bFurnace.markDirty();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return super.slotClick(index, button, mode, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
ItemStack var3 = null;
|
||||
@ -58,7 +77,7 @@ public class ContainerMachineDiFurnaceRTG extends Container {
|
||||
if(!this.mergeItemStack(var5, 9, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else if(var5.getItem() instanceof IRadioisotopeFuel) {
|
||||
} else if(var5.getItem() instanceof ItemRTGPellet) {
|
||||
if(!this.mergeItemStack(var5, 3, 9, false))
|
||||
return null;
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@ -14,8 +15,11 @@ import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class GUIMachineDiFurnaceRTG extends GuiInfoContainer {
|
||||
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID, "textures/gui/processing/gui_rtg_difurnace.png");
|
||||
@ -47,6 +51,23 @@ public class GUIMachineDiFurnaceRTG extends GuiInfoContainer {
|
||||
}
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 15, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, pelletText);
|
||||
|
||||
if(this.mc.thePlayer.inventory.getItemStack() == null) {
|
||||
for(int i = 0; i < 2; i++) {
|
||||
Slot slot = (Slot) this.inventorySlots.inventorySlots.get(i);
|
||||
|
||||
if(this.isMouseOverSlot(slot, mouseX, mouseY)) {
|
||||
|
||||
String label = EnumChatFormatting.YELLOW + "Accepts items from: ";
|
||||
byte dir = i == 0 ? bFurnace.sideUpper : bFurnace.sideLower;
|
||||
label += ForgeDirection.getOrientation(dir);
|
||||
|
||||
this.func_146283_a(Arrays.asList(new String[] { label }), mouseX, mouseY - (slot.getHasStack() ? 15 : 0));
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,6 +4,7 @@ import com.hbm.blocks.machine.MachineDiFurnaceRTG;
|
||||
import com.hbm.inventory.container.ContainerMachineDiFurnaceRTG;
|
||||
import com.hbm.inventory.gui.GUIMachineDiFurnaceRTG;
|
||||
import com.hbm.inventory.recipes.BlastFurnaceRecipes;
|
||||
import com.hbm.items.machine.ItemRTGPellet;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.RTGUtil;
|
||||
@ -25,6 +26,8 @@ public class TileEntityDiFurnaceRTG extends TileEntityMachineBase implements IGU
|
||||
private static final short timeRequired = 1200;
|
||||
private static final int[] rtgIn = new int[] {3, 4, 5, 6, 7, 8};
|
||||
private String name;
|
||||
public byte sideUpper = 1;
|
||||
public byte sideLower = 1;
|
||||
|
||||
public TileEntityDiFurnaceRTG() {
|
||||
super(9);
|
||||
@ -70,6 +73,7 @@ public class TileEntityDiFurnaceRTG extends TileEntityMachineBase implements IGU
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setShort("progress", progress);
|
||||
data.setShort("speed", processSpeed);
|
||||
data.setByteArray("modes", new byte[] {(byte) sideUpper, (byte) sideLower});
|
||||
networkPack(data, 10);
|
||||
}
|
||||
|
||||
@ -77,6 +81,9 @@ public class TileEntityDiFurnaceRTG extends TileEntityMachineBase implements IGU
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
progress = nbt.getShort("progress");
|
||||
processSpeed = nbt.getShort("speed");
|
||||
byte[] modes = nbt.getByteArray("modes");
|
||||
this.sideUpper = modes[0];
|
||||
this.sideLower = modes[1];
|
||||
}
|
||||
|
||||
private void processItem() {
|
||||
@ -105,6 +112,10 @@ public class TileEntityDiFurnaceRTG extends TileEntityMachineBase implements IGU
|
||||
super.readFromNBT(nbt);
|
||||
progress = nbt.getShort("progress");
|
||||
processSpeed = nbt.getShort("speed");
|
||||
|
||||
byte[] modes = nbt.getByteArray("modes");
|
||||
this.sideUpper = modes[0];
|
||||
this.sideLower = modes[1];
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -112,6 +123,7 @@ public class TileEntityDiFurnaceRTG extends TileEntityMachineBase implements IGU
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setShort("progress", progress);
|
||||
nbt.setShort("speed", processSpeed);
|
||||
nbt.setByteArray("modes", new byte[] {(byte) sideUpper, (byte) sideLower});
|
||||
}
|
||||
|
||||
public int getDiFurnaceProgressScaled(int i) {
|
||||
@ -159,21 +171,33 @@ public class TileEntityDiFurnaceRTG extends TileEntityMachineBase implements IGU
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
|
||||
if(i == 0 && this.sideUpper != j) return false;
|
||||
if(i == 1 && this.sideLower != j) return false;
|
||||
|
||||
return this.isItemValidForSlot(i, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
if(i == 2) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
if(i == 2) return false;
|
||||
if(stack.getItem() instanceof ItemRTGPellet) return i > 2;
|
||||
return !(stack.getItem() instanceof ItemRTGPellet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == 0 ? new int[] {2} : side == 1 ? new int[] {0} : new int[] {1};
|
||||
return new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slot, ItemStack stack, int side) {
|
||||
|
||||
if(slot > 2) {
|
||||
return !(stack.getItem() instanceof ItemRTGPellet);
|
||||
}
|
||||
|
||||
return slot == 2;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user