Made destructopack work
Missed two files...
This commit is contained in:
parent
8a2119d5d2
commit
600293b0e8
2 changed files with 22 additions and 1 deletions
|
@ -11,6 +11,7 @@ import techreborn.client.container.ContainerBlastFurnace;
|
|||
import techreborn.client.container.ContainerCentrifuge;
|
||||
import techreborn.client.container.ContainerChemicalReactor;
|
||||
import techreborn.client.container.ContainerChunkloader;
|
||||
import techreborn.client.container.ContainerDestructoPack;
|
||||
import techreborn.client.container.ContainerDieselGenerator;
|
||||
import techreborn.client.container.ContainerGrinder;
|
||||
import techreborn.client.container.ContainerImplosionCompressor;
|
||||
|
@ -34,6 +35,7 @@ import techreborn.client.gui.GuiBlastFurnace;
|
|||
import techreborn.client.gui.GuiCentrifuge;
|
||||
import techreborn.client.gui.GuiChemicalReactor;
|
||||
import techreborn.client.gui.GuiChunkLoader;
|
||||
import techreborn.client.gui.GuiDestructoPack;
|
||||
import techreborn.client.gui.GuiDieselGenerator;
|
||||
import techreborn.client.gui.GuiGrinder;
|
||||
import techreborn.client.gui.GuiImplosionCompressor;
|
||||
|
@ -79,7 +81,8 @@ public class GuiHandler implements IGuiHandler {
|
|||
public static final int semifluidGeneratorID = 21;
|
||||
public static final int gasTurbineID = 22;
|
||||
public static final int digitalChestID = 23;
|
||||
|
||||
public static final int destructoPackID = 25;
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world,
|
||||
int x, int y, int z)
|
||||
|
@ -179,6 +182,8 @@ public class GuiHandler implements IGuiHandler {
|
|||
} else if (ID == pdaID)
|
||||
{
|
||||
return null;
|
||||
} else if (ID == destructoPackID) {
|
||||
return new ContainerDestructoPack(player);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -283,6 +288,8 @@ public class GuiHandler implements IGuiHandler {
|
|||
} else if (ID == pdaID)
|
||||
{
|
||||
return new GuiPda(player);
|
||||
} else if (ID == destructoPackID) {
|
||||
return new GuiDestructoPack(new ContainerDestructoPack(player));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -4,9 +4,13 @@ import java.util.List;
|
|||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModItems;
|
||||
|
||||
|
@ -95,4 +99,14 @@ public class ItemParts extends Item {
|
|||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {
|
||||
switch (itemStack.getItemDamage()) {
|
||||
case 37: // Destructo pack
|
||||
player.openGui(Core.INSTANCE, GuiHandler.destructoPackID, world,
|
||||
(int) player.posX, (int) player.posY, (int) player.posY);
|
||||
break;
|
||||
}
|
||||
return itemStack;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue