diff --git a/build.gradle b/build.gradle index 3e35ce5..b3632f9 100644 --- a/build.gradle +++ b/build.gradle @@ -2,12 +2,15 @@ buildscript { repositories { jcenter() maven { url = "http://files.minecraftforge.net/maven" } + maven { url = "https://plugins.gradle.org/m2/" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' + classpath 'com.wynprice.cursemaven:CurseMaven:2.+' } } apply plugin: 'net.minecraftforge.gradle.forge' +apply plugin: 'com.wynprice.cursemaven' version = "${mc_version}-${mod_version}" group = "jackyy.exchangers" @@ -44,8 +47,11 @@ repositories { dependencies { deobfCompile "mezz.jei:jei_1.12.2:+" - deobfCompile "mcp.mobius.waila:Hwyla:+" + deobfCompile "mcp.mobius.waila:Hwyla:1.8.26-B41_1.12.2" + deobfCompile "cofh:RedstoneFlux:1.12-2.+:universal" deobfCompile "cofh:CoFHCore:1.12.2-4.+:universal" + deobfCompile "curse.maven:gunpowderlib:2852431" + deobfCompile "curse.maven:better-with-mods:2885221" } processResources { @@ -58,13 +64,6 @@ processResources { from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } - rename '(.+_at.cfg)', 'META-INF/$1' -} - -jar { - manifest { - attributes 'FMLAT': 'exchangers_at.cfg' - } } task signJar(type: SignJar, dependsOn: reobfJar) { diff --git a/gradle.properties b/gradle.properties index 26fc31d..8c446ce 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,5 @@ -# Sets default memory used for gradle commands. Can be overridden by user or command line properties. -# This is required to provide enough memory for the Minecraft decompilation process. org.gradle.jvmargs=-Xmx4G mc_version=1.12.2 -forge_version=1.12.2-14.23.4.2760 -mod_version=2.8 +forge_version=1.12.2-14.23.5.2847 +mod_version=2.9 mappings_version=stable_39 diff --git a/src/main/java/jackyy/exchangers/Exchangers.java b/src/main/java/jackyy/exchangers/Exchangers.java index 4bf9dd2..dbaab4f 100644 --- a/src/main/java/jackyy/exchangers/Exchangers.java +++ b/src/main/java/jackyy/exchangers/Exchangers.java @@ -1,51 +1,18 @@ package jackyy.exchangers; import jackyy.exchangers.proxy.CommonProxy; -import jackyy.exchangers.registry.ModItems; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.text.TextFormatting; -import net.minecraftforge.common.util.EnumHelper; +import jackyy.exchangers.util.Reference; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLFingerprintViolationEvent; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -@Mod(modid = Exchangers.MODID, version = Exchangers.VERSION, name = Exchangers.MODNAME, dependencies = Exchangers.DEPENDS, certificateFingerprint = "@FINGERPRINT@", acceptedMinecraftVersions = Exchangers.MCVERSION, useMetadata = true) +@Mod(modid = Reference.MODID, version = Reference.VERSION, name = Reference.MODNAME, dependencies = Reference.DEPENDS, certificateFingerprint = "@FINGERPRINT@", acceptedMinecraftVersions = Reference.MCVERSION, useMetadata = true) public class Exchangers { - public static final String VERSION = "1.12.2-2.8"; - public static final String MCVERSION = "[1.12,1.13)"; - public static final String MODID = "exchangers"; - public static final String MODNAME = "Exchangers"; - public static final String EIO = "enderio"; - public static final String TE = "thermalexpansion"; - public static final String MEK = "mekanism"; - public static final String IE = "immersiveengineering"; - public static final String DEPENDS - = "after:redstoneflux;" - + "after:" + EIO + ";" - + "after:cofhcore;" - + "after:thermalfoundation;" - + "after:" + TE + ";" - + "after:" + MEK + ";" - + "after:" + IE + ";"; - public static final CreativeTabs TAB = new CreativeTabs(MODID) { - @Override - public ItemStack createIcon() { - return new ItemStack(ModItems.obsidianExchanger); - } - }; - public static final EnumRarity TIER_1 = EnumHelper.addRarity("TIER_1", TextFormatting.GREEN, "Tier 1"); - - public static Logger logger = LogManager.getLogger(MODNAME); - - @SidedProxy(serverSide = "jackyy.exchangers.proxy.CommonProxy", clientSide = "jackyy.exchangers.proxy.ClientProxy") + @SidedProxy(serverSide = Reference.COMMON_PROXY, clientSide = Reference.CLIENT_PROXY) public static CommonProxy proxy; @Mod.EventHandler @@ -65,7 +32,7 @@ public void postInit(FMLPostInitializationEvent e) { @Mod.EventHandler public void onFingerprintViolation(FMLFingerprintViolationEvent event) { - logger.warn("Invalid fingerprint detected! The file " + event.getSource().getName() + " may have been modified. This will NOT be supported by the mod author!"); + Reference.LOGGER.warn("Invalid fingerprint detected! The file " + event.getSource().getName() + " may have been modified. This will NOT be supported by the mod author!"); } } diff --git a/src/main/java/jackyy/exchangers/client/CapeBufferDownload.java b/src/main/java/jackyy/exchangers/client/CapeBufferDownload.java deleted file mode 100644 index 0ecb30a..0000000 --- a/src/main/java/jackyy/exchangers/client/CapeBufferDownload.java +++ /dev/null @@ -1,77 +0,0 @@ -package jackyy.exchangers.client; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.ThreadDownloadImageData; -import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StringUtils; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import java.io.File; - -@SideOnly(Side.CLIENT) -public class CapeBufferDownload extends Thread { - - public String username; - - public String staticCapeUrl; - - public ResourceLocation resourceLocation; - - public ThreadDownloadImageData capeImage; - - public boolean downloaded = false; - - public CapeBufferDownload(String name, String url) { - username = name; - staticCapeUrl = url; - setDaemon(true); - setName("Exchangers Cape Buffer Download"); - } - - @Override - public void run() { - try { - download(); - } catch(Exception e) { - e.printStackTrace(); - } - } - - private void download() { - try { - resourceLocation = new ResourceLocation("cache/exchangers/" + StringUtils.stripControlCodes(username)); - capeImage = downloadCape(); - } catch(Exception e) { - e.printStackTrace(); - } - downloaded = true; - } - - public ThreadDownloadImageData getImage() { - return capeImage; - } - - public ResourceLocation getResourceLocation() { - return resourceLocation; - } - - public ThreadDownloadImageData downloadCape() { - try { - File capeFile = new File(resourceLocation.getPath() + ".png"); - - if (capeFile.exists()) { - capeFile.delete(); - } - TextureManager manager = Minecraft.getMinecraft().getTextureManager(); - ThreadDownloadImageData data = new ThreadDownloadImageData(capeFile, staticCapeUrl, null, null); - manager.loadTexture(resourceLocation, data); - return data; - } catch(Exception e) { - e.printStackTrace(); - } - return null; - } - -} \ No newline at end of file diff --git a/src/main/java/jackyy/exchangers/client/Keys.java b/src/main/java/jackyy/exchangers/client/Keys.java index e0fe0ee..91afe16 100644 --- a/src/main/java/jackyy/exchangers/client/Keys.java +++ b/src/main/java/jackyy/exchangers/client/Keys.java @@ -44,10 +44,22 @@ public boolean conflicts(IKeyConflictContext other) { } }, Keyboard.KEY_PERIOD, "key.categories.exchangers"); + public static final KeyBinding Directional_PLACEMENT_KEY = new KeyBinding("key.exchanger_directional_placement", new IKeyConflictContext() { + @Override + public boolean isActive() { + return KeyConflictContext.IN_GAME.isActive(); + } + @Override + public boolean conflicts(IKeyConflictContext other) { + return other == this || KeyConflictContext.IN_GAME.isActive(); + } + }, Keyboard.KEY_APOSTROPHE, "key.categories.exchangers"); + public static void init() { ClientRegistry.registerKeyBinding(RANGE_SWITCH_KEY); ClientRegistry.registerKeyBinding(MODE_SWITCH_KEY); ClientRegistry.registerKeyBinding(FORCE_DROP_ITEMS_KEY); + ClientRegistry.registerKeyBinding(Directional_PLACEMENT_KEY); } } diff --git a/src/main/java/jackyy/exchangers/handler/ClientEventsHandler.java b/src/main/java/jackyy/exchangers/handler/ClientEventsHandler.java index 2ec9c8a..86a5f01 100644 --- a/src/main/java/jackyy/exchangers/handler/ClientEventsHandler.java +++ b/src/main/java/jackyy/exchangers/handler/ClientEventsHandler.java @@ -1,21 +1,15 @@ package jackyy.exchangers.handler; -import com.mojang.authlib.minecraft.MinecraftProfileTexture; -import jackyy.exchangers.client.CapeBufferDownload; import jackyy.exchangers.client.Keys; -import jackyy.exchangers.handler.network.PacketHandler; -import jackyy.exchangers.handler.network.PacketSwitchMode; -import jackyy.exchangers.handler.network.PacketSwitchRange; -import jackyy.exchangers.handler.network.PacketToggleForceDropItemsMode; +import jackyy.exchangers.handler.network.*; import jackyy.exchangers.item.ItemExchangerBase; import jackyy.exchangers.item.special.ItemCreativeExchanger; +import jackyy.gunpowderlib.helper.NBTHelper; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.client.network.NetworkPlayerInfo; import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator; @@ -23,65 +17,23 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTUtil; -import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.World; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderWorldLastEvent; -import net.minecraftforge.fml.client.FMLClientHandler; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.InputEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import java.util.HashMap; -import java.util.Map; import java.util.Set; -import java.util.UUID; @SideOnly(Side.CLIENT) public class ClientEventsHandler { - private static Minecraft mc = FMLClientHandler.instance().getClient(); - private static final String DEV_CAPE = "https://jackyytv.github.io/imgs/mc_mods/exchangers/capes/cape_dev.png"; - - private Map buffer = new HashMap<>(); - - @SubscribeEvent - public void onTick(TickEvent.ClientTickEvent event) { - if (event.phase == TickEvent.Phase.START) { - if (mc.world != null && mc.player != null && !mc.isGamePaused()) { - for (EntityPlayer entityPlayer : mc.world.playerEntities) { - if (entityPlayer instanceof AbstractClientPlayer) { - AbstractClientPlayer player = (AbstractClientPlayer) entityPlayer; - if (player.getUniqueID().equals(UUID.fromString("38de3769-70fa-441c-89e8-67280f3068a0"))) { - CapeBufferDownload download = buffer.get(player.getName()); - if (download == null) { - download = new CapeBufferDownload(player.getName(), DEV_CAPE); - buffer.put(player.getName(), download); - download.start(); - } else { - if (!download.downloaded) { - continue; - } - setCape(player, download.getResourceLocation()); - } - } - } - } - } - } - } - - private static void setCape(AbstractClientPlayer player, ResourceLocation cape) { - NetworkPlayerInfo info = player.getPlayerInfo(); - if (info != null) { - info.playerTextures.put(MinecraftProfileTexture.Type.CAPE, cape); - } - } + private static Minecraft mc = Minecraft.getMinecraft(); @SubscribeEvent public void onGameOverlayRender(RenderGameOverlayEvent event) { @@ -101,7 +53,7 @@ public void onGameOverlayRender(RenderGameOverlayEvent event) { ItemStack stack = player.getHeldItemMainhand(); - if (stack.getTagCompound() != null) { + if (NBTHelper.getTag(stack) != null) { ScaledResolution scaledresolution = new ScaledResolution(mc); int w = scaledresolution.getScaledWidth(); int h = scaledresolution.getScaledHeight(); @@ -110,7 +62,7 @@ public void onGameOverlayRender(RenderGameOverlayEvent event) { GlStateManager.disableDepth(); GlStateManager.disableRescaleNormal(); - String exchangeMode = ExchangerHandler.modeSwitchList[stack.getTagCompound().getInteger("range")]; + String exchangeMode = ExchangerHandler.modeSwitchList[NBTHelper.getTag(stack).getInteger("range")]; double scale = exchangeMode.length() > 2 ? 1 : 1; double swidth = mc.fontRenderer.getStringWidth(exchangeMode) * scale; GlStateManager.translate((w / 2 - 2 - swidth), h / 2 - 4, 0); @@ -125,7 +77,6 @@ public void onGameOverlayRender(RenderGameOverlayEvent event) { @SubscribeEvent @SuppressWarnings("deprecation") public void renderWorldLastEvent(RenderWorldLastEvent event) { - Minecraft mc = Minecraft.getMinecraft(); RayTraceResult mouseOver = mc.objectMouseOver; EntityPlayerSP player = mc.player; World world = player.getEntityWorld(); @@ -152,7 +103,7 @@ public void renderWorldLastEvent(RenderWorldLastEvent event) { GlStateManager.disableDepth(); for (BlockPos coordinate : coordinates) { - IBlockState exState = NBTUtil.readBlockState(ExchangerHandler.getTagCompound(stack).getCompoundTag("blockstate")); + IBlockState exState = NBTUtil.readBlockState(NBTHelper.getTag(stack).getCompoundTag("blockstate")); float blockHardness = block.getBlockHardness(state, world, coordinate); if (world.isAirBlock(coordinate) || exState == state) { continue; @@ -221,6 +172,8 @@ public void onKeyInput(InputEvent.KeyInputEvent event) { PacketHandler.INSTANCE.sendToServer(new PacketSwitchMode()); } else if (Keys.FORCE_DROP_ITEMS_KEY.isPressed()) { PacketHandler.INSTANCE.sendToServer(new PacketToggleForceDropItemsMode()); + } else if (Keys.Directional_PLACEMENT_KEY.isPressed()) { + PacketHandler.INSTANCE.sendToServer(new PacketToggleDirectionalPlacement()); } } diff --git a/src/main/java/jackyy/exchangers/handler/EventsHandler.java b/src/main/java/jackyy/exchangers/handler/EventsHandler.java index b203512..788ee13 100644 --- a/src/main/java/jackyy/exchangers/handler/EventsHandler.java +++ b/src/main/java/jackyy/exchangers/handler/EventsHandler.java @@ -1,57 +1,12 @@ package jackyy.exchangers.handler; import jackyy.exchangers.registry.ModItems; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.monster.EntityCreeper; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; -import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.event.RegistryEvent; -import net.minecraftforge.event.entity.living.LivingEvent; -import net.minecraftforge.event.entity.living.LivingSetAttackTargetEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import java.util.UUID; - public class EventsHandler { - @SubscribeEvent - public void onEntityTargeted(LivingSetAttackTargetEvent event) { - if (event.getTarget() == null) - return; - if (!(event.getTarget() instanceof EntityPlayer) || event.getTarget() instanceof FakePlayer) - return; - if (!(event.getEntity() instanceof EntityLiving)) - return; - - EntityPlayer player = (EntityPlayer) event.getTarget(); - EntityLiving entity = (EntityLiving) event.getEntity(); - - if (entity instanceof EntityCreeper) { - if (player.getUniqueID().equals(UUID.fromString("38de3769-70fa-441c-89e8-67280f3068a0"))) { - entity.setAttackTarget(null); - entity.setRevengeTarget(null); - } - } - } - - @SubscribeEvent - public void onLivingUpdate(LivingEvent.LivingUpdateEvent event) { - if (!(event.getEntity() instanceof EntityLiving)) - return; - EntityLiving entity = (EntityLiving) event.getEntity(); - if (entity.getAttackTarget() == null || !(entity.getAttackTarget() instanceof EntityPlayer) || entity.getAttackTarget() instanceof FakePlayer) - return; - EntityPlayer player = (EntityPlayer) entity.getAttackTarget(); - - if (entity instanceof EntityCreeper) { - if (player.getUniqueID().equals(UUID.fromString("38de3769-70fa-441c-89e8-67280f3068a0"))) { - entity.setAttackTarget(null); - entity.setRevengeTarget(null); - } - } - } - /** * This exists to remap all the item IDs so they match with 1.10 and 1.11 * Will be removed on 1.13 diff --git a/src/main/java/jackyy/exchangers/handler/ExchangerHandler.java b/src/main/java/jackyy/exchangers/handler/ExchangerHandler.java index cefed84..282b59b 100644 --- a/src/main/java/jackyy/exchangers/handler/ExchangerHandler.java +++ b/src/main/java/jackyy/exchangers/handler/ExchangerHandler.java @@ -3,10 +3,12 @@ import jackyy.exchangers.handler.mode.ExchangerModeHorizontalCol; import jackyy.exchangers.handler.mode.ExchangerModePlane; import jackyy.exchangers.handler.mode.ExchangerModeVerticalCol; -import jackyy.exchangers.helper.ChatHelper; -import jackyy.exchangers.helper.StringHelper; import jackyy.exchangers.item.ItemExchangerBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; +import jackyy.gunpowderlib.helper.ChatHelper; +import jackyy.gunpowderlib.helper.NBTHelper; +import jackyy.gunpowderlib.helper.StringHelper; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.enchantment.EnchantmentHelper; @@ -15,6 +17,7 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Enchantments; +import net.minecraft.init.Items; import net.minecraft.init.SoundEvents; import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; @@ -26,10 +29,13 @@ import net.minecraft.util.SoundCategory; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.Vec3d; import net.minecraft.util.text.TextFormatting; import net.minecraft.world.World; +import net.minecraftforge.common.IShearable; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.BlockSnapshot; +import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; @@ -54,17 +60,20 @@ public static void setDefaultTagCompound(ItemStack stack) { compound.setInteger("exmode", 0); compound.setInteger("range", 0); compound.setBoolean("forceDropItems", false); + compound.setBoolean("directionalPlacement", false); stack.setTagCompound(compound); } else { - if (!stack.getTagCompound().hasKey("blockstate")) { - stack.getTagCompound().setTag("blockstate", new NBTTagCompound()); - NBTUtil.writeBlockState(stack.getTagCompound().getCompoundTag("blockstate"), Blocks.AIR.getDefaultState()); - } else if (!stack.getTagCompound().hasKey("exmode")) { - stack.getTagCompound().setInteger("exmode", 0); - } else if (!stack.getTagCompound().hasKey("range")) { - stack.getTagCompound().setInteger("range", 0); - } else if (!stack.getTagCompound().hasKey("forceDropItems")) { - stack.getTagCompound().setBoolean("forceDropItems", false); + if (!NBTHelper.getTag(stack).hasKey("blockstate")) { + NBTHelper.getTag(stack).setTag("blockstate", new NBTTagCompound()); + NBTUtil.writeBlockState(NBTHelper.getTag(stack).getCompoundTag("blockstate"), Blocks.AIR.getDefaultState()); + } else if (!NBTHelper.getTag(stack).hasKey("exmode")) { + NBTHelper.getTag(stack).setInteger("exmode", 0); + } else if (!NBTHelper.getTag(stack).hasKey("range")) { + NBTHelper.getTag(stack).setInteger("range", 0); + } else if (!NBTHelper.getTag(stack).hasKey("forceDropItems")) { + NBTHelper.getTag(stack).setBoolean("forceDropItems", false); + } else if (!NBTHelper.getTag(stack).hasKey("directionalPlacement")) { + NBTHelper.getTag(stack).setBoolean("directionalPlacement", false); } } } @@ -101,7 +110,7 @@ private static boolean getExIsPowered(ItemStack stack) { public static void switchRange(EntityPlayer player, ItemStack stack) { setDefaultTagCompound(stack); - int rangeSwitch = stack.getTagCompound().getInteger("range"); + int rangeSwitch = NBTHelper.getTag(stack).getInteger("range"); if (player.isSneaking()) { rangeSwitch--; } else { @@ -115,12 +124,12 @@ public static void switchRange(EntityPlayer player, ItemStack stack) { rangeSwitch = getExRange(stack); } } - stack.getTagCompound().setInteger("range", rangeSwitch); + NBTHelper.getTag(stack).setInteger("range", rangeSwitch); } public static void switchMode(EntityPlayer player, ItemStack stack) { setDefaultTagCompound(stack); - int mode = stack.getTagCompound().getInteger("exmode"); + int mode = NBTHelper.getTag(stack).getInteger("exmode"); if (player.isSneaking()) { mode--; } else { @@ -134,29 +143,40 @@ public static void switchMode(EntityPlayer player, ItemStack stack) { mode = 2; } } - stack.getTagCompound().setInteger("exmode", mode); + NBTHelper.getTag(stack).setInteger("exmode", mode); switch (mode) { case 0: - ChatHelper.msgPlayerRaw(player, StringHelper.localize("msg.mode") + " " + TextFormatting.GREEN + TextFormatting.ITALIC + StringHelper.localize("mode.plane")); + ChatHelper.msgPlayerRaw(player, StringHelper.localize(Reference.MODID, "msg.mode") + " " + TextFormatting.GREEN + TextFormatting.ITALIC + StringHelper.localize(Reference.MODID, "mode.plane")); break; case 1: - ChatHelper.msgPlayerRaw(player, StringHelper.localize("msg.mode") + " " + TextFormatting.GREEN + TextFormatting.ITALIC + StringHelper.localize("mode.horizontal")); + ChatHelper.msgPlayerRaw(player, StringHelper.localize(Reference.MODID, "msg.mode") + " " + TextFormatting.GREEN + TextFormatting.ITALIC + StringHelper.localize(Reference.MODID, "mode.horizontal")); break; case 2: - ChatHelper.msgPlayerRaw(player, StringHelper.localize("msg.mode") + " " + TextFormatting.GREEN + TextFormatting.ITALIC + StringHelper.localize("mode.vertical")); + ChatHelper.msgPlayerRaw(player, StringHelper.localize(Reference.MODID, "msg.mode") + " " + TextFormatting.GREEN + TextFormatting.ITALIC + StringHelper.localize(Reference.MODID, "mode.vertical")); break; } } public static void toggleForceDropItems(EntityPlayer player, ItemStack stack) { setDefaultTagCompound(stack); - boolean toggle = stack.getTagCompound().getBoolean("forceDropItems"); + boolean toggle = NBTHelper.getTag(stack).getBoolean("forceDropItems"); ItemStack heldItem = player.getHeldItemMainhand(); if (!heldItem.isEmpty()) { toggle = !toggle; } - stack.getTagCompound().setBoolean("forceDropItems", toggle); - ChatHelper.msgPlayer(player, toggle ? "msg.force_drop_items.on" : "msg.force_drop_items.off"); + NBTHelper.getTag(stack).setBoolean("forceDropItems", toggle); + ChatHelper.msgPlayer(player, Reference.MODID, toggle ? "msg.force_drop_items.on" : "msg.force_drop_items.off"); + } + + public static void toggleDirectionalPlacement(EntityPlayer player, ItemStack stack) { + setDefaultTagCompound(stack); + boolean toggle = NBTHelper.getTag(stack).getBoolean("directionalPlacement"); + ItemStack heldItem = player.getHeldItemMainhand(); + if (!heldItem.isEmpty()) { + toggle = !toggle; + } + NBTHelper.getTag(stack).setBoolean("directionalPlacement", toggle); + ChatHelper.msgPlayer(player, Reference.MODID, toggle ? "msg.directional_placement.on" : "msg.directional_placement.off"); } public static boolean isWhitelisted(World world, BlockPos pos) { @@ -179,12 +199,10 @@ public static boolean isBlacklisted(World world, BlockPos pos) { @SuppressWarnings("deprecation") public static void placeBlock(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side) { - NBTTagCompound tagCompound = stack.getTagCompound(); - IBlockState state = NBTUtil.readBlockState(tagCompound.getCompoundTag("blockstate")); + IBlockState state = NBTUtil.readBlockState(NBTHelper.getTag(stack).getCompoundTag("blockstate")); Block block = state.getBlock(); IBlockState oldState = world.getBlockState(pos); Block oldblock = oldState.getBlock(); - int oldmeta = oldblock.getMetaFromState(oldState); float blockHardness = oldblock.getBlockHardness(oldState, world, pos); if (block == Blocks.AIR) { @@ -192,19 +210,19 @@ public static void placeBlock(ItemStack stack, EntityPlayer player, World world, } else if ((block == oldblock) && (state == oldState)) { return; } else if (world.getTileEntity(pos) != null && !isWhitelisted(world, pos)) { - ChatHelper.msgPlayer(player, "error.invalid_block.te"); + ChatHelper.msgPlayer(player, Reference.MODID, "error.invalid_block.te"); return; } else if (isBlacklisted(world, pos)) { - ChatHelper.msgPlayer(player, "error.blacklisted"); + ChatHelper.msgPlayer(player, Reference.MODID, "error.blacklisted"); return; } else if (!getExIsCreative(stack) && blockHardness < -0.1F) { - ChatHelper.msgPlayer(player, "error.invalid_block.unbreakable"); + ChatHelper.msgPlayer(player, Reference.MODID, "error.invalid_block.unbreakable"); return; - } else if (!getExIsCreative(stack) && getExIsPowered(stack) && stack.getTagCompound().getInteger("Energy") < getPerBlockEnergy(stack)) { - ChatHelper.msgPlayer(player, "error.out_of_power"); + } else if (!getExIsCreative(stack) && getExIsPowered(stack) && NBTHelper.getTag(stack).getInteger("Energy") < getPerBlockEnergy(stack)) { + ChatHelper.msgPlayer(player, Reference.MODID, "error.out_of_power"); return; } else if (!getExIsCreative(stack) && getExHarvestLevel(stack) < oldblock.getHarvestLevel(oldState)) { - ChatHelper.msgPlayer(player, "error.low_harvest_level"); + ChatHelper.msgPlayer(player, Reference.MODID, "error.low_harvest_level"); return; } @@ -214,12 +232,27 @@ public static void placeBlock(ItemStack stack, EntityPlayer player, World world, for (BlockPos coordinate : coordinates) { BlockEvent.PlaceEvent event = new BlockEvent.PlaceEvent(BlockSnapshot.getBlockSnapshot(world, coordinate, 3), Blocks.AIR.getDefaultState(), player, player.getActiveHand()); - world.setBlockState(coordinate, state, 3); + if (!NBTHelper.getTag(player.getHeldItemMainhand()).getBoolean("directionalPlacement")) { + world.setBlockState(coordinate, state, 3); + } + if (NBTHelper.getTag(player.getHeldItemMainhand()).getBoolean("directionalPlacement")) { + Vec3d vec = player.getLookVec(); + IBlockState placeState = block.getStateForPlacement(world, pos, side, ((float)vec.x), ((float)vec.y), ((float)vec.z), block.getItem(world, pos, state).getMetadata(), player, player.getActiveHand()); + world.setBlockState(coordinate, placeState, 3); + } if (!MinecraftForge.EVENT_BUS.post(event)) { - if (consumeItemInInventory(Item.getItemFromBlock(block), state.getBlock().getItem(world, pos, state).getMetadata(), player.inventory, player)) { + if (consumeItemInInventory(Item.getItemFromBlock(block), block.getItem(world, pos, state).getMetadata(), player.inventory, player)) { if (!player.capabilities.isCreativeMode && !getExIsCreative(stack)) { if (ModConfig.misc.doExchangersSilkTouch || EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack) > 0) { - ItemStack oldblockItem = oldblock.getItem(world, pos, oldState); + ItemStack oldblockItem; + if (oldblock.canSilkHarvest(world, pos, oldState, player) && !(oldblock instanceof IShearable)) { + oldblockItem = getSilkTouchDrop(oldState); + } else { + oldblockItem = oldblock.getPickBlock(oldState, null, world, pos, player); + } + if (oldblockItem.getItem().equals(Items.AIR)) { + oldblockItem = oldblock.getPickBlock(oldState, null, world, pos, player); + } giveItem(world, player, oldblockItem); } else { int fortuneLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, stack); @@ -230,8 +263,8 @@ public static void placeBlock(ItemStack stack, EntityPlayer player, World world, } if (!getExIsPowered(stack)) { stack.damageItem(1, player); - } else if (stack.getTagCompound().getInteger("Energy") >= getPerBlockEnergy(stack)) { - stack.getTagCompound().setInteger("Energy", stack.getTagCompound().getInteger("Energy") - getPerBlockEnergy(stack)); + } else if (NBTHelper.getTag(stack).getInteger("Energy") >= getPerBlockEnergy(stack)) { + NBTHelper.getTag(stack).setInteger("Energy", NBTHelper.getTag(stack).getInteger("Energy") - getPerBlockEnergy(stack)); } player.openContainer.detectAndSendChanges(); } @@ -247,11 +280,11 @@ public static void placeBlock(ItemStack stack, EntityPlayer player, World world, world.restoringBlockSnapshots = true; event.getBlockSnapshot().restore(true); world.restoringBlockSnapshots = false; - ChatHelper.msgPlayer(player, "error.event_cancelled"); + ChatHelper.msgPlayer(player, Reference.MODID, "error.event_cancelled"); } } if (notEnough) { - ChatHelper.msgPlayer(player, "error.out_of_block"); + ChatHelper.msgPlayer(player, Reference.MODID, "error.out_of_block"); } world.captureBlockSnapshots = true; } @@ -261,25 +294,24 @@ public static void selectBlock(ItemStack stack, EntityPlayer player, World world setDefaultTagCompound(stack); IBlockState state = world.getBlockState(pos); Block block = state.getBlock(); - NBTTagCompound tagCompound = getTagCompound(stack); float blockHardness = block.getBlockHardness(state, world, pos); if (world.getTileEntity(pos) != null && !isWhitelisted(world, pos)) { - ChatHelper.msgPlayer(player, "error.invalid_block.te"); + ChatHelper.msgPlayer(player, Reference.MODID, "error.invalid_block.te"); return; } else if (isBlacklisted(world, pos)) { - ChatHelper.msgPlayer(player, "error.blacklisted"); + ChatHelper.msgPlayer(player, Reference.MODID, "error.blacklisted"); return; } else if (!getExIsCreative(stack) && blockHardness < -0.1F) { - ChatHelper.msgPlayer(player, "error.invalid_block.unbreakable"); + ChatHelper.msgPlayer(player, Reference.MODID, "error.invalid_block.unbreakable"); return; } - NBTUtil.writeBlockState(tagCompound.getCompoundTag("blockstate"), state); + NBTUtil.writeBlockState(NBTHelper.getTag(stack).getCompoundTag("blockstate"), state); } public static Set findSuitableBlocks(ItemStack stack, World world, EntityPlayer player, EnumFacing sideHit, BlockPos pos, IBlockState centerState) { Set coordinates = new HashSet<>(); - int range = stack.getTagCompound().getInteger("range"); - int mode = stack.getTagCompound().getInteger("exmode"); + int range = NBTHelper.getTag(stack).getInteger("range"); + int mode = NBTHelper.getTag(stack).getInteger("exmode"); switch (mode) { case 0: @@ -345,16 +377,26 @@ private static int findItemInContainer(Item item, int meta, IItemHandler inv) { private static IItemHandler findItemHolder(IInventory inv) { for (int i = 0; i < inv.getSizeInventory(); i++) { ItemStack stack = inv.getStackInSlot(i); - if (!stack.isEmpty() && stack.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)) { + if (!stack.isEmpty() && stack.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null) && !stack.hasCapability(CapabilityEnergy.ENERGY, null)) { return stack.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); } } return null; } + private static ItemStack getSilkTouchDrop(IBlockState state) { + Block block = state.getBlock(); + Item item = Item.getItemFromBlock(block); + int i = 0; + if (item.getHasSubtypes()) { + i = block.getMetaFromState(state); + } + return new ItemStack(item, 1, i); + } + private static void giveItem(World world, EntityPlayer player, ItemStack oldStack) { EntityItem entityItem = new EntityItem(world, player.posX, player.posY, player.posZ, oldStack); - if (player.getHeldItemMainhand().getTagCompound().getBoolean("forceDropItems")) { + if (NBTHelper.getTag(player.getHeldItemMainhand()).getBoolean("forceDropItems")) { world.spawnEntity(entityItem); } else { if (!player.inventory.addItemStackToInventory(oldStack)) { @@ -363,15 +405,6 @@ private static void giveItem(World world, EntityPlayer player, ItemStack oldStac } } - public static NBTTagCompound getTagCompound(ItemStack stack) { - NBTTagCompound tagCompound = stack.getTagCompound(); - if (tagCompound == null) { - tagCompound = new NBTTagCompound(); - stack.setTagCompound(tagCompound); - } - return tagCompound; - } - public static String getBlockName(Block block, int meta) { ItemStack stack = new ItemStack(block, 1, meta); String name; diff --git a/src/main/java/jackyy/exchangers/handler/network/PacketHandler.java b/src/main/java/jackyy/exchangers/handler/network/PacketHandler.java index 74f6f67..9ab0ed9 100644 --- a/src/main/java/jackyy/exchangers/handler/network/PacketHandler.java +++ b/src/main/java/jackyy/exchangers/handler/network/PacketHandler.java @@ -17,5 +17,6 @@ public static void registerMessages(String channelName) { INSTANCE.registerMessage(PacketSwitchRange.class, PacketSwitchRange.class, nextID(), Side.SERVER); INSTANCE.registerMessage(PacketSwitchMode.class, PacketSwitchMode.class, nextID(), Side.SERVER); INSTANCE.registerMessage(PacketToggleForceDropItemsMode.class, PacketToggleForceDropItemsMode.class, nextID(), Side.SERVER); + INSTANCE.registerMessage(PacketToggleDirectionalPlacement.class, PacketToggleDirectionalPlacement.class, nextID(), Side.SERVER); } } diff --git a/src/main/java/jackyy/exchangers/handler/network/PacketToggleDirectionalPlacement.java b/src/main/java/jackyy/exchangers/handler/network/PacketToggleDirectionalPlacement.java new file mode 100644 index 0000000..9d96186 --- /dev/null +++ b/src/main/java/jackyy/exchangers/handler/network/PacketToggleDirectionalPlacement.java @@ -0,0 +1,32 @@ +package jackyy.exchangers.handler.network; + +import io.netty.buffer.ByteBuf; +import jackyy.exchangers.handler.ExchangerHandler; +import jackyy.exchangers.item.ItemExchangerBase; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.network.simpleimpl.IMessage; +import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; +import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; + +public class PacketToggleDirectionalPlacement implements IMessage, IMessageHandler { + + @Override + public void fromBytes(ByteBuf buf) { } + + @Override + public void toBytes(ByteBuf buf) { } + + public PacketToggleDirectionalPlacement() { } + + @Override + public IMessage onMessage(PacketToggleDirectionalPlacement message, MessageContext context) { + EntityPlayerMP playerMP = context.getServerHandler().player; + ItemStack heldItem = playerMP.getHeldItemMainhand(); + if (!heldItem.isEmpty() && heldItem.getItem() instanceof ItemExchangerBase) { + ExchangerHandler.toggleDirectionalPlacement(playerMP, heldItem); + } + return null; + } + +} diff --git a/src/main/java/jackyy/exchangers/helper/ChatHelper.java b/src/main/java/jackyy/exchangers/helper/ChatHelper.java deleted file mode 100644 index 124e879..0000000 --- a/src/main/java/jackyy/exchangers/helper/ChatHelper.java +++ /dev/null @@ -1,18 +0,0 @@ -package jackyy.exchangers.helper; - -import jackyy.exchangers.Exchangers; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.text.TextComponentString; -import net.minecraft.util.text.TextComponentTranslation; - -public class ChatHelper { - - public static void msgPlayer(EntityPlayer player, String msg) { - player.sendStatusMessage(new TextComponentTranslation(Exchangers.MODID + "." + msg), true); - } - - public static void msgPlayerRaw(EntityPlayer player, String msg) { - player.sendStatusMessage(new TextComponentString(msg), true); - } - -} diff --git a/src/main/java/jackyy/exchangers/helper/EnergyHelper.java b/src/main/java/jackyy/exchangers/helper/EnergyHelper.java deleted file mode 100644 index 4e1dfb4..0000000 --- a/src/main/java/jackyy/exchangers/helper/EnergyHelper.java +++ /dev/null @@ -1,16 +0,0 @@ -package jackyy.exchangers.helper; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class EnergyHelper { - - public static ItemStack setDefaultEnergyTag(ItemStack container, int energy) { - if (!container.hasTagCompound()) { - container.setTagCompound(new NBTTagCompound()); - } - container.getTagCompound().setInteger("Energy", energy); - return container; - } - -} \ No newline at end of file diff --git a/src/main/java/jackyy/exchangers/helper/NBTHelper.java b/src/main/java/jackyy/exchangers/helper/NBTHelper.java deleted file mode 100644 index 817cd28..0000000 --- a/src/main/java/jackyy/exchangers/helper/NBTHelper.java +++ /dev/null @@ -1,50 +0,0 @@ -package jackyy.exchangers.helper; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public class NBTHelper { - - public static NBTTagCompound getTag(ItemStack stack) { - if (!stack.hasTagCompound()) - stack.setTagCompound(new NBTTagCompound()); - return stack.getTagCompound(); - } - - public static boolean hasTag(ItemStack stack) { - return stack.hasTagCompound(); - } - - public static void setInt(ItemStack stack, String key, int val) { - getTag(stack).setInteger(key, val); - } - - public static int getInt(ItemStack stack, String key) { - return hasTag(stack) ? getTag(stack).getInteger(key) : 0; - } - - public static int receiveEnergy(ItemStack container, int energy, int maxEnergy, boolean simulate) { - int stored = getEnergyStored(container); - int accepted = Math.min(energy, maxEnergy - stored); - if (!simulate) { - stored += accepted; - setInt(container, "Energy", stored); - } - return accepted; - } - - public static int extractEnergy(ItemStack container, int energy, boolean simulate) { - int stored = getEnergyStored(container); - int extracted = Math.min(energy, stored); - if (!simulate) { - stored -= extracted; - setInt(container, "Energy", stored); - } - return extracted; - } - - public static int getEnergyStored(ItemStack container) { - return getInt(container, "Energy"); - } - -} diff --git a/src/main/java/jackyy/exchangers/helper/StringHelper.java b/src/main/java/jackyy/exchangers/helper/StringHelper.java deleted file mode 100644 index addca28..0000000 --- a/src/main/java/jackyy/exchangers/helper/StringHelper.java +++ /dev/null @@ -1,51 +0,0 @@ -package jackyy.exchangers.helper; - -import jackyy.exchangers.Exchangers; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.util.text.translation.I18n; -import org.lwjgl.input.Keyboard; - -import java.text.NumberFormat; - -@SuppressWarnings("deprecation") -public class StringHelper { - - public static String getTierText(int tier) { - return localize("tooltip.tier", tier); - } - - public static String getShiftText() { - return TextFormatting.GRAY + localize("tooltip.hold_shift", TextFormatting.YELLOW.toString() + TextFormatting.ITALIC + localize("tooltip.hold_shift.shift") + TextFormatting.RESET + TextFormatting.GRAY); - } - - public static String getCtrlText() { - return TextFormatting.GRAY + localize("tooltip.hold_ctrl", TextFormatting.AQUA.toString() + TextFormatting.ITALIC + localize("tooltip.hold_ctrl.ctrl") + TextFormatting.RESET + TextFormatting.GRAY); - } - - public static boolean isShiftKeyDown() { - return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT); - } - - public static boolean isCtrlKeyDown() { - return Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL); - } - - public static String formatNumber(long number) { - return NumberFormat.getInstance().format(number); - } - - public static String formatHarvestLevel(int harvestLevel) { - return localize("harvest_level." + harvestLevel).equals(Exchangers.MODID + "." + "harvest_level." + harvestLevel) ? String.valueOf(harvestLevel) : localize("harvest_level." + harvestLevel); - } - - public static String localize(String unlocalized, Object... args) { - String toLocalize = Exchangers.MODID + "." + unlocalized; - if (args != null && args.length > 0) { - return I18n.translateToLocalFormatted(toLocalize, args); - } - else { - return I18n.translateToLocal(toLocalize); - } - } - -} diff --git a/src/main/java/jackyy/exchangers/integration/BetterWithModsIntegration.java b/src/main/java/jackyy/exchangers/integration/BetterWithModsIntegration.java new file mode 100644 index 0000000..dc23b12 --- /dev/null +++ b/src/main/java/jackyy/exchangers/integration/BetterWithModsIntegration.java @@ -0,0 +1,39 @@ +package jackyy.exchangers.integration; + +import betterwithmods.module.hardcore.world.strata.HCStrata; +import jackyy.exchangers.util.IExchanger; +import jackyy.exchangers.util.Reference; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.TextComponentTranslation; +import net.minecraft.world.World; +import net.minecraftforge.event.world.BlockEvent; +import net.minecraftforge.fml.common.Optional; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +public class BetterWithModsIntegration { + + @SubscribeEvent @Deprecated + @Optional.Method(modid = Reference.BWM) + public void onPlace(BlockEvent.PlaceEvent event) { + World world = event.getWorld(); + BlockPos pos = event.getPos(); + if (!(event.getEntity() instanceof EntityPlayer)) + return; + IBlockState state = event.getState(); + if (HCStrata.shouldStratify(world, state)) { + ItemStack stack = ((EntityPlayer) event.getEntity()).getHeldItemMainhand(); + int strata = HCStrata.getStratification(world, pos, world.provider.getDimension()).ordinal(); + if (stack.getItem() instanceof IExchanger && HCStrata.STATES.containsKey(event.getState())) { + int level = Math.max(1, ((IExchanger) stack.getItem()).getHarvestLevel()); + if (level <= strata) { + event.setCanceled(true); + ((EntityPlayer) event.getEntity()).sendStatusMessage(new TextComponentTranslation(Reference.MODID + "." + "error.event_cancelled_bwm"), false); + } + } + } + } + +} diff --git a/src/main/java/jackyy/exchangers/integration/EnderIOEndergyIntegration.java b/src/main/java/jackyy/exchangers/integration/EnderIOEndergyIntegration.java new file mode 100644 index 0000000..889e7a1 --- /dev/null +++ b/src/main/java/jackyy/exchangers/integration/EnderIOEndergyIntegration.java @@ -0,0 +1,36 @@ +package jackyy.exchangers.integration; + +import jackyy.exchangers.util.Reference; +import jackyy.gunpowderlib.helper.ObjectHelper; +import net.minecraft.item.ItemStack; + +public class EnderIOEndergyIntegration { + + public static ItemStack grainyCapacitor; + public static ItemStack silverCapacitor; + public static ItemStack endergeticSilverCapacitor; + public static ItemStack endergisedCapacitor; + public static ItemStack crystallineCapacitor; + public static ItemStack totemicCapacitor; + public static ItemStack melodicCapacitor; + public static ItemStack stellarCapacitor; + public static ItemStack infinityDust; + public static ItemStack glowstoneNanoParticles; + + public static void init() { + Reference.LOGGER.info("Fetching items for Ender IO Endergy integration..."); + + grainyCapacitor = ObjectHelper.getItemStackByName(Reference.EIO, "item_capacitor_grainy", 1, 0); + silverCapacitor = ObjectHelper.getItemStackByName(Reference.EIO, "item_capacitor_silver", 1, 0); + endergeticSilverCapacitor = ObjectHelper.getItemStackByName(Reference.EIO, "item_capacitor_energetic_silver", 1, 0); + endergisedCapacitor = ObjectHelper.getItemStackByName(Reference.EIO, "item_capacitor_vivid", 1, 0); + crystallineCapacitor = ObjectHelper.getItemStackByName(Reference.EIO, "item_capacitor_crystalline", 1, 0); + totemicCapacitor = ObjectHelper.getItemStackByName(Reference.EIO, "item_capacitor_totemic", 1, 0); + melodicCapacitor = ObjectHelper.getItemStackByName(Reference.EIO, "item_capacitor_melodic", 1, 0); + stellarCapacitor = ObjectHelper.getItemStackByName(Reference.EIO, "item_capacitor_stellar", 1, 0); + + infinityDust = ObjectHelper.getItemStackByName(Reference.EIO, "block_infinity_fog", 1, 0); + glowstoneNanoParticles = ObjectHelper.getItemStackByName(Reference.EIO, "block_holy_fog", 1, 0); + } + +} diff --git a/src/main/java/jackyy/exchangers/integration/EnderIOIntegration.java b/src/main/java/jackyy/exchangers/integration/EnderIOIntegration.java index 7de6255..7fa2758 100644 --- a/src/main/java/jackyy/exchangers/integration/EnderIOIntegration.java +++ b/src/main/java/jackyy/exchangers/integration/EnderIOIntegration.java @@ -1,10 +1,10 @@ package jackyy.exchangers.integration; -import jackyy.exchangers.Exchangers; +import jackyy.exchangers.util.Reference; +import jackyy.gunpowderlib.helper.ObjectHelper; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; @@ -16,6 +16,8 @@ public class EnderIOIntegration { public static ItemStack capacitorBank; public static ItemStack capacitorBankVibrant; public static ItemStack enhancedWirelessChargingAntenna; + public static ItemStack telepadBlock; + public static ItemStack dimensionalTransceiver; public static ItemStack basicCapacitor; public static ItemStack doubleLayerCapacitor; public static ItemStack octadicCapacitor; @@ -26,23 +28,27 @@ public class EnderIOIntegration { public static ItemStack bucketNutrientDistillation; public static ItemStack bucketDewOfTheVoid; public static ItemStack bucketVaporOfLevity; + public static ItemStack bucketLiquidSunshine; + public static ItemStack bucketConcentratedCloudSeed; public static void init() { - Exchangers.logger.info("Fetching items for Ender IO integration..."); + Reference.LOGGER.info("Fetching items for Ender IO integration..."); - Block capBankBlock = Block.REGISTRY.getObject(new ResourceLocation(Exchangers.EIO, "block_cap_bank")); + Block capBankBlock = ObjectHelper.getBlockByName(Reference.EIO, "block_cap_bank"); capacitorBankBasic = new ItemStack(capBankBlock, 1, 1); capacitorBank = new ItemStack(capBankBlock, 1, 2); capacitorBankVibrant = new ItemStack(capBankBlock, 1, 3); - Item capacitorItem = Item.REGISTRY.getObject(new ResourceLocation(Exchangers.EIO, "item_basic_capacitor")); + Item capacitorItem = ObjectHelper.getItemByName(Reference.EIO, "item_basic_capacitor"); if (capacitorItem != null) { basicCapacitor = new ItemStack(capacitorItem, 1, 0); doubleLayerCapacitor = new ItemStack(capacitorItem, 1, 1); octadicCapacitor = new ItemStack(capacitorItem, 1, 2); } - enhancedWirelessChargingAntenna = new ItemStack(Block.REGISTRY.getObject(new ResourceLocation(Exchangers.EIO, "block_enhanced_wireless_charger"))); + enhancedWirelessChargingAntenna = ObjectHelper.getBlockStackByName(Reference.EIO, "block_enhanced_wireless_charger", 1, 0); + telepadBlock = ObjectHelper.getBlockStackByName(Reference.EIO, "block_tele_pad", 1, 0); + dimensionalTransceiver = ObjectHelper.getBlockStackByName(Reference.EIO, "block_transceiver", 1, 0); pulsatingCrystal = "itemPulsatingCrystal"; vibrantCrystal = "itemVibrantCrystal"; @@ -55,6 +61,10 @@ public static void init() { bucketDewOfTheVoid = FluidUtil.getFilledBucket(new FluidStack(dewOfTheVoid, 1000)); Fluid vaporOfLevity = FluidRegistry.getFluid("vapor_of_levity"); bucketVaporOfLevity = FluidUtil.getFilledBucket(new FluidStack(vaporOfLevity, 1000)); + Fluid liquidSunshine = FluidRegistry.getFluid("liquid_sunshine"); + bucketLiquidSunshine = FluidUtil.getFilledBucket(new FluidStack(liquidSunshine, 1000)); + Fluid concentratedCloudSeed = FluidRegistry.getFluid("cloud_seed_concentrated"); + bucketConcentratedCloudSeed = FluidUtil.getFilledBucket(new FluidStack(concentratedCloudSeed, 1000)); } } diff --git a/src/main/java/jackyy/exchangers/integration/ImmersiveEngineeringIntegration.java b/src/main/java/jackyy/exchangers/integration/ImmersiveEngineeringIntegration.java index 325e72c..d36d5e4 100644 --- a/src/main/java/jackyy/exchangers/integration/ImmersiveEngineeringIntegration.java +++ b/src/main/java/jackyy/exchangers/integration/ImmersiveEngineeringIntegration.java @@ -1,10 +1,10 @@ package jackyy.exchangers.integration; -import jackyy.exchangers.Exchangers; +import jackyy.exchangers.util.Reference; +import jackyy.gunpowderlib.helper.ObjectHelper; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; @@ -26,24 +26,24 @@ public class ImmersiveEngineeringIntegration { public static ItemStack bucketBiodiesel; public static void init() { - Exchangers.logger.info("Fetching items for Immersive Engineering integration..."); + Reference.LOGGER.info("Fetching items for Immersive Engineering integration..."); - Block capBlock = Block.REGISTRY.getObject(new ResourceLocation(Exchangers.IE, "metal_device0")); + Block capBlock = ObjectHelper.getBlockByName(Reference.IE, "metal_device0"); lvCapacitor = new ItemStack(capBlock, 1, 0); mvCapacitor = new ItemStack(capBlock, 1, 1); hvCapacitor = new ItemStack(capBlock, 1, 2); - Block engBlock = Block.REGISTRY.getObject(new ResourceLocation(Exchangers.IE, "metal_decoration0")); + Block engBlock = ObjectHelper.getBlockByName(Reference.IE, "metal_decoration0"); heavyEngineeringBlock = new ItemStack(engBlock, 1, 5); - Item wireCoil = Item.REGISTRY.getObject(new ResourceLocation(Exchangers.IE, "wirecoil")); + Item wireCoil = ObjectHelper.getItemByName(Reference.IE, "wirecoil"); if (wireCoil != null) { lvWireCoil = new ItemStack(wireCoil, 1, 0); mvWireCoil = new ItemStack(wireCoil, 1, 1); hvWireCoil = new ItemStack(wireCoil, 1, 2); } - Item material = Item.REGISTRY.getObject(new ResourceLocation(Exchangers.IE, "material")); + Item material = ObjectHelper.getItemByName(Reference.IE, "material"); if (material != null) { ironMechanicalComponent = new ItemStack(material, 1, 8); steelMechanicalComponent = new ItemStack(material, 1, 9); diff --git a/src/main/java/jackyy/exchangers/integration/MekanismIntegration.java b/src/main/java/jackyy/exchangers/integration/MekanismIntegration.java index 6fb4165..5af9bb9 100644 --- a/src/main/java/jackyy/exchangers/integration/MekanismIntegration.java +++ b/src/main/java/jackyy/exchangers/integration/MekanismIntegration.java @@ -1,10 +1,10 @@ package jackyy.exchangers.integration; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; +import jackyy.gunpowderlib.helper.ObjectHelper; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; public class MekanismIntegration { @@ -17,7 +17,7 @@ public class MekanismIntegration { public static ItemStack portableTeleporter; public static void init() { - Exchangers.logger.info("Fetching items for Mekanism integration..."); + Reference.LOGGER.info("Fetching items for Mekanism integration..."); if (ModConfig.misc.useOreDictCircuits) { circuitBasic = "circuitBasic"; @@ -25,7 +25,7 @@ public static void init() { circuitElite = "circuitElite"; circuitUltimate = "circuitUltimate"; } else { - Item circuitsItem = Item.REGISTRY.getObject(new ResourceLocation(Exchangers.MEK, "controlcircuit")); + Item circuitsItem = ObjectHelper.getItemByName(Reference.MEK, "controlcircuit"); if (circuitsItem != null) { circuitBasic = new ItemStack(circuitsItem, 1, 0); circuitAdvanced = new ItemStack(circuitsItem, 1, 1); @@ -34,17 +34,17 @@ public static void init() { } } - Item energyTabletItem = Item.REGISTRY.getObject(new ResourceLocation(Exchangers.MEK, "energytablet")); + Item energyTabletItem = ObjectHelper.getItemByName(Reference.MEK, "energytablet"); if (energyTabletItem != null) { energyTablet = new ItemStack(energyTabletItem, 1, 0); } - Item teleportationCoreItem = Item.REGISTRY.getObject(new ResourceLocation(Exchangers.MEK, "teleportationcore")); + Item teleportationCoreItem = ObjectHelper.getItemByName(Reference.MEK, "teleportationcore"); if (teleportationCoreItem != null) { teleportationCore = new ItemStack(teleportationCoreItem, 1, 0); } - Item portableTeleporterItem = Item.REGISTRY.getObject(new ResourceLocation(Exchangers.MEK, "portableteleporter")); + Item portableTeleporterItem = ObjectHelper.getItemByName(Reference.MEK, "portableteleporter"); if (portableTeleporterItem != null) { portableTeleporter = new ItemStack(portableTeleporterItem, 1, 0); } diff --git a/src/main/java/jackyy/exchangers/integration/ThermalExpansionIntegration.java b/src/main/java/jackyy/exchangers/integration/ThermalExpansionIntegration.java index 61a022c..4361a24 100644 --- a/src/main/java/jackyy/exchangers/integration/ThermalExpansionIntegration.java +++ b/src/main/java/jackyy/exchangers/integration/ThermalExpansionIntegration.java @@ -1,9 +1,9 @@ package jackyy.exchangers.integration; -import jackyy.exchangers.Exchangers; +import jackyy.exchangers.util.Reference; +import jackyy.gunpowderlib.helper.ObjectHelper; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; @@ -25,9 +25,9 @@ public class ThermalExpansionIntegration { public static ItemStack bucketGelidCryotheum; public static void init() { - Exchangers.logger.info("Fetching items for Thermal Expansion integration..."); + Reference.LOGGER.info("Fetching items for Thermal Expansion integration..."); - Item fluxCapacitorItem = Item.REGISTRY.getObject(new ResourceLocation(Exchangers.TE, "capacitor")); + Item fluxCapacitorItem = ObjectHelper.getItemByName(Reference.TE, "capacitor"); if (fluxCapacitorItem != null) { fluxCapacitorBasic = new ItemStack(fluxCapacitorItem, 1, 0); fluxCapacitorHardened = new ItemStack(fluxCapacitorItem, 1, 1); @@ -36,7 +36,7 @@ public static void init() { fluxCapacitorResonant = new ItemStack(fluxCapacitorItem, 1, 4); } - Item teMaterialsItem = Item.REGISTRY.getObject(new ResourceLocation("thermalfoundation", "material")); + Item teMaterialsItem = ObjectHelper.getItemByName("thermalfoundation", "material"); if (teMaterialsItem != null) { redstoneServo = new ItemStack(teMaterialsItem, 1, 512); redstoneReceptionCoil = new ItemStack(teMaterialsItem, 1, 513); diff --git a/src/main/java/jackyy/exchangers/item/ItemCoreBase.java b/src/main/java/jackyy/exchangers/item/ItemCoreBase.java index 195b454..1194235 100644 --- a/src/main/java/jackyy/exchangers/item/ItemCoreBase.java +++ b/src/main/java/jackyy/exchangers/item/ItemCoreBase.java @@ -1,6 +1,6 @@ package jackyy.exchangers.item; -import jackyy.exchangers.Exchangers; +import jackyy.exchangers.util.Reference; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -12,7 +12,7 @@ public class ItemCoreBase extends Item { public ItemCoreBase() { setMaxStackSize(16); - setCreativeTab(Exchangers.TAB); + setCreativeTab(Reference.TAB); } @Override diff --git a/src/main/java/jackyy/exchangers/item/ItemExchangerBase.java b/src/main/java/jackyy/exchangers/item/ItemExchangerBase.java index f7fdb3c..077f4d8 100644 --- a/src/main/java/jackyy/exchangers/item/ItemExchangerBase.java +++ b/src/main/java/jackyy/exchangers/item/ItemExchangerBase.java @@ -1,11 +1,13 @@ package jackyy.exchangers.item; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.client.Keys; import jackyy.exchangers.handler.ExchangerHandler; -import jackyy.exchangers.helper.StringHelper; import jackyy.exchangers.registry.ModConfig; import jackyy.exchangers.util.IExchanger; +import jackyy.exchangers.util.Reference; +import jackyy.gunpowderlib.helper.KeyHelper; +import jackyy.gunpowderlib.helper.NBTHelper; +import jackyy.gunpowderlib.helper.StringHelper; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.client.util.ITooltipFlag; @@ -34,7 +36,7 @@ public class ItemExchangerBase extends Item implements IExchanger { public ItemExchangerBase() { setMaxStackSize(1); - setCreativeTab(Exchangers.TAB); + setCreativeTab(Reference.TAB); } @Override @@ -64,47 +66,49 @@ public void addInformation(ItemStack stack, World world, List tooltip, I super.addInformation(stack, world, tooltip, flag); ExchangerHandler.setDefaultTagCompound(stack); - NBTTagCompound compound = stack.getTagCompound(); + NBTTagCompound compound = NBTHelper.getTag(stack); IBlockState state = NBTUtil.readBlockState(compound.getCompoundTag("blockstate")); Block block = state.getBlock(); - int mode = stack.getTagCompound().getInteger("exmode"); + int mode = compound.getInteger("exmode"); - if (!StringHelper.isShiftKeyDown()) { - tooltip.add(StringHelper.getShiftText()); + if (!KeyHelper.isShiftKeyDown()) { + tooltip.add(StringHelper.getShiftText(Reference.MODID)); } - if (StringHelper.isShiftKeyDown()) { - tooltip.add(TextFormatting.WHITE + StringHelper.localize("tooltip.selected_block") + " " + (block == Blocks.AIR ? TextFormatting.RED + StringHelper.localize("tooltip.selected_block.none") : TextFormatting.GREEN + ExchangerHandler.getBlockName(block, state.getBlock().getMetaFromState(state)))); - tooltip.add(TextFormatting.WHITE + StringHelper.localize("tooltip.current_range") + " " + TextFormatting.GREEN + ExchangerHandler.modeSwitchList[compound.getInteger("range")]); - tooltip.add(TextFormatting.WHITE + StringHelper.localize("tooltip.max_range") + " " + TextFormatting.GREEN + ExchangerHandler.modeSwitchList[getMaxRange()]); - tooltip.add(TextFormatting.WHITE + StringHelper.localize("tooltip.max_harvest_level") + " " + TextFormatting.GREEN + StringHelper.formatHarvestLevel(getHarvestLevel())); + if (KeyHelper.isShiftKeyDown()) { + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.selected_block") + " " + (block == Blocks.AIR ? TextFormatting.RED + StringHelper.localize(Reference.MODID, "tooltip.selected_block.none") : TextFormatting.GREEN + ExchangerHandler.getBlockName(block, state.getBlock().getMetaFromState(state)))); + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.current_range") + " " + TextFormatting.GREEN + ExchangerHandler.modeSwitchList[compound.getInteger("range")]); + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.max_range") + " " + TextFormatting.GREEN + ExchangerHandler.modeSwitchList[getMaxRange()]); + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.max_harvest_level") + " " + TextFormatting.GREEN + StringHelper.formatHarvestLevel(Reference.MODID, getHarvestLevel())); switch (mode) { case 0: - tooltip.add(TextFormatting.WHITE + StringHelper.localize("tooltip.current_mode") + " " + TextFormatting.GREEN + StringHelper.localize("mode.plane")); + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.current_mode") + " " + TextFormatting.GREEN + StringHelper.localize(Reference.MODID, "mode.plane")); break; case 1: - tooltip.add(TextFormatting.WHITE + StringHelper.localize("tooltip.current_mode") + " " + TextFormatting.GREEN + StringHelper.localize("mode.horizontal")); + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.current_mode") + " " + TextFormatting.GREEN + StringHelper.localize(Reference.MODID, "mode.horizontal")); break; case 2: - tooltip.add(TextFormatting.WHITE + StringHelper.localize("tooltip.current_mode") + " " + TextFormatting.GREEN + StringHelper.localize("mode.vertical")); + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.current_mode") + " " + TextFormatting.GREEN + StringHelper.localize(Reference.MODID, "mode.vertical")); break; } - tooltip.add(TextFormatting.WHITE + StringHelper.localize("tooltip.silk_touch", ModConfig.misc.doExchangersSilkTouch ? TextFormatting.GREEN + StringHelper.localize("tooltip.state.enabled") + TextFormatting.WHITE : TextFormatting.RED + StringHelper.localize("tooltip.state.disabled") + TextFormatting.WHITE)); - tooltip.add(TextFormatting.WHITE + StringHelper.localize("tooltip.force_drop_items", compound.getBoolean("forceDropItems") ? TextFormatting.GREEN + StringHelper.localize("tooltip.state.enabled") + TextFormatting.WHITE : TextFormatting.RED + StringHelper.localize("tooltip.state.disabled") + TextFormatting.WHITE)); + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.silk_touch", ModConfig.misc.doExchangersSilkTouch ? TextFormatting.GREEN + StringHelper.localize(Reference.MODID, "tooltip.state.enabled") + TextFormatting.WHITE : TextFormatting.RED + StringHelper.localize(Reference.MODID, "tooltip.state.disabled") + TextFormatting.WHITE)); + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.force_drop_items", compound.getBoolean("forceDropItems") ? TextFormatting.GREEN + StringHelper.localize(Reference.MODID, "tooltip.state.enabled") + TextFormatting.WHITE : TextFormatting.RED + StringHelper.localize(Reference.MODID, "tooltip.state.disabled") + TextFormatting.WHITE)); + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.directional_placement", compound.getBoolean("directionalPlacement") ? TextFormatting.GREEN + StringHelper.localize(Reference.MODID, "tooltip.state.enabled") + TextFormatting.WHITE : TextFormatting.RED + StringHelper.localize(Reference.MODID, "tooltip.state.disabled") + TextFormatting.WHITE)); } - if (!StringHelper.isCtrlKeyDown()) { - tooltip.add(StringHelper.getCtrlText()); + if (!KeyHelper.isCtrlKeyDown()) { + tooltip.add(StringHelper.getCtrlText(Reference.MODID)); } - if (StringHelper.isCtrlKeyDown()) { - tooltip.add(TextFormatting.WHITE + StringHelper.localize("tooltip.extra1")); - tooltip.add(TextFormatting.WHITE + StringHelper.localize("tooltip.extra2")); - tooltip.add(TextFormatting.WHITE + StringHelper.localize("tooltip.extra3", TextFormatting.GREEN + Keys.RANGE_SWITCH_KEY.getDisplayName() + TextFormatting.WHITE)); - tooltip.add(TextFormatting.WHITE + StringHelper.localize("tooltip.extra4", TextFormatting.GREEN + Keys.MODE_SWITCH_KEY.getDisplayName() + TextFormatting.WHITE)); - tooltip.add(TextFormatting.WHITE + StringHelper.localize("tooltip.extra5", TextFormatting.GREEN + Keys.FORCE_DROP_ITEMS_KEY.getDisplayName() + TextFormatting.WHITE)); + if (KeyHelper.isCtrlKeyDown()) { + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.extra1")); + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.extra2")); + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.extra3", TextFormatting.GREEN + Keys.RANGE_SWITCH_KEY.getDisplayName() + TextFormatting.WHITE)); + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.extra4", TextFormatting.GREEN + Keys.MODE_SWITCH_KEY.getDisplayName() + TextFormatting.WHITE)); + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.extra5", TextFormatting.GREEN + Keys.FORCE_DROP_ITEMS_KEY.getDisplayName() + TextFormatting.WHITE)); + tooltip.add(TextFormatting.WHITE + StringHelper.localize(Reference.MODID, "tooltip.extra6", TextFormatting.GREEN + Keys.Directional_PLACEMENT_KEY.getDisplayName() + TextFormatting.WHITE)); } - if (StringHelper.isShiftKeyDown()) { - tooltip.add(StringHelper.getTierText(getTier())); + if (KeyHelper.isShiftKeyDown()) { + tooltip.add(StringHelper.getTierText(Reference.MODID, getTier())); if (!isPowered()) { - tooltip.add(StringHelper.formatNumber(stack.getMaxDamage() - stack.getItemDamage()) + " / " + StringHelper.formatNumber(stack.getMaxDamage()) + " " + StringHelper.localize("tooltip.durability")); + tooltip.add(StringHelper.formatNumber(stack.getMaxDamage() - stack.getItemDamage()) + " / " + StringHelper.formatNumber(stack.getMaxDamage()) + " " + StringHelper.localize(Reference.MODID, "tooltip.durability")); } } } diff --git a/src/main/java/jackyy/exchangers/item/ItemExchangerBasePowered.java b/src/main/java/jackyy/exchangers/item/ItemExchangerBasePowered.java index eb77df8..a06824c 100644 --- a/src/main/java/jackyy/exchangers/item/ItemExchangerBasePowered.java +++ b/src/main/java/jackyy/exchangers/item/ItemExchangerBasePowered.java @@ -4,10 +4,12 @@ import cofh.redstoneflux.api.IEnergyContainerItem; import cofh.redstoneflux.util.EnergyContainerItemWrapper; import jackyy.exchangers.handler.ExchangerHandler; -import jackyy.exchangers.helper.EnergyHelper; -import jackyy.exchangers.helper.NBTHelper; -import jackyy.exchangers.helper.StringHelper; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; +import jackyy.gunpowderlib.helper.EnergyHelper; +import jackyy.gunpowderlib.helper.KeyHelper; +import jackyy.gunpowderlib.helper.NBTHelper; +import jackyy.gunpowderlib.helper.StringHelper; import net.minecraft.client.util.ITooltipFlag; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.enchantment.Enchantment; @@ -80,9 +82,9 @@ public double getDurabilityForDisplay(ItemStack stack) { public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) { super.addInformation(stack, world, tooltip, flag); if (!Loader.isModLoaded("redstoneflux")) { - tooltip.add(StringHelper.localize("tooltip.redstone_flux_warning")); + tooltip.add(StringHelper.localize(Reference.MODID, "tooltip.redstone_flux_warning")); } - if (StringHelper.isShiftKeyDown()) { + if (KeyHelper.isShiftKeyDown()) { tooltip.add(StringHelper.formatNumber(getEnergyStored(stack)) + " / " + StringHelper.formatNumber(getMaxEnergyStored(stack)) + " RF"); } } diff --git a/src/main/java/jackyy/exchangers/item/enderio/ItemConductiveIronExchanger.java b/src/main/java/jackyy/exchangers/item/enderio/ItemConductiveIronExchanger.java index 355f1a1..ab8d8f5 100644 --- a/src/main/java/jackyy/exchangers/item/enderio/ItemConductiveIronExchanger.java +++ b/src/main/java/jackyy/exchangers/item/enderio/ItemConductiveIronExchanger.java @@ -1,12 +1,12 @@ package jackyy.exchangers.item.enderio; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +14,8 @@ public class ItemConductiveIronExchanger extends ItemExchangerBasePowered { public ItemConductiveIronExchanger() { - setRegistryName(Exchangers.MODID + ":conductive_iron_exchanger"); - setTranslationKey(Exchangers.MODID + ".conductive_iron_exchanger"); + setRegistryName(Reference.MODID + ":conductive_iron_exchanger"); + setTranslationKey(Reference.MODID + ".conductive_iron_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +35,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.enderIOModule && Loader.isModLoaded(Exchangers.EIO); + return ModConfig.modules.enderIOModule && Loader.isModLoaded(Reference.EIO); } @Override @@ -54,8 +54,8 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { - return Exchangers.TIER_1; + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; } } diff --git a/src/main/java/jackyy/exchangers/item/enderio/ItemDarkSteelExchanger.java b/src/main/java/jackyy/exchangers/item/enderio/ItemDarkSteelExchanger.java index d7916ee..77bccd3 100644 --- a/src/main/java/jackyy/exchangers/item/enderio/ItemDarkSteelExchanger.java +++ b/src/main/java/jackyy/exchangers/item/enderio/ItemDarkSteelExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.enderio; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemDarkSteelExchanger extends ItemExchangerBasePowered { public ItemDarkSteelExchanger() { - setRegistryName(Exchangers.MODID + ":dark_steel_exchanger"); - setTranslationKey(Exchangers.MODID + ".dark_steel_exchanger"); + setRegistryName(Reference.MODID + ":dark_steel_exchanger"); + setTranslationKey(Reference.MODID + ".dark_steel_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +36,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.enderIOModule && Loader.isModLoaded(Exchangers.EIO); + return ModConfig.modules.enderIOModule && Loader.isModLoaded(Reference.EIO); } @Override @@ -54,7 +55,7 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/enderio/ItemEIOExchangerCoreT1.java b/src/main/java/jackyy/exchangers/item/enderio/ItemEIOExchangerCoreT1.java index 1f4766f..225f6f8 100644 --- a/src/main/java/jackyy/exchangers/item/enderio/ItemEIOExchangerCoreT1.java +++ b/src/main/java/jackyy/exchangers/item/enderio/ItemEIOExchangerCoreT1.java @@ -1,12 +1,12 @@ package jackyy.exchangers.item.enderio; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +14,8 @@ public class ItemEIOExchangerCoreT1 extends ItemCoreBase { public ItemEIOExchangerCoreT1() { - setRegistryName(Exchangers.MODID + ":eio_exchanger_core_tier1"); - setTranslationKey(Exchangers.MODID + ".eio_exchanger_core_tier1"); + setRegistryName(Reference.MODID + ":eio_exchanger_core_tier1"); + setTranslationKey(Reference.MODID + ".eio_exchanger_core_tier1"); } @SideOnly(Side.CLIENT) @@ -25,12 +25,12 @@ public void initModel() { @Override public boolean checkLoaded() { - return ModConfig.modules.enderIOModule && Loader.isModLoaded(Exchangers.EIO); + return ModConfig.modules.enderIOModule && Loader.isModLoaded(Reference.EIO); } @Override - public EnumRarity getRarity(ItemStack stack) { - return Exchangers.TIER_1; + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; } } diff --git a/src/main/java/jackyy/exchangers/item/enderio/ItemEIOExchangerCoreT2.java b/src/main/java/jackyy/exchangers/item/enderio/ItemEIOExchangerCoreT2.java index 1f3aebf..46debf9 100644 --- a/src/main/java/jackyy/exchangers/item/enderio/ItemEIOExchangerCoreT2.java +++ b/src/main/java/jackyy/exchangers/item/enderio/ItemEIOExchangerCoreT2.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.enderio; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemEIOExchangerCoreT2 extends ItemCoreBase { public ItemEIOExchangerCoreT2() { - setRegistryName(Exchangers.MODID + ":eio_exchanger_core_tier2"); - setTranslationKey(Exchangers.MODID + ".eio_exchanger_core_tier2"); + setRegistryName(Reference.MODID + ":eio_exchanger_core_tier2"); + setTranslationKey(Reference.MODID + ".eio_exchanger_core_tier2"); } @SideOnly(Side.CLIENT) @@ -25,11 +26,11 @@ public void initModel() { @Override public boolean checkLoaded() { - return ModConfig.modules.enderIOModule && Loader.isModLoaded(Exchangers.EIO); + return ModConfig.modules.enderIOModule && Loader.isModLoaded(Reference.EIO); } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.RARE; } diff --git a/src/main/java/jackyy/exchangers/item/enderio/ItemEIOExchangerCoreT3.java b/src/main/java/jackyy/exchangers/item/enderio/ItemEIOExchangerCoreT3.java index 19b02d6..0316f85 100644 --- a/src/main/java/jackyy/exchangers/item/enderio/ItemEIOExchangerCoreT3.java +++ b/src/main/java/jackyy/exchangers/item/enderio/ItemEIOExchangerCoreT3.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.enderio; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemEIOExchangerCoreT3 extends ItemCoreBase { public ItemEIOExchangerCoreT3() { - setRegistryName(Exchangers.MODID + ":eio_exchanger_core_tier3"); - setTranslationKey(Exchangers.MODID + ".eio_exchanger_core_tier3"); + setRegistryName(Reference.MODID + ":eio_exchanger_core_tier3"); + setTranslationKey(Reference.MODID + ".eio_exchanger_core_tier3"); } @SideOnly(Side.CLIENT) @@ -25,11 +26,11 @@ public void initModel() { @Override public boolean checkLoaded() { - return ModConfig.modules.enderIOModule && Loader.isModLoaded(Exchangers.EIO); + return ModConfig.modules.enderIOModule && Loader.isModLoaded(Reference.EIO); } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/enderio/ItemElectricalSteelExchanger.java b/src/main/java/jackyy/exchangers/item/enderio/ItemElectricalSteelExchanger.java index 4549289..aed8292 100644 --- a/src/main/java/jackyy/exchangers/item/enderio/ItemElectricalSteelExchanger.java +++ b/src/main/java/jackyy/exchangers/item/enderio/ItemElectricalSteelExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.enderio; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemElectricalSteelExchanger extends ItemExchangerBasePowered { public ItemElectricalSteelExchanger() { - setRegistryName(Exchangers.MODID + ":electrical_steel_exchanger"); - setTranslationKey(Exchangers.MODID + ".electrical_steel_exchanger"); + setRegistryName(Reference.MODID + ":electrical_steel_exchanger"); + setTranslationKey(Reference.MODID + ".electrical_steel_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +36,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.enderIOModule && Loader.isModLoaded(Exchangers.EIO); + return ModConfig.modules.enderIOModule && Loader.isModLoaded(Reference.EIO); } @Override @@ -54,7 +55,7 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.RARE; } diff --git a/src/main/java/jackyy/exchangers/item/enderio/ItemEndSteelExchanger.java b/src/main/java/jackyy/exchangers/item/enderio/ItemEndSteelExchanger.java index 4323f5b..556b383 100644 --- a/src/main/java/jackyy/exchangers/item/enderio/ItemEndSteelExchanger.java +++ b/src/main/java/jackyy/exchangers/item/enderio/ItemEndSteelExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.enderio; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemEndSteelExchanger extends ItemExchangerBasePowered { public ItemEndSteelExchanger() { - setRegistryName(Exchangers.MODID + ":end_steel_exchanger"); - setTranslationKey(Exchangers.MODID + ".end_steel_exchanger"); + setRegistryName(Reference.MODID + ":end_steel_exchanger"); + setTranslationKey(Reference.MODID + ".end_steel_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +36,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.enderIOModule && Loader.isModLoaded(Exchangers.EIO); + return ModConfig.modules.enderIOModule && Loader.isModLoaded(Reference.EIO); } @Override @@ -54,7 +55,7 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/enderio/ItemEnergeticExchanger.java b/src/main/java/jackyy/exchangers/item/enderio/ItemEnergeticExchanger.java index 3e1df05..1a666a8 100644 --- a/src/main/java/jackyy/exchangers/item/enderio/ItemEnergeticExchanger.java +++ b/src/main/java/jackyy/exchangers/item/enderio/ItemEnergeticExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.enderio; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemEnergeticExchanger extends ItemExchangerBasePowered { public ItemEnergeticExchanger() { - setRegistryName(Exchangers.MODID + ":energetic_exchanger"); - setTranslationKey(Exchangers.MODID + ".energetic_exchanger"); + setRegistryName(Reference.MODID + ":energetic_exchanger"); + setTranslationKey(Reference.MODID + ".energetic_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +36,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.enderIOModule && Loader.isModLoaded(Exchangers.EIO); + return ModConfig.modules.enderIOModule && Loader.isModLoaded(Reference.EIO); } @Override @@ -54,7 +55,7 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.RARE; } diff --git a/src/main/java/jackyy/exchangers/item/enderio/ItemPulsatingIronExchanger.java b/src/main/java/jackyy/exchangers/item/enderio/ItemPulsatingIronExchanger.java index 04b479d..a293b6c 100644 --- a/src/main/java/jackyy/exchangers/item/enderio/ItemPulsatingIronExchanger.java +++ b/src/main/java/jackyy/exchangers/item/enderio/ItemPulsatingIronExchanger.java @@ -1,12 +1,12 @@ package jackyy.exchangers.item.enderio; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +14,8 @@ public class ItemPulsatingIronExchanger extends ItemExchangerBasePowered { public ItemPulsatingIronExchanger() { - setRegistryName(Exchangers.MODID + ":pulsating_iron_exchanger"); - setTranslationKey(Exchangers.MODID + ".pulsating_iron_exchanger"); + setRegistryName(Reference.MODID + ":pulsating_iron_exchanger"); + setTranslationKey(Reference.MODID + ".pulsating_iron_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +35,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.enderIOModule && Loader.isModLoaded(Exchangers.EIO); + return ModConfig.modules.enderIOModule && Loader.isModLoaded(Reference.EIO); } @Override @@ -54,8 +54,8 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { - return Exchangers.TIER_1; + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; } } diff --git a/src/main/java/jackyy/exchangers/item/enderio/ItemVibrantExchanger.java b/src/main/java/jackyy/exchangers/item/enderio/ItemVibrantExchanger.java index 2d615a4..cd6e879 100644 --- a/src/main/java/jackyy/exchangers/item/enderio/ItemVibrantExchanger.java +++ b/src/main/java/jackyy/exchangers/item/enderio/ItemVibrantExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.enderio; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemVibrantExchanger extends ItemExchangerBasePowered { public ItemVibrantExchanger() { - setRegistryName(Exchangers.MODID + ":vibrant_exchanger"); - setTranslationKey(Exchangers.MODID + ".vibrant_exchanger"); + setRegistryName(Reference.MODID + ":vibrant_exchanger"); + setTranslationKey(Reference.MODID + ".vibrant_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +36,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.enderIOModule && Loader.isModLoaded(Exchangers.EIO); + return ModConfig.modules.enderIOModule && Loader.isModLoaded(Reference.EIO); } @Override @@ -54,7 +55,7 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/enderioendergy/ItemCrudeSteelExchanger.java b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemCrudeSteelExchanger.java new file mode 100644 index 0000000..10e9dd7 --- /dev/null +++ b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemCrudeSteelExchanger.java @@ -0,0 +1,61 @@ +package jackyy.exchangers.item.enderioendergy; + +import jackyy.exchangers.item.ItemExchangerBasePowered; +import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class ItemCrudeSteelExchanger extends ItemExchangerBasePowered { + + public ItemCrudeSteelExchanger() { + setRegistryName(Reference.MODID + ":crude_steel_exchanger"); + setTranslationKey(Reference.MODID + ".crude_steel_exchanger"); + } + + @SideOnly(Side.CLIENT) + public void initModel() { + ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); + } + + @Override + public int getMaxEnergy() { + return ModConfig.enderIOEndergyTweaks.crudeSteelMaxEnergy; + } + + @Override + public int getPerBlockUse() { + return ModConfig.enderIOEndergyTweaks.crudeSteelPerBlockUse; + } + + @Override + public boolean checkLoaded() { + return ModConfig.modules.enderIOEndergyModule && Loader.isModLoaded(Reference.EIO_ENDERGY); + } + + @Override + public int getTier() { + return 1; + } + + @Override + public int getHarvestLevel() { + return ModConfig.enderIOEndergyTweaks.crudeSteelMaxHarvestLevel; + } + + @Override + public int getMaxRange() { + return ModConfig.enderIOEndergyTweaks.crudeSteelMaxRange; + } + + @Override + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; + } + +} diff --git a/src/main/java/jackyy/exchangers/item/enderioendergy/ItemCrystallineExchanger.java b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemCrystallineExchanger.java new file mode 100644 index 0000000..88619a9 --- /dev/null +++ b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemCrystallineExchanger.java @@ -0,0 +1,62 @@ +package jackyy.exchangers.item.enderioendergy; + +import jackyy.exchangers.item.ItemExchangerBasePowered; +import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class ItemCrystallineExchanger extends ItemExchangerBasePowered { + + public ItemCrystallineExchanger() { + setRegistryName(Reference.MODID + ":crystalline_exchanger"); + setTranslationKey(Reference.MODID + ".crystalline_exchanger"); + } + + @SideOnly(Side.CLIENT) + public void initModel() { + ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); + } + + @Override + public int getMaxEnergy() { + return ModConfig.enderIOEndergyTweaks.crystallineMaxEnergy; + } + + @Override + public int getPerBlockUse() { + return ModConfig.enderIOEndergyTweaks.crystallinePerBlockUse; + } + + @Override + public boolean checkLoaded() { + return ModConfig.modules.enderIOEndergyModule && Loader.isModLoaded(Reference.EIO_ENDERGY); + } + + @Override + public int getTier() { + return 4; + } + + @Override + public int getHarvestLevel() { + return ModConfig.enderIOEndergyTweaks.crystallineMaxHarvestLevel; + } + + @Override + public int getMaxRange() { + return ModConfig.enderIOEndergyTweaks.crystallineMaxRange; + } + + @Override + public IRarity getForgeRarity(ItemStack stack) { + return EnumRarity.RARE; + } + +} diff --git a/src/main/java/jackyy/exchangers/item/enderioendergy/ItemEIOEndergyExchangerCoreT1.java b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemEIOEndergyExchangerCoreT1.java new file mode 100644 index 0000000..0ccd001 --- /dev/null +++ b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemEIOEndergyExchangerCoreT1.java @@ -0,0 +1,36 @@ +package jackyy.exchangers.item.enderioendergy; + +import jackyy.exchangers.item.ItemCoreBase; +import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class ItemEIOEndergyExchangerCoreT1 extends ItemCoreBase { + + public ItemEIOEndergyExchangerCoreT1() { + setRegistryName(Reference.MODID + ":eio_endergy_exchanger_core_tier1"); + setTranslationKey(Reference.MODID + ".eio_endergy_exchanger_core_tier1"); + } + + @SideOnly(Side.CLIENT) + public void initModel() { + ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); + } + + @Override + public boolean checkLoaded() { + return ModConfig.modules.enderIOEndergyModule && Loader.isModLoaded(Reference.EIO_ENDERGY); + } + + @Override + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; + } + +} diff --git a/src/main/java/jackyy/exchangers/item/enderioendergy/ItemEIOEndergyExchangerCoreT2.java b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemEIOEndergyExchangerCoreT2.java new file mode 100644 index 0000000..046e66d --- /dev/null +++ b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemEIOEndergyExchangerCoreT2.java @@ -0,0 +1,37 @@ +package jackyy.exchangers.item.enderioendergy; + +import jackyy.exchangers.item.ItemCoreBase; +import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class ItemEIOEndergyExchangerCoreT2 extends ItemCoreBase { + + public ItemEIOEndergyExchangerCoreT2() { + setRegistryName(Reference.MODID + ":eio_endergy_exchanger_core_tier2"); + setTranslationKey(Reference.MODID + ".eio_endergy_exchanger_core_tier2"); + } + + @SideOnly(Side.CLIENT) + public void initModel() { + ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); + } + + @Override + public boolean checkLoaded() { + return ModConfig.modules.enderIOEndergyModule && Loader.isModLoaded(Reference.EIO_ENDERGY); + } + + @Override + public IRarity getForgeRarity(ItemStack stack) { + return EnumRarity.RARE; + } + +} diff --git a/src/main/java/jackyy/exchangers/item/enderioendergy/ItemEIOEndergyExchangerCoreT3.java b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemEIOEndergyExchangerCoreT3.java new file mode 100644 index 0000000..b07c719 --- /dev/null +++ b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemEIOEndergyExchangerCoreT3.java @@ -0,0 +1,37 @@ +package jackyy.exchangers.item.enderioendergy; + +import jackyy.exchangers.item.ItemCoreBase; +import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class ItemEIOEndergyExchangerCoreT3 extends ItemCoreBase { + + public ItemEIOEndergyExchangerCoreT3() { + setRegistryName(Reference.MODID + ":eio_endergy_exchanger_core_tier3"); + setTranslationKey(Reference.MODID + ".eio_endergy_exchanger_core_tier3"); + } + + @SideOnly(Side.CLIENT) + public void initModel() { + ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); + } + + @Override + public boolean checkLoaded() { + return ModConfig.modules.enderIOEndergyModule && Loader.isModLoaded(Reference.EIO_ENDERGY); + } + + @Override + public IRarity getForgeRarity(ItemStack stack) { + return EnumRarity.EPIC; + } + +} diff --git a/src/main/java/jackyy/exchangers/item/enderioendergy/ItemEnergeticSilverExchanger.java b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemEnergeticSilverExchanger.java new file mode 100644 index 0000000..ab956ed --- /dev/null +++ b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemEnergeticSilverExchanger.java @@ -0,0 +1,61 @@ +package jackyy.exchangers.item.enderioendergy; + +import jackyy.exchangers.item.ItemExchangerBasePowered; +import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class ItemEnergeticSilverExchanger extends ItemExchangerBasePowered { + + public ItemEnergeticSilverExchanger() { + setRegistryName(Reference.MODID + ":energetic_silver_exchanger"); + setTranslationKey(Reference.MODID + ".energetic_silver_exchanger"); + } + + @SideOnly(Side.CLIENT) + public void initModel() { + ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); + } + + @Override + public int getMaxEnergy() { + return ModConfig.enderIOEndergyTweaks.energeticSilverMaxEnergy; + } + + @Override + public int getPerBlockUse() { + return ModConfig.enderIOEndergyTweaks.energeticSilverPerBlockUse; + } + + @Override + public boolean checkLoaded() { + return ModConfig.modules.enderIOEndergyModule && Loader.isModLoaded(Reference.EIO_ENDERGY); + } + + @Override + public int getTier() { + return 2; + } + + @Override + public int getHarvestLevel() { + return ModConfig.enderIOEndergyTweaks.energeticSilverMaxHarvestLevel; + } + + @Override + public int getMaxRange() { + return ModConfig.enderIOEndergyTweaks.energeticSilverMaxRange; + } + + @Override + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; + } + +} diff --git a/src/main/java/jackyy/exchangers/item/enderioendergy/ItemMelodicExchanger.java b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemMelodicExchanger.java new file mode 100644 index 0000000..5bd55e5 --- /dev/null +++ b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemMelodicExchanger.java @@ -0,0 +1,62 @@ +package jackyy.exchangers.item.enderioendergy; + +import jackyy.exchangers.item.ItemExchangerBasePowered; +import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class ItemMelodicExchanger extends ItemExchangerBasePowered { + + public ItemMelodicExchanger() { + setRegistryName(Reference.MODID + ":melodic_exchanger"); + setTranslationKey(Reference.MODID + ".melodic_exchanger"); + } + + @SideOnly(Side.CLIENT) + public void initModel() { + ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); + } + + @Override + public int getMaxEnergy() { + return ModConfig.enderIOEndergyTweaks.melodicMaxEnergy; + } + + @Override + public int getPerBlockUse() { + return ModConfig.enderIOEndergyTweaks.melodicPerBlockUse; + } + + @Override + public boolean checkLoaded() { + return ModConfig.modules.enderIOEndergyModule && Loader.isModLoaded(Reference.EIO_ENDERGY); + } + + @Override + public int getTier() { + return 5; + } + + @Override + public int getHarvestLevel() { + return ModConfig.enderIOEndergyTweaks.melodicMaxHarvestLevel; + } + + @Override + public int getMaxRange() { + return ModConfig.enderIOEndergyTweaks.melodicMaxRange; + } + + @Override + public IRarity getForgeRarity(ItemStack stack) { + return EnumRarity.EPIC; + } + +} diff --git a/src/main/java/jackyy/exchangers/item/enderioendergy/ItemStellarExchanger.java b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemStellarExchanger.java new file mode 100644 index 0000000..05135d0 --- /dev/null +++ b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemStellarExchanger.java @@ -0,0 +1,62 @@ +package jackyy.exchangers.item.enderioendergy; + +import jackyy.exchangers.item.ItemExchangerBasePowered; +import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class ItemStellarExchanger extends ItemExchangerBasePowered { + + public ItemStellarExchanger() { + setRegistryName(Reference.MODID + ":stellar_exchanger"); + setTranslationKey(Reference.MODID + ".stellar_exchanger"); + } + + @SideOnly(Side.CLIENT) + public void initModel() { + ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); + } + + @Override + public int getMaxEnergy() { + return ModConfig.enderIOEndergyTweaks.stellarMaxEnergy; + } + + @Override + public int getPerBlockUse() { + return ModConfig.enderIOEndergyTweaks.stellarPerBlockUse; + } + + @Override + public boolean checkLoaded() { + return ModConfig.modules.enderIOEndergyModule && Loader.isModLoaded(Reference.EIO_ENDERGY); + } + + @Override + public int getTier() { + return 6; + } + + @Override + public int getHarvestLevel() { + return ModConfig.enderIOEndergyTweaks.stellarMaxHarvestLevel; + } + + @Override + public int getMaxRange() { + return ModConfig.enderIOEndergyTweaks.stellarMaxRange; + } + + @Override + public IRarity getForgeRarity(ItemStack stack) { + return EnumRarity.EPIC; + } + +} diff --git a/src/main/java/jackyy/exchangers/item/enderioendergy/ItemVividExchanger.java b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemVividExchanger.java new file mode 100644 index 0000000..e0d1526 --- /dev/null +++ b/src/main/java/jackyy/exchangers/item/enderioendergy/ItemVividExchanger.java @@ -0,0 +1,62 @@ +package jackyy.exchangers.item.enderioendergy; + +import jackyy.exchangers.item.ItemExchangerBasePowered; +import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class ItemVividExchanger extends ItemExchangerBasePowered { + + public ItemVividExchanger() { + setRegistryName(Reference.MODID + ":vivid_exchanger"); + setTranslationKey(Reference.MODID + ".vivid_exchanger"); + } + + @SideOnly(Side.CLIENT) + public void initModel() { + ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); + } + + @Override + public int getMaxEnergy() { + return ModConfig.enderIOEndergyTweaks.vividMaxEnergy; + } + + @Override + public int getPerBlockUse() { + return ModConfig.enderIOEndergyTweaks.vividPerBlockUse; + } + + @Override + public boolean checkLoaded() { + return ModConfig.modules.enderIOEndergyModule && Loader.isModLoaded(Reference.EIO_ENDERGY); + } + + @Override + public int getTier() { + return 3; + } + + @Override + public int getHarvestLevel() { + return ModConfig.enderIOEndergyTweaks.vividMaxHarvestLevel; + } + + @Override + public int getMaxRange() { + return ModConfig.enderIOEndergyTweaks.vividMaxRange; + } + + @Override + public IRarity getForgeRarity(ItemStack stack) { + return EnumRarity.RARE; + } + +} diff --git a/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemHVExchanger.java b/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemHVExchanger.java index 073c98e..42bf314 100644 --- a/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemHVExchanger.java +++ b/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemHVExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.immersiveengineering; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemHVExchanger extends ItemExchangerBasePowered { public ItemHVExchanger() { - setRegistryName(Exchangers.MODID + ":hv_exchanger"); - setTranslationKey(Exchangers.MODID + ".hv_exchanger"); + setRegistryName(Reference.MODID + ":hv_exchanger"); + setTranslationKey(Reference.MODID + ".hv_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +36,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.immersiveEngineeringModule && Loader.isModLoaded(Exchangers.IE); + return ModConfig.modules.immersiveEngineeringModule && Loader.isModLoaded(Reference.IE); } @Override @@ -54,7 +55,7 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemIEExchangerCoreT1.java b/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemIEExchangerCoreT1.java index 28f921a..bbbfb9d 100644 --- a/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemIEExchangerCoreT1.java +++ b/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemIEExchangerCoreT1.java @@ -1,12 +1,12 @@ package jackyy.exchangers.item.immersiveengineering; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +14,8 @@ public class ItemIEExchangerCoreT1 extends ItemCoreBase { public ItemIEExchangerCoreT1() { - setRegistryName(Exchangers.MODID + ":ie_exchanger_core_tier1"); - setTranslationKey(Exchangers.MODID + ".ie_exchanger_core_tier1"); + setRegistryName(Reference.MODID + ":ie_exchanger_core_tier1"); + setTranslationKey(Reference.MODID + ".ie_exchanger_core_tier1"); } @SideOnly(Side.CLIENT) @@ -25,12 +25,12 @@ public void initModel() { @Override public boolean checkLoaded() { - return ModConfig.modules.immersiveEngineeringModule && Loader.isModLoaded(Exchangers.IE); + return ModConfig.modules.immersiveEngineeringModule && Loader.isModLoaded(Reference.IE); } @Override - public EnumRarity getRarity(ItemStack stack) { - return Exchangers.TIER_1; + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; } } diff --git a/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemIEExchangerCoreT2.java b/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemIEExchangerCoreT2.java index dcc6ea2..a291c13 100644 --- a/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemIEExchangerCoreT2.java +++ b/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemIEExchangerCoreT2.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.immersiveengineering; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemIEExchangerCoreT2 extends ItemCoreBase { public ItemIEExchangerCoreT2() { - setRegistryName(Exchangers.MODID + ":ie_exchanger_core_tier2"); - setTranslationKey(Exchangers.MODID + ".ie_exchanger_core_tier2"); + setRegistryName(Reference.MODID + ":ie_exchanger_core_tier2"); + setTranslationKey(Reference.MODID + ".ie_exchanger_core_tier2"); } @SideOnly(Side.CLIENT) @@ -25,11 +26,11 @@ public void initModel() { @Override public boolean checkLoaded() { - return ModConfig.modules.immersiveEngineeringModule && Loader.isModLoaded(Exchangers.IE); + return ModConfig.modules.immersiveEngineeringModule && Loader.isModLoaded(Reference.IE); } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.RARE; } diff --git a/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemIEExchangerCoreT3.java b/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemIEExchangerCoreT3.java index c7b717e..0a8b46c 100644 --- a/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemIEExchangerCoreT3.java +++ b/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemIEExchangerCoreT3.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.immersiveengineering; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemIEExchangerCoreT3 extends ItemCoreBase { public ItemIEExchangerCoreT3() { - setRegistryName(Exchangers.MODID + ":ie_exchanger_core_tier3"); - setTranslationKey(Exchangers.MODID + ".ie_exchanger_core_tier3"); + setRegistryName(Reference.MODID + ":ie_exchanger_core_tier3"); + setTranslationKey(Reference.MODID + ".ie_exchanger_core_tier3"); } @SideOnly(Side.CLIENT) @@ -25,11 +26,11 @@ public void initModel() { @Override public boolean checkLoaded() { - return ModConfig.modules.immersiveEngineeringModule && Loader.isModLoaded(Exchangers.IE); + return ModConfig.modules.immersiveEngineeringModule && Loader.isModLoaded(Reference.IE); } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemLVExchanger.java b/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemLVExchanger.java index d3564d1..2d85537 100644 --- a/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemLVExchanger.java +++ b/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemLVExchanger.java @@ -1,12 +1,12 @@ package jackyy.exchangers.item.immersiveengineering; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +14,8 @@ public class ItemLVExchanger extends ItemExchangerBasePowered { public ItemLVExchanger() { - setRegistryName(Exchangers.MODID + ":lv_exchanger"); - setTranslationKey(Exchangers.MODID + ".lv_exchanger"); + setRegistryName(Reference.MODID + ":lv_exchanger"); + setTranslationKey(Reference.MODID + ".lv_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +35,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.immersiveEngineeringModule && Loader.isModLoaded(Exchangers.IE); + return ModConfig.modules.immersiveEngineeringModule && Loader.isModLoaded(Reference.IE); } @Override @@ -54,8 +54,8 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { - return Exchangers.TIER_1; + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; } } diff --git a/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemMVExchanger.java b/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemMVExchanger.java index 80c40c9..cccb56f 100644 --- a/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemMVExchanger.java +++ b/src/main/java/jackyy/exchangers/item/immersiveengineering/ItemMVExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.immersiveengineering; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemMVExchanger extends ItemExchangerBasePowered { public ItemMVExchanger() { - setRegistryName(Exchangers.MODID + ":mv_exchanger"); - setTranslationKey(Exchangers.MODID + ".mv_exchanger"); + setRegistryName(Reference.MODID + ":mv_exchanger"); + setTranslationKey(Reference.MODID + ".mv_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +36,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.immersiveEngineeringModule && Loader.isModLoaded(Exchangers.IE); + return ModConfig.modules.immersiveEngineeringModule && Loader.isModLoaded(Reference.IE); } @Override @@ -54,7 +55,7 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.RARE; } diff --git a/src/main/java/jackyy/exchangers/item/mekanism/ItemAdvancedExchanger.java b/src/main/java/jackyy/exchangers/item/mekanism/ItemAdvancedExchanger.java index 1cc8ca7..b546e27 100644 --- a/src/main/java/jackyy/exchangers/item/mekanism/ItemAdvancedExchanger.java +++ b/src/main/java/jackyy/exchangers/item/mekanism/ItemAdvancedExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.mekanism; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemAdvancedExchanger extends ItemExchangerBasePowered { public ItemAdvancedExchanger() { - setRegistryName(Exchangers.MODID + ":advanced_exchanger"); - setTranslationKey(Exchangers.MODID + ".advanced_exchanger"); + setRegistryName(Reference.MODID + ":advanced_exchanger"); + setTranslationKey(Reference.MODID + ".advanced_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +36,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.mekanismModule && Loader.isModLoaded(Exchangers.MEK); + return ModConfig.modules.mekanismModule && Loader.isModLoaded(Reference.MEK); } @Override @@ -54,7 +55,7 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.RARE; } diff --git a/src/main/java/jackyy/exchangers/item/mekanism/ItemBasicExchanger.java b/src/main/java/jackyy/exchangers/item/mekanism/ItemBasicExchanger.java index 8c64545..f844a79 100644 --- a/src/main/java/jackyy/exchangers/item/mekanism/ItemBasicExchanger.java +++ b/src/main/java/jackyy/exchangers/item/mekanism/ItemBasicExchanger.java @@ -1,12 +1,12 @@ package jackyy.exchangers.item.mekanism; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +14,8 @@ public class ItemBasicExchanger extends ItemExchangerBasePowered { public ItemBasicExchanger() { - setRegistryName(Exchangers.MODID + ":basic_exchanger"); - setTranslationKey(Exchangers.MODID + ".basic_exchanger"); + setRegistryName(Reference.MODID + ":basic_exchanger"); + setTranslationKey(Reference.MODID + ".basic_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +35,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.mekanismModule && Loader.isModLoaded(Exchangers.MEK); + return ModConfig.modules.mekanismModule && Loader.isModLoaded(Reference.MEK); } @Override @@ -54,8 +54,8 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { - return Exchangers.TIER_1; + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; } } diff --git a/src/main/java/jackyy/exchangers/item/mekanism/ItemEliteExchanger.java b/src/main/java/jackyy/exchangers/item/mekanism/ItemEliteExchanger.java index 3b5291b..9e46308 100644 --- a/src/main/java/jackyy/exchangers/item/mekanism/ItemEliteExchanger.java +++ b/src/main/java/jackyy/exchangers/item/mekanism/ItemEliteExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.mekanism; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemEliteExchanger extends ItemExchangerBasePowered { public ItemEliteExchanger() { - setRegistryName(Exchangers.MODID + ":elite_exchanger"); - setTranslationKey(Exchangers.MODID + ".elite_exchanger"); + setRegistryName(Reference.MODID + ":elite_exchanger"); + setTranslationKey(Reference.MODID + ".elite_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +36,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.mekanismModule && Loader.isModLoaded(Exchangers.MEK); + return ModConfig.modules.mekanismModule && Loader.isModLoaded(Reference.MEK); } @Override @@ -54,7 +55,7 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/mekanism/ItemMekanismExchangerCoreT1.java b/src/main/java/jackyy/exchangers/item/mekanism/ItemMekanismExchangerCoreT1.java index 0bdeb84..6ee9298 100644 --- a/src/main/java/jackyy/exchangers/item/mekanism/ItemMekanismExchangerCoreT1.java +++ b/src/main/java/jackyy/exchangers/item/mekanism/ItemMekanismExchangerCoreT1.java @@ -1,12 +1,12 @@ package jackyy.exchangers.item.mekanism; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +14,8 @@ public class ItemMekanismExchangerCoreT1 extends ItemCoreBase { public ItemMekanismExchangerCoreT1() { - setRegistryName(Exchangers.MODID + ":mekanism_exchanger_core_tier1"); - setTranslationKey(Exchangers.MODID + ".mekanism_exchanger_core_tier1"); + setRegistryName(Reference.MODID + ":mekanism_exchanger_core_tier1"); + setTranslationKey(Reference.MODID + ".mekanism_exchanger_core_tier1"); } @SideOnly(Side.CLIENT) @@ -25,12 +25,12 @@ public void initModel() { @Override public boolean checkLoaded() { - return ModConfig.modules.mekanismModule && Loader.isModLoaded(Exchangers.MEK); + return ModConfig.modules.mekanismModule && Loader.isModLoaded(Reference.MEK); } @Override - public EnumRarity getRarity(ItemStack stack) { - return Exchangers.TIER_1; + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; } } diff --git a/src/main/java/jackyy/exchangers/item/mekanism/ItemMekanismExchangerCoreT2.java b/src/main/java/jackyy/exchangers/item/mekanism/ItemMekanismExchangerCoreT2.java index 8aacddb..077e676 100644 --- a/src/main/java/jackyy/exchangers/item/mekanism/ItemMekanismExchangerCoreT2.java +++ b/src/main/java/jackyy/exchangers/item/mekanism/ItemMekanismExchangerCoreT2.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.mekanism; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemMekanismExchangerCoreT2 extends ItemCoreBase { public ItemMekanismExchangerCoreT2() { - setRegistryName(Exchangers.MODID + ":mekanism_exchanger_core_tier2"); - setTranslationKey(Exchangers.MODID + ".mekanism_exchanger_core_tier2"); + setRegistryName(Reference.MODID + ":mekanism_exchanger_core_tier2"); + setTranslationKey(Reference.MODID + ".mekanism_exchanger_core_tier2"); } @SideOnly(Side.CLIENT) @@ -25,11 +26,11 @@ public void initModel() { @Override public boolean checkLoaded() { - return ModConfig.modules.mekanismModule && Loader.isModLoaded(Exchangers.MEK); + return ModConfig.modules.mekanismModule && Loader.isModLoaded(Reference.MEK); } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.RARE; } diff --git a/src/main/java/jackyy/exchangers/item/mekanism/ItemMekanismExchangerCoreT3.java b/src/main/java/jackyy/exchangers/item/mekanism/ItemMekanismExchangerCoreT3.java index 029842c..107ebe4 100644 --- a/src/main/java/jackyy/exchangers/item/mekanism/ItemMekanismExchangerCoreT3.java +++ b/src/main/java/jackyy/exchangers/item/mekanism/ItemMekanismExchangerCoreT3.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.mekanism; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemMekanismExchangerCoreT3 extends ItemCoreBase { public ItemMekanismExchangerCoreT3() { - setRegistryName(Exchangers.MODID + ":mekanism_exchanger_core_tier3"); - setTranslationKey(Exchangers.MODID + ".mekanism_exchanger_core_tier3"); + setRegistryName(Reference.MODID + ":mekanism_exchanger_core_tier3"); + setTranslationKey(Reference.MODID + ".mekanism_exchanger_core_tier3"); } @SideOnly(Side.CLIENT) @@ -25,10 +26,10 @@ public void initModel() { @Override public boolean checkLoaded() { - return ModConfig.modules.mekanismModule && Loader.isModLoaded(Exchangers.MEK); + return ModConfig.modules.mekanismModule && Loader.isModLoaded(Reference.MEK); } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/mekanism/ItemUltimateExchanger.java b/src/main/java/jackyy/exchangers/item/mekanism/ItemUltimateExchanger.java index 0de792f..31672dd 100644 --- a/src/main/java/jackyy/exchangers/item/mekanism/ItemUltimateExchanger.java +++ b/src/main/java/jackyy/exchangers/item/mekanism/ItemUltimateExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.mekanism; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemUltimateExchanger extends ItemExchangerBasePowered { public ItemUltimateExchanger() { - setRegistryName(Exchangers.MODID + ":ultimate_exchanger"); - setTranslationKey(Exchangers.MODID + ".ultimate_exchanger"); + setRegistryName(Reference.MODID + ":ultimate_exchanger"); + setTranslationKey(Reference.MODID + ".ultimate_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +36,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.mekanismModule && Loader.isModLoaded(Exchangers.MEK); + return ModConfig.modules.mekanismModule && Loader.isModLoaded(Reference.MEK); } @Override @@ -54,7 +55,7 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/special/ItemCreativeExchanger.java b/src/main/java/jackyy/exchangers/item/special/ItemCreativeExchanger.java index 310b3d0..9e3f5ea 100644 --- a/src/main/java/jackyy/exchangers/item/special/ItemCreativeExchanger.java +++ b/src/main/java/jackyy/exchangers/item/special/ItemCreativeExchanger.java @@ -1,20 +1,21 @@ package jackyy.exchangers.item.special; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class ItemCreativeExchanger extends ItemExchangerBase { public ItemCreativeExchanger() { - setRegistryName(Exchangers.MODID + ":creative_exchanger"); - setTranslationKey(Exchangers.MODID + ".creative_exchanger"); + setRegistryName(Reference.MODID + ":creative_exchanger"); + setTranslationKey(Reference.MODID + ".creative_exchanger"); setMaxDamage(9001); } @@ -49,7 +50,7 @@ public boolean checkLoaded() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/special/ItemTuberousExchanger.java b/src/main/java/jackyy/exchangers/item/special/ItemTuberousExchanger.java index 07b34bf..e9eab19 100644 --- a/src/main/java/jackyy/exchangers/item/special/ItemTuberousExchanger.java +++ b/src/main/java/jackyy/exchangers/item/special/ItemTuberousExchanger.java @@ -1,9 +1,10 @@ package jackyy.exchangers.item.special; -import jackyy.exchangers.Exchangers; -import jackyy.exchangers.helper.StringHelper; import jackyy.exchangers.item.ItemExchangerBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; +import jackyy.gunpowderlib.helper.KeyHelper; +import jackyy.gunpowderlib.helper.StringHelper; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.util.ITooltipFlag; import net.minecraft.entity.player.EntityPlayer; @@ -16,6 +17,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -24,8 +26,8 @@ public class ItemTuberousExchanger extends ItemExchangerBase { public ItemTuberousExchanger() { - setRegistryName(Exchangers.MODID + ":tuberous_exchanger"); - setTranslationKey(Exchangers.MODID + ".tuberous_exchanger"); + setRegistryName(Reference.MODID + ":tuberous_exchanger"); + setTranslationKey(Reference.MODID + ".tuberous_exchanger"); setMaxDamage(1); } @@ -38,8 +40,8 @@ public void initModel() { @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World world, List tooltip, ITooltipFlag flag) { super.addInformation(stack, world, tooltip, flag); - if (StringHelper.isShiftKeyDown()) { - tooltip.add(StringHelper.localize("tooltip.tuberous_exchanger.warning")); + if (KeyHelper.isShiftKeyDown()) { + tooltip.add(StringHelper.localize(Reference.MODID, "tooltip.tuberous_exchanger.warning")); } } @@ -60,7 +62,7 @@ public boolean checkLoaded() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.UNCOMMON; } diff --git a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemHardenedExchanger.java b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemHardenedExchanger.java index 16f413e..e1b8a32 100644 --- a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemHardenedExchanger.java +++ b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemHardenedExchanger.java @@ -1,12 +1,12 @@ package jackyy.exchangers.item.thermalexpansion; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +14,8 @@ public class ItemHardenedExchanger extends ItemExchangerBasePowered { public ItemHardenedExchanger() { - setRegistryName(Exchangers.MODID + ":hardened_exchanger"); - setTranslationKey(Exchangers.MODID + ".hardened_exchanger"); + setRegistryName(Reference.MODID + ":hardened_exchanger"); + setTranslationKey(Reference.MODID + ".hardened_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +35,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Exchangers.TE); + return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Reference.TE); } @Override @@ -54,8 +54,8 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { - return Exchangers.TIER_1; + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; } } diff --git a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemLeadstoneExchanger.java b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemLeadstoneExchanger.java index f39eb2f..061594e 100644 --- a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemLeadstoneExchanger.java +++ b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemLeadstoneExchanger.java @@ -1,12 +1,12 @@ package jackyy.exchangers.item.thermalexpansion; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +14,8 @@ public class ItemLeadstoneExchanger extends ItemExchangerBasePowered { public ItemLeadstoneExchanger() { - setRegistryName(Exchangers.MODID + ":leadstone_exchanger"); - setTranslationKey(Exchangers.MODID + ".leadstone_exchanger"); + setRegistryName(Reference.MODID + ":leadstone_exchanger"); + setTranslationKey(Reference.MODID + ".leadstone_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +35,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Exchangers.TE); + return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Reference.TE); } @Override @@ -54,8 +54,8 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { - return Exchangers.TIER_1; + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; } } diff --git a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemReinforcedExchanger.java b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemReinforcedExchanger.java index 7ba7138..7525fc7 100644 --- a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemReinforcedExchanger.java +++ b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemReinforcedExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.thermalexpansion; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemReinforcedExchanger extends ItemExchangerBasePowered { public ItemReinforcedExchanger() { - setRegistryName(Exchangers.MODID + ":reinforced_exchanger"); - setTranslationKey(Exchangers.MODID + ".reinforced_exchanger"); + setRegistryName(Reference.MODID + ":reinforced_exchanger"); + setTranslationKey(Reference.MODID + ".reinforced_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +36,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Exchangers.TE); + return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Reference.TE); } @Override @@ -54,7 +55,7 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.RARE; } diff --git a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemResonantExchanger.java b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemResonantExchanger.java index 62dad53..638c98c 100644 --- a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemResonantExchanger.java +++ b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemResonantExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.thermalexpansion; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemResonantExchanger extends ItemExchangerBasePowered { public ItemResonantExchanger() { - setRegistryName(Exchangers.MODID + ":resonant_exchanger"); - setTranslationKey(Exchangers.MODID + ".resonant_exchanger"); + setRegistryName(Reference.MODID + ":resonant_exchanger"); + setTranslationKey(Reference.MODID + ".resonant_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +36,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Exchangers.TE); + return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Reference.TE); } @Override @@ -54,7 +55,7 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemSignalumExchanger.java b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemSignalumExchanger.java index 215650b..6f3563c 100644 --- a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemSignalumExchanger.java +++ b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemSignalumExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.thermalexpansion; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBasePowered; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemSignalumExchanger extends ItemExchangerBasePowered { public ItemSignalumExchanger() { - setRegistryName(Exchangers.MODID + ":signalum_exchanger"); - setTranslationKey(Exchangers.MODID + ".signalum_exchanger"); + setRegistryName(Reference.MODID + ":signalum_exchanger"); + setTranslationKey(Reference.MODID + ".signalum_exchanger"); } @SideOnly(Side.CLIENT) @@ -35,7 +36,7 @@ public int getPerBlockUse() { @Override public boolean checkLoaded() { - return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Exchangers.TE); + return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Reference.TE); } @Override @@ -54,7 +55,7 @@ public int getMaxRange() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemTEExchangerCoreT1.java b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemTEExchangerCoreT1.java index 80b2c29..f99f712 100644 --- a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemTEExchangerCoreT1.java +++ b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemTEExchangerCoreT1.java @@ -1,12 +1,12 @@ package jackyy.exchangers.item.thermalexpansion; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +14,8 @@ public class ItemTEExchangerCoreT1 extends ItemCoreBase { public ItemTEExchangerCoreT1() { - setRegistryName(Exchangers.MODID + ":te_exchanger_core_tier1"); - setTranslationKey(Exchangers.MODID + ".te_exchanger_core_tier1"); + setRegistryName(Reference.MODID + ":te_exchanger_core_tier1"); + setTranslationKey(Reference.MODID + ".te_exchanger_core_tier1"); } @SideOnly(Side.CLIENT) @@ -25,12 +25,12 @@ public void initModel() { @Override public boolean checkLoaded() { - return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Exchangers.TE); + return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Reference.TE); } @Override - public EnumRarity getRarity(ItemStack stack) { - return Exchangers.TIER_1; + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; } } diff --git a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemTEExchangerCoreT2.java b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemTEExchangerCoreT2.java index cc4e012..f67b4cc 100644 --- a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemTEExchangerCoreT2.java +++ b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemTEExchangerCoreT2.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.thermalexpansion; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemTEExchangerCoreT2 extends ItemCoreBase { public ItemTEExchangerCoreT2() { - setRegistryName(Exchangers.MODID + ":te_exchanger_core_tier2"); - setTranslationKey(Exchangers.MODID + ".te_exchanger_core_tier2"); + setRegistryName(Reference.MODID + ":te_exchanger_core_tier2"); + setTranslationKey(Reference.MODID + ".te_exchanger_core_tier2"); } @SideOnly(Side.CLIENT) @@ -25,11 +26,11 @@ public void initModel() { @Override public boolean checkLoaded() { - return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Exchangers.TE); + return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Reference.TE); } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.RARE; } diff --git a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemTEExchangerCoreT3.java b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemTEExchangerCoreT3.java index 7e5a119..7eaf913 100644 --- a/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemTEExchangerCoreT3.java +++ b/src/main/java/jackyy/exchangers/item/thermalexpansion/ItemTEExchangerCoreT3.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.thermalexpansion; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -14,8 +15,8 @@ public class ItemTEExchangerCoreT3 extends ItemCoreBase { public ItemTEExchangerCoreT3() { - setRegistryName(Exchangers.MODID + ":te_exchanger_core_tier3"); - setTranslationKey(Exchangers.MODID + ".te_exchanger_core_tier3"); + setRegistryName(Reference.MODID + ":te_exchanger_core_tier3"); + setTranslationKey(Reference.MODID + ".te_exchanger_core_tier3"); } @SideOnly(Side.CLIENT) @@ -25,11 +26,11 @@ public void initModel() { @Override public boolean checkLoaded() { - return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Exchangers.TE); + return ModConfig.modules.thermalExpansionModule && Loader.isModLoaded(Reference.TE); } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/vanilla/ItemDiamondExchanger.java b/src/main/java/jackyy/exchangers/item/vanilla/ItemDiamondExchanger.java index c071c2b..caf1bfc 100644 --- a/src/main/java/jackyy/exchangers/item/vanilla/ItemDiamondExchanger.java +++ b/src/main/java/jackyy/exchangers/item/vanilla/ItemDiamondExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.vanilla; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; @@ -14,8 +15,8 @@ public class ItemDiamondExchanger extends ItemExchangerBase { public ItemDiamondExchanger() { - setRegistryName(Exchangers.MODID + ":diamond_exchanger"); - setTranslationKey(Exchangers.MODID + ".diamond_exchanger"); + setRegistryName(Reference.MODID + ":diamond_exchanger"); + setTranslationKey(Reference.MODID + ".diamond_exchanger"); setMaxDamage(ModConfig.vanillaTweaks.diamondMaxDmg); } @@ -45,7 +46,7 @@ public boolean checkLoaded() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/vanilla/ItemEmeraldExchanger.java b/src/main/java/jackyy/exchangers/item/vanilla/ItemEmeraldExchanger.java index 16d2e23..8c2ec9f 100644 --- a/src/main/java/jackyy/exchangers/item/vanilla/ItemEmeraldExchanger.java +++ b/src/main/java/jackyy/exchangers/item/vanilla/ItemEmeraldExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.vanilla; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; @@ -14,11 +15,11 @@ public class ItemEmeraldExchanger extends ItemExchangerBase { public ItemEmeraldExchanger() { - setRegistryName(Exchangers.MODID + ":emerald_exchanger"); - setTranslationKey(Exchangers.MODID + ".emerald_exchanger"); + setRegistryName(Reference.MODID + ":emerald_exchanger"); + setTranslationKey(Reference.MODID + ".emerald_exchanger"); setMaxStackSize(1); setMaxDamage(ModConfig.vanillaTweaks.emeraldMaxDmg); - setCreativeTab(Exchangers.TAB); + setCreativeTab(Reference.TAB); } @SideOnly(Side.CLIENT) @@ -47,7 +48,7 @@ public boolean checkLoaded() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/vanilla/ItemEndExchanger.java b/src/main/java/jackyy/exchangers/item/vanilla/ItemEndExchanger.java index 2c8a09d..8ff8628 100644 --- a/src/main/java/jackyy/exchangers/item/vanilla/ItemEndExchanger.java +++ b/src/main/java/jackyy/exchangers/item/vanilla/ItemEndExchanger.java @@ -1,14 +1,15 @@ package jackyy.exchangers.item.vanilla; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; @@ -16,8 +17,8 @@ public class ItemEndExchanger extends ItemExchangerBase { public ItemEndExchanger() { - setRegistryName(Exchangers.MODID + ":end_exchanger"); - setTranslationKey(Exchangers.MODID + ".end_exchanger"); + setRegistryName(Reference.MODID + ":end_exchanger"); + setTranslationKey(Reference.MODID + ".end_exchanger"); setMaxDamage(ModConfig.vanillaTweaks.endMaxDmg); } @@ -47,7 +48,7 @@ public boolean checkLoaded() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/vanilla/ItemExchangerCoreT1.java b/src/main/java/jackyy/exchangers/item/vanilla/ItemExchangerCoreT1.java index c9a5ed2..c7e1a80 100644 --- a/src/main/java/jackyy/exchangers/item/vanilla/ItemExchangerCoreT1.java +++ b/src/main/java/jackyy/exchangers/item/vanilla/ItemExchangerCoreT1.java @@ -1,20 +1,20 @@ package jackyy.exchangers.item.vanilla; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class ItemExchangerCoreT1 extends ItemCoreBase { public ItemExchangerCoreT1() { - setRegistryName(Exchangers.MODID + ":exchanger_core_tier1"); - setTranslationKey(Exchangers.MODID + ".exchanger_core_tier1"); + setRegistryName(Reference.MODID + ":exchanger_core_tier1"); + setTranslationKey(Reference.MODID + ".exchanger_core_tier1"); } @SideOnly(Side.CLIENT) @@ -28,8 +28,8 @@ public boolean checkLoaded() { } @Override - public EnumRarity getRarity(ItemStack stack) { - return Exchangers.TIER_1; + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; } } diff --git a/src/main/java/jackyy/exchangers/item/vanilla/ItemExchangerCoreT2.java b/src/main/java/jackyy/exchangers/item/vanilla/ItemExchangerCoreT2.java index d294a51..b2dec58 100644 --- a/src/main/java/jackyy/exchangers/item/vanilla/ItemExchangerCoreT2.java +++ b/src/main/java/jackyy/exchangers/item/vanilla/ItemExchangerCoreT2.java @@ -1,20 +1,21 @@ package jackyy.exchangers.item.vanilla; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class ItemExchangerCoreT2 extends ItemCoreBase { public ItemExchangerCoreT2() { - setRegistryName(Exchangers.MODID + ":exchanger_core_tier2"); - setTranslationKey(Exchangers.MODID + ".exchanger_core_tier2"); + setRegistryName(Reference.MODID + ":exchanger_core_tier2"); + setTranslationKey(Reference.MODID + ".exchanger_core_tier2"); } @SideOnly(Side.CLIENT) @@ -28,7 +29,7 @@ public boolean checkLoaded() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.RARE; } diff --git a/src/main/java/jackyy/exchangers/item/vanilla/ItemExchangerCoreT3.java b/src/main/java/jackyy/exchangers/item/vanilla/ItemExchangerCoreT3.java index e67e666..629e186 100644 --- a/src/main/java/jackyy/exchangers/item/vanilla/ItemExchangerCoreT3.java +++ b/src/main/java/jackyy/exchangers/item/vanilla/ItemExchangerCoreT3.java @@ -1,20 +1,21 @@ package jackyy.exchangers.item.vanilla; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemCoreBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class ItemExchangerCoreT3 extends ItemCoreBase { public ItemExchangerCoreT3() { - setRegistryName(Exchangers.MODID + ":exchanger_core_tier3"); - setTranslationKey(Exchangers.MODID + ".exchanger_core_tier3"); + setRegistryName(Reference.MODID + ":exchanger_core_tier3"); + setTranslationKey(Reference.MODID + ".exchanger_core_tier3"); } @SideOnly(Side.CLIENT) @@ -28,7 +29,7 @@ public boolean checkLoaded() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/vanilla/ItemGoldenExchanger.java b/src/main/java/jackyy/exchangers/item/vanilla/ItemGoldenExchanger.java index 008a088..a9d3395 100644 --- a/src/main/java/jackyy/exchangers/item/vanilla/ItemGoldenExchanger.java +++ b/src/main/java/jackyy/exchangers/item/vanilla/ItemGoldenExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.vanilla; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; @@ -14,8 +15,8 @@ public class ItemGoldenExchanger extends ItemExchangerBase { public ItemGoldenExchanger() { - setRegistryName(Exchangers.MODID + ":golden_exchanger"); - setTranslationKey(Exchangers.MODID + ".golden_exchanger"); + setRegistryName(Reference.MODID + ":golden_exchanger"); + setTranslationKey(Reference.MODID + ".golden_exchanger"); setMaxDamage(ModConfig.vanillaTweaks.goldenMaxDmg); } @@ -45,7 +46,7 @@ public boolean checkLoaded() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.RARE; } diff --git a/src/main/java/jackyy/exchangers/item/vanilla/ItemIronExchanger.java b/src/main/java/jackyy/exchangers/item/vanilla/ItemIronExchanger.java index 01ff9bb..782b796 100644 --- a/src/main/java/jackyy/exchangers/item/vanilla/ItemIronExchanger.java +++ b/src/main/java/jackyy/exchangers/item/vanilla/ItemIronExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.vanilla; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; @@ -14,8 +15,8 @@ public class ItemIronExchanger extends ItemExchangerBase { public ItemIronExchanger() { - setRegistryName(Exchangers.MODID + ":iron_exchanger"); - setTranslationKey(Exchangers.MODID + ".iron_exchanger"); + setRegistryName(Reference.MODID + ":iron_exchanger"); + setTranslationKey(Reference.MODID + ".iron_exchanger"); setMaxDamage(ModConfig.vanillaTweaks.ironMaxDmg); } @@ -45,7 +46,7 @@ public boolean checkLoaded() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.RARE; } diff --git a/src/main/java/jackyy/exchangers/item/vanilla/ItemObsidianExchanger.java b/src/main/java/jackyy/exchangers/item/vanilla/ItemObsidianExchanger.java index 585b882..f1203d3 100644 --- a/src/main/java/jackyy/exchangers/item/vanilla/ItemObsidianExchanger.java +++ b/src/main/java/jackyy/exchangers/item/vanilla/ItemObsidianExchanger.java @@ -1,12 +1,13 @@ package jackyy.exchangers.item.vanilla; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; @@ -14,8 +15,8 @@ public class ItemObsidianExchanger extends ItemExchangerBase { public ItemObsidianExchanger() { - setRegistryName(Exchangers.MODID + ":obsidian_exchanger"); - setTranslationKey(Exchangers.MODID + ".obsidian_exchanger"); + setRegistryName(Reference.MODID + ":obsidian_exchanger"); + setTranslationKey(Reference.MODID + ".obsidian_exchanger"); setMaxDamage(ModConfig.vanillaTweaks.obsidianMaxDmg); } @@ -45,7 +46,7 @@ public boolean checkLoaded() { } @Override - public EnumRarity getRarity(ItemStack stack) { + public IRarity getForgeRarity(ItemStack stack) { return EnumRarity.EPIC; } diff --git a/src/main/java/jackyy/exchangers/item/vanilla/ItemStoneExchanger.java b/src/main/java/jackyy/exchangers/item/vanilla/ItemStoneExchanger.java index 51ba799..d86fbbd 100644 --- a/src/main/java/jackyy/exchangers/item/vanilla/ItemStoneExchanger.java +++ b/src/main/java/jackyy/exchangers/item/vanilla/ItemStoneExchanger.java @@ -1,12 +1,12 @@ package jackyy.exchangers.item.vanilla; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; @@ -14,8 +14,8 @@ public class ItemStoneExchanger extends ItemExchangerBase { public ItemStoneExchanger() { - setRegistryName(Exchangers.MODID + ":stone_exchanger"); - setTranslationKey(Exchangers.MODID + ".stone_exchanger"); + setRegistryName(Reference.MODID + ":stone_exchanger"); + setTranslationKey(Reference.MODID + ".stone_exchanger"); setMaxDamage(ModConfig.vanillaTweaks.stoneMaxDmg); } @@ -45,8 +45,8 @@ public boolean checkLoaded() { } @Override - public EnumRarity getRarity(ItemStack stack) { - return Exchangers.TIER_1; + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; } @Override diff --git a/src/main/java/jackyy/exchangers/item/vanilla/ItemWoodenExchanger.java b/src/main/java/jackyy/exchangers/item/vanilla/ItemWoodenExchanger.java index d5e4734..4750b6d 100644 --- a/src/main/java/jackyy/exchangers/item/vanilla/ItemWoodenExchanger.java +++ b/src/main/java/jackyy/exchangers/item/vanilla/ItemWoodenExchanger.java @@ -1,14 +1,14 @@ package jackyy.exchangers.item.vanilla; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.item.ItemExchangerBase; import jackyy.exchangers.registry.ModConfig; +import jackyy.exchangers.util.Reference; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.init.Blocks; -import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.common.IRarity; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.oredict.OreDictionary; @@ -18,8 +18,8 @@ public class ItemWoodenExchanger extends ItemExchangerBase { public ItemWoodenExchanger() { - setRegistryName(Exchangers.MODID + ":wooden_exchanger"); - setTranslationKey(Exchangers.MODID + ".wooden_exchanger"); + setRegistryName(Reference.MODID + ":wooden_exchanger"); + setTranslationKey(Reference.MODID + ".wooden_exchanger"); setMaxDamage(ModConfig.vanillaTweaks.woodenMaxDmg); } @@ -49,8 +49,8 @@ public boolean checkLoaded() { } @Override - public EnumRarity getRarity(ItemStack stack) { - return Exchangers.TIER_1; + public IRarity getForgeRarity(ItemStack stack) { + return Reference.TIER_1; } @Override diff --git a/src/main/java/jackyy/exchangers/proxy/CommonProxy.java b/src/main/java/jackyy/exchangers/proxy/CommonProxy.java index 37b9415..3b397c8 100644 --- a/src/main/java/jackyy/exchangers/proxy/CommonProxy.java +++ b/src/main/java/jackyy/exchangers/proxy/CommonProxy.java @@ -1,14 +1,16 @@ package jackyy.exchangers.proxy; -import jackyy.exchangers.Exchangers; import jackyy.exchangers.handler.EventsHandler; import jackyy.exchangers.handler.network.PacketHandler; +import jackyy.exchangers.integration.BetterWithModsIntegration; import jackyy.exchangers.registry.ModItems; import jackyy.exchangers.registry.ModRecipes; +import jackyy.exchangers.util.Reference; import net.minecraft.item.Item; import net.minecraft.item.crafting.IRecipe; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @@ -17,9 +19,12 @@ public class CommonProxy { public void preInit(FMLPreInitializationEvent e) { - PacketHandler.registerMessages(Exchangers.MODID); + PacketHandler.registerMessages(Reference.MODID); MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(new EventsHandler()); + if (Loader.isModLoaded(Reference.BWM)) { + MinecraftForge.EVENT_BUS.register(new BetterWithModsIntegration()); + } } @SubscribeEvent diff --git a/src/main/java/jackyy/exchangers/registry/ModConfig.java b/src/main/java/jackyy/exchangers/registry/ModConfig.java index 8f104e4..8d7239c 100644 --- a/src/main/java/jackyy/exchangers/registry/ModConfig.java +++ b/src/main/java/jackyy/exchangers/registry/ModConfig.java @@ -1,18 +1,19 @@ package jackyy.exchangers.registry; -import jackyy.exchangers.Exchangers; +import jackyy.exchangers.util.Reference; import net.minecraftforge.common.config.Config; import net.minecraftforge.common.config.ConfigManager; import net.minecraftforge.fml.client.event.ConfigChangedEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -@Config(modid = Exchangers.MODID, name = "Exchangers", category = Exchangers.MODID) +@Config(modid = Reference.MODID, name = "Exchangers", category = Reference.MODID) public class ModConfig { public static Modules modules = new Modules(); public static VanillaTweaks vanillaTweaks = new VanillaTweaks(); public static EnderIOTweaks enderIOTweaks = new EnderIOTweaks(); + public static EnderIOEndergyTweaks enderIOEndergyTweaks = new EnderIOEndergyTweaks(); public static ThermalExpansionTweaks thermalExpansionTweaks = new ThermalExpansionTweaks(); public static MekanismTweaks mekanismTweaks = new MekanismTweaks(); public static ImmersiveEngineeringTweaks immersiveEngineeringTweaks = new ImmersiveEngineeringTweaks(); @@ -24,6 +25,8 @@ public static class Modules { public boolean vanillaModule = true; @Config.Comment("If true, enables Ender IO-based exchangers (Requires Ender IO to be installed).") public boolean enderIOModule = true; + @Config.Comment("If true, enables Ender IO Endergy-based exchangers (Requires Ender IO Endergy to be installed).") + public boolean enderIOEndergyModule = true; @Config.Comment("If true, enables Thermal Expansion-based exchangers (Requires Thermal Expansion to be installed).") public boolean thermalExpansionModule = true; @Config.Comment("If true, enables Mekanism-based exchangers (Requires Mekanism to be installed).") @@ -103,7 +106,7 @@ public static class VanillaTweaks { public int endMaxDmg = 32768; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for End Exchanger") - public int endMaxHarvestLevel = 4; + public int endMaxHarvestLevel = 5; @Config.RangeInt(min = 0, max = 12) @Config.Comment("Set the max range for End Exchanger") public int endMaxRange = 7; @@ -112,10 +115,10 @@ public static class VanillaTweaks { public static class EnderIOTweaks { @Config.RangeInt(min = 1000) @Config.Comment("Set the RF capacity for Conductive Iron Exchanger") - public int conductiveMaxEnergy = 80000; + public int conductiveMaxEnergy = 50000; @Config.RangeInt(min = 1) @Config.Comment("Set the Rf consumption per block for Conductive Iron Exchanger") - public int conductivePerBlockUse = 10; + public int conductivePerBlockUse = 50; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for Conductive Iron Exchanger") public int conductiveMaxHarvestLevel = 1; @@ -124,10 +127,10 @@ public static class EnderIOTweaks { public int conductiveMaxRange = 1; @Config.RangeInt(min = 1000) @Config.Comment("Set the RF capacity for Pulsating Iron Exchanger") - public int pulsatingMaxEnergy = 400000; + public int pulsatingMaxEnergy = 250000; @Config.RangeInt(min = 1) @Config.Comment("Set the RF consumption per block for Pulsating Iron Exchanger") - public int pulsatingPerBlockUse = 50; + public int pulsatingPerBlockUse = 100; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for Pulsating Iron Exchanger") public int pulsatingMaxHarvestLevel = 2; @@ -136,10 +139,10 @@ public static class EnderIOTweaks { public int pulsatingMaxRange = 2; @Config.RangeInt(min = 1000) @Config.Comment("Set the RF capacity for Electrical Steel Exchanger") - public int electricalSteelMaxEnergy = 800000; + public int electricalSteelMaxEnergy = 1000000; @Config.RangeInt(min = 1) @Config.Comment("Set the RF consumption per block for Electrical Steel Exchanger") - public int electricalSteelPerBlockUse = 100; + public int electricalSteelPerBlockUse = 500; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for Electrical Steel Exchanger") public int electricalSteelMaxHarvestLevel = 3; @@ -151,7 +154,7 @@ public static class EnderIOTweaks { public int energeticMaxEnergy = 5000000; @Config.RangeInt(min = 1) @Config.Comment("Set the RF consumption per block for Energetic Exchanger") - public int energeticPerBlockUse = 250; + public int energeticPerBlockUse = 1000; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for Energetic Exchanger") public int energeticMaxHarvestLevel = 3; @@ -163,7 +166,7 @@ public static class EnderIOTweaks { public int darkSteelMaxEnergy = 10000000; @Config.RangeInt(min = 1) @Config.Comment("Set the RF consumption per block for Dark Steel Exchanger") - public int darkSteelPerBlockUse = 500; + public int darkSteelPerBlockUse = 1500; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for Dark Steel Exchanger") public int darkSteelMaxHarvestLevel = 4; @@ -172,10 +175,10 @@ public static class EnderIOTweaks { public int darkSteelMaxRange = 6; @Config.RangeInt(min = 1000) @Config.Comment("Set the RF capacity for Vibrant Exchanger") - public int vibrantMaxEnergy = 20000000; + public int vibrantMaxEnergy = 25000000; @Config.RangeInt(min = 1) @Config.Comment("Set the RF consumption per block for Vibrant Exchanger") - public int vibrantPerBlockUse = 1000; + public int vibrantPerBlockUse = 2500; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for Vibrant Exchanger") public int vibrantMaxHarvestLevel = 4; @@ -190,19 +193,94 @@ public static class EnderIOTweaks { public int endSteelPerBlockUse = 5000; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for End Steel Exchanger") - public int endSteelMaxHarvestLevel = 4; + public int endSteelMaxHarvestLevel = 5; @Config.RangeInt(min = 0, max = 12) @Config.Comment("Set the max range for End Steel Exchanger") public int endSteelMaxRange = 7; } + public static class EnderIOEndergyTweaks { + @Config.RangeInt(min = 1000) + @Config.Comment("Set the RF capacity for Crude Steel Exchanger") + public int crudeSteelMaxEnergy = 50000; + @Config.RangeInt(min = 1) + @Config.Comment("Set the Rf consumption per block for Crude Steel Exchanger") + public int crudeSteelPerBlockUse = 50; + @Config.RangeInt(min = 0) + @Config.Comment("Set the max harvest level for Crude Steel Exchanger") + public int crudeSteelMaxHarvestLevel = 1; + @Config.RangeInt(min = 0, max = 12) + @Config.Comment("Set the max range for Crude Steel Exchanger") + public int crudeSteelMaxRange = 1; + @Config.RangeInt(min = 1000) + @Config.Comment("Set the RF capacity for Energetic Silver Exchanger") + public int energeticSilverMaxEnergy = 250000; + @Config.RangeInt(min = 1) + @Config.Comment("Set the RF consumption per block for Energetic Silver Exchanger") + public int energeticSilverPerBlockUse = 100; + @Config.RangeInt(min = 0) + @Config.Comment("Set the max harvest level for Energetic Silver Exchanger") + public int energeticSilverMaxHarvestLevel = 2; + @Config.RangeInt(min = 0, max = 12) + @Config.Comment("Set the max range for Energetic Silver Exchanger") + public int energeticSilverMaxRange = 2; + @Config.RangeInt(min = 1000) + @Config.Comment("Set the RF capacity for Vivid Exchanger") + public int vividMaxEnergy = 1000000; + @Config.RangeInt(min = 1) + @Config.Comment("Set the RF consumption per block for Vivid Exchanger") + public int vividPerBlockUse = 500; + @Config.RangeInt(min = 0) + @Config.Comment("Set the max harvest level for Vivid Exchanger") + public int vividMaxHarvestLevel = 3; + @Config.RangeInt(min = 0, max = 12) + @Config.Comment("Set the max range for Vivid Exchanger") + public int vividMaxRange = 4; + @Config.RangeInt(min = 1000) + @Config.Comment("Set the RF capacity for Crystalline Exchanger") + public int crystallineMaxEnergy = 10000000; + @Config.RangeInt(min = 1) + @Config.Comment("Set the RF consumption per block for Crystalline Exchanger") + public int crystallinePerBlockUse = 1500; + @Config.RangeInt(min = 0) + @Config.Comment("Set the max harvest level for Crystalline Exchanger") + public int crystallineMaxHarvestLevel = 3; + @Config.RangeInt(min = 0, max = 12) + @Config.Comment("Set the max range for Crystalline Exchanger") + public int crystallineMaxRange = 5; + @Config.RangeInt(min = 1000) + @Config.Comment("Set the RF capacity for Melodic Exchanger") + public int melodicMaxEnergy = 50000000; + @Config.RangeInt(min = 1) + @Config.Comment("Set the RF consumption per block for Melodic Exchanger") + public int melodicPerBlockUse = 2500; + @Config.RangeInt(min = 0) + @Config.Comment("Set the max harvest level for Melodic Exchanger") + public int melodicMaxHarvestLevel = 4; + @Config.RangeInt(min = 0, max = 12) + @Config.Comment("Set the max range for Melodic Exchanger") + public int melodicMaxRange = 7; + @Config.RangeInt(min = 1000) + @Config.Comment("Set the RF capacity for Stellar Exchanger") + public int stellarMaxEnergy = 100000000; + @Config.RangeInt(min = 1) + @Config.Comment("Set the RF consumption per block for Stellar Exchanger") + public int stellarPerBlockUse = 5000; + @Config.RangeInt(min = 0) + @Config.Comment("Set the max harvest level for Stellar Exchanger") + public int stellarMaxHarvestLevel = 5; + @Config.RangeInt(min = 0, max = 12) + @Config.Comment("Set the max range for Stellar Exchanger") + public int stellarMaxRange = 9; + } + public static class ThermalExpansionTweaks { @Config.RangeInt(min = 1000) @Config.Comment("Set the RF capacity for Leadstone Exchanger") - public int leadstoneMaxEnergy = 80000; + public int leadstoneMaxEnergy = 100000; @Config.RangeInt(min = 1) @Config.Comment("Set the RF consumption per block for Leadstone Exchanger") - public int leadstonePerBlockUse = 10; + public int leadstonePerBlockUse = 50; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for Leadstone Exchanger") public int leadstoneMaxHarvestLevel = 1; @@ -214,7 +292,7 @@ public static class ThermalExpansionTweaks { public int hardenedMaxEnergy = 500000; @Config.RangeInt(min = 1) @Config.Comment("Set the RF consumption per block for Hardened Exchanger") - public int hardenedPerBlockUse = 50; + public int hardenedPerBlockUse = 150; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for Hardened Exchanger") public int hardenedMaxHarvestLevel = 2; @@ -226,7 +304,7 @@ public static class ThermalExpansionTweaks { public int reinforcedMaxEnergy = 1000000; @Config.RangeInt(min = 1) @Config.Comment("Set the RF consumption per block for Reinforced Exchanger") - public int reinforcedPerBlockUse = 100; + public int reinforcedPerBlockUse = 250; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for Reinforced Exchanger") public int reinforcedMaxHarvestLevel = 3; @@ -247,10 +325,10 @@ public static class ThermalExpansionTweaks { public int signalumMaxRange = 6; @Config.RangeInt(min = 1000) @Config.Comment("Set the RF capacity for Resonant Exchanger") - public int resonantMaxEnergy = 20000000; + public int resonantMaxEnergy = 25000000; @Config.RangeInt(min = 1) @Config.Comment("Set the RF consumption per block for Resonant Exchanger") - public int resonantPerBlockUse = 1000; + public int resonantPerBlockUse = 1500; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for Resonant Exchanger") public int resonantMaxHarvestLevel = 4; @@ -262,7 +340,7 @@ public static class ThermalExpansionTweaks { public static class MekanismTweaks { @Config.RangeInt(min = 1000) @Config.Comment("Set the RF capacity for Basic Exchanger") - public int basicMaxEnergy = 100000; + public int basicMaxEnergy = 250000; @Config.RangeInt(min = 1) @Config.Comment("Set the RF consumption per block for Basic Exchanger") public int basicPerBlockUse = 50; @@ -274,10 +352,10 @@ public static class MekanismTweaks { public int basicMaxRange = 3; @Config.RangeInt(min = 1000) @Config.Comment("Set the RF capacity for Advanced Exchanger") - public int advancedMaxEnergy = 800000; + public int advancedMaxEnergy = 1000000; @Config.RangeInt(min = 1) @Config.Comment("Set the RF consumption per block for Advanced Exchanger") - public int advancedPerBlockUse = 100; + public int advancedPerBlockUse = 150; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for Advanced Exchanger") public int advancedMaxHarvestLevel = 2; @@ -289,7 +367,7 @@ public static class MekanismTweaks { public int eliteMaxEnergy = 5000000; @Config.RangeInt(min = 1) @Config.Comment("Set the RF consumption per block for Elite Exchanger") - public int elitePerBlockUse = 250; + public int elitePerBlockUse = 500; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for Elite Exchanger") public int eliteMaxHarvestLevel = 3; @@ -301,7 +379,7 @@ public static class MekanismTweaks { public int ultimateMaxEnergy = 10000000; @Config.RangeInt(min = 1) @Config.Comment("Set the RF consumption per block for Ultimate Exchanger") - public int ultimatePerBlockUse = 500; + public int ultimatePerBlockUse = 1000; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for Ultimate Exchanger") public int ultimateMaxHarvestLevel = 4; @@ -316,7 +394,7 @@ public static class ImmersiveEngineeringTweaks { public int lvMaxEnergy = 100000; @Config.RangeInt(min = 1) @Config.Comment("Set the RF consumption per block for LV Exchanger") - public int lvPerBlockUse = 100; + public int lvPerBlockUse = 50; @Config.RangeInt(min = 0) @Config.Comment("Set the max harvest level for LV Exchanger") public int lvMaxHarvestLevel = 2; @@ -364,6 +442,13 @@ public static class RecipeTweaks { "'hard' Hard recipes, progressive, expensive recipe costs." }) public String enderIORecipesType = "normal"; + @Config.Comment({ + "Set the recipes type for Ender IO Endergy-based exchangers:", + "'easy' Easy recipes, non-progressive, lowest recipe costs.", + "'normal' Normal recipes, progressive, moderate recipe costs.", + "'hard' Hard recipes, progressive, expensive recipe costs." + }) + public String enderIOEndergyRecipesType = "normal"; @Config.Comment({ "Set the recipes type for Thermal Expansion-based exchangers:", "'easy' Easy recipes, non-progressive, lowest recipe costs.", @@ -419,8 +504,8 @@ public static class Misc { public static class ConfigHolder { @SubscribeEvent public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { - if (event.getModID().equals(Exchangers.MODID)) { - ConfigManager.sync(Exchangers.MODID, Config.Type.INSTANCE); + if (event.getModID().equals(Reference.MODID)) { + ConfigManager.sync(Reference.MODID, Config.Type.INSTANCE); } } } diff --git a/src/main/java/jackyy/exchangers/registry/ModItems.java b/src/main/java/jackyy/exchangers/registry/ModItems.java index 7f6d140..b0076f5 100644 --- a/src/main/java/jackyy/exchangers/registry/ModItems.java +++ b/src/main/java/jackyy/exchangers/registry/ModItems.java @@ -1,6 +1,7 @@ package jackyy.exchangers.registry; import jackyy.exchangers.item.enderio.*; +import jackyy.exchangers.item.enderioendergy.*; import jackyy.exchangers.item.immersiveengineering.*; import jackyy.exchangers.item.mekanism.*; import jackyy.exchangers.item.special.ItemCreativeExchanger; @@ -38,6 +39,16 @@ public class ModItems { public static ItemEIOExchangerCoreT2 eioExchangerCoreT2 = new ItemEIOExchangerCoreT2(); public static ItemEIOExchangerCoreT3 eioExchangerCoreT3 = new ItemEIOExchangerCoreT3(); + public static ItemCrudeSteelExchanger crudeSteelExchanger = new ItemCrudeSteelExchanger(); + public static ItemEnergeticSilverExchanger energeticSilverExchanger = new ItemEnergeticSilverExchanger(); + public static ItemVividExchanger vividExchanger = new ItemVividExchanger(); + public static ItemCrystallineExchanger crystallineExchanger = new ItemCrystallineExchanger(); + public static ItemMelodicExchanger melodicExchanger = new ItemMelodicExchanger(); + public static ItemStellarExchanger stellarExchanger = new ItemStellarExchanger(); + public static ItemEIOEndergyExchangerCoreT1 eioEndergyExchangerCoreT1 = new ItemEIOEndergyExchangerCoreT1(); + public static ItemEIOEndergyExchangerCoreT2 eioEndergyExchangerCoreT2 = new ItemEIOEndergyExchangerCoreT2(); + public static ItemEIOEndergyExchangerCoreT3 eioEndergyExchangerCoreT3 = new ItemEIOEndergyExchangerCoreT3(); + public static ItemLeadstoneExchanger leadstoneExchanger = new ItemLeadstoneExchanger(); public static ItemHardenedExchanger hardenedExchanger = new ItemHardenedExchanger(); public static ItemReinforcedExchanger reinforcedExchanger = new ItemReinforcedExchanger(); @@ -90,6 +101,16 @@ public static void init(RegistryEvent.Register e) { eioExchangerCoreT1, eioExchangerCoreT2, eioExchangerCoreT3, + //Ender IO Endergy Exchangers + crudeSteelExchanger, + energeticSilverExchanger, + vividExchanger, + crystallineExchanger, + melodicExchanger, + stellarExchanger, + eioEndergyExchangerCoreT1, + eioEndergyExchangerCoreT2, + eioEndergyExchangerCoreT3, //Thermal Expansion Exchangers leadstoneExchanger, hardenedExchanger, @@ -144,6 +165,16 @@ public static void initModels() { eioExchangerCoreT1.initModel(); eioExchangerCoreT2.initModel(); eioExchangerCoreT3.initModel(); + //Ender IO Endergy Exchangers + crudeSteelExchanger.initModel(); + energeticSilverExchanger.initModel(); + vividExchanger.initModel(); + crystallineExchanger.initModel(); + melodicExchanger.initModel(); + stellarExchanger.initModel(); + eioEndergyExchangerCoreT1.initModel(); + eioEndergyExchangerCoreT2.initModel(); + eioEndergyExchangerCoreT3.initModel(); //Thermal Expansion Exchangers leadstoneExchanger.initModel(); hardenedExchanger.initModel(); diff --git a/src/main/java/jackyy/exchangers/registry/ModRecipes.java b/src/main/java/jackyy/exchangers/registry/ModRecipes.java index ec6a88b..47c0227 100644 --- a/src/main/java/jackyy/exchangers/registry/ModRecipes.java +++ b/src/main/java/jackyy/exchangers/registry/ModRecipes.java @@ -1,10 +1,7 @@ package jackyy.exchangers.registry; -import jackyy.exchangers.Exchangers; -import jackyy.exchangers.integration.EnderIOIntegration; -import jackyy.exchangers.integration.ImmersiveEngineeringIntegration; -import jackyy.exchangers.integration.MekanismIntegration; -import jackyy.exchangers.integration.ThermalExpansionIntegration; +import jackyy.exchangers.integration.*; +import jackyy.exchangers.util.Reference; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.InventoryCrafting; @@ -23,81 +20,86 @@ public class ModRecipes { public static void init(RegistryEvent.Register e) { if (ModConfig.modules.enderIOModule) { - if (Loader.isModLoaded(Exchangers.EIO)) { + if (Loader.isModLoaded(Reference.EIO)) { EnderIOIntegration.init(); } } + if (ModConfig.modules.enderIOEndergyModule) { + if (Loader.isModLoaded(Reference.EIO_ENDERGY)) { + EnderIOEndergyIntegration.init(); + } + } if (ModConfig.modules.thermalExpansionModule) { - if (Loader.isModLoaded(Exchangers.TE)) { + if (Loader.isModLoaded(Reference.TE)) { ThermalExpansionIntegration.init(); } } if (ModConfig.modules.mekanismModule) { - if (Loader.isModLoaded(Exchangers.MEK)) { + if (Loader.isModLoaded(Reference.MEK)) { MekanismIntegration.init(); } } if (ModConfig.modules.immersiveEngineeringModule) { - if (Loader.isModLoaded(Exchangers.IE)) { + if (Loader.isModLoaded(Reference.IE)) { ImmersiveEngineeringIntegration.init(); } } if (ModConfig.modules.vanillaModule) { GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":wooden_exchanger"), null, new ItemStack(ModItems.woodenExchanger), + new ResourceLocation(Reference.MODID + ":wooden_exchanger"), null, new ItemStack(ModItems.woodenExchanger), "WEW", "WCW", "WEW", 'W', "logWood", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT1 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":vanilla_core_tier1"), null, new ItemStack(ModItems.exchangerCoreT1), + new ResourceLocation(Reference.MODID + ":vanilla_core_tier1"), null, new ItemStack(ModItems.exchangerCoreT1), "WRW", "RPR", "WRW", 'R', "dyeRed", 'W', "logWood", 'P', "enderpearl" ); switch (ModConfig.recipeTweaks.vanillaRecipesType) { case "easy": { GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":stone_exchanger_easy"), null, new ItemStack(ModItems.stoneExchanger), + new ResourceLocation(Reference.MODID + ":stone_exchanger_easy"), null, new ItemStack(ModItems.stoneExchanger), "SES", "SCS", "SES", 'S', "stone", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT1 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":golden_exchanger_easy"), null, new ItemStack(ModItems.goldenExchanger), + new ResourceLocation(Reference.MODID + ":golden_exchanger_easy"), null, new ItemStack(ModItems.goldenExchanger), "GEG", "GCG", "GEG", 'G', "ingotGold", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT2 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":iron_exchanger_easy"), null, new ItemStack(ModItems.ironExchanger), + new ResourceLocation(Reference.MODID + ":iron_exchanger_easy"), null, new ItemStack(ModItems.ironExchanger), "IEI", "ICI", "IEI", 'I', "ingotIron", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT2 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":diamond_exchanger_easy"), null, new ItemStack(ModItems.diamondExchanger), + new ResourceLocation(Reference.MODID + ":diamond_exchanger_easy"), null, new ItemStack(ModItems.diamondExchanger), "DED", "DCD", "DED", 'D', "gemDiamond", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT3 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":emerald_exchanger_easy"), null, new ItemStack(ModItems.emeraldExchanger), + new ResourceLocation(Reference.MODID + ":emerald_exchanger_easy"), null, new ItemStack(ModItems.emeraldExchanger), "MEM", "MCM", "MEM", 'M', "gemEmerald", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT3 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":obsidian_exchanger_easy"), null, new ItemStack(ModItems.obsidianExchanger), + new ResourceLocation(Reference.MODID + ":obsidian_exchanger_easy"), null, new ItemStack(ModItems.obsidianExchanger), "OEO", "OCO", "OEO", 'O', "obsidian", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT3 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":end_exchanger_easy"), null, new ItemStack(ModItems.endExchanger), + new ResourceLocation(Reference.MODID + ":end_exchanger_easy"), null, new ItemStack(ModItems.endExchanger), "SEP", "PCS", "SEP", 'S', "endstone", 'P', new ItemStack(Blocks.PURPUR_BLOCK), 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT3 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":vanilla_core_tier2_easy"), null, new ItemStack(ModItems.exchangerCoreT2), + new ResourceLocation(Reference.MODID + ":vanilla_core_tier2_easy"), null, new ItemStack(ModItems.exchangerCoreT2), "ILI", "LEL", "ILI", 'I', "ingotIron", 'E', Items.ENDER_EYE, 'L', "gemLapis" ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":vanilla_core_tier3_easy"), null, new ItemStack(ModItems.exchangerCoreT3), + new ResourceLocation(Reference.MODID + ":vanilla_core_tier3_easy"), null, new ItemStack(ModItems.exchangerCoreT3), "DED", "EBE", "DED", 'D', "gemDiamond", 'E', "gemEmerald", 'B', "blockDiamond" ); @@ -105,47 +107,47 @@ public static void init(RegistryEvent.Register e) { } case "normal": { new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":stone_exchanger_normal"), new ItemStack(ModItems.stoneExchanger), new ItemStack(ModItems.woodenExchanger), + e, new ResourceLocation(Reference.MODID + ":stone_exchanger_normal"), new ItemStack(ModItems.stoneExchanger), new ItemStack(ModItems.woodenExchanger), "SCS", "EXE", "SSS", 'S', "stone", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT1, 'X', ModItems.woodenExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":golden_exchanger_normal"), new ItemStack(ModItems.goldenExchanger), new ItemStack(ModItems.stoneExchanger), + e, new ResourceLocation(Reference.MODID + ":golden_exchanger_normal"), new ItemStack(ModItems.goldenExchanger), new ItemStack(ModItems.stoneExchanger), "GCG", "EXE", "GGG", 'G', "ingotGold", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT2, 'X', ModItems.stoneExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":iron_exchanger_normal"), new ItemStack(ModItems.ironExchanger), new ItemStack(ModItems.goldenExchanger), + e, new ResourceLocation(Reference.MODID + ":iron_exchanger_normal"), new ItemStack(ModItems.ironExchanger), new ItemStack(ModItems.goldenExchanger), "ICI", "EXE", "III", 'I', "ingotIron", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT2, 'X', ModItems.goldenExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":diamond_exchanger_normal"), new ItemStack(ModItems.diamondExchanger), new ItemStack(ModItems.ironExchanger), + e, new ResourceLocation(Reference.MODID + ":diamond_exchanger_normal"), new ItemStack(ModItems.diamondExchanger), new ItemStack(ModItems.ironExchanger), "DCD", "EXE", "DDD", 'D', "gemDiamond", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT3, 'X', ModItems.ironExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":emerald_exchanger_normal"), new ItemStack(ModItems.emeraldExchanger), new ItemStack(ModItems.diamondExchanger), + e, new ResourceLocation(Reference.MODID + ":emerald_exchanger_normal"), new ItemStack(ModItems.emeraldExchanger), new ItemStack(ModItems.diamondExchanger), "MCM", "EXE", "MMM", 'M', "gemEmerald", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT3, 'X', ModItems.diamondExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":obsidian_exchanger_normal"), new ItemStack(ModItems.obsidianExchanger), new ItemStack(ModItems.emeraldExchanger), + e, new ResourceLocation(Reference.MODID + ":obsidian_exchanger_normal"), new ItemStack(ModItems.obsidianExchanger), new ItemStack(ModItems.emeraldExchanger), "OCO", "EXE", "OOO", 'O', "obsidian", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT3, 'X', ModItems.emeraldExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":end_exchanger_normal"), new ItemStack(ModItems.endExchanger), new ItemStack(ModItems.obsidianExchanger), + e, new ResourceLocation(Reference.MODID + ":end_exchanger_normal"), new ItemStack(ModItems.endExchanger), new ItemStack(ModItems.obsidianExchanger), "SCP", "EXE", "PFS", 'S', "endstone", 'P', new ItemStack(Blocks.PURPUR_BLOCK), 'F', new ItemStack(Blocks.CHORUS_FLOWER), 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT3, 'X', ModItems.obsidianExchanger ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":vanilla_core_tier2_normal"), null, new ItemStack(ModItems.exchangerCoreT2), + new ResourceLocation(Reference.MODID + ":vanilla_core_tier2_normal"), null, new ItemStack(ModItems.exchangerCoreT2), "ILI", "ECE", "ILI", 'I', "ingotIron", 'E', Items.ENDER_EYE, 'L', "gemLapis", 'C', ModItems.exchangerCoreT1 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":vanilla_core_tier3_normal"), null, new ItemStack(ModItems.exchangerCoreT3), + new ResourceLocation(Reference.MODID + ":vanilla_core_tier3_normal"), null, new ItemStack(ModItems.exchangerCoreT3), "DED", "BCB", "DED", 'D', "gemDiamond", 'E', "gemEmerald", 'C', ModItems.exchangerCoreT2, 'B', "blockDiamond" ); @@ -153,47 +155,47 @@ e, new ResourceLocation(Exchangers.MODID + ":end_exchanger_normal"), new ItemSta } case "hard": { new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":stone_exchanger_hard"), new ItemStack(ModItems.stoneExchanger), new ItemStack(ModItems.woodenExchanger), + e, new ResourceLocation(Reference.MODID + ":stone_exchanger_hard"), new ItemStack(ModItems.stoneExchanger), new ItemStack(ModItems.woodenExchanger), "SES", "CXC", "SES", 'S', "stone", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT1, 'X', ModItems.woodenExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":golden_exchanger_hard"), new ItemStack(ModItems.goldenExchanger), new ItemStack(ModItems.stoneExchanger), + e, new ResourceLocation(Reference.MODID + ":golden_exchanger_hard"), new ItemStack(ModItems.goldenExchanger), new ItemStack(ModItems.stoneExchanger), "GEG", "CXC", "GEG", 'G', "ingotGold", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT2, 'X', ModItems.stoneExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":iron_exchanger_hard"), new ItemStack(ModItems.ironExchanger), new ItemStack(ModItems.goldenExchanger), + e, new ResourceLocation(Reference.MODID + ":iron_exchanger_hard"), new ItemStack(ModItems.ironExchanger), new ItemStack(ModItems.goldenExchanger), "IEI", "CXC", "IEI", 'I', "ingotIron", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT2, 'X', ModItems.goldenExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":diamond_exchanger_hard"), new ItemStack(ModItems.diamondExchanger), new ItemStack(ModItems.ironExchanger), + e, new ResourceLocation(Reference.MODID + ":diamond_exchanger_hard"), new ItemStack(ModItems.diamondExchanger), new ItemStack(ModItems.ironExchanger), "DED", "CXC", "DED", 'D', "gemDiamond", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT3, 'X', ModItems.ironExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":emerald_exchanger_hard"), new ItemStack(ModItems.emeraldExchanger), new ItemStack(ModItems.diamondExchanger), + e, new ResourceLocation(Reference.MODID + ":emerald_exchanger_hard"), new ItemStack(ModItems.emeraldExchanger), new ItemStack(ModItems.diamondExchanger), "MEM", "CXC", "MEM", 'M', "gemEmerald", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT3, 'X', ModItems.diamondExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":obsidian_exchanger_hard"), new ItemStack(ModItems.obsidianExchanger), new ItemStack(ModItems.emeraldExchanger), + e, new ResourceLocation(Reference.MODID + ":obsidian_exchanger_hard"), new ItemStack(ModItems.obsidianExchanger), new ItemStack(ModItems.emeraldExchanger), "OEO", "CXC", "OEO", 'O', "obsidian", 'E', Items.ENDER_EYE, 'C', ModItems.exchangerCoreT3, 'X', ModItems.emeraldExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":end_exchanger_hard"), new ItemStack(ModItems.endExchanger), new ItemStack(ModItems.obsidianExchanger), + e, new ResourceLocation(Reference.MODID + ":end_exchanger_hard"), new ItemStack(ModItems.endExchanger), new ItemStack(ModItems.obsidianExchanger), "SEP", "CXC", "PES", 'S', "endstone", 'P', new ItemStack(Blocks.PURPUR_BLOCK), 'E', Items.END_CRYSTAL, 'C', ModItems.exchangerCoreT3, 'X', ModItems.obsidianExchanger ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":vanilla_core_tier2_hard"), null, new ItemStack(ModItems.exchangerCoreT2), + new ResourceLocation(Reference.MODID + ":vanilla_core_tier2_hard"), null, new ItemStack(ModItems.exchangerCoreT2), "ILI", "CEC", "ILI", 'I', "ingotIron", 'E', Items.ENDER_EYE, 'L', "gemLapis", 'C', ModItems.exchangerCoreT1 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":vanilla_core_tier3_hard"), null, new ItemStack(ModItems.exchangerCoreT3), + new ResourceLocation(Reference.MODID + ":vanilla_core_tier3_hard"), null, new ItemStack(ModItems.exchangerCoreT3), "DCE", "CBC", "ECD", 'D', "gemDiamond", 'E', "gemEmerald", 'C', ModItems.exchangerCoreT2, 'B', "blockDiamond" ); @@ -203,56 +205,56 @@ e, new ResourceLocation(Exchangers.MODID + ":end_exchanger_hard"), new ItemStack } if (ModConfig.modules.enderIOModule) { - if (Loader.isModLoaded(Exchangers.EIO)) { + if (Loader.isModLoaded(Reference.EIO)) { GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":conductive_exchanger"), null, new ItemStack(ModItems.conductiveIronExchanger), + new ResourceLocation(Reference.MODID + ":conductive_exchanger"), null, new ItemStack(ModItems.conductiveIronExchanger), "IBI", "ICI", "IBI", 'I', "ingotConductiveIron", 'B', EnderIOIntegration.basicCapacitor, 'C', ModItems.eioExchangerCoreT1 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":eio_core_tier1"), null, new ItemStack(ModItems.eioExchangerCoreT1), + new ResourceLocation(Reference.MODID + ":eio_core_tier1"), null, new ItemStack(ModItems.eioExchangerCoreT1), "PCP", "CNC", "PCP", 'P', "nuggetPulsatingIron", 'C', "ingotConductiveIron", 'N', EnderIOIntegration.bucketNutrientDistillation ); switch (ModConfig.recipeTweaks.enderIORecipesType) { case "easy": { GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":pulsating_exchanger_easy"), null, new ItemStack(ModItems.pulsatingIronExchanger), + new ResourceLocation(Reference.MODID + ":pulsating_exchanger_easy"), null, new ItemStack(ModItems.pulsatingIronExchanger), "IPI", "ICI", "IBI", 'I', "ingotPulsatingIron", 'P', EnderIOIntegration.pulsatingCrystal, 'B', EnderIOIntegration.basicCapacitor, 'C', ModItems.eioExchangerCoreT1 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":electricalsteel_exchanger_easy"), null, new ItemStack(ModItems.electricalSteelExchanger), + new ResourceLocation(Reference.MODID + ":electricalsteel_exchanger_easy"), null, new ItemStack(ModItems.electricalSteelExchanger), "SDS", "SCS", "SBS", 'S', "ingotElectricalSteel", 'B', EnderIOIntegration.capacitorBankBasic, 'D', EnderIOIntegration.doubleLayerCapacitor, 'C', ModItems.eioExchangerCoreT2 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":energetic_exchanger_easy"), null, new ItemStack(ModItems.energeticExchanger), + new ResourceLocation(Reference.MODID + ":energetic_exchanger_easy"), null, new ItemStack(ModItems.energeticExchanger), "ADA", "ACA", "ABA", 'A', "ingotEnergeticAlloy", 'B', EnderIOIntegration.capacitorBank, 'D', EnderIOIntegration.doubleLayerCapacitor, 'C', ModItems.eioExchangerCoreT2 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":darksteel_exchanger_easy"), null, new ItemStack(ModItems.darkSteelExchanger), + new ResourceLocation(Reference.MODID + ":darksteel_exchanger_easy"), null, new ItemStack(ModItems.darkSteelExchanger), "SVS", "SCS", "SOS", 'S', "ingotDarkSteel", 'O', EnderIOIntegration.octadicCapacitor, 'V', EnderIOIntegration.vibrantCrystal, 'C', ModItems.eioExchangerCoreT3 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":vibrant_exchanger_easy"), null, new ItemStack(ModItems.vibrantExchanger), + new ResourceLocation(Reference.MODID + ":vibrant_exchanger_easy"), null, new ItemStack(ModItems.vibrantExchanger), "AEA", "ACA", "ABA", 'A', "ingotVibrantAlloy", 'B', EnderIOIntegration.capacitorBankVibrant, 'E', EnderIOIntegration.enderCrystal, 'C', ModItems.eioExchangerCoreT3 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":endsteel_exchanger_easy"), null, new ItemStack(ModItems.endSteelExchanger), + new ResourceLocation(Reference.MODID + ":endsteel_exchanger_easy"), null, new ItemStack(ModItems.endSteelExchanger), "SPS", "SCS", "SAS", 'S', "ingotEndSteel", 'A', EnderIOIntegration.enhancedWirelessChargingAntenna, 'P', EnderIOIntegration.precientCrystal, 'C', ModItems.eioExchangerCoreT3 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":eio_core_tier2_easy"), null, new ItemStack(ModItems.eioExchangerCoreT2), + new ResourceLocation(Reference.MODID + ":eio_core_tier2_easy"), null, new ItemStack(ModItems.eioExchangerCoreT2), "PSP", "SDS", "PSP", 'P', "itemPulsatingPowder", 'S', "ingotElectricalSteel", 'D', EnderIOIntegration.bucketDewOfTheVoid ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":eio_core_tier3_easy"), null, new ItemStack(ModItems.eioExchangerCoreT3), + new ResourceLocation(Reference.MODID + ":eio_core_tier3_easy"), null, new ItemStack(ModItems.eioExchangerCoreT3), "DBD", "BVB", "DBD", 'D', "ingotDarkSteel", 'B', EnderIOIntegration.basicCapacitor, 'V', EnderIOIntegration.bucketVaporOfLevity ); @@ -260,42 +262,42 @@ e, new ResourceLocation(Exchangers.MODID + ":end_exchanger_hard"), new ItemStack } case "normal": { new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":pulsating_exchanger_normal"), new ItemStack(ModItems.pulsatingIronExchanger), new ItemStack(ModItems.conductiveIronExchanger), + e, new ResourceLocation(Reference.MODID + ":pulsating_exchanger_normal"), new ItemStack(ModItems.pulsatingIronExchanger), new ItemStack(ModItems.conductiveIronExchanger), "ICI", "PXP", "IBI", 'I', "ingotPulsatingIron", 'P', EnderIOIntegration.pulsatingCrystal, 'B', EnderIOIntegration.basicCapacitor, 'C', ModItems.eioExchangerCoreT1, 'X', ModItems.conductiveIronExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":electricalsteel_exchanger_normal"), new ItemStack(ModItems.electricalSteelExchanger), new ItemStack(ModItems.pulsatingIronExchanger), + e, new ResourceLocation(Reference.MODID + ":electricalsteel_exchanger_normal"), new ItemStack(ModItems.electricalSteelExchanger), new ItemStack(ModItems.pulsatingIronExchanger), "SCS", "DXD", "SBS", 'S', "ingotElectricalSteel", 'B', EnderIOIntegration.capacitorBankBasic, 'D', EnderIOIntegration.doubleLayerCapacitor, 'C', ModItems.eioExchangerCoreT2, 'X', ModItems.pulsatingIronExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":energetic_exchanger_normal"), new ItemStack(ModItems.energeticExchanger), new ItemStack(ModItems.electricalSteelExchanger), + e, new ResourceLocation(Reference.MODID + ":energetic_exchanger_normal"), new ItemStack(ModItems.energeticExchanger), new ItemStack(ModItems.electricalSteelExchanger), "ACA", "DXD", "ABA", 'A', "ingotEnergeticAlloy", 'B', EnderIOIntegration.capacitorBank, 'D', EnderIOIntegration.doubleLayerCapacitor, 'C', ModItems.eioExchangerCoreT2, 'X', ModItems.electricalSteelExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":darksteel_exchanger_normal"), new ItemStack(ModItems.darkSteelExchanger), new ItemStack(ModItems.energeticExchanger), + e, new ResourceLocation(Reference.MODID + ":darksteel_exchanger_normal"), new ItemStack(ModItems.darkSteelExchanger), new ItemStack(ModItems.energeticExchanger), "SCS", "VXV", "SOS", 'S', "ingotDarkSteel", 'O', EnderIOIntegration.octadicCapacitor, 'V', EnderIOIntegration.vibrantCrystal, 'C', ModItems.eioExchangerCoreT3, 'X', ModItems.energeticExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":vibrant_exchanger_normal"), new ItemStack(ModItems.vibrantExchanger), new ItemStack(ModItems.darkSteelExchanger), + e, new ResourceLocation(Reference.MODID + ":vibrant_exchanger_normal"), new ItemStack(ModItems.vibrantExchanger), new ItemStack(ModItems.darkSteelExchanger), "ACA", "EXE", "ABA", 'A', "ingotVibrantAlloy", 'B', EnderIOIntegration.capacitorBankVibrant, 'E', EnderIOIntegration.enderCrystal, 'C', ModItems.eioExchangerCoreT3, 'X', ModItems.darkSteelExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":endsteel_exchanger_normal"), new ItemStack(ModItems.endSteelExchanger), new ItemStack(ModItems.vibrantExchanger), + e, new ResourceLocation(Reference.MODID + ":endsteel_exchanger_normal"), new ItemStack(ModItems.endSteelExchanger), new ItemStack(ModItems.vibrantExchanger), "SCS", "PXP", "SAS", 'S', "ingotEndSteel", 'A', EnderIOIntegration.enhancedWirelessChargingAntenna, 'P', EnderIOIntegration.precientCrystal, 'C', ModItems.eioExchangerCoreT3, 'X', ModItems.vibrantExchanger ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":eio_core_tier2_normal"), null, new ItemStack(ModItems.eioExchangerCoreT2), + new ResourceLocation(Reference.MODID + ":eio_core_tier2_normal"), null, new ItemStack(ModItems.eioExchangerCoreT2), "PSP", "DCD", "PSP", 'P', "itemPulsatingPowder", 'S', "ingotElectricalSteel", 'C', ModItems.eioExchangerCoreT1, 'D', EnderIOIntegration.bucketDewOfTheVoid ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":eio_core_tier3_normal"), null, new ItemStack(ModItems.eioExchangerCoreT3), + new ResourceLocation(Reference.MODID + ":eio_core_tier3_normal"), null, new ItemStack(ModItems.eioExchangerCoreT3), "DBD", "VCV", "DBD", 'C', ModItems.eioExchangerCoreT2, 'D', "ingotDarkSteel", 'B', EnderIOIntegration.basicCapacitor, 'V', EnderIOIntegration.bucketVaporOfLevity ); @@ -303,42 +305,42 @@ e, new ResourceLocation(Exchangers.MODID + ":endsteel_exchanger_normal"), new It } case "hard": { new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":pulsating_exchanger_hard"), new ItemStack(ModItems.pulsatingIronExchanger), new ItemStack(ModItems.conductiveIronExchanger), + e, new ResourceLocation(Reference.MODID + ":pulsating_exchanger_hard"), new ItemStack(ModItems.pulsatingIronExchanger), new ItemStack(ModItems.conductiveIronExchanger), "IPI", "CXC", "IBI", 'I', "ingotPulsatingIron", 'P', EnderIOIntegration.pulsatingCrystal, 'B', EnderIOIntegration.basicCapacitor, 'C', ModItems.eioExchangerCoreT1, 'X', ModItems.conductiveIronExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":electricalsteel_exchanger_hard"), new ItemStack(ModItems.electricalSteelExchanger), new ItemStack(ModItems.pulsatingIronExchanger), + e, new ResourceLocation(Reference.MODID + ":electricalsteel_exchanger_hard"), new ItemStack(ModItems.electricalSteelExchanger), new ItemStack(ModItems.pulsatingIronExchanger), "SDS", "CXC", "SBS", 'S', "ingotElectricalSteel", 'B', EnderIOIntegration.capacitorBankBasic, 'D', EnderIOIntegration.doubleLayerCapacitor, 'C', ModItems.eioExchangerCoreT2, 'X', ModItems.pulsatingIronExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":energetic_exchanger_hard"), new ItemStack(ModItems.energeticExchanger), new ItemStack(ModItems.electricalSteelExchanger), + e, new ResourceLocation(Reference.MODID + ":energetic_exchanger_hard"), new ItemStack(ModItems.energeticExchanger), new ItemStack(ModItems.electricalSteelExchanger), "ADA", "CXC", "ABA", 'A', "ingotEnergeticAlloy", 'B', EnderIOIntegration.capacitorBank, 'D', EnderIOIntegration.doubleLayerCapacitor, 'C', ModItems.eioExchangerCoreT2, 'X', ModItems.electricalSteelExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":darksteel_exchanger_hard"), new ItemStack(ModItems.darkSteelExchanger), new ItemStack(ModItems.energeticExchanger), + e, new ResourceLocation(Reference.MODID + ":darksteel_exchanger_hard"), new ItemStack(ModItems.darkSteelExchanger), new ItemStack(ModItems.energeticExchanger), "SVS", "CXC", "SOS", 'S', "ingotDarkSteel", 'O', EnderIOIntegration.octadicCapacitor, 'V', EnderIOIntegration.vibrantCrystal, 'C', ModItems.eioExchangerCoreT3, 'X', ModItems.energeticExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":vibrant_exchanger_hard"), new ItemStack(ModItems.vibrantExchanger), new ItemStack(ModItems.darkSteelExchanger), + e, new ResourceLocation(Reference.MODID + ":vibrant_exchanger_hard"), new ItemStack(ModItems.vibrantExchanger), new ItemStack(ModItems.darkSteelExchanger), "AEA", "CXC", "ABA", 'A', "ingotVibrantAlloy", 'B', EnderIOIntegration.capacitorBankVibrant, 'E', EnderIOIntegration.enderCrystal, 'C', ModItems.eioExchangerCoreT3, 'X', ModItems.darkSteelExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":endsteel_exchanger_hard"), new ItemStack(ModItems.endSteelExchanger), new ItemStack(ModItems.vibrantExchanger), + e, new ResourceLocation(Reference.MODID + ":endsteel_exchanger_hard"), new ItemStack(ModItems.endSteelExchanger), new ItemStack(ModItems.vibrantExchanger), "SPS", "CXC", "SAS", 'S', "ingotEndSteel", 'A', EnderIOIntegration.enhancedWirelessChargingAntenna, 'P', EnderIOIntegration.precientCrystal, 'C', ModItems.eioExchangerCoreT3, 'X', ModItems.vibrantExchanger ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":eio_core_tier2_hard"), null, new ItemStack(ModItems.eioExchangerCoreT2), + new ResourceLocation(Reference.MODID + ":eio_core_tier2_hard"), null, new ItemStack(ModItems.eioExchangerCoreT2), "PSP", "CDC", "PSP", 'P', "itemPulsatingPowder", 'S', "ingotElectricalSteel", 'C', ModItems.eioExchangerCoreT1, 'D', EnderIOIntegration.bucketDewOfTheVoid ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":eio_core_tier3_hard"), null, new ItemStack(ModItems.eioExchangerCoreT3), + new ResourceLocation(Reference.MODID + ":eio_core_tier3_hard"), null, new ItemStack(ModItems.eioExchangerCoreT3), "DCD", "CVC", "DCD", 'C', ModItems.eioExchangerCoreT2, 'D', "ingotDarkSteel", 'V', EnderIOIntegration.bucketVaporOfLevity ); @@ -348,47 +350,178 @@ e, new ResourceLocation(Exchangers.MODID + ":endsteel_exchanger_hard"), new Item } } + if (ModConfig.modules.enderIOEndergyModule) { + if (Loader.isModLoaded(Reference.EIO_ENDERGY)) { + GameRegistry.addShapedRecipe( + new ResourceLocation(Reference.MODID + ":crudesteel_exchanger"), null, new ItemStack(ModItems.crudeSteelExchanger), + "S#S", "SCS", "S#S", + 'S', "ingotCrudeSteel", '#', EnderIOEndergyIntegration.silverCapacitor, 'C', ModItems.eioEndergyExchangerCoreT1 + ); + GameRegistry.addShapedRecipe( + new ResourceLocation(Reference.MODID + ":eio_endergy_core_tier1"), null, new ItemStack(ModItems.eioEndergyExchangerCoreT1), + "GSG", "SIS", "GSG", + 'G', EnderIOEndergyIntegration.grainyCapacitor, 'S', "ingotCrudeSteel", 'I', EnderIOEndergyIntegration.infinityDust + ); + switch (ModConfig.recipeTweaks.enderIOEndergyRecipesType) { + case "easy": { + GameRegistry.addShapedRecipe( + new ResourceLocation(Reference.MODID + ":energeticsilver_exchanger_easy"), null, new ItemStack(ModItems.energeticSilverExchanger), + "SXS", "SCS", "S#S", + 'S', "ingotEnergeticSilver", 'X', EnderIOEndergyIntegration.silverCapacitor, '#', EnderIOEndergyIntegration.endergeticSilverCapacitor, 'C', ModItems.eioEndergyExchangerCoreT1 + ); + GameRegistry.addShapedRecipe( + new ResourceLocation(Reference.MODID + ":vivid_exchanger_easy"), null, new ItemStack(ModItems.vividExchanger), + "VSV", "VCV", "VEV", + 'V', "ingotVividAlloy", 'S', EnderIOEndergyIntegration.endergeticSilverCapacitor, 'E', EnderIOEndergyIntegration.endergisedCapacitor, 'C', ModItems.eioEndergyExchangerCoreT2 + ); + GameRegistry.addShapedRecipe( + new ResourceLocation(Reference.MODID + ":crystalline_exchanger_easy"), null, new ItemStack(ModItems.crystallineExchanger), + "A#A", "ACA", "ATA", + 'A', "ingotCrystallineAlloy", 'T', EnderIOEndergyIntegration.totemicCapacitor, '#', EnderIOEndergyIntegration.crystallineCapacitor, 'C', ModItems.eioEndergyExchangerCoreT2 + ); + GameRegistry.addShapedRecipe( + new ResourceLocation(Reference.MODID + ":melodic_exchanger_easy"), null, new ItemStack(ModItems.melodicExchanger), + "MLM", "MCM", "M#M", + 'M', "ingotMelodicAlloy", 'L', EnderIOEndergyIntegration.melodicCapacitor, '#', EnderIOIntegration.telepadBlock, 'C', ModItems.eioEndergyExchangerCoreT3 + ); + GameRegistry.addShapedRecipe( + new ResourceLocation(Reference.MODID + ":stellar_exchanger_easy"), null, new ItemStack(ModItems.stellarExchanger), + "S#S", "SCS", "SDS", + 'S', "ingotStellarAlloy", '#', EnderIOEndergyIntegration.stellarCapacitor, 'D', EnderIOIntegration.dimensionalTransceiver, 'C', ModItems.eioEndergyExchangerCoreT3 + ); + GameRegistry.addShapedRecipe( + new ResourceLocation(Reference.MODID + ":eio_endergy_core_tier2_easy"), null, new ItemStack(ModItems.eioEndergyExchangerCoreT2), + "PVP", "VLV", "PVP", + 'P', EnderIOEndergyIntegration.glowstoneNanoParticles, 'V', "ingotVividAlloy", 'L', EnderIOIntegration.bucketLiquidSunshine + ); + GameRegistry.addShapedRecipe( + new ResourceLocation(Reference.MODID + ":eio_endergy_core_tier3_easy"), null, new ItemStack(ModItems.eioEndergyExchangerCoreT3), + "MIM", "ISI", "MIM", + 'M', "ingotMelodicAlloy", 'I', "itemInfinityGoop", 'S', EnderIOIntegration.bucketConcentratedCloudSeed + ); + break; + } + case "normal": { + new ShapedCopyNBTRecipe( + e, new ResourceLocation(Reference.MODID + ":energeticsilver_exchanger_normal"), new ItemStack(ModItems.energeticSilverExchanger), new ItemStack(ModItems.crudeSteelExchanger), + "SCS", "#X#", "SES", + 'S', "ingotEnergeticSilver", '#', EnderIOEndergyIntegration.silverCapacitor, 'E', EnderIOEndergyIntegration.endergeticSilverCapacitor, 'C', ModItems.eioEndergyExchangerCoreT1, 'X', ModItems.crudeSteelExchanger + ); + new ShapedCopyNBTRecipe( + e, new ResourceLocation(Reference.MODID + ":vivid_exchanger_normal"), new ItemStack(ModItems.vividExchanger), new ItemStack(ModItems.energeticSilverExchanger), + "VCV", "SXS", "V#V", + 'V', "ingotVividAlloy", 'S', EnderIOEndergyIntegration.endergeticSilverCapacitor, '#', EnderIOEndergyIntegration.endergisedCapacitor, 'C', ModItems.eioEndergyExchangerCoreT2, 'X', ModItems.energeticSilverExchanger + ); + new ShapedCopyNBTRecipe( + e, new ResourceLocation(Reference.MODID + ":crystalline_exchanger_normal"), new ItemStack(ModItems.crystallineExchanger), new ItemStack(ModItems.vividExchanger), + "ACA", "#X#", "ATA", + 'A', "ingotCrystallineAlloy", 'T', EnderIOEndergyIntegration.totemicCapacitor, '#', EnderIOEndergyIntegration.crystallineCapacitor, 'C', ModItems.eioEndergyExchangerCoreT2, 'X', ModItems.vividExchanger + ); + new ShapedCopyNBTRecipe( + e, new ResourceLocation(Reference.MODID + ":melodic_exchanger_normal"), new ItemStack(ModItems.melodicExchanger), new ItemStack(ModItems.crystallineExchanger), + "MCM", "LXL", "M#M", + 'M', "ingotMelodicAlloy", '#', EnderIOIntegration.telepadBlock, 'L', EnderIOEndergyIntegration.melodicCapacitor, 'C', ModItems.eioEndergyExchangerCoreT3, 'X', ModItems.crystallineExchanger + ); + new ShapedCopyNBTRecipe( + e, new ResourceLocation(Reference.MODID + ":stellar_exchanger_normal"), new ItemStack(ModItems.stellarExchanger), new ItemStack(ModItems.melodicExchanger), + "SCS", "#X#", "SDS", + 'S', "ingotStellarAlloy", '#', EnderIOEndergyIntegration.stellarCapacitor, 'D', EnderIOIntegration.dimensionalTransceiver, 'C', ModItems.eioEndergyExchangerCoreT3, 'X', ModItems.melodicExchanger + ); + GameRegistry.addShapedRecipe( + new ResourceLocation(Reference.MODID + ":eio_endergy_core_tier2_normal"), null, new ItemStack(ModItems.eioEndergyExchangerCoreT2), + "PVP", "LCL", "PVP", + 'P', EnderIOEndergyIntegration.glowstoneNanoParticles, 'V', "ingotVividAlloy", 'C', ModItems.eioEndergyExchangerCoreT1, 'L', EnderIOIntegration.bucketLiquidSunshine + ); + GameRegistry.addShapedRecipe( + new ResourceLocation(Reference.MODID + ":eio_endergy_core_tier3_normal"), null, new ItemStack(ModItems.eioEndergyExchangerCoreT3), + "MIM", "SCS", "MIM", + 'C', ModItems.eioEndergyExchangerCoreT2, 'M', "ingotMelodicAlloy", 'I', "itemInfinityGoop", 'S', EnderIOIntegration.bucketConcentratedCloudSeed + ); + break; + } + case "hard": { + new ShapedCopyNBTRecipe( + e, new ResourceLocation(Reference.MODID + ":energeticsilver_exchanger_hard"), new ItemStack(ModItems.energeticSilverExchanger), new ItemStack(ModItems.crudeSteelExchanger), + "S#S", "CXC", "SES", + 'S', "ingotEnergeticSilver", '#', EnderIOEndergyIntegration.silverCapacitor, 'E', EnderIOEndergyIntegration.endergeticSilverCapacitor, 'C', ModItems.eioEndergyExchangerCoreT1, 'X', ModItems.crudeSteelExchanger + ); + new ShapedCopyNBTRecipe( + e, new ResourceLocation(Reference.MODID + ":vivid_exchanger_hard"), new ItemStack(ModItems.vividExchanger), new ItemStack(ModItems.energeticSilverExchanger), + "VSV", "CXC", "V#V", + 'V', "ingotVividAlloy", 'S', EnderIOEndergyIntegration.endergeticSilverCapacitor, '#', EnderIOEndergyIntegration.endergisedCapacitor, 'C', ModItems.eioEndergyExchangerCoreT2, 'X', ModItems.energeticSilverExchanger + ); + new ShapedCopyNBTRecipe( + e, new ResourceLocation(Reference.MODID + ":crystalline_exchanger_hard"), new ItemStack(ModItems.crystallineExchanger), new ItemStack(ModItems.vividExchanger), + "A#A", "CXC", "ATA", + 'A', "ingotCrystallineAlloy", 'T', EnderIOEndergyIntegration.totemicCapacitor, '#', EnderIOEndergyIntegration.crystallineCapacitor, 'C', ModItems.eioEndergyExchangerCoreT2, 'X', ModItems.vividExchanger + ); + new ShapedCopyNBTRecipe( + e, new ResourceLocation(Reference.MODID + ":melodic_exchanger_hard"), new ItemStack(ModItems.melodicExchanger), new ItemStack(ModItems.crystallineExchanger), + "MLM", "CXC", "M#M", + 'M', "ingotMelodicAlloy", '#', EnderIOIntegration.telepadBlock, 'L', EnderIOEndergyIntegration.melodicCapacitor, 'C', ModItems.eioEndergyExchangerCoreT3, 'X', ModItems.crystallineExchanger + ); + new ShapedCopyNBTRecipe( + e, new ResourceLocation(Reference.MODID + ":stellar_exchanger_hard"), new ItemStack(ModItems.stellarExchanger), new ItemStack(ModItems.melodicExchanger), + "S#S", "CXC", "SDS", + 'S', "ingotStellarAlloy", '#', EnderIOEndergyIntegration.stellarCapacitor, 'D', EnderIOIntegration.dimensionalTransceiver, 'C', ModItems.eioEndergyExchangerCoreT3, 'X', ModItems.melodicExchanger + ); + GameRegistry.addShapedRecipe( + new ResourceLocation(Reference.MODID + ":eio_endergy_core_tier2_hard"), null, new ItemStack(ModItems.eioEndergyExchangerCoreT2), + "PVP", "CLC", "PVP", + 'P', EnderIOEndergyIntegration.glowstoneNanoParticles, 'V', "ingotVividAlloy", 'C', ModItems.eioEndergyExchangerCoreT1, 'L', EnderIOIntegration.bucketLiquidSunshine + ); + GameRegistry.addShapedRecipe( + new ResourceLocation(Reference.MODID + ":eio_endergy_core_tier3_hard"), null, new ItemStack(ModItems.eioEndergyExchangerCoreT3), + "MCM", "CSC", "MCM", + 'C', ModItems.eioEndergyExchangerCoreT2, 'M', "ingotMelodicAlloy", 'S', EnderIOIntegration.bucketConcentratedCloudSeed + ); + break; + } + } + } + } + if (ModConfig.modules.thermalExpansionModule) { - if (Loader.isModLoaded(Exchangers.TE)) { + if (Loader.isModLoaded(Reference.TE)) { GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":leadstone_exchanger"), null, new ItemStack(ModItems.leadstoneExchanger), + new ResourceLocation(Reference.MODID + ":leadstone_exchanger"), null, new ItemStack(ModItems.leadstoneExchanger), "LSL", "LCL", "LFL", 'L', "ingotLead", 'S', ThermalExpansionIntegration.redstoneServo, 'F', ThermalExpansionIntegration.fluxCapacitorBasic, 'C', ModItems.teExchangerCoreT1 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":te_core_tier1"), null, new ItemStack(ModItems.teExchangerCoreT1), + new ResourceLocation(Reference.MODID + ":te_core_tier1"), null, new ItemStack(ModItems.teExchangerCoreT1), "CLC", "LRL", "CLC", 'C', "gearCopper", 'L', "ingotLead", 'R', ThermalExpansionIntegration.bucketResonantEnder ); switch (ModConfig.recipeTweaks.thermalExpansionRecipesType) { case "easy": { GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":hardened_exchanger_easy"), null, new ItemStack(ModItems.hardenedExchanger), + new ResourceLocation(Reference.MODID + ":hardened_exchanger_easy"), null, new ItemStack(ModItems.hardenedExchanger), "IRI", "ICI", "IFI", 'I', "ingotInvar", 'R', ThermalExpansionIntegration.redstoneReceptionCoil, 'F', ThermalExpansionIntegration.fluxCapacitorHardened, 'C', ModItems.teExchangerCoreT1 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":reinforced_exchanger_easy"), null, new ItemStack(ModItems.reinforcedExchanger), + new ResourceLocation(Reference.MODID + ":reinforced_exchanger_easy"), null, new ItemStack(ModItems.reinforcedExchanger), "ERE", "ECE", "EFE", 'E', "ingotElectrum", 'R', ThermalExpansionIntegration.redstoneTransmissionCoil, 'F', ThermalExpansionIntegration.fluxCapacitorReinforced, 'C', ModItems.teExchangerCoreT2 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":signalum_exchanger_easy"), null, new ItemStack(ModItems.signalumExchanger), + new ResourceLocation(Reference.MODID + ":signalum_exchanger_easy"), null, new ItemStack(ModItems.signalumExchanger), "SRS", "SCS", "SFS", 'S', "ingotSignalum", 'R', ThermalExpansionIntegration.redstoneConductanceCoil, 'F', ThermalExpansionIntegration.fluxCapacitorSignalum, 'C', ModItems.teExchangerCoreT3 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":resonant_exchanger_easy"), null, new ItemStack(ModItems.resonantExchanger), + new ResourceLocation(Reference.MODID + ":resonant_exchanger_easy"), null, new ItemStack(ModItems.resonantExchanger), "IRI", "ICI", "IFI", 'I', "ingotEnderium", 'R', ThermalExpansionIntegration.redstoneConductanceCoil, 'F', ThermalExpansionIntegration.fluxCapacitorResonant, 'C', ModItems.teExchangerCoreT3 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":te_core_tier2_easy"), null, new ItemStack(ModItems.teExchangerCoreT2), + new ResourceLocation(Reference.MODID + ":te_core_tier2_easy"), null, new ItemStack(ModItems.teExchangerCoreT2), "BIB", "IGI", "BIB", 'B', "gearBronze", 'I', "gearInvar", 'G', ThermalExpansionIntegration.bucketEnergizedGlowstone ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":te_core_tier3_easy"), null, new ItemStack(ModItems.teExchangerCoreT3), + new ResourceLocation(Reference.MODID + ":te_core_tier3_easy"), null, new ItemStack(ModItems.teExchangerCoreT3), "LSL", "SGS", "LSL", 'S', "gearSignalum", 'L', "gearLumium", 'G', ThermalExpansionIntegration.bucketGelidCryotheum ); @@ -396,32 +529,32 @@ e, new ResourceLocation(Exchangers.MODID + ":endsteel_exchanger_hard"), new Item } case "normal": { new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":hardened_exchanger_normal"), new ItemStack(ModItems.hardenedExchanger), new ItemStack(ModItems.leadstoneExchanger), + e, new ResourceLocation(Reference.MODID + ":hardened_exchanger_normal"), new ItemStack(ModItems.hardenedExchanger), new ItemStack(ModItems.leadstoneExchanger), "ICI", "RXR", "IFI", 'I', "ingotInvar", 'R', ThermalExpansionIntegration.redstoneReceptionCoil, 'F', ThermalExpansionIntegration.fluxCapacitorHardened, 'C', ModItems.teExchangerCoreT1, 'X', ModItems.leadstoneExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":reinforced_exchanger_normal"), new ItemStack(ModItems.reinforcedExchanger), new ItemStack(ModItems.hardenedExchanger), + e, new ResourceLocation(Reference.MODID + ":reinforced_exchanger_normal"), new ItemStack(ModItems.reinforcedExchanger), new ItemStack(ModItems.hardenedExchanger), "ECE", "RXR", "EFE", 'E', "ingotElectrum", 'R', ThermalExpansionIntegration.redstoneTransmissionCoil, 'F', ThermalExpansionIntegration.fluxCapacitorReinforced, 'C', ModItems.teExchangerCoreT2, 'X', ModItems.hardenedExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":signalum_exchanger_normal"), new ItemStack(ModItems.signalumExchanger), new ItemStack(ModItems.reinforcedExchanger), + e, new ResourceLocation(Reference.MODID + ":signalum_exchanger_normal"), new ItemStack(ModItems.signalumExchanger), new ItemStack(ModItems.reinforcedExchanger), "SCS", "RXR", "SFS", 'S', "ingotSignalum", 'R', ThermalExpansionIntegration.redstoneConductanceCoil, 'F', ThermalExpansionIntegration.fluxCapacitorSignalum, 'C', ModItems.teExchangerCoreT3, 'X', ModItems.reinforcedExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":resonant_exchanger_normal"), new ItemStack(ModItems.resonantExchanger), new ItemStack(ModItems.signalumExchanger), + e, new ResourceLocation(Reference.MODID + ":resonant_exchanger_normal"), new ItemStack(ModItems.resonantExchanger), new ItemStack(ModItems.signalumExchanger), "ICI", "RXR", "IFI", 'I', "ingotEnderium", 'R', ThermalExpansionIntegration.redstoneConductanceCoil, 'F', ThermalExpansionIntegration.fluxCapacitorResonant, 'C', ModItems.teExchangerCoreT3, 'X', ModItems.signalumExchanger ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":te_core_tier2_normal"), null, new ItemStack(ModItems.teExchangerCoreT2), + new ResourceLocation(Reference.MODID + ":te_core_tier2_normal"), null, new ItemStack(ModItems.teExchangerCoreT2), "BIB", "GCG", "BIB", 'B', "gearBronze", 'I', "gearInvar", 'C', ModItems.teExchangerCoreT1, 'G', ThermalExpansionIntegration.bucketEnergizedGlowstone ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":te_core_tier3_normal"), null, new ItemStack(ModItems.teExchangerCoreT3), + new ResourceLocation(Reference.MODID + ":te_core_tier3_normal"), null, new ItemStack(ModItems.teExchangerCoreT3), "LSL", "GCG", "LSL", 'C', ModItems.teExchangerCoreT2, 'L', "gearLumium", 'S', "gearSignalum", 'G', ThermalExpansionIntegration.bucketGelidCryotheum ); @@ -429,32 +562,32 @@ e, new ResourceLocation(Exchangers.MODID + ":resonant_exchanger_normal"), new It } case "hard": { new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":hardened_exchanger_hard"), new ItemStack(ModItems.hardenedExchanger), new ItemStack(ModItems.leadstoneExchanger), + e, new ResourceLocation(Reference.MODID + ":hardened_exchanger_hard"), new ItemStack(ModItems.hardenedExchanger), new ItemStack(ModItems.leadstoneExchanger), "IRI", "CXC", "IFI", 'I', "ingotInvar", 'R', ThermalExpansionIntegration.redstoneReceptionCoil, 'F', ThermalExpansionIntegration.fluxCapacitorHardened, 'C', ModItems.teExchangerCoreT1, 'X', ModItems.leadstoneExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":reinforced_exchanger_hard"), new ItemStack(ModItems.reinforcedExchanger), new ItemStack(ModItems.hardenedExchanger), + e, new ResourceLocation(Reference.MODID + ":reinforced_exchanger_hard"), new ItemStack(ModItems.reinforcedExchanger), new ItemStack(ModItems.hardenedExchanger), "ERE", "CXC", "EFE", 'E', "ingotElectrum", 'R', ThermalExpansionIntegration.redstoneTransmissionCoil, 'F', ThermalExpansionIntegration.fluxCapacitorReinforced, 'C', ModItems.teExchangerCoreT2, 'X', ModItems.hardenedExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":signalum_exchanger_hard"), new ItemStack(ModItems.signalumExchanger), new ItemStack(ModItems.reinforcedExchanger), + e, new ResourceLocation(Reference.MODID + ":signalum_exchanger_hard"), new ItemStack(ModItems.signalumExchanger), new ItemStack(ModItems.reinforcedExchanger), "SRS", "CXC", "SFS", 'S', "ingotSignalum", 'R', ThermalExpansionIntegration.redstoneConductanceCoil, 'F', ThermalExpansionIntegration.fluxCapacitorSignalum, 'C', ModItems.teExchangerCoreT3, 'X', ModItems.reinforcedExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":resonant_exchanger_hard"), new ItemStack(ModItems.resonantExchanger), new ItemStack(ModItems.signalumExchanger), + e, new ResourceLocation(Reference.MODID + ":resonant_exchanger_hard"), new ItemStack(ModItems.resonantExchanger), new ItemStack(ModItems.signalumExchanger), "IRI", "CXC", "IFI", 'I', "ingotEnderium", 'R', ThermalExpansionIntegration.redstoneConductanceCoil, 'F', ThermalExpansionIntegration.fluxCapacitorResonant, 'C', ModItems.teExchangerCoreT3, 'X', ModItems.signalumExchanger ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":te_core_tier2_hard"), null, new ItemStack(ModItems.teExchangerCoreT2), + new ResourceLocation(Reference.MODID + ":te_core_tier2_hard"), null, new ItemStack(ModItems.teExchangerCoreT2), "BIB", "CGC", "BIB", 'B', "gearBronze", 'I', "gearInvar", 'C', ModItems.teExchangerCoreT1, 'G', ThermalExpansionIntegration.bucketEnergizedGlowstone ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":te_core_tier3_hard"), null, new ItemStack(ModItems.teExchangerCoreT3), + new ResourceLocation(Reference.MODID + ":te_core_tier3_hard"), null, new ItemStack(ModItems.teExchangerCoreT3), "LCL", "CGC", "LCL", 'C', ModItems.teExchangerCoreT2, 'L', "gearLumium", 'G', ThermalExpansionIntegration.bucketGelidCryotheum ); @@ -465,41 +598,41 @@ e, new ResourceLocation(Exchangers.MODID + ":resonant_exchanger_hard"), new Item } if (ModConfig.modules.mekanismModule) { - if (Loader.isModLoaded(Exchangers.MEK)) { + if (Loader.isModLoaded(Reference.MEK)) { GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":basic_exchanger"), null, new ItemStack(ModItems.basicExchanger), + new ResourceLocation(Reference.MODID + ":basic_exchanger"), null, new ItemStack(ModItems.basicExchanger), "BTB", "BCB", "BTB", 'B', MekanismIntegration.circuitBasic, 'T', MekanismIntegration.energyTablet, 'C', ModItems.mekanismExchangerCoreT1 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":mek_core_tier1"), null, new ItemStack(ModItems.mekanismExchangerCoreT1), + new ResourceLocation(Reference.MODID + ":mek_core_tier1"), null, new ItemStack(ModItems.mekanismExchangerCoreT1), "OSO", "SAS", "OSO", 'O', "ingotOsmium", 'S', "ingotSteel", 'A', "alloyAdvanced" ); switch (ModConfig.recipeTweaks.mekanismRecipesType) { case "easy": { GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":advanced_exchanger_easy"), null, new ItemStack(ModItems.advancedExchanger), + new ResourceLocation(Reference.MODID + ":advanced_exchanger_easy"), null, new ItemStack(ModItems.advancedExchanger), "ATA", "ACA", "ATA", 'A', MekanismIntegration.circuitAdvanced, 'T', MekanismIntegration.energyTablet, 'C', ModItems.mekanismExchangerCoreT2 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":elite_exchanger_easy"), null, new ItemStack(ModItems.eliteExchanger), + new ResourceLocation(Reference.MODID + ":elite_exchanger_easy"), null, new ItemStack(ModItems.eliteExchanger), "EPE", "ECE", "ETE", 'E', MekanismIntegration.circuitElite, 'P', MekanismIntegration.teleportationCore, 'T', MekanismIntegration.energyTablet, 'C', ModItems.mekanismExchangerCoreT3 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":ultimate_exchanger_easy"), null, new ItemStack(ModItems.ultimateExchanger), + new ResourceLocation(Reference.MODID + ":ultimate_exchanger_easy"), null, new ItemStack(ModItems.ultimateExchanger), "UTU", "UCU", "UTU", 'U', MekanismIntegration.circuitUltimate, 'T', MekanismIntegration.portableTeleporter, 'C', ModItems.mekanismExchangerCoreT3 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":mek_core_tier2_easy"), null, new ItemStack(ModItems.mekanismExchangerCoreT2), + new ResourceLocation(Reference.MODID + ":mek_core_tier2_easy"), null, new ItemStack(ModItems.mekanismExchangerCoreT2), "DGD", "GAG", "DGD", 'D', "dustDiamond", 'G', "ingotRefinedGlowstone", 'A', "alloyElite" ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":mek_core_tier3_easy"), null, new ItemStack(ModItems.mekanismExchangerCoreT3), + new ResourceLocation(Reference.MODID + ":mek_core_tier3_easy"), null, new ItemStack(ModItems.mekanismExchangerCoreT3), "OIO", "IAI", "OIO", 'O', "dustRefinedObsidian", 'I', "ingotRefinedObsidian", 'A', "alloyUltimate" ); @@ -507,27 +640,27 @@ e, new ResourceLocation(Exchangers.MODID + ":resonant_exchanger_hard"), new Item } case "normal": { new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":advanced_exchanger_normal"), new ItemStack(ModItems.advancedExchanger), new ItemStack(ModItems.basicExchanger), + e, new ResourceLocation(Reference.MODID + ":advanced_exchanger_normal"), new ItemStack(ModItems.advancedExchanger), new ItemStack(ModItems.basicExchanger), "ACA", "TXT", "AAA", 'A', MekanismIntegration.circuitAdvanced, 'T', MekanismIntegration.energyTablet, 'C', ModItems.mekanismExchangerCoreT2, 'X', ModItems.basicExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":elite_exchanger_normal"), new ItemStack(ModItems.eliteExchanger), new ItemStack(ModItems.advancedExchanger), + e, new ResourceLocation(Reference.MODID + ":elite_exchanger_normal"), new ItemStack(ModItems.eliteExchanger), new ItemStack(ModItems.advancedExchanger), "ECE", "TXT", "EPE", 'E', MekanismIntegration.circuitElite, 'P', MekanismIntegration.teleportationCore, 'T', MekanismIntegration.energyTablet, 'C', ModItems.mekanismExchangerCoreT3, 'X', ModItems.advancedExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":ultimate_exchanger_normal"), new ItemStack(ModItems.ultimateExchanger), new ItemStack(ModItems.eliteExchanger), + e, new ResourceLocation(Reference.MODID + ":ultimate_exchanger_normal"), new ItemStack(ModItems.ultimateExchanger), new ItemStack(ModItems.eliteExchanger), "UCU", "TXT", "UUU", 'U', MekanismIntegration.circuitUltimate, 'T', MekanismIntegration.portableTeleporter, 'C', ModItems.mekanismExchangerCoreT3, 'X', ModItems.eliteExchanger ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":mek_core_tier2_normal"), null, new ItemStack(ModItems.mekanismExchangerCoreT2), + new ResourceLocation(Reference.MODID + ":mek_core_tier2_normal"), null, new ItemStack(ModItems.mekanismExchangerCoreT2), "DGD", "ACA", "DGD", 'D', "dustDiamond", 'G', "ingotRefinedGlowstone", 'C', ModItems.mekanismExchangerCoreT1, 'A', "alloyElite" ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":mek_core_tier3_normal"), null, new ItemStack(ModItems.mekanismExchangerCoreT3), + new ResourceLocation(Reference.MODID + ":mek_core_tier3_normal"), null, new ItemStack(ModItems.mekanismExchangerCoreT3), "OAO", "ACA", "OAO", 'C', ModItems.mekanismExchangerCoreT2, 'O', "dustRefinedObsidian", 'A', "alloyUltimate" ); @@ -535,27 +668,27 @@ e, new ResourceLocation(Exchangers.MODID + ":ultimate_exchanger_normal"), new It } case "hard": { new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":advanced_exchanger_hard"), new ItemStack(ModItems.advancedExchanger), new ItemStack(ModItems.basicExchanger), + e, new ResourceLocation(Reference.MODID + ":advanced_exchanger_hard"), new ItemStack(ModItems.advancedExchanger), new ItemStack(ModItems.basicExchanger), "ATA", "CXC", "ATA", 'A', MekanismIntegration.circuitAdvanced, 'T', MekanismIntegration.energyTablet, 'C', ModItems.mekanismExchangerCoreT2, 'X', ModItems.basicExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":elite_exchanger_hard"), new ItemStack(ModItems.eliteExchanger), new ItemStack(ModItems.advancedExchanger), + e, new ResourceLocation(Reference.MODID + ":elite_exchanger_hard"), new ItemStack(ModItems.eliteExchanger), new ItemStack(ModItems.advancedExchanger), "EPE", "CXC", "ETE", 'E', MekanismIntegration.circuitElite, 'P', MekanismIntegration.teleportationCore, 'T', MekanismIntegration.energyTablet, 'C', ModItems.mekanismExchangerCoreT3, 'X', ModItems.advancedExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":ultimate_exchanger_hard"), new ItemStack(ModItems.ultimateExchanger), new ItemStack(ModItems.eliteExchanger), + e, new ResourceLocation(Reference.MODID + ":ultimate_exchanger_hard"), new ItemStack(ModItems.ultimateExchanger), new ItemStack(ModItems.eliteExchanger), "UTU", "CXC", "UTU", 'U', MekanismIntegration.circuitUltimate, 'T', MekanismIntegration.portableTeleporter, 'C', ModItems.mekanismExchangerCoreT3, 'X', ModItems.eliteExchanger ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":mek_core_tier2_hard"), null, new ItemStack(ModItems.mekanismExchangerCoreT2), + new ResourceLocation(Reference.MODID + ":mek_core_tier2_hard"), null, new ItemStack(ModItems.mekanismExchangerCoreT2), "DGD", "CAC", "DGD", 'D', "dustDiamond", 'G', "ingotRefinedGlowstone", 'C', ModItems.mekanismExchangerCoreT1, 'A', "alloyElite" ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":mek_core_tier3_hard"), null, new ItemStack(ModItems.mekanismExchangerCoreT3), + new ResourceLocation(Reference.MODID + ":mek_core_tier3_hard"), null, new ItemStack(ModItems.mekanismExchangerCoreT3), "OCO", "CAC", "OCO", 'C', ModItems.mekanismExchangerCoreT2, 'O', "dustRefinedObsidian", 'A', "alloyUltimate" ); @@ -566,36 +699,36 @@ e, new ResourceLocation(Exchangers.MODID + ":ultimate_exchanger_hard"), new Item } if (ModConfig.modules.immersiveEngineeringModule) { - if (Loader.isModLoaded(Exchangers.IE)) { + if (Loader.isModLoaded(Reference.IE)) { GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":lv_exchanger"), null, new ItemStack(ModItems.lvExchanger), + new ResourceLocation(Reference.MODID + ":lv_exchanger"), null, new ItemStack(ModItems.lvExchanger), "SLS", "SCS", "SLS", 'S', "blockSheetmetalCopper", 'L', ImmersiveEngineeringIntegration.lvCapacitor, 'C', ModItems.ieExchangerCoreT1 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":ie_core_tier1"), null, new ItemStack(ModItems.ieExchangerCoreT1), + new ResourceLocation(Reference.MODID + ":ie_core_tier1"), null, new ItemStack(ModItems.ieExchangerCoreT1), "CIC", "IBI", "CIC", 'C', ImmersiveEngineeringIntegration.lvWireCoil, 'I', ImmersiveEngineeringIntegration.ironMechanicalComponent, 'B', ImmersiveEngineeringIntegration.bucketCreosote ); switch (ModConfig.recipeTweaks.immersiveEngineeringRecipesType) { case "easy": { GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":mv_exchanger_easy"), null, new ItemStack(ModItems.mvExchanger), + new ResourceLocation(Reference.MODID + ":mv_exchanger_easy"), null, new ItemStack(ModItems.mvExchanger), "SMS", "SCS", "SMS", 'S', "blockSheetmetalElectrum", 'M', ImmersiveEngineeringIntegration.mvCapacitor, 'C', ModItems.ieExchangerCoreT2 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":hv_exchanger_easy"), null, new ItemStack(ModItems.hvExchanger), + new ResourceLocation(Reference.MODID + ":hv_exchanger_easy"), null, new ItemStack(ModItems.hvExchanger), "SHS", "SCS", "SHS", 'S', "blockSheetmetalSteel", 'H', ImmersiveEngineeringIntegration.hvCapacitor, 'C', ModItems.ieExchangerCoreT3 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":ie_core_tier2_easy"), null, new ItemStack(ModItems.ieExchangerCoreT2), + new ResourceLocation(Reference.MODID + ":ie_core_tier2_easy"), null, new ItemStack(ModItems.ieExchangerCoreT2), "ESE", "SBS", "ESE", 'E', ImmersiveEngineeringIntegration.mvWireCoil, 'S', ImmersiveEngineeringIntegration.steelMechanicalComponent, 'B', ImmersiveEngineeringIntegration.bucketPlantOil ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":ie_core_tier3_easy"), null, new ItemStack(ModItems.ieExchangerCoreT3), + new ResourceLocation(Reference.MODID + ":ie_core_tier3_easy"), null, new ItemStack(ModItems.ieExchangerCoreT3), "SHS", "HBH", "SHS", 'S', ImmersiveEngineeringIntegration.hvWireCoil, 'H', ImmersiveEngineeringIntegration.heavyEngineeringBlock, 'B', ImmersiveEngineeringIntegration.bucketBiodiesel ); @@ -603,22 +736,22 @@ e, new ResourceLocation(Exchangers.MODID + ":ultimate_exchanger_hard"), new Item } case "normal": { new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":mv_exchanger_normal"), new ItemStack(ModItems.mvExchanger), new ItemStack(ModItems.lvExchanger), + e, new ResourceLocation(Reference.MODID + ":mv_exchanger_normal"), new ItemStack(ModItems.mvExchanger), new ItemStack(ModItems.lvExchanger), "SCS", "MXM", "SSS", 'S', "blockSheetmetalElectrum", 'M', ImmersiveEngineeringIntegration.mvCapacitor, 'C', ModItems.ieExchangerCoreT2, 'X', ModItems.lvExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":hv_exchanger_normal"), new ItemStack(ModItems.hvExchanger), new ItemStack(ModItems.mvExchanger), + e, new ResourceLocation(Reference.MODID + ":hv_exchanger_normal"), new ItemStack(ModItems.hvExchanger), new ItemStack(ModItems.mvExchanger), "SCS", "HXH", "SSS", 'S', "blockSheetmetalSteel", 'H', ImmersiveEngineeringIntegration.hvCapacitor, 'C', ModItems.ieExchangerCoreT3, 'X', ModItems.mvExchanger ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":ie_core_tier2_normal"), null, new ItemStack(ModItems.ieExchangerCoreT2), + new ResourceLocation(Reference.MODID + ":ie_core_tier2_normal"), null, new ItemStack(ModItems.ieExchangerCoreT2), "ESE", "BCB", "ESE", 'E', ImmersiveEngineeringIntegration.mvWireCoil, 'S', ImmersiveEngineeringIntegration.steelMechanicalComponent, 'B', ImmersiveEngineeringIntegration.bucketPlantOil, 'C', ModItems.ieExchangerCoreT1 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":ie_core_tier3_normal"), null, new ItemStack(ModItems.ieExchangerCoreT3), + new ResourceLocation(Reference.MODID + ":ie_core_tier3_normal"), null, new ItemStack(ModItems.ieExchangerCoreT3), "SHS", "BCB", "SHS", 'S', ImmersiveEngineeringIntegration.hvWireCoil, 'H', ImmersiveEngineeringIntegration.heavyEngineeringBlock, 'B', ImmersiveEngineeringIntegration.bucketBiodiesel, 'C', ModItems.ieExchangerCoreT2 ); @@ -626,22 +759,22 @@ e, new ResourceLocation(Exchangers.MODID + ":hv_exchanger_normal"), new ItemStac } case "hard": { new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":mv_exchanger_hard"), new ItemStack(ModItems.mvExchanger), new ItemStack(ModItems.lvExchanger), + e, new ResourceLocation(Reference.MODID + ":mv_exchanger_hard"), new ItemStack(ModItems.mvExchanger), new ItemStack(ModItems.lvExchanger), "SMS", "CXC", "SMS", 'S', "blockSheetmetalElectrum", 'M', ImmersiveEngineeringIntegration.mvCapacitor, 'C', ModItems.ieExchangerCoreT2, 'X', ModItems.lvExchanger ); new ShapedCopyNBTRecipe( - e, new ResourceLocation(Exchangers.MODID + ":hv_exchanger_hard"), new ItemStack(ModItems.hvExchanger), new ItemStack(ModItems.mvExchanger), + e, new ResourceLocation(Reference.MODID + ":hv_exchanger_hard"), new ItemStack(ModItems.hvExchanger), new ItemStack(ModItems.mvExchanger), "SHS", "CXC", "SHS", 'S', "blockSheetmetalSteel", 'H', ImmersiveEngineeringIntegration.hvCapacitor, 'C', ModItems.ieExchangerCoreT3, 'X', ModItems.mvExchanger ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":ie_core_tier2_hard"), null, new ItemStack(ModItems.ieExchangerCoreT2), + new ResourceLocation(Reference.MODID + ":ie_core_tier2_hard"), null, new ItemStack(ModItems.ieExchangerCoreT2), "ESE", "CBC", "ESE", 'E', ImmersiveEngineeringIntegration.mvWireCoil, 'S', ImmersiveEngineeringIntegration.steelMechanicalComponent, 'B', ImmersiveEngineeringIntegration.bucketPlantOil, 'C', ModItems.ieExchangerCoreT1 ); GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":ie_core_tier3_hard"), null, new ItemStack(ModItems.ieExchangerCoreT3), + new ResourceLocation(Reference.MODID + ":ie_core_tier3_hard"), null, new ItemStack(ModItems.ieExchangerCoreT3), "HCS", "CBC", "SCH", 'S', ImmersiveEngineeringIntegration.hvWireCoil, 'H', ImmersiveEngineeringIntegration.heavyEngineeringBlock, 'B', ImmersiveEngineeringIntegration.bucketBiodiesel, 'C', ModItems.ieExchangerCoreT2 ); @@ -653,7 +786,7 @@ e, new ResourceLocation(Exchangers.MODID + ":hv_exchanger_hard"), new ItemStack( if (ModConfig.modules.specialModule) { GameRegistry.addShapedRecipe( - new ResourceLocation(Exchangers.MODID + ":tuberous_exchanger"), null, new ItemStack(ModItems.tuberousExchanger), + new ResourceLocation(Reference.MODID + ":tuberous_exchanger"), null, new ItemStack(ModItems.tuberousExchanger), "PGP", "PEP", "PGP", 'P', Items.POTATO, 'G', "nuggetGold", 'E', "enderpearl" ); diff --git a/src/main/java/jackyy/exchangers/util/Reference.java b/src/main/java/jackyy/exchangers/util/Reference.java new file mode 100644 index 0000000..39e32b0 --- /dev/null +++ b/src/main/java/jackyy/exchangers/util/Reference.java @@ -0,0 +1,61 @@ +package jackyy.exchangers.util; + +import jackyy.exchangers.registry.ModItems; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.TextFormatting; +import net.minecraftforge.common.IRarity; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +public final class Reference { + + public static final String MODID = "exchangers"; + public static final String MODNAME = "Exchangers"; + public static final String VERSION = "1.12.2-2.9"; + public static final String MCVERSION = "[1.12,1.13)"; + + public static final String EIO = "enderio"; + public static final String EIO_ENDERGY = "enderioendergy"; + public static final String TE = "thermalexpansion"; + public static final String MEK = "mekanism"; + public static final String IE = "immersiveengineering"; + public static final String BWM = "betterwithmods"; + + public static final String DEPENDS + = "required-after:gunpowderlib@[1.12.2-1.0,);" + + "required-after:forge@[14.23.5.2816,);" + + "after:redstoneflux;" + + "after:cofhcore;" + + "after:thermalfoundation;" + + "after:" + EIO + ";" + + "after:" + EIO_ENDERGY + ";" + + "after:" + TE + ";" + + "after:" + MEK + ";" + + "after:" + IE + ";" + + "after:" + BWM + ";"; + + public static final CreativeTabs TAB = new CreativeTabs(MODID) { + @Override + public ItemStack createIcon() { + return new ItemStack(ModItems.obsidianExchanger); + } + }; + public static final IRarity TIER_1 = new IRarity() { + @Override + public TextFormatting getColor() { + return TextFormatting.GREEN; + } + + @Override + public String getName() { + return "Tier 1"; + } + }; + + public static final Logger LOGGER = LogManager.getLogger(MODNAME); + + public static final String COMMON_PROXY = "jackyy.exchangers.proxy.CommonProxy"; + public static final String CLIENT_PROXY = "jackyy.exchangers.proxy.ClientProxy"; + +} diff --git a/src/main/resources/assets/exchangers/lang/en_US.lang b/src/main/resources/assets/exchangers/lang/en_US.lang index 570458b..32dd3ef 100644 --- a/src/main/resources/assets/exchangers/lang/en_US.lang +++ b/src/main/resources/assets/exchangers/lang/en_US.lang @@ -6,6 +6,7 @@ key.categories.exchangers=Exchangers key.exchanger_range_switch=Exchanger Range Switch key.exchanger_mode_switch=Exchanger Mode Switch key.exchanger_force_drop_items=Force Drop Items Mode Toggle +key.exchanger_directional_placement=Directional Placement Mode Toggle #Death death.attack.tuberous_exchanger=%1$s tried to operate a potato exchanger @@ -26,6 +27,7 @@ exchangers.tooltip.extra2=Right click on a block to exchange. exchangers.tooltip.extra3=Use the Range Switch key (%s) to switch between ranges. exchangers.tooltip.extra4=Use the Mode Switch key (%s) to switch between modes. exchangers.tooltip.extra5=Use the Force Drop Items Mode Toggle key (%s) to enable/disable Force Drop Items Mode. +exchangers.tooltip.extra6=Use the Directional Placement Mode Toggle key (%s) to enable/disable Directional Placement Mode. exchangers.tooltip.tuberous_exchanger.warning=§c§oClever! But not exchangeable. exchangers.tooltip.selected_block=Selected Block: exchangers.tooltip.selected_block.none=None @@ -35,6 +37,7 @@ exchangers.tooltip.max_harvest_level=Maximum Harvest Level: exchangers.tooltip.current_mode=Current Mode: exchangers.tooltip.silk_touch=Silk Touch mode is %s in config. exchangers.tooltip.force_drop_items=Force Drop Items mode is %s. +exchangers.tooltip.directional_placement=Directional Placement mode is %s. #Harvest Levels exchangers.harvest_level.0=Stone @@ -42,6 +45,9 @@ exchangers.harvest_level.1=Iron exchangers.harvest_level.2=Diamond exchangers.harvest_level.3=Obsidian exchangers.harvest_level.4=Cobalt +exchangers.harvest_level.5=Cobalt+ +exchangers.harvest_level.6=Cobalt++ +exchangers.harvest_level.7=Cobalt+++ exchangers.harvest_level.2147483647=§d§kOver 9000 #Messages @@ -51,9 +57,12 @@ exchangers.error.blacklisted=§cError: This block is blacklisted by the config! exchangers.error.out_of_block=§cError: Out of block! exchangers.error.out_of_power=§cError: Out of power! exchangers.error.event_cancelled=§cError: Exchange event cancelled by other mods! +exchangers.error.event_cancelled_bwm=§cYou need an Exchanger with higher harvest level due to Better With Mods Hardcore Strata! exchangers.error.low_harvest_level=§cError: Your Exchanger's maximum harvest level is too low to exchange this block! exchangers.msg.force_drop_items.on=Force Drop Items mode is now §a§lenabled§r. exchangers.msg.force_drop_items.off=Force Drop Items mode is now §4§ldisabled§r. +exchangers.msg.directional_placement.on=Directional Placement mode is now §a§lenabled§r. +exchangers.msg.directional_placement.off=Directional Placement mode is now §4§ldisabled§r. exchangers.msg.mode=Exchanger Mode is now set to: #Modes @@ -70,6 +79,10 @@ item.exchangers.exchanger_core_tier3.name=Exchanger Core (Tier 3) item.exchangers.eio_exchanger_core_tier1.name=Ender IO Exchanger Core (Tier 1) item.exchangers.eio_exchanger_core_tier2.name=Ender IO Exchanger Core (Tier 2) item.exchangers.eio_exchanger_core_tier3.name=Ender IO Exchanger Core (Tier 3) +#Ender IO Endergy +item.exchangers.eio_endergy_exchanger_core_tier1.name=Ender IO Endergy Exchanger Core (Tier 1) +item.exchangers.eio_endergy_exchanger_core_tier2.name=Ender IO Endergy Exchanger Core (Tier 2) +item.exchangers.eio_endergy_exchanger_core_tier3.name=Ender IO Endergy Exchanger Core (Tier 3) #Thermal Expansion item.exchangers.te_exchanger_core_tier1.name=Thermal Expansion Exchanger Core (Tier 1) item.exchangers.te_exchanger_core_tier2.name=Thermal Expansion Exchanger Core (Tier 2) @@ -106,6 +119,14 @@ item.exchangers.dark_steel_exchanger.name=Dark Steel Exchanger item.exchangers.vibrant_exchanger.name=Vibrant Exchanger item.exchangers.end_steel_exchanger.name=End Steel Exchanger +#Ender IO Endergy Exchangers +item.exchangers.crude_steel_exchanger.name=Crude Steel Exchanger +item.exchangers.energetic_silver_exchanger.name=Energetic Silver Exchanger +item.exchangers.vivid_exchanger.name=Vivid Exchanger +item.exchangers.crystalline_exchanger.name=Crystalline Exchanger +item.exchangers.melodic_exchanger.name=Melodic Exchanger +item.exchangers.stellar_exchanger.name=Stellar Exchanger + #Thermal Expansion Exchangers item.exchangers.leadstone_exchanger.name=Leadstone Exchanger item.exchangers.hardened_exchanger.name=Hardened Exchanger diff --git a/src/main/resources/assets/exchangers/models/item/crude_steel_exchanger.json b/src/main/resources/assets/exchangers/models/item/crude_steel_exchanger.json new file mode 100644 index 0000000..57610a3 --- /dev/null +++ b/src/main/resources/assets/exchangers/models/item/crude_steel_exchanger.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "exchangers:items/enderioendergy/crude_steel_exchanger" + } +} diff --git a/src/main/resources/assets/exchangers/models/item/crystalline_exchanger.json b/src/main/resources/assets/exchangers/models/item/crystalline_exchanger.json new file mode 100644 index 0000000..41a8a38 --- /dev/null +++ b/src/main/resources/assets/exchangers/models/item/crystalline_exchanger.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "exchangers:items/enderioendergy/crystalline_exchanger" + } +} diff --git a/src/main/resources/assets/exchangers/models/item/eio_endergy_exchanger_core_tier1.json b/src/main/resources/assets/exchangers/models/item/eio_endergy_exchanger_core_tier1.json new file mode 100644 index 0000000..3b86ea8 --- /dev/null +++ b/src/main/resources/assets/exchangers/models/item/eio_endergy_exchanger_core_tier1.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "exchangers:items/enderioendergy/eio_endergy_exchanger_core_tier1" + } +} diff --git a/src/main/resources/assets/exchangers/models/item/eio_endergy_exchanger_core_tier2.json b/src/main/resources/assets/exchangers/models/item/eio_endergy_exchanger_core_tier2.json new file mode 100644 index 0000000..9c79a4d --- /dev/null +++ b/src/main/resources/assets/exchangers/models/item/eio_endergy_exchanger_core_tier2.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "exchangers:items/enderioendergy/eio_endergy_exchanger_core_tier2" + } +} diff --git a/src/main/resources/assets/exchangers/models/item/eio_endergy_exchanger_core_tier3.json b/src/main/resources/assets/exchangers/models/item/eio_endergy_exchanger_core_tier3.json new file mode 100644 index 0000000..cde014d --- /dev/null +++ b/src/main/resources/assets/exchangers/models/item/eio_endergy_exchanger_core_tier3.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "exchangers:items/enderioendergy/eio_endergy_exchanger_core_tier3" + } +} diff --git a/src/main/resources/assets/exchangers/models/item/energetic_silver_exchanger.json b/src/main/resources/assets/exchangers/models/item/energetic_silver_exchanger.json new file mode 100644 index 0000000..caf0e77 --- /dev/null +++ b/src/main/resources/assets/exchangers/models/item/energetic_silver_exchanger.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "exchangers:items/enderioendergy/energetic_silver_exchanger" + } +} diff --git a/src/main/resources/assets/exchangers/models/item/melodic_exchanger.json b/src/main/resources/assets/exchangers/models/item/melodic_exchanger.json new file mode 100644 index 0000000..719c08a --- /dev/null +++ b/src/main/resources/assets/exchangers/models/item/melodic_exchanger.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "exchangers:items/enderioendergy/melodic_exchanger" + } +} diff --git a/src/main/resources/assets/exchangers/models/item/stellar_exchanger.json b/src/main/resources/assets/exchangers/models/item/stellar_exchanger.json new file mode 100644 index 0000000..3db85b1 --- /dev/null +++ b/src/main/resources/assets/exchangers/models/item/stellar_exchanger.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "exchangers:items/enderioendergy/stellar_exchanger" + } +} diff --git a/src/main/resources/assets/exchangers/models/item/vivid_exchanger.json b/src/main/resources/assets/exchangers/models/item/vivid_exchanger.json new file mode 100644 index 0000000..07a05c5 --- /dev/null +++ b/src/main/resources/assets/exchangers/models/item/vivid_exchanger.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "exchangers:items/enderioendergy/vivid_exchanger" + } +} diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/crude_steel_exchanger.png b/src/main/resources/assets/exchangers/textures/items/enderioendergy/crude_steel_exchanger.png new file mode 100644 index 0000000..a03746c Binary files /dev/null and b/src/main/resources/assets/exchangers/textures/items/enderioendergy/crude_steel_exchanger.png differ diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/crude_steel_exchanger.png.mcmeta b/src/main/resources/assets/exchangers/textures/items/enderioendergy/crude_steel_exchanger.png.mcmeta new file mode 100644 index 0000000..6739fa5 --- /dev/null +++ b/src/main/resources/assets/exchangers/textures/items/enderioendergy/crude_steel_exchanger.png.mcmeta @@ -0,0 +1,12 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/crystalline_exchanger.png b/src/main/resources/assets/exchangers/textures/items/enderioendergy/crystalline_exchanger.png new file mode 100644 index 0000000..5434c80 Binary files /dev/null and b/src/main/resources/assets/exchangers/textures/items/enderioendergy/crystalline_exchanger.png differ diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/crystalline_exchanger.png.mcmeta b/src/main/resources/assets/exchangers/textures/items/enderioendergy/crystalline_exchanger.png.mcmeta new file mode 100644 index 0000000..6739fa5 --- /dev/null +++ b/src/main/resources/assets/exchangers/textures/items/enderioendergy/crystalline_exchanger.png.mcmeta @@ -0,0 +1,12 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier1.png b/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier1.png new file mode 100644 index 0000000..b170d7a Binary files /dev/null and b/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier1.png differ diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier1.png.mcmeta b/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier1.png.mcmeta new file mode 100644 index 0000000..6739fa5 --- /dev/null +++ b/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier1.png.mcmeta @@ -0,0 +1,12 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier2.png b/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier2.png new file mode 100644 index 0000000..01720fc Binary files /dev/null and b/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier2.png differ diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier2.png.mcmeta b/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier2.png.mcmeta new file mode 100644 index 0000000..6739fa5 --- /dev/null +++ b/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier2.png.mcmeta @@ -0,0 +1,12 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier3.png b/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier3.png new file mode 100644 index 0000000..04cb316 Binary files /dev/null and b/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier3.png differ diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier3.png.mcmeta b/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier3.png.mcmeta new file mode 100644 index 0000000..6739fa5 --- /dev/null +++ b/src/main/resources/assets/exchangers/textures/items/enderioendergy/eio_endergy_exchanger_core_tier3.png.mcmeta @@ -0,0 +1,12 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/energetic_silver_exchanger.png b/src/main/resources/assets/exchangers/textures/items/enderioendergy/energetic_silver_exchanger.png new file mode 100644 index 0000000..ae14816 Binary files /dev/null and b/src/main/resources/assets/exchangers/textures/items/enderioendergy/energetic_silver_exchanger.png differ diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/energetic_silver_exchanger.png.mcmeta b/src/main/resources/assets/exchangers/textures/items/enderioendergy/energetic_silver_exchanger.png.mcmeta new file mode 100644 index 0000000..6739fa5 --- /dev/null +++ b/src/main/resources/assets/exchangers/textures/items/enderioendergy/energetic_silver_exchanger.png.mcmeta @@ -0,0 +1,12 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/melodic_exchanger.png b/src/main/resources/assets/exchangers/textures/items/enderioendergy/melodic_exchanger.png new file mode 100644 index 0000000..df81102 Binary files /dev/null and b/src/main/resources/assets/exchangers/textures/items/enderioendergy/melodic_exchanger.png differ diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/melodic_exchanger.png.mcmeta b/src/main/resources/assets/exchangers/textures/items/enderioendergy/melodic_exchanger.png.mcmeta new file mode 100644 index 0000000..6739fa5 --- /dev/null +++ b/src/main/resources/assets/exchangers/textures/items/enderioendergy/melodic_exchanger.png.mcmeta @@ -0,0 +1,12 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/stellar_exchanger.png b/src/main/resources/assets/exchangers/textures/items/enderioendergy/stellar_exchanger.png new file mode 100644 index 0000000..5c4c937 Binary files /dev/null and b/src/main/resources/assets/exchangers/textures/items/enderioendergy/stellar_exchanger.png differ diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/stellar_exchanger.png.mcmeta b/src/main/resources/assets/exchangers/textures/items/enderioendergy/stellar_exchanger.png.mcmeta new file mode 100644 index 0000000..6739fa5 --- /dev/null +++ b/src/main/resources/assets/exchangers/textures/items/enderioendergy/stellar_exchanger.png.mcmeta @@ -0,0 +1,12 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/vivid_exchanger.png b/src/main/resources/assets/exchangers/textures/items/enderioendergy/vivid_exchanger.png new file mode 100644 index 0000000..2a87853 Binary files /dev/null and b/src/main/resources/assets/exchangers/textures/items/enderioendergy/vivid_exchanger.png differ diff --git a/src/main/resources/assets/exchangers/textures/items/enderioendergy/vivid_exchanger.png.mcmeta b/src/main/resources/assets/exchangers/textures/items/enderioendergy/vivid_exchanger.png.mcmeta new file mode 100644 index 0000000..6739fa5 --- /dev/null +++ b/src/main/resources/assets/exchangers/textures/items/enderioendergy/vivid_exchanger.png.mcmeta @@ -0,0 +1,12 @@ +{ + "animation": { + "frametime": 4, + "frames": [ + 0, + 1, + 2, + 3, + 4 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/exchangers_at.cfg b/src/main/resources/exchangers_at.cfg deleted file mode 100644 index b246c2d..0000000 --- a/src/main/resources/exchangers_at.cfg +++ /dev/null @@ -1,7 +0,0 @@ -##### Exchangers Access Transformer ##### - -#net.minecraft.client.entity.AbstractClientPlayer -public net.minecraft.client.entity.AbstractClientPlayer func_175155_b()Lnet/minecraft/client/network/NetworkPlayerInfo; #getPlayerInfo - -#net.minecraft.client.network.NetworkPlayerInfo -public net.minecraft.client.network.NetworkPlayerInfo field_187107_a #playerTextures diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index a2cd567..04f43c8 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "exchangers", "name": "Exchangers", "description": "Block Exchangers.", - "version": "1.12.2-2.8", + "version": "1.12.2-2.9", "mcversion": "1.12.2", "url": "https://github.com/JackyyTV/Exchangers", "updateUrl": "",