mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
coker
This commit is contained in:
parent
628ae3fab6
commit
b276b0167f
@ -928,6 +928,7 @@ public class ModBlocks {
|
||||
public static Block fraction_spacer;
|
||||
public static Block machine_catalytic_cracker;
|
||||
public static Block machine_catalytic_reformer;
|
||||
public static Block machine_coker;
|
||||
|
||||
public static Block machine_boiler_off;
|
||||
public static Block machine_boiler_on;
|
||||
@ -2139,6 +2140,7 @@ public class ModBlocks {
|
||||
fraction_spacer = new FractionSpacer(Material.iron).setBlockName("fraction_spacer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_catalytic_cracker = new MachineCatalyticCracker(Material.iron).setBlockName("machine_catalytic_cracker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_catalytic_reformer = new MachineCatalyticReformer(Material.iron).setBlockName("machine_catalytic_reformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_coker = new MachineCoker(Material.iron).setBlockName("machine_coker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_autosaw = new MachineAutosaw().setBlockName("machine_autosaw").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_drill = new MachineMiningDrill(Material.iron).setBlockName("machine_drill").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_drill");
|
||||
machine_excavator = new MachineExcavator().setBlockName("machine_excavator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -3186,12 +3188,13 @@ public class ModBlocks {
|
||||
register(machine_flare);
|
||||
register(machine_refinery);
|
||||
register(machine_vacuum_distill);
|
||||
GameRegistry.registerBlock(machine_fraction_tower, machine_fraction_tower.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fraction_spacer, fraction_spacer.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_catalytic_cracker, machine_catalytic_cracker.getUnlocalizedName());
|
||||
register(machine_fraction_tower);
|
||||
register(fraction_spacer);
|
||||
register(machine_catalytic_cracker);
|
||||
register(machine_catalytic_reformer);
|
||||
GameRegistry.registerBlock(machine_drill, machine_drill.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_autosaw, machine_autosaw.getUnlocalizedName());
|
||||
register(machine_coker);
|
||||
register(machine_drill);
|
||||
register(machine_autosaw);
|
||||
register(machine_excavator);
|
||||
register(machine_mining_laser);
|
||||
register(barricade);
|
||||
|
||||
39
src/main/java/com/hbm/blocks/machine/MachineCoker.java
Normal file
39
src/main/java/com/hbm/blocks/machine/MachineCoker.java
Normal file
@ -0,0 +1,39 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineCoker;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineCoker extends BlockDummyable {
|
||||
|
||||
public MachineCoker(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= 12) return new TileEntityMachineCoker();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return standardOpenBehavior(world, x, y, z, player, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {4, 0, 2, 2, 2, 2};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@ -136,6 +136,9 @@ public class RodRecipes {
|
||||
addPellet(PB, EnumWatzType.LEAD);
|
||||
addPellet(B, EnumWatzType.BORON);
|
||||
addPellet(U238, EnumWatzType.DU);
|
||||
}
|
||||
|
||||
public static void registerInit() {
|
||||
/* GT6 */
|
||||
if(OreDictionary.doesOreNameExist("ingotNaquadah-Enriched")) addPellet(new DictFrame("Naquadah-Enriched"), EnumWatzType.NQD);
|
||||
if(OreDictionary.doesOreNameExist("ingotNaquadria")) addPellet(new DictFrame("Naquadria"), EnumWatzType.NQR);
|
||||
|
||||
@ -9,7 +9,6 @@ import api.hbm.energy.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@ -55,11 +54,6 @@ public class ContainerMachineCatalyticReformer extends Container {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
ItemStack var3 = null;
|
||||
|
||||
@ -0,0 +1,73 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineCoker;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerMachineCoker extends Container {
|
||||
|
||||
private TileEntityMachineCoker coker;
|
||||
|
||||
public ContainerMachineCoker(InventoryPlayer invPlayer, TileEntityMachineCoker tedf) {
|
||||
|
||||
coker = tedf;
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 35, 72));
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 1, 97, 27));
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 122 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 180));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if(var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if(par2 <= 1) {
|
||||
if(!this.mergeItemStack(var5, 2, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(var3.getItem() instanceof IItemFluidIdentifier) {
|
||||
if(!this.mergeItemStack(var5, 0, 1, false)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if(var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return coker.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
52
src/main/java/com/hbm/inventory/gui/GUIMachineCoker.java
Normal file
52
src/main/java/com/hbm/inventory/gui/GUIMachineCoker.java
Normal file
@ -0,0 +1,52 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMachineCoker;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineCoker;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachineCoker extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_coker.png");
|
||||
private TileEntityMachineCoker refinery;
|
||||
|
||||
public GUIMachineCoker(InventoryPlayer invPlayer, TileEntityMachineCoker tedf) {
|
||||
super(new ContainerMachineCoker(invPlayer, tedf));
|
||||
refinery = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 204;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
refinery.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 35, guiTop + 18, 16, 52);
|
||||
refinery.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 125, guiTop + 18, 16, 52);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.refinery.hasCustomInventoryName() ? this.refinery.getInventoryName() : I18n.format(this.refinery.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0xC7C1A3);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
refinery.tanks[0].renderTank(guiLeft + 35, guiTop + 70, this.zLevel, 16, 52);
|
||||
refinery.tanks[1].renderTank(guiLeft + 125, guiTop + 70, this.zLevel, 16, 52);
|
||||
}
|
||||
}
|
||||
@ -135,7 +135,7 @@ public class ItemWatzPellet extends ItemEnumMulti {
|
||||
|
||||
if(num.passive > 0){
|
||||
list.add(color + "Base fission rate: " + reset + num.passive);
|
||||
list.add(EnumChatFormatting.RED + "Self-ingiting!");
|
||||
list.add(EnumChatFormatting.RED + "Self-igniting!");
|
||||
}
|
||||
if(num.heatEmission > 0) list.add(color + "Heat per flux: " + reset + num.heatEmission + " TU");
|
||||
if(num.burnFunc != null) {
|
||||
|
||||
@ -49,6 +49,7 @@ import com.hbm.blocks.generic.BlockMotherOfAllOres;
|
||||
import com.hbm.blocks.generic.BlockToolConversion;
|
||||
import com.hbm.commands.CommandReloadRecipes;
|
||||
import com.hbm.config.*;
|
||||
import com.hbm.crafting.RodRecipes;
|
||||
import com.hbm.creativetabs.*;
|
||||
import com.hbm.entity.EntityMappings;
|
||||
import com.hbm.entity.grenade.*;
|
||||
@ -637,6 +638,8 @@ public class MainRegistry {
|
||||
|
||||
@EventHandler
|
||||
public static void load(FMLInitializationEvent event) {
|
||||
|
||||
RodRecipes.registerInit();
|
||||
|
||||
achSacrifice = new Achievement("achievement.sacrifice", "sacrifice", -3, 1, ModItems.burnt_bark, null).initIndependentStat().setSpecial().registerStat();
|
||||
achImpossible = new Achievement("achievement.impossible", "impossible", 18, 10, ModItems.nothing, null).initIndependentStat().setSpecial().registerStat();
|
||||
|
||||
@ -0,0 +1,64 @@
|
||||
package com.hbm.tileentity.machine.oil;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMachineCoker;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.gui.GUIMachineCoker;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachineCoker extends TileEntityMachineBase implements IFluidStandardTransceiver, IGUIProvider {
|
||||
|
||||
public FluidTank[] tanks;
|
||||
|
||||
public TileEntityMachineCoker() {
|
||||
super(1);
|
||||
tanks = new FluidTank[2];
|
||||
tanks[0] = new FluidTank(Fluids.HEAVYOIL, 16_000);
|
||||
tanks[1] = new FluidTank(Fluids.GAS, 8_000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.machineCoker";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getAllTanks() {
|
||||
return tanks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getSendingTanks() {
|
||||
return new FluidTank[] { tanks[1] };
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTank[] getReceivingTanks() {
|
||||
return new FluidTank[] { tanks[0] };
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerMachineCoker(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineCoker(player.inventory, this);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
Loading…
x
Reference in New Issue
Block a user