i need to finger the wall outlet with a fork

This commit is contained in:
Bob 2024-05-19 00:22:33 +02:00
parent e975a558ea
commit af53a9b09f
18 changed files with 6436 additions and 19 deletions

View File

@ -5,6 +5,7 @@
* Sellafite diamond ore now shreds into diamond gravel
* ICF vessel blocks now use half as much fullerite as before
* ICF capacitor and turbocharger blocks are now quite a bit cheaper
* Nerfed MEP, it only outputs 75% the heat it used to per outgoing flux and its self-ignition rate has been reduced from 20 flux to 2.5
## Fixed
* Fixed missing localization for meteorite ores and the new crucible materials

View File

@ -1,11 +1,14 @@
package com.hbm.blocks.machine;
import com.hbm.blocks.BlockDummyable;
import com.hbm.handler.MultiblockHandlerXR;
import com.hbm.tileentity.machine.TileEntityMachineArcFurnaceLarge;
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;
public class MachineArcFurnaceLarge extends BlockDummyable {
@ -15,16 +18,35 @@ public class MachineArcFurnaceLarge extends BlockDummyable {
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityMachineArcFurnaceLarge();
if(meta >= 12) return new TileEntityMachineArcFurnaceLarge();
return null;
}
@Override
public int[] getDimensions() {
return new int[] {0, 0, 0, 0, 0, 0};
return new int[] {4, 0, 2, 2, 2, 2};
}
@Override
public int getOffset() {
return 0;
return 2;
}
@Override
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
super.fillSpace(world, x, y, z, dir, o);
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o , y, z + dir.offsetZ * o, new int[] {4, 0, 3, -2, 1, 1}, this, dir);
}
@Override
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
if(!super.checkRequirement(world, x, y, z, dir, o)) return false;
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y, z + dir.offsetZ * o, new int[] {4, 0, 3, -2, 1, 1}, x, y, z, dir)) return false;
return true;
}
@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);
}
}

View File

@ -68,7 +68,7 @@ public class MachineGasFlare extends BlockDummyable implements ITooltipProvider
list.add(EnumChatFormatting.GOLD + "Vents up to " + EnumChatFormatting.RED + "50mB/t");
list.add("");
list.add(EnumChatFormatting.YELLOW + "Fuel efficiency:");
list.add(EnumChatFormatting.YELLOW + "-Flammable Gasses: " + EnumChatFormatting.RED + "50%");
list.add(EnumChatFormatting.YELLOW + "-Flammable Gasses: " + EnumChatFormatting.RED + "20%");
list.add(EnumChatFormatting.YELLOW + "-Flammable Liquids: " + EnumChatFormatting.RED + "10%");
}
}

View File

@ -54,7 +54,8 @@ public class MachineICF extends BlockDummyable {
@Override
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
if(!super.checkRequirement(world, x, y, z, dir, o)) return false;
//if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {4, -3, 1, 1, 1, 1}, x, y, z, dir)) return false;
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + 3, z + dir.offsetZ * o, new int[] {1, 1, -1, 2, 8, 8}, x, y, z, dir)) return false;
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + 3, z + dir.offsetZ * o, new int[] {1, 1, 2, -1, 8, 8}, x, y, z, dir)) return false;
return true;
}

View File

@ -0,0 +1,48 @@
package com.hbm.inventory.container;
import com.hbm.inventory.SlotNonRetarded;
import com.hbm.tileentity.machine.TileEntityMachineArcFurnaceLarge;
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 ContainerMachineArcFurnaceLarge extends Container {
private TileEntityMachineArcFurnaceLarge furnace;
public ContainerMachineArcFurnaceLarge(InventoryPlayer playerInv, TileEntityMachineArcFurnaceLarge tile) {
furnace = tile;
//Electrodes
for(int i = 0; i < 3; i++) this.addSlotToContainer(new SlotNonRetarded(tile, i, 62 + i * 18, 22));
//Battery
this.addSlotToContainer(new Slot(tile, 3, 8, 108));
//Upgrade
this.addSlotToContainer(new Slot(tile, 4, 152, 108));
//Inputs
for(int i = 0; i < 4; i++) for(int j = 0; j < 5; j++) this.addSlotToContainer(new Slot(tile, 5 + j + i * 5, 44 + j * 18, 54 + i * 18));
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(playerInv, j + i * 9 + 9, 8 + j * 18, 158 + i * 18));
}
}
for(int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(playerInv, i, 8 + i * 18, 216));
}
}
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
return null;
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return furnace.isUseableByPlayer(player);
}
}

View File

