Moved items into content
This commit is contained in:
parent
bf7f7ba871
commit
9f9595f955
40 changed files with 519 additions and 582 deletions
|
@ -29,7 +29,7 @@ import net.minecraft.inventory.EntityEquipmentSlot;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import techreborn.init.TRItems;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class ClientEventHandler {
|
||||
|
||||
|
@ -38,7 +38,7 @@ public class ClientEventHandler {
|
|||
EntityPlayer player = event.getEntityPlayer();
|
||||
Item chestslot = !player.getItemStackFromSlot(EntityEquipmentSlot.CHEST).isEmpty()
|
||||
? player.getItemStackFromSlot(EntityEquipmentSlot.CHEST).getItem() : null;
|
||||
if (chestslot != null && chestslot == TRItems.CLOAKING_DEVICE) {
|
||||
if (chestslot != null && chestslot == TRContent.CLOAKING_DEVICE) {
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ import techreborn.TechReborn;
|
|||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.init.TRBlocks;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.init.TRItems;
|
||||
|
||||
public class RegisterItemJsons {
|
||||
public static void registerModels() {
|
||||
|
@ -44,80 +43,80 @@ public class RegisterItemJsons {
|
|||
|
||||
private static void registerItems() {
|
||||
// Armor
|
||||
register(TRItems.CLOAKING_DEVICE, "armor/cloaking_device");
|
||||
register(TRItems.LAPOTRONIC_ORBPACK, "armor/lapotronic_orbpack");
|
||||
register(TRItems.LITHIUM_ION_BATPACK, "armor/lithium_batpack");
|
||||
register(TRContent.CLOAKING_DEVICE, "armor/cloaking_device");
|
||||
register(TRContent.LAPOTRONIC_ORBPACK, "armor/lapotronic_orbpack");
|
||||
register(TRContent.LITHIUM_ION_BATPACK, "armor/lithium_batpack");
|
||||
|
||||
// Battery
|
||||
register(TRItems.RED_CELL_BATTERY, "battery/re_battery");
|
||||
register(TRItems.LITHIUM_ION_BATTERY, "battery/lithium_battery");
|
||||
register(TRItems.ENERGY_CRYSTAL, "battery/energy_crystal");
|
||||
register(TRItems.LAPOTRON_CRYSTAL, "battery/lapotron_crystal");
|
||||
register(TRItems.LAPOTRONIC_ORB, "battery/lapotronic_orb");
|
||||
register(TRContent.RED_CELL_BATTERY, "battery/re_battery");
|
||||
register(TRContent.LITHIUM_ION_BATTERY, "battery/lithium_battery");
|
||||
register(TRContent.ENERGY_CRYSTAL, "battery/energy_crystal");
|
||||
register(TRContent.LAPOTRON_CRYSTAL, "battery/lapotron_crystal");
|
||||
register(TRContent.LAPOTRONIC_ORB, "battery/lapotronic_orb");
|
||||
|
||||
// Tools
|
||||
register(TRItems.INDUSTRIAL_CHAINSAW, "tool/industrial_chainsaw");
|
||||
register(TRItems.INDUSTRIAL_DRILL, "tool/industrial_drill");
|
||||
register(TRItems.INDUSTRIAL_JACKHAMMER, "tool/industrial_jackhammer");
|
||||
register(TRItems.DEBUG_TOOL, "tool/debug");
|
||||
register(TRItems.ADVANCED_CHAINSAW, "tool/advanced_chainsaw");
|
||||
register(TRItems.ADVANCED_DRILL, "tool/advanced_drill");
|
||||
register(TRItems.ADVANCED_JACKHAMMER, "tool/advanced_jackhammer");
|
||||
register(TRItems.ELECTRIC_TREE_TAP, "tool/electric_treetap");
|
||||
register(TRItems.NANOSABER, "tool/nanosaber");
|
||||
register(TRItems.OMNI_TOOL, "tool/omni_tool");
|
||||
register(TRItems.ROCK_CUTTER, "tool/rock_cutter");
|
||||
register(TRItems.BASIC_CHAINSAW, "tool/basic_chainsaw");
|
||||
register(TRItems.BASIC_DRILL, "tool/basic_drill");
|
||||
register(TRItems.BASIC_JACKHAMMER, "tool/basic_jackhammer");
|
||||
register(TRItems.TREE_TAP, "tool/treetap");
|
||||
register(TRItems.WRENCH, "tool/wrench");
|
||||
register(TRContent.INDUSTRIAL_CHAINSAW, "tool/industrial_chainsaw");
|
||||
register(TRContent.INDUSTRIAL_DRILL, "tool/industrial_drill");
|
||||
register(TRContent.INDUSTRIAL_JACKHAMMER, "tool/industrial_jackhammer");
|
||||
register(TRContent.DEBUG_TOOL, "tool/debug");
|
||||
register(TRContent.ADVANCED_CHAINSAW, "tool/advanced_chainsaw");
|
||||
register(TRContent.ADVANCED_DRILL, "tool/advanced_drill");
|
||||
register(TRContent.ADVANCED_JACKHAMMER, "tool/advanced_jackhammer");
|
||||
register(TRContent.ELECTRIC_TREE_TAP, "tool/electric_treetap");
|
||||
register(TRContent.NANOSABER, "tool/nanosaber");
|
||||
register(TRContent.OMNI_TOOL, "tool/omni_tool");
|
||||
register(TRContent.ROCK_CUTTER, "tool/rock_cutter");
|
||||
register(TRContent.BASIC_CHAINSAW, "tool/basic_chainsaw");
|
||||
register(TRContent.BASIC_DRILL, "tool/basic_drill");
|
||||
register(TRContent.BASIC_JACKHAMMER, "tool/basic_jackhammer");
|
||||
register(TRContent.TREE_TAP, "tool/treetap");
|
||||
register(TRContent.WRENCH, "tool/wrench");
|
||||
|
||||
// Other
|
||||
register(TRItems.FREQUENCY_TRANSMITTER, "misc/frequency_transmitter");
|
||||
register(TRItems.SCRAP_BOX, "misc/scrapbox");
|
||||
register(TRItems.MANUAL, "misc/manual");
|
||||
register(TRContent.FREQUENCY_TRANSMITTER, "misc/frequency_transmitter");
|
||||
register(TRContent.SCRAP_BOX, "misc/scrapbox");
|
||||
register(TRContent.MANUAL, "misc/manual");
|
||||
;
|
||||
|
||||
// Gem armor & tools
|
||||
if (ConfigTechReborn.enableGemArmorAndTools) {
|
||||
registerBlockstateMultiItem(TRItems.RUBY_HELMET, "ruby_helmet", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.RUBY_CHESTPLATE, "ruby_chestplate", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.RUBY_LEGGINGS, "ruby_leggings", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.RUBY_BOOTS, "ruby_boots", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.SAPPHIRE_HELMET, "sapphire_helmet", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.SAPPHIRE_CHESTPLATE, "sapphire_chestplate", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.SAPPHIRE_LEGGINGS, "sapphire_leggings", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.SAPPHIRE_BOOTS, "sapphire_boots", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.PERIDOT_HELMET, "peridot_helmet", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.PERIDOT_CHESTPLATE, "peridot_chestplate", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.PERIDOT_LEGGINGS, "peridot_leggings", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.PERIDOT_BOOTS, "peridot_boots", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.BRONZE_HELMET, "bronze_helmet", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.BRONZE_CHESTPLATE, "bronze_chestplate", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.BRONZE_LEGGINGS, "bronze_leggings", "items/armour");
|
||||
registerBlockstateMultiItem(TRItems.BRONZE_BOOTS, "bronze_boots", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.RUBY_HELMET, "ruby_helmet", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.RUBY_CHESTPLATE, "ruby_chestplate", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.RUBY_LEGGINGS, "ruby_leggings", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.RUBY_BOOTS, "ruby_boots", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.SAPPHIRE_HELMET, "sapphire_helmet", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.SAPPHIRE_CHESTPLATE, "sapphire_chestplate", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.SAPPHIRE_LEGGINGS, "sapphire_leggings", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.SAPPHIRE_BOOTS, "sapphire_boots", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.PERIDOT_HELMET, "peridot_helmet", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.PERIDOT_CHESTPLATE, "peridot_chestplate", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.PERIDOT_LEGGINGS, "peridot_leggings", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.PERIDOT_BOOTS, "peridot_boots", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.BRONZE_HELMET, "bronze_helmet", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.BRONZE_CHESTPLATE, "bronze_chestplate", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.BRONZE_LEGGINGS, "bronze_leggings", "items/armour");
|
||||
registerBlockstateMultiItem(TRContent.BRONZE_BOOTS, "bronze_boots", "items/armour");
|
||||
|
||||
registerBlockstateMultiItem(TRItems.RUBY_PICKAXE, "ruby_pickaxe", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.RUBY_SWORD, "ruby_sword", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.RUBY_AXE, "ruby_axe", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.RUBY_SPADE, "ruby_spade", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.RUBY_HOE, "ruby_hoe", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.SAPPHIRE_PICKAXE, "sapphire_pickaxe", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.SAPPHIRE_SWORD, "sapphire_sword", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.SAPPHIRE_AXE, "sapphire_axe", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.SAPPHIRE_SPADE, "sapphire_spade", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.SAPPHIRE_HOE, "sapphire_hoe", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.PERIDOT_PICKAXE, "peridot_pickaxe", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.PERIDOT_SWORD, "peridot_sword", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.PERIDOT_AXE, "peridot_axe", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.PERIDOT_SPADE, "peridot_spade", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.PERIDOT_HOE, "peridot_hoe", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.BRONZE_PICKAXE, "bronze_pickaxe", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.BRONZE_SWORD, "bronze_sword", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.BRONZE_AXE, "bronze_axe", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.BRONZE_SPADE, "bronze_spade", "items/tool");
|
||||
registerBlockstateMultiItem(TRItems.BRONZE_HOE, "bronze_hoe", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.RUBY_PICKAXE, "ruby_pickaxe", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.RUBY_SWORD, "ruby_sword", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.RUBY_AXE, "ruby_axe", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.RUBY_SPADE, "ruby_spade", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.RUBY_HOE, "ruby_hoe", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.SAPPHIRE_PICKAXE, "sapphire_pickaxe", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.SAPPHIRE_SWORD, "sapphire_sword", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.SAPPHIRE_AXE, "sapphire_axe", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.SAPPHIRE_SPADE, "sapphire_spade", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.SAPPHIRE_HOE, "sapphire_hoe", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.PERIDOT_PICKAXE, "peridot_pickaxe", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.PERIDOT_SWORD, "peridot_sword", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.PERIDOT_AXE, "peridot_axe", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.PERIDOT_SPADE, "peridot_spade", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.PERIDOT_HOE, "peridot_hoe", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.BRONZE_PICKAXE, "bronze_pickaxe", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.BRONZE_SWORD, "bronze_sword", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.BRONZE_AXE, "bronze_axe", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.BRONZE_SPADE, "bronze_spade", "items/tool");
|
||||
registerBlockstateMultiItem(TRContent.BRONZE_HOE, "bronze_hoe", "items/tool");
|
||||
}
|
||||
|
||||
register(TRBlocks.RUBBER_SAPLING, "misc/rubber_sapling");
|
||||
|
|
|
@ -41,7 +41,7 @@ import techreborn.client.container.builder.BuiltContainer;
|
|||
import techreborn.client.gui.slot.GuiFluidConfiguration;
|
||||
import techreborn.client.gui.slot.GuiSlotConfiguration;
|
||||
import techreborn.client.gui.widget.GuiButtonPowerBar;
|
||||
import techreborn.init.TRItems;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.items.DynamicCell;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -144,7 +144,7 @@ public class GuiBase extends GuiContainer {
|
|||
}
|
||||
}
|
||||
if(getMachine().hasSlotConfig()){
|
||||
builder.drawSlotTab(this, guiLeft, guiTop, mouseX, mouseY, upgrades, new ItemStack(TRItems.WRENCH));
|
||||
builder.drawSlotTab(this, guiLeft, guiTop, mouseX, mouseY, upgrades, new ItemStack(TRContent.WRENCH));
|
||||
}
|
||||
if(getMachine().showTankConfig()){
|
||||
builder.drawSlotTab(this, guiLeft, guiTop + 27, mouseX, mouseY, upgrades, DynamicCell.getCellWithFluid(FluidRegistry.LAVA));
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.client.resources.I18n;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import techreborn.init.TRItems;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.tiles.machine.iron.TileIronFurnace;
|
||||
|
||||
public class GuiIronFurnace extends GuiBase {
|
||||
|
@ -50,7 +50,7 @@ public class GuiIronFurnace extends GuiBase {
|
|||
protected void drawGuiContainerBackgroundLayer(final float p_146976_1_, final int p_146976_2_, final int p_146976_3_) {
|
||||
this.drawDefaultBackground();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
builder.drawSlotTab(this, guiLeft, guiTop, p_146976_2_, p_146976_3_, upgrades, new ItemStack(TRItems.WRENCH));
|
||||
builder.drawSlotTab(this, guiLeft, guiTop, p_146976_2_, p_146976_3_, upgrades, new ItemStack(TRContent.WRENCH));
|
||||
this.mc.getTextureManager().bindTexture(GuiIronFurnace.texture);
|
||||
final int k = (this.width - this.xSize) / 2;
|
||||
final int l = (this.height - this.ySize) / 2;
|
||||
|
|
|
@ -43,7 +43,7 @@ import reborncore.client.gui.guibuilder.GuiBuilder;
|
|||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import reborncore.common.powerSystem.TilePowerAcceptor;
|
||||
import techreborn.TechReborn;
|
||||
import techreborn.init.TRItems;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.proxies.ClientProxy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -455,7 +455,7 @@ public class TRBuilder extends GuiBuilder {
|
|||
}
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(GUI_SHEET);
|
||||
gui.drawTexturedModalRect(posX - 26, posY + 84 - offset, 157, 148, 30, 30);
|
||||
renderItemStack(new ItemStack(TRItems.WRENCH), posX - 19, posY + 92 - offset);
|
||||
renderItemStack(new ItemStack(TRContent.WRENCH), posX - 19, posY + 92 - offset);
|
||||
}
|
||||
|
||||
public void renderItemStack(ItemStack stack, int x, int y) {
|
||||
|
|
|
@ -44,7 +44,7 @@ import net.minecraftforge.fluids.Fluid;
|
|||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.init.TRItems;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.items.DynamicCell;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
@ -69,8 +69,8 @@ public class ModelDynamicCell implements IModel {
|
|||
private static final float SOUTH_Z_FLUID = 8.4f / 16f;
|
||||
|
||||
public static void init() {
|
||||
ModelLoader.setCustomMeshDefinition(TRItems.CELL, stack -> MODEL_LOCATION);
|
||||
ModelBakery.registerItemVariants(TRItems.CELL, MODEL_LOCATION);
|
||||
ModelLoader.setCustomMeshDefinition(TRContent.CELL, stack -> MODEL_LOCATION);
|
||||
ModelBakery.registerItemVariants(TRContent.CELL, MODEL_LOCATION);
|
||||
ModelLoaderRegistry.registerLoader(new DynamicCellLoader());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue