mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
gooey
This commit is contained in:
parent
ec2468bb18
commit
696bef065e
@ -21,9 +21,13 @@
|
||||
* The treasure now consists of mainly some rarer earlygame ingots, circuits, some gear, a small selection of armor mods and alexandrite (rare)
|
||||
* Schraranium processing now yields neptunium as a byproduct instead of plutonium, making neptunium easier to automate outside of the cyclotron
|
||||
* Using the guide book now opens a link to the new wiki
|
||||
* Certain earlygame things can now be recycled like stirling engines and gears
|
||||
* Antenna part recycling has been moved to the anvil
|
||||
* NTM's pickaxes now have a break speed bonus for glass
|
||||
|
||||
## Fixed
|
||||
* Fixed DFC receivers not outputting power
|
||||
* Fixed the custom machine NEI handlers not working
|
||||
* Fixed a potential crash caused by invalid assembly templates
|
||||
* Fixed general weirdness with the schrabidium transmutator item IO
|
||||
* Fixed general weirdness with the schrabidium transmutator item IO
|
||||
* Fixed certain tooltips using the backslash escape character despite not needing them
|
||||
@ -4,6 +4,7 @@ import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.machine.TileEntityICF;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -28,4 +29,9 @@ public class MachineICF extends BlockDummyable {
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
|
||||
38
src/main/java/com/hbm/inventory/container/ContainerICF.java
Normal file
38
src/main/java/com/hbm/inventory/container/ContainerICF.java
Normal file
@ -0,0 +1,38 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntityICF;
|
||||
|
||||
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 ContainerICF extends Container {
|
||||
|
||||
protected TileEntityICF icf;
|
||||
|
||||
public ContainerICF(InventoryPlayer invPlayer, TileEntityICF tedf) {
|
||||
this.icf = tedf;
|
||||
|
||||
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, 147 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 205));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
return null; //TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return icf.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
36
src/main/java/com/hbm/inventory/gui/GUIICF.java
Normal file
36
src/main/java/com/hbm/inventory/gui/GUIICF.java
Normal file
@ -0,0 +1,36 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import com.hbm.inventory.container.ContainerICF;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityICF;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIICF extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/reactors/gui_icf.png");
|
||||
private TileEntityICF icf;
|
||||
|
||||
public GUIICF(InventoryPlayer invPlayer, TileEntityICF icf) {
|
||||
super(new ContainerICF(invPlayer, icf));
|
||||
this.icf = icf;
|
||||
|
||||
this.xSize = 248;
|
||||
this.ySize = 222;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.icf.hasCustomInventoryName() ? this.icf.getInventoryName() : I18n.format(this.icf.getInventoryName());
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 93, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float interp, int x, int y) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
}
|
||||
}
|
||||
@ -1,12 +1,19 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.inventory.container.ContainerICF;
|
||||
import com.hbm.inventory.gui.GUIICF;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
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 TileEntityICF extends TileEntityMachineBase {
|
||||
public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider {
|
||||
|
||||
public TileEntityICF() {
|
||||
super(12);
|
||||
@ -46,4 +53,15 @@ public class TileEntityICF extends TileEntityMachineBase {
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerICF(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIICF(player.inventory, this);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user