mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
big chungus for playstation 3
This commit is contained in:
parent
b5fb8ae5be
commit
0c0a3c952b
@ -3,6 +3,7 @@
|
||||
* Like boxducts, but for power
|
||||
|
||||
## Changed
|
||||
* Updated chinese localization
|
||||
* Updated meteors
|
||||
* Meteors will now punch through weak blocks like leaves instead of getting stuck on trees
|
||||
* Meteor impacts now have new visuals
|
||||
@ -45,6 +46,7 @@
|
||||
* In their place, there's now a different, more useful structure with similar but not identical spawn rules
|
||||
* ROR controller torches can now set the threshold of particle accelerator dipoles
|
||||
* Removed the legacy recipes from the terra drills
|
||||
* Slag can now be cast into ingots
|
||||
|
||||
## Fixed
|
||||
* Fixed arc furnace only allowing electrodes to be inserted when the lid is down instead of up
|
||||
|
||||
@ -8,7 +8,9 @@ import com.hbm.blocks.generic.*;
|
||||
import com.hbm.blocks.generic.BlockHazard.ExtDisplayEffect;
|
||||
import com.hbm.blocks.machine.*;
|
||||
import com.hbm.blocks.machine.albion.*;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionBoiler;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionBreeder;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionCollector;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionKlystron;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionTorus;
|
||||
import com.hbm.blocks.machine.pile.*;
|
||||
@ -2061,6 +2063,8 @@ public class ModBlocks {
|
||||
fusion_torus = new MachineFusionTorus().setBlockName("fusion_torus").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
fusion_klystron = new MachineFusionKlystron().setBlockName("fusion_klystron").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
fusion_breeder = new MachineFusionBreeder().setBlockName("fusion_breeder").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
fusion_collector = new MachineFusionCollector().setBlockName("fusion_collector").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
fusion_boiler = new MachineFusionBoiler().setBlockName("fusion_boiler").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
machine_icf_press = new MachineICFPress().setBlockName("machine_icf_press").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
icf = new MachineICF().setBlockName("icf").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -3448,6 +3452,8 @@ public class ModBlocks {
|
||||
register(fusion_torus);
|
||||
register(fusion_klystron);
|
||||
register(fusion_breeder);
|
||||
register(fusion_collector);
|
||||
register(fusion_boiler);
|
||||
|
||||
register(watz_element);
|
||||
register(watz_cooler);
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
package com.hbm.blocks.machine.fusion;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.fusion.TileEntityFusionBoiler;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineFusionBoiler extends BlockDummyable {
|
||||
|
||||
public MachineFusionBoiler() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityFusionBoiler();
|
||||
if(meta >= 6) return new TileEntityProxyCombo().power().fluid();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] { 3, 0, 4, 4, 1, 1 };
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
return super.checkRequirement(world, x, y, z, dir, o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.hbm.blocks.machine.fusion;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.fusion.TileEntityFusionCollector;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineFusionCollector extends BlockDummyable {
|
||||
|
||||
public MachineFusionCollector() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityFusionCollector();
|
||||
if(meta >= 6) return new TileEntityProxyCombo().power().fluid();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] { 3, 0, 2, 1, 2, 2 };
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
return super.checkRequirement(world, x, y, z, dir, o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,7 @@ import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.fusion.TileEntityFusionTorus;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@ -77,6 +78,11 @@ public class MachineFusionTorus extends BlockDummyable {
|
||||
|
||||
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 super.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.items.special.ItemByproduct.EnumByproduct;
|
||||
import com.hbm.main.CraftingManager;
|
||||
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
import static com.hbm.inventory.material.Mats.*;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
@ -54,6 +55,8 @@ public class MineralRecipes {
|
||||
add1To9Pair(ModBlocks.block_tcalloy, ModItems.ingot_tcalloy);
|
||||
add1To9Pair(ModBlocks.block_cdalloy, ModItems.ingot_cdalloy);
|
||||
|
||||
add1To9Pair(new ItemStack(ModBlocks.block_slag), new ItemStack(ModItems.ingot_raw, 9, MAT_SLAG.id));
|
||||
|
||||
for(int i = 0; i < EnumCokeType.values().length; i++) {
|
||||
add1To9PairSameMeta(Item.getItemFromBlock(ModBlocks.block_coke), ModItems.coke, i);
|
||||
}
|
||||
@ -479,6 +482,11 @@ public class MineralRecipes {
|
||||
add1To9(new ItemStack(one), new ItemStack(nine, 9));
|
||||
add9To1(new ItemStack(nine), new ItemStack(one));
|
||||
}
|
||||
|
||||
public static void add1To9Pair(ItemStack one, ItemStack nine) {
|
||||
add1To9(one, nine);
|
||||
add9To1(nine, one);
|
||||
}
|
||||
|
||||
public static void add1To9PairSameMeta(Item one, Item nine, int meta) {
|
||||
add1To9SameMeta(one, nine, meta);
|
||||
|
||||
@ -0,0 +1,72 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotNonRetarded;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.machine.fusion.TileEntityFusionTorus;
|
||||
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
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 ContainerFusionTorus extends Container {
|
||||
|
||||
protected TileEntityFusionTorus torus;
|
||||
|
||||
public ContainerFusionTorus(InventoryPlayer invPlayer, TileEntityFusionTorus tedf) {
|
||||
this.torus = tedf;
|
||||
|
||||
this.addSlotToContainer(new SlotNonRetarded(torus, 0, 8, 82));
|
||||
this.addSlotToContainer(new SlotNonRetarded(torus, 1, 71, 81));
|
||||
this.addSlotToContainer(new SlotNonRetarded(torus, 2, 130, 36));
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 35 + j * 18, 162 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 35 + i * 18, 220));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return torus.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
ItemStack copy = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(index);
|
||||
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack stack = slot.getStack();
|
||||
copy = stack.copy();
|
||||
|
||||
if(index <= 2) {
|
||||
if(!this.mergeItemStack(stack, 3, this.inventorySlots.size(), true)) return null;
|
||||
} else {
|
||||
|
||||
if(copy.getItem() == ModItems.blueprints) {
|
||||
if(!this.mergeItemStack(stack, 1, 2, false)) return null;
|
||||
} else if(copy.getItem() instanceof IBatteryItem || copy.getItem() == ModItems.battery_creative) {
|
||||
if(!this.mergeItemStack(stack, 0, 1, false)) return null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if(stack.stackSize == 0) {
|
||||
slot.putStack((ItemStack) null);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return copy;
|
||||
}
|
||||
}
|
||||
78
src/main/java/com/hbm/inventory/gui/GUIFusionTorus.java
Normal file
78
src/main/java/com/hbm/inventory/gui/GUIFusionTorus.java
Normal file
@ -0,0 +1,78 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import com.hbm.inventory.container.ContainerFusionTorus;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.util.GaugeUtil;
|
||||
import com.hbm.tileentity.machine.fusion.TileEntityFusionTorus;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIFusionTorus extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/reactors/gui_fusion_torus.png");
|
||||
private TileEntityFusionTorus torus;
|
||||
|
||||
public GUIFusionTorus(InventoryPlayer invPlayer, TileEntityFusionTorus torus) {
|
||||
super(new ContainerFusionTorus(invPlayer, torus));
|
||||
this.torus = torus;
|
||||
|
||||
this.xSize = 230;
|
||||
this.ySize = 244;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int x, int y, float interp) {
|
||||
super.drawScreen(x, y, interp);
|
||||
|
||||
torus.tanks[0].renderTankInfo(this, x, y, guiLeft + 188, guiTop + 46, 16, 52);
|
||||
torus.tanks[1].renderTankInfo(this, x, y, guiLeft + 206, guiTop + 46, 16, 52);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.torus.hasCustomInventoryName() ? this.torus.getInventoryName() : I18n.format(this.torus.getInventoryName());
|
||||
this.fontRendererObj.drawString(name, 106 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 35, this.ySize - 93, 4210752);
|
||||
|
||||
this.fontRendererObj.drawString(EnumChatFormatting.AQUA + "/123K", 136 + 54, 32, 4210752);
|
||||
int heat = (int) Math.ceil(300);
|
||||
String label = (heat > 123 ? EnumChatFormatting.RED : EnumChatFormatting.AQUA) + "" + heat + "K";
|
||||
this.fontRendererObj.drawString(label, 166 + 54 - this.fontRendererObj.getStringWidth(label), 22, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float interp, int x, int y) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
// power LED
|
||||
drawTexturedModalRect(guiLeft + 160, guiTop + 115, 246, 14, 8, 8);
|
||||
// coolant LED
|
||||
drawTexturedModalRect(guiLeft + 170, guiTop + 115, 246, 14, 8, 8);
|
||||
// plasma LED
|
||||
drawTexturedModalRect(guiLeft + 180, guiTop + 115, 246, 14, 8, 8);
|
||||
|
||||
// recipe LED
|
||||
drawTexturedModalRect(guiLeft + 87, guiTop + 76, 249, 0, 3, 6);
|
||||
// progress LED
|
||||
drawTexturedModalRect(guiLeft + 92, guiTop + 76, 249, 0, 3, 6);
|
||||
|
||||
double gauge = BobMathUtil.sps((Minecraft.getMinecraft().theWorld.getTotalWorldTime() + interp) * 0.25) / 2 + 0.5D;
|
||||
|
||||
// input energy
|
||||
GaugeUtil.drawSmoothGauge(guiLeft + 52, guiTop + 124, this.zLevel, gauge, 5, 2, 1, 0xA00000);
|
||||
// output genergy
|
||||
GaugeUtil.drawSmoothGauge(guiLeft + 88, guiTop + 124, this.zLevel, gauge, 5, 2, 1, 0xA00000);
|
||||
// fuel consumption
|
||||
GaugeUtil.drawSmoothGauge(guiLeft + 124, guiTop + 124, this.zLevel, gauge, 5, 2, 1, 0xA00000);
|
||||
|
||||
// coolant
|
||||
torus.tanks[0].renderTank(guiLeft + 188, guiTop + 98, this.zLevel, 16, 52);
|
||||
torus.tanks[1].renderTank(guiLeft + 206, guiTop + 98, this.zLevel, 16, 52);
|
||||
}
|
||||
}
|
||||
@ -428,6 +428,8 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFusionTorus.class, new RenderFusionTorus());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFusionKlystron.class, new RenderFusionKlystron());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFusionBreeder.class, new RenderFusionBreeder());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFusionCollector.class, new RenderFusionCollector());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFusionBoiler.class, new RenderFusionBoiler());
|
||||
//Watz
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatz.class, new RenderWatz());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatzPump.class, new RenderWatzPump());
|
||||
|
||||
@ -251,6 +251,8 @@ public class ResourceManager {
|
||||
public static final IModelCustom fusion_torus = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/fusion/torus.obj")).asVBO();
|
||||
public static final IModelCustom fusion_klystron = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/fusion/klystron.obj")).asVBO();
|
||||
public static final IModelCustom fusion_breeder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/fusion/breeder.obj")).asVBO();
|
||||
public static final IModelCustom fusion_collector = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/fusion/collector.obj")).asVBO();
|
||||
public static final IModelCustom fusion_boiler = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/fusion/boiler.obj")).asVBO();
|
||||
|
||||
//ICF
|
||||
public static final IModelCustom icf = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/reactors/icf.obj")).asVBO();
|
||||
@ -704,6 +706,8 @@ public class ResourceManager {
|
||||
public static final ResourceLocation fusion_torus_tex = new ResourceLocation(RefStrings.MODID, "textures/models/fusion/torus.png");
|
||||
public static final ResourceLocation fusion_klystron_tex = new ResourceLocation(RefStrings.MODID, "textures/models/fusion/klystron.png");
|
||||
public static final ResourceLocation fusion_breeder_tex = new ResourceLocation(RefStrings.MODID, "textures/models/fusion/breeder.png");
|
||||
public static final ResourceLocation fusion_collector_tex = new ResourceLocation(RefStrings.MODID, "textures/models/fusion/collector.png");
|
||||
public static final ResourceLocation fusion_boiler_tex = new ResourceLocation(RefStrings.MODID, "textures/models/fusion/boiler.png");
|
||||
|
||||
//ICF
|
||||
public static final ResourceLocation icf_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/icf.png");
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderFusionBoiler extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tile.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.fusion_boiler_tex);
|
||||
ResourceManager.fusion_boiler.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.fusion_boiler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
GL11.glScaled(3.5, 3.5, 3.5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.fusion_boiler_tex);
|
||||
ResourceManager.fusion_boiler.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}};
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderFusionCollector extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tile.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.fusion_collector_tex);
|
||||
ResourceManager.fusion_collector.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.fusion_collector);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
GL11.glScaled(5, 5, 5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.fusion_collector_tex);
|
||||
ResourceManager.fusion_collector.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}};
|
||||
}
|
||||
}
|
||||
@ -417,6 +417,8 @@ public class TileMappings {
|
||||
put(TileEntityFusionTorus.class, "tileentity_fusion_torus");
|
||||
put(TileEntityFusionKlystron.class, "tileentity_fusion_klystron");
|
||||
put(TileEntityFusionBreeder.class, "tileentity_fusion_breeder");
|
||||
put(TileEntityFusionCollector.class, "tileentity_fusion_collector");
|
||||
put(TileEntityFusionBoiler.class, "tileentity_fusion_boiler");
|
||||
}
|
||||
|
||||
private static void putNetwork() {
|
||||
|
||||
@ -7,11 +7,11 @@ import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.fluidmk2.IFluidStandardTransceiverMK2;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public abstract class TileEntityCooledBase extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiver {
|
||||
public abstract class TileEntityCooledBase extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiverMK2 {
|
||||
|
||||
public FluidTank[] tanks;
|
||||
|
||||
@ -39,7 +39,7 @@ public abstract class TileEntityCooledBase extends TileEntityMachineBase impleme
|
||||
for(DirPos pos : this.getConPos()) {
|
||||
this.trySubscribe(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
this.trySubscribe(tanks[0].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
this.sendFluid(tanks[1], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
this.tryProvide(tanks[1], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
|
||||
this.temperature += this.temp_passive_heating;
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
package com.hbm.tileentity.machine.fusion;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityFusionBoiler extends TileEntity {
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 4,
|
||||
yCoord,
|
||||
zCoord - 4,
|
||||
xCoord + 5,
|
||||
yCoord + 4,
|
||||
zCoord + 5
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
@ -14,12 +14,12 @@ public class TileEntityFusionBreeder extends TileEntity {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 4,
|
||||
xCoord - 2,
|
||||
yCoord,
|
||||
zCoord - 4,
|
||||
xCoord + 5,
|
||||
yCoord + 5,
|
||||
zCoord + 5
|
||||
zCoord - 2,
|
||||
xCoord + 3,
|
||||
yCoord + 4,
|
||||
zCoord + 3
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
package com.hbm.tileentity.machine.fusion;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityFusionCollector extends TileEntity {
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 2,
|
||||
yCoord,
|
||||
zCoord - 2,
|
||||
xCoord + 3,
|
||||
yCoord + 4,
|
||||
zCoord + 3
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
@ -1,13 +1,19 @@
|
||||
package com.hbm.tileentity.machine.fusion;
|
||||
|
||||
import com.hbm.inventory.container.ContainerFusionTorus;
|
||||
import com.hbm.inventory.gui.GUIFusionTorus;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityCooledBase;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityFusionTorus extends TileEntityCooledBase {
|
||||
public class TileEntityFusionTorus extends TileEntityCooledBase implements IGUIProvider {
|
||||
|
||||
public TileEntityFusionTorus() {
|
||||
super(3);
|
||||
@ -57,4 +63,14 @@ public class TileEntityFusionTorus extends TileEntityCooledBase {
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerFusionTorus(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIFusionTorus(player.inventory, this);
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.8 KiB |
Loading…
x
Reference in New Issue
Block a user