@ -0,0 +1,50 @@
package com.hbm.inventory.gui;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerMachineArcFurnaceLarge;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.TileEntityMachineArcFurnaceLarge;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUIMachineArcFurnaceLarge extends GuiInfoContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_arc_furnace.png");
private TileEntityMachineArcFurnaceLarge arc;
public GUIMachineArcFurnaceLarge(InventoryPlayer invPlayer, TileEntityMachineArcFurnaceLarge arc) {
super(new ContainerMachineArcFurnaceLarge(invPlayer, arc));
this.arc = arc;
this.xSize = 176;
this.ySize = 240;
}
@Override
public void drawScreen(int x, int y, float interp) {
super.drawScreen(x, y, interp);
this.drawElectricityInfo(this, x, y, guiLeft + 8, guiTop + 36, 7, 70, arc.getPower(), arc.getMaxPower());
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.arc.hasCustomInventoryName() ? this.arc.getInventoryName() : I18n.format(this.arc.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0xffffff);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float interp, int x, int y) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
int p = (int) (arc.power * 70 / arc.maxPower);
drawTexturedModalRect(guiLeft + 8, guiTop + 106 - p, 176, 70 - p, 7, p);
}
}

View File

@ -3644,8 +3644,9 @@ public class ModItems {
.setUnlocalizedName("rbmk_fuel_lep").setTextureName(RefStrings.MODID + ":rbmk_fuel_lep");
rbmk_fuel_mep = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_mep)
.setYield(100000000D)
.setStats(35, 20)
.setStats(35, 2.5)
.setFunction(EnumBurnFunc.SQUARE_ROOT)
.setHeat(0.75D)
.setMeltingPoint(2744)
.setUnlocalizedName("rbmk_fuel_mep").setTextureName(RefStrings.MODID + ":rbmk_fuel_mep");
rbmk_fuel_hep239 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hep239)

View File

@ -316,6 +316,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePumpSteam.class, new RenderPump());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePumpElectric.class, new RenderPump());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineArcWelder.class, new RenderArcWelder());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineArcFurnaceLarge.class, new RenderArcFurnace());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineWoodBurner.class, new RenderWoodBurner());
//Foundry
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryBasin.class, new RenderFoundry());

View File

@ -336,8 +336,6 @@ public class ModEventHandler {
@SubscribeEvent(priority = EventPriority.LOWEST)
public void onEntityDeathLast(LivingDeathEvent event) {
EntityLivingBase entity = event.entityLiving;
if(event.entityLiving instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) event.entityLiving;

View File

@ -154,16 +154,19 @@ public class ResourceManager {
public static final IModelCustom mixer = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/mixer.obj"));
//Arc Welder
public static final IModelCustom arc_welder = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/arc_welder.obj"));
public static final IModelCustom arc_welder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/arc_welder.obj"), false).asVBO();
//Arc Furnace
public static final IModelCustom arc_furnace = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/arc_furnace.obj")).asVBO();
//F6 TANKS
public static final IModelCustom tank = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/tank.obj"));
//Centrifuge
public static final IModelCustom centrifuge = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/centrifuge.obj"));
public static final IModelCustom gascent = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/gascent.obj"));
public static final IModelCustom silex = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/silex.obj"));
public static final IModelCustom fel = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/fel.obj"));
public static final IModelCustom centrifuge = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/centrifuge.obj")).asVBO();
public static final IModelCustom gascent = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/gascent.obj")).asVBO();
public static final IModelCustom silex = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/silex.obj")).asVBO();
public static final IModelCustom fel = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/fel.obj")).asVBO();
//Magnusson Device
public static final IModelCustom microwave = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/microwave.obj"));
@ -175,16 +178,16 @@ public class ResourceManager {
public static final IModelCustom mining_drill = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/mining_drill.obj")).asVBO();
//Laser Miner
public static final IModelCustom mining_laser = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/mining_laser.obj"));
public static final IModelCustom mining_laser = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/mining_laser.obj")).asVBO();
//Crystallizer
public static final IModelCustom crystallizer = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/crystallizer.obj"));
public static final IModelCustom crystallizer = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/crystallizer.obj")).asVBO();
//Cyclotron
public static final IModelCustom cyclotron = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/cyclotron.obj"));
public static final IModelCustom cyclotron = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/cyclotron.obj")).asVBO();
//Exposure Chamber
public static final IModelCustom exposure_chamber = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/exposure_chamber.obj"));
public static final IModelCustom exposure_chamber = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/exposure_chamber.obj")).asVBO();
//RTG
public static final IModelCustom rtg = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/rtg.obj"));
@ -193,7 +196,7 @@ public class ResourceManager {
public static final IModelCustom waste_drum = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/drum.obj"));
//Deuterium Tower
public static final IModelCustom deuterium_tower = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/machine_deuterium_tower.obj"));
public static final IModelCustom deuterium_tower = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/machine_deuterium_tower.obj")).asVBO();
//Dark Matter Core
public static final IModelCustom dfc_emitter = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/core_emitter.obj"));
@ -551,6 +554,9 @@ public class ResourceManager {
//Welder
public static final ResourceLocation arc_welder_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/arc_welder.png");
//Arc Furnace
public static final ResourceLocation arc_furnace_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/arc_furnace.png");
//F6 TANKS
public static final ResourceLocation uf6_tex = new ResourceLocation(RefStrings.MODID, "textures/models/UF6Tank.png");

View File

@ -0,0 +1,84 @@
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 com.hbm.tileentity.machine.TileEntityMachineArcFurnaceLarge;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.IItemRenderer;
public class RenderArcFurnace 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;
}
TileEntityMachineArcFurnaceLarge arc = (TileEntityMachineArcFurnaceLarge) tile;
float lift = arc.prevLid + (arc.lid - arc.prevLid) * interp;
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.arc_furnace_tex);
ResourceManager.arc_furnace.renderPart("Furnace");
GL11.glTranslated(0, 2 * lift, 0);
ResourceManager.arc_furnace.renderPart("Lid");
ResourceManager.arc_furnace.renderPart("Ring1");
ResourceManager.arc_furnace.renderPart("Ring2");
ResourceManager.arc_furnace.renderPart("Ring3");
ResourceManager.arc_furnace.renderPart("Electrode1");
ResourceManager.arc_furnace.renderPart("Electrode2");
ResourceManager.arc_furnace.renderPart("Electrode3");
ResourceManager.arc_furnace.renderPart("Cable1");
ResourceManager.arc_furnace.renderPart("Cable2");
ResourceManager.arc_furnace.renderPart("Cable3");
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
@Override
public Item getItemForRenderer() {
return Item.getItemFromBlock(ModBlocks.machine_arc_furnace);
}
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() {
GL11.glTranslated(0, -3, 0);
GL11.glScaled(3.5, 3.5, 3.5);
}
public void renderCommon() {
GL11.glScaled(0.5, 0.5, 0.5);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.arc_furnace_tex);
ResourceManager.arc_furnace.renderPart("Furnace");
ResourceManager.arc_furnace.renderPart("Lid");
ResourceManager.arc_furnace.renderPart("Ring1");
ResourceManager.arc_furnace.renderPart("Ring2");
ResourceManager.arc_furnace.renderPart("Ring3");
ResourceManager.arc_furnace.renderPart("Electrode1");
ResourceManager.arc_furnace.renderPart("Electrode2");
ResourceManager.arc_furnace.renderPart("Electrode3");
ResourceManager.arc_furnace.renderPart("Cable1");
ResourceManager.arc_furnace.renderPart("Cable2");
ResourceManager.arc_furnace.renderPart("Cable3");
GL11.glShadeModel(GL11.GL_FLAT);
}};
}
}

View File

@ -313,6 +313,7 @@ public class TileMappings {
put(TileEntityElectrolyser.class, "tileentity_electrolyser");
put(TileEntityMachineMixer.class, "tileentity_mixer");
put(TileEntityMachineArcWelder.class, "tileentity_arc_welder");
put(TileEntityMachineArcFurnace.class, "tileentity_arc_furnace");
put(TileEntitySteamEngine.class, "tileentity_steam_engine");
put(TileEntityMachineTurbine.class, "tileentity_turbine");

View File

@ -23,6 +23,7 @@ import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class TileEntityICFPress extends TileEntityMachineBase implements IFluidStandardReceiver, IGUIProvider {
@ -152,6 +153,22 @@ public class TileEntityICFPress extends TileEntityMachineBase implements IFluidS
public int[] getAccessibleSlotsFromSide(int side) {
return side == 0 || side == 1 ? topBottom : sides;
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
tanks[0].readFromNBT(nbt, "t0");
tanks[1].readFromNBT(nbt, "t1");
this.muon = nbt.getByte("muon");
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
tanks[0].writeToNBT(nbt, "t0");
tanks[1].writeToNBT(nbt, "t1");
nbt.setByte("muon", (byte) muon);
}
@Override
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {

View File

@ -3,10 +3,22 @@ package com.hbm.tileentity.machine;
import java.util.ArrayList;
import java.util.List;
import com.hbm.inventory.container.ContainerMachineArcFurnaceLarge;
import com.hbm.inventory.gui.GUIMachineArcFurnaceLarge;
import com.hbm.inventory.material.Mats.MaterialStack;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.TileEntityMachineBase;
public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase {
import api.hbm.energymk2.IEnergyReceiverMK2;
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.util.AxisAlignedBB;
import net.minecraft.world.World;
public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase implements IEnergyReceiverMK2, IGUIProvider {
public long power;
public static final long maxPower = 10_000_000;
@ -30,4 +42,55 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase {
public void updateEntity() {
}
@Override
public long getPower() {
return power;
}
@Override
public void setPower(long power) {
this.power = power;
}
@Override
public long getMaxPower() {
return maxPower;
}
AxisAlignedBB bb = null;
@Override
public AxisAlignedBB getRenderBoundingBox() {
if(bb == null) {
bb = AxisAlignedBB.getBoundingBox(
xCoord - 3,
yCoord,
zCoord - 3,
xCoord + 4,
yCoord + 6,
zCoord + 4
);
}
return bb;
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
return 65536.0D;
}
@Override
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new ContainerMachineArcFurnaceLarge(player.inventory, this);
}
@Override
@SideOnly(Side.CLIENT)
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIMachineArcFurnaceLarge(player.inventory, this);
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB