From 28dbcb8a16c26b24e42cee218b8ed02f80485485 Mon Sep 17 00:00:00 2001 From: Gig Date: Sun, 14 Jun 2015 17:04:57 +0100 Subject: [PATCH 1/4] Removed Debug Recipes --- src/main/java/techreborn/init/ModRecipes.java | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/src/main/java/techreborn/init/ModRecipes.java b/src/main/java/techreborn/init/ModRecipes.java index e121c590e..6d5442f6c 100644 --- a/src/main/java/techreborn/init/ModRecipes.java +++ b/src/main/java/techreborn/init/ModRecipes.java @@ -32,7 +32,6 @@ public class ModRecipes { addShaplessRecipes(); addShappedRecipes(); addSmeltingRecipes(); - addMachineRecipes(); addAlloySmelterRecipes(); addLatheRecipes(); addPlateCuttingMachineRecipes(); @@ -144,33 +143,9 @@ public class ModRecipes { LogHelper.info("Smelting Recipes Added"); } - public static void addMachineRecipes() { - - TechRebornAPI.addRollingMachinceRecipe(new ItemStack(Blocks.furnace, 4), "ccc", "c c", "ccc", 'c', Blocks.cobblestone); - TechRebornAPI.registerBlastFurnaceRecipe(new BlastFurnaceRecipe(new ItemStack(Items.apple), new ItemStack(Items.ender_pearl), new ItemStack(Items.golden_apple), new ItemStack(Items.diamond), 120, 1000)); - - RecipeHandler.addRecipe(new ImplosionCompressorRecipe(new ItemStack(Blocks.netherrack, 4), new ItemStack(Blocks.diamond_block, 1), new ItemStack(ModItems.bucketTritium), null, 120, 5)); - - RecipeHandler.addRecipe(new AssemblingMachineRecipe(new ItemStack(Items.coal), new ItemStack(Blocks.sand), new ItemStack(Items.diamond), 120, 5)); - RecipeHandler.addRecipe(new LatheRecipe(new ItemStack(Items.coal), new ItemStack(Items.diamond), 120, 5)); - RecipeHandler.addRecipe(new PlateCuttingMachineRecipe(new ItemStack(Items.coal), new ItemStack(Items.diamond), 120, 5)); - //TODO - RecipeHandler.addRecipe(new ChemicalReactorRecipe(new ItemStack(Items.coal), new ItemStack(Blocks.sand), new ItemStack(Items.diamond), 120, 5)); - - RecipeHandler.addRecipe(new GrinderRecipe(new ItemStack(ModBlocks.ore, 1, 1), null, new FluidStack(ModFluids.fluidMercury, 500), IC2Items.getItem("iridiumOre"), new ItemStack(ModItems.smallDusts, 6, 39), new ItemStack(ModItems.dusts, 6, 58), null, 400, 5)); - RecipeHandler.addRecipe(new GrinderRecipe(new ItemStack(ModBlocks.ore, 1, 1), new ItemStack(ModItems.cells, 1, 16), null, IC2Items.getItem("iridiumOre"), new ItemStack(ModItems.smallDusts, 6, 39), new ItemStack(ModItems.dusts, 6, 58), IC2Items.getItem("cell"), 400, 5)); - - RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.coal), null, new ItemStack(Items.diamond), new ItemStack(Items.emerald), new ItemStack(Items.apple), new ItemStack(Items.arrow), 1, 10)); - - LogHelper.info("Machine Recipes Added"); - } - public static void addHammerRecipes(){ ItemStack hammerIron = new ItemStack(ModItems.hammerIron, 1, OreDictionary.WILDCARD_VALUE); ItemStack hammerDiamond = new ItemStack(ModItems.hammerDiamond, 1, OreDictionary.WILDCARD_VALUE); - - // :( I cant do this -// List anyhammer = Arrays.asList(hammerIron, hammerDiamond); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.plate, 1, 13), hammerIron, new ItemStack(Items.iron_ingot)); From 0b43eca49a45113437a59e7124e63550b5f98c7b Mon Sep 17 00:00:00 2001 From: Gig Date: Sun, 14 Jun 2015 17:11:18 +0100 Subject: [PATCH 2/4] Removed Gravity Chestplate not needed in this mod anymore --- src/main/java/techreborn/init/ModItems.java | 4 - .../items/armor/ItemGravityChest.java | 165 ------------------ 2 files changed, 169 deletions(-) delete mode 100644 src/main/java/techreborn/items/armor/ItemGravityChest.java diff --git a/src/main/java/techreborn/init/ModItems.java b/src/main/java/techreborn/init/ModItems.java index 884f1111d..98ad69d39 100644 --- a/src/main/java/techreborn/init/ModItems.java +++ b/src/main/java/techreborn/init/ModItems.java @@ -24,7 +24,6 @@ import techreborn.items.ItemRods; import techreborn.items.ItemUUmatter; import techreborn.items.ItemLapotronicOrb; import techreborn.items.ItemUpgrade; -import techreborn.items.armor.ItemGravityChest; import techreborn.items.armor.ItemLapotronPack; import techreborn.items.armor.ItemLithiumBatpack; import techreborn.items.tools.ItemAdvancedDrill; @@ -50,7 +49,6 @@ public class ModItems { public static Item rockCutter; public static Item lithiumBatpack; public static Item lapotronpack; - public static Item gravityChest; public static Item omniTool; public static Item advancedDrill; public static Item lapotronicOrb; @@ -129,8 +127,6 @@ public class ModItems { GameRegistry.registerItem(omniTool, "omniTool"); advancedDrill = new ItemAdvancedDrill(); GameRegistry.registerItem(advancedDrill, "advancedDrill"); - gravityChest = new ItemGravityChest(ArmorMaterial.DIAMOND, 7, 1); - GameRegistry.registerItem(gravityChest, "gravitychestplate"); manuel = new ItemTechPda(); GameRegistry.registerItem(manuel, "techmanuel"); uuMatter = new ItemUUmatter(); diff --git a/src/main/java/techreborn/items/armor/ItemGravityChest.java b/src/main/java/techreborn/items/armor/ItemGravityChest.java deleted file mode 100644 index 36c328233..000000000 --- a/src/main/java/techreborn/items/armor/ItemGravityChest.java +++ /dev/null @@ -1,165 +0,0 @@ -package techreborn.items.armor; - -import ic2.api.item.ElectricItem; -import ic2.api.item.IElectricItem; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.world.World; -import net.minecraftforge.common.ISpecialArmor; -import techreborn.client.TechRebornCreativeTab; -import techreborn.config.ConfigTechReborn; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class ItemGravityChest extends ItemArmor implements IElectricItem, - ISpecialArmor { - - public static int maxCharge = ConfigTechReborn.GravityCharge; - public int tier = 3; - public int cost = 100; - public double transferLimit = 1000; - public int energyPerDamage = 100; - - public ItemGravityChest(ArmorMaterial material, int par3, int par4){ - super(material, par3, par4); - setCreativeTab(TechRebornCreativeTab.instance); - setUnlocalizedName("techreborn.gravitychestplate"); - setMaxStackSize(1); - setMaxDamage(120); - } - - @SideOnly(Side.CLIENT) - @Override - public void registerIcons(IIconRegister iconRegister){ - this.itemIcon = iconRegister.registerIcon("techreborn:" + "items/gravitychestplate"); - } - - @Override - @SideOnly(Side.CLIENT) - public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type){ - return "techreborn:" + "textures/models/gravitychestplate.png"; - } - - @SuppressWarnings( - { "rawtypes", "unchecked" }) - @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList){ - ItemStack itemStack = new ItemStack(this, 1); - if (getChargedItem(itemStack) == this){ - ItemStack charged = new ItemStack(this, 1); - ElectricItem.manager.charge(charged, 2147483647, 2147483647, true, - false); - itemList.add(charged); - } - if (getEmptyItem(itemStack) == this){ - itemList.add(new ItemStack(this, 1, getMaxDamage())); - } - } - - @Override - public void onArmorTick(World world, EntityPlayer player, ItemStack stack){ - if (world.isRemote) - ; - if (ElectricItem.manager.canUse(stack, cost)){ - player.capabilities.allowFlying = true; - - if (player.fallDistance > 0.0F) - player.fallDistance = 0; - - if (player.capabilities.allowFlying == true & !player.onGround) - ElectricItem.manager.discharge(stack, cost, tier, false, true, - false); - - if (!ElectricItem.manager.canUse(stack, cost)) - player.capabilities.allowFlying = false; - } - - if (player.fallDistance > 0.0F) - player.fallDistance = 0; - } - - @Override - public boolean canProvideEnergy(ItemStack itemStack){ - return true; - } - - @Override - public Item getChargedItem(ItemStack itemStack){ - return this; - } - - @Override - public Item getEmptyItem(ItemStack itemStack){ - return this; - } - - @Override - public double getMaxCharge(ItemStack itemStack){ - return maxCharge; - } - - @Override - public int getTier(ItemStack itemStack){ - return tier; - } - - @Override - public double getTransferLimit(ItemStack itemStack){ - return transferLimit; - } - - public int getEnergyPerDamage(){ - return energyPerDamage; - } - - @Override - public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot){ - if (source.isUnblockable()){ - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties( - 0, 0.0D, 3); - } else { - double absorptionRatio = getBaseAbsorptionRatio() - * getDamageAbsorptionRatio(); - int energyPerDamage = getEnergyPerDamage(); - double damageLimit = energyPerDamage <= 0 ? 0 - : (25 * ElectricItem.manager.getCharge(armor)) - / energyPerDamage; - return new net.minecraftforge.common.ISpecialArmor.ArmorProperties( - 3, absorptionRatio, (int) damageLimit); - } - } - - @Override - public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot){ - if (ElectricItem.manager.getCharge(armor) >= getEnergyPerDamage()){ - return (int) Math.round(20D * getBaseAbsorptionRatio() - * getDamageAbsorptionRatio()); - } else{ - return 0; - } - } - - @Override - public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot){ - ElectricItem.manager.discharge(stack, damage * getEnergyPerDamage(), 0x7fffffff, true, false, false); - } - - public double getDamageAbsorptionRatio(){ - return 1.1000000000000001D; - } - - private double getBaseAbsorptionRatio(){ - return 0.14999999999999999D; - } - -} From f5aecc07cc99c5c6b0c0bfaaf567fdfc2c6f48f7 Mon Sep 17 00:00:00 2001 From: Gig Date: Sun, 14 Jun 2015 18:29:27 +0100 Subject: [PATCH 3/4] Fixed derpy textures --- src/main/java/techreborn/blocks/machine/BlockGrinder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/techreborn/blocks/machine/BlockGrinder.java b/src/main/java/techreborn/blocks/machine/BlockGrinder.java index 5fbcf5e3e..70aeffb15 100644 --- a/src/main/java/techreborn/blocks/machine/BlockGrinder.java +++ b/src/main/java/techreborn/blocks/machine/BlockGrinder.java @@ -97,7 +97,7 @@ public class BlockGrinder extends BlockMachineBase{ return metadata == 0 && side == 3 ? this.iconFront : side == 1 ? this.iconTop : side == 0 ? this.iconBottom: (side == 0 ? this.iconTop - : (side == metadata ? this.iconFront : this.iconFront)); + : (side == metadata ? this.iconFront : this.blockIcon)); } From 22d018efb3f8e36ace42ed5d1309c35f61484a35 Mon Sep 17 00:00:00 2001 From: Gig Date: Sun, 14 Jun 2015 18:31:49 +0100 Subject: [PATCH 4/4] World gen tweeks --- src/main/java/techreborn/world/TROreGen.java | 53 ++++++++++---------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/src/main/java/techreborn/world/TROreGen.java b/src/main/java/techreborn/world/TROreGen.java index e32641400..1a2703822 100644 --- a/src/main/java/techreborn/world/TROreGen.java +++ b/src/main/java/techreborn/world/TROreGen.java @@ -78,46 +78,45 @@ public class TROreGen implements IWorldGenerator { } - void generateUndergroundOres(Random random, int xChunk, int zChunk, - World world) + void generateUndergroundOres(Random random, int xChunk, int zChunk, World world) { int xPos, yPos, zPos; if (config.GalenaOreTrue){ for (int i = 0; i <= 16; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 10); zPos = zChunk + random.nextInt(16); oreGalena.generate(world, random, xPos, yPos, zPos); } } if (config.IridiumOreTrue){ - for (int i = 0; i <= 16; i++){ + for (int i = 0; i <= 1; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); - zPos = zChunk + random.nextInt(16); + yPos = 10 + random.nextInt(60 - 10); + zPos = zChunk + random.nextInt(1); oreIridium.generate(world, random, xPos, yPos, zPos); } } if (config.RubyOreTrue){ - for (int i = 0; i <= 16; i++){ + for (int i = 0; i <= 3; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 10); zPos = zChunk + random.nextInt(16); oreRuby.generate(world, random, xPos, yPos, zPos); } } if (config.SapphireOreTrue){ - for (int i = 0; i <= 16; i++){ + for (int i = 0; i <= 3; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 10); zPos = zChunk + random.nextInt(16); oreSapphire.generate(world, random, xPos, yPos, zPos); } } if (config.BauxiteOreTrue){ - for (int i = 0; i <= 16; i++){ + for (int i = 0; i <= 10; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 10); zPos = zChunk + random.nextInt(16); oreBauxite.generate(world, random, xPos, yPos, zPos); } @@ -125,7 +124,7 @@ public class TROreGen implements IWorldGenerator { if (config.TetrahedriteOreTrue){ for (int i = 0; i <= 16; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 10); zPos = zChunk + random.nextInt(16); oreTetrahedrite.generate(world, random, xPos, yPos, zPos); } @@ -133,7 +132,7 @@ public class TROreGen implements IWorldGenerator { if (config.CassiteriteOreTrue){ for (int i = 0; i <= 16; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 20); zPos = zChunk + random.nextInt(16); oreCassiterite.generate(world, random, xPos, yPos, zPos); } @@ -141,7 +140,7 @@ public class TROreGen implements IWorldGenerator { if (config.LeadOreTrue){ for (int i = 0; i <= 16; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 20); zPos = zChunk + random.nextInt(16); oreLead.generate(world, random, xPos, yPos, zPos); } @@ -149,7 +148,7 @@ public class TROreGen implements IWorldGenerator { if (config.SilverOreTrue){ for (int i = 0; i <= 16; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 20); zPos = zChunk + random.nextInt(16); oreSilver.generate(world, random, xPos, yPos, zPos); } @@ -161,7 +160,7 @@ public class TROreGen implements IWorldGenerator { if (config.PyriteOreTrue){ for (int i = 0; i <= 16; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 10); zPos = zChunk + random.nextInt(16); orePyrite.generate(world, random, xPos, yPos, zPos); } @@ -169,7 +168,7 @@ public class TROreGen implements IWorldGenerator { if (config.CinnabarOreTrue){ for (int i = 0; i <= 16; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 10); zPos = zChunk + random.nextInt(16); oreCinnabar.generate(world, random, xPos, yPos, zPos); } @@ -177,7 +176,7 @@ public class TROreGen implements IWorldGenerator { if (config.SphaleriteOreTrue){ for (int i = 0; i <= 16; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 10); zPos = zChunk + random.nextInt(16); oreSphalerite.generate(world, random, xPos, yPos, zPos); } @@ -187,33 +186,33 @@ public class TROreGen implements IWorldGenerator { void generateEndOres(Random random, int xChunk, int zChunk, World world){ int xPos, yPos, zPos; if (config.TungstenOreTrue){ - for (int i = 0; i <= 16; i++){ + for (int i = 0; i <= 2; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 10); zPos = zChunk + random.nextInt(16); oreTungston.generate(world, random, xPos, yPos, zPos); } } if (config.SheldoniteOreTrue){ - for (int i = 0; i <= 16; i++){ + for (int i = 0; i <= 3; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 10); zPos = zChunk + random.nextInt(16); oreSheldonite.generate(world, random, xPos, yPos, zPos); } } if (config.PeridotOreTrue){ - for (int i = 0; i <= 16; i++){ + for (int i = 0; i <= 3; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 10); zPos = zChunk + random.nextInt(16); orePeridot.generate(world, random, xPos, yPos, zPos); } } if (config.SodaliteOreTrue){ - for (int i = 0; i <= 16; i++){ + for (int i = 0; i <= 3; i++){ xPos = xChunk + random.nextInt(16); - yPos = 60 + random.nextInt(60 - 20); + yPos = 10 + random.nextInt(60 - 10); zPos = zChunk + random.nextInt(16); oreSodalite.generate(world, random, xPos, yPos, zPos); }