diff --git a/.gitignore b/.gitignore index 85a8f873..644aa019 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,5 @@ version.properties #eclipse stuffs /.classpath /.project -/.settings/ \ No newline at end of file +/.settings/ +/debug/ diff --git a/src/api/java/mcp/mobius/waila/api/IWailaBlock.java b/src/api/java/mcp/mobius/waila/api/IWailaBlock.java index fd7a3db6..8b5e4fb0 100644 --- a/src/api/java/mcp/mobius/waila/api/IWailaBlock.java +++ b/src/api/java/mcp/mobius/waila/api/IWailaBlock.java @@ -2,12 +2,7 @@ package mcp.mobius.waila.api; import java.util.List; -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; public interface IWailaBlock { diff --git a/src/api/java/mcp/mobius/waila/api/IWailaDataAccessor.java b/src/api/java/mcp/mobius/waila/api/IWailaDataAccessor.java index 0f30baff..7e3f0632 100644 --- a/src/api/java/mcp/mobius/waila/api/IWailaDataAccessor.java +++ b/src/api/java/mcp/mobius/waila/api/IWailaDataAccessor.java @@ -1,10 +1,7 @@ package mcp.mobius.waila.api; -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MovingObjectPosition; diff --git a/src/api/java/mods/battlegear2/api/IDyable.java b/src/api/java/mods/battlegear2/api/IDyable.java index a5be9d7e..811e215f 100644 --- a/src/api/java/mods/battlegear2/api/IDyable.java +++ b/src/api/java/mods/battlegear2/api/IDyable.java @@ -1,31 +1,28 @@ package mods.battlegear2.api; - import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; //This is a tempory fix until we get the heradry system up and running -public interface IDyable { +public interface IDyable +{ /** * Return whether the specified armor ItemStack has a color. */ - public boolean hasColor(ItemStack par1ItemStack); - + public boolean hasColor (ItemStack par1ItemStack); /** * Return the color for the specified armor ItemStack. */ - public int getColor(ItemStack par1ItemStack); + public int getColor (ItemStack par1ItemStack); - public void setColor(ItemStack dyable, int rgb); + public void setColor (ItemStack dyable, int rgb); /** * Remove the color from the specified armor ItemStack. */ - public void removeColor(ItemStack par1ItemStack); - - public int getDefaultColor(ItemStack par1ItemStack); + public void removeColor (ItemStack par1ItemStack); + public int getDefaultColor (ItemStack par1ItemStack); } diff --git a/src/api/java/mods/battlegear2/api/IShield.java b/src/api/java/mods/battlegear2/api/IShield.java index de9a81bf..4531c669 100644 --- a/src/api/java/mods/battlegear2/api/IShield.java +++ b/src/api/java/mods/battlegear2/api/IShield.java @@ -1,10 +1,10 @@ package mods.battlegear2.api; - import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; -public interface IShield { +public interface IShield +{ /** * Gets the decay rate for the stamina bar when the shield is in use. @@ -14,7 +14,7 @@ public interface IShield { * @param shield The {@link #ItemStack} representing the shield * @return a value between 0 & 1 representing the decay rate per tick */ - public float getDecayRate(ItemStack shield); + public float getDecayRate (ItemStack shield); /** * Returns true if the current shield can and should block the given damage source @@ -23,7 +23,7 @@ public interface IShield { * @param source The {@link #DamageSource} representing the current damage * @return true if the shield can block the given damage type */ - public boolean canBlock(ItemStack shield, DamageSource source); + public boolean canBlock (ItemStack shield, DamageSource source); /** * Gets the extra decay rate to the stamina bar when the shield is damaged @@ -32,7 +32,7 @@ public interface IShield { * @param amount The amount of damage the shield has absorbed * @return a value between 0 & 1 representing the decay rate */ - public float getDamageDecayRate(ItemStack shield, float amount); + public float getDamageDecayRate (ItemStack shield, float amount); /** * Returns the block angle in degrees that the shield can block. @@ -41,8 +41,7 @@ public interface IShield { * @param shield The {@link #ItemStack} representing the shield * @return The maximum angle the shield should be able to block at */ - public float getBlockAngle(ItemStack shield); - + public float getBlockAngle (ItemStack shield); /** * Returns the time a shield bash should take to be preformed. A shield bash will disallow actions @@ -50,5 +49,5 @@ public interface IShield { * * @return The amount of ticks the shield bash animation will play */ - public int getBashTimer(ItemStack shield); + public int getBashTimer (ItemStack shield); } diff --git a/src/api/java/mods/battlegear2/api/PlayerEventChild.java b/src/api/java/mods/battlegear2/api/PlayerEventChild.java index 9a8116aa..d40638d4 100644 --- a/src/api/java/mods/battlegear2/api/PlayerEventChild.java +++ b/src/api/java/mods/battlegear2/api/PlayerEventChild.java @@ -2,27 +2,32 @@ package mods.battlegear2.api; import net.minecraftforge.event.entity.player.PlayerEvent; -public class PlayerEventChild extends PlayerEvent{ +public class PlayerEventChild extends PlayerEvent +{ - public PlayerEvent parent; + public PlayerEvent parent; - public PlayerEventChild(PlayerEvent parent) { - super(parent.entityPlayer); - this.parent = parent; - } + public PlayerEventChild(PlayerEvent parent) + { + super(parent.entityPlayer); + this.parent = parent; + } - public void setCancelParentEvent(boolean cancel) { + public void setCancelParentEvent (boolean cancel) + { parent.setCanceled(cancel); } @Override - public void setCanceled(boolean cancel) { + public void setCanceled (boolean cancel) + { super.setCanceled(cancel); parent.setCanceled(cancel); } @Override - public void setResult(Result value) { + public void setResult (Result value) + { super.setResult(value); parent.setResult(value); } diff --git a/src/api/java/mods/battlegear2/api/quiver/IArrowContainer2.java b/src/api/java/mods/battlegear2/api/quiver/IArrowContainer2.java index 9ad1355e..45ba1bff 100644 --- a/src/api/java/mods/battlegear2/api/quiver/IArrowContainer2.java +++ b/src/api/java/mods/battlegear2/api/quiver/IArrowContainer2.java @@ -5,28 +5,29 @@ import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public interface IArrowContainer2 { +public interface IArrowContainer2 +{ /** * Returns the maximum amout of slots in the arrow container * @param container {@link #ItemStack} representing this item * @return the amount of slots */ - public int getSlotCount(ItemStack container); + public int getSlotCount (ItemStack container); /** * Returns the currently selected slot in the arrow container * @param container {@link #ItemStack} representing this item * @return the currently selected slot */ - public int getSelectedSlot(ItemStack container); + public int getSelectedSlot (ItemStack container); /** * Sets the currently selected slot to the given value * @param container {@link #ItemStack} representing this item * @param newSlot the new slot index */ - public void setSelectedSlot(ItemStack container, int newSlot); + public void setSelectedSlot (ItemStack container, int newSlot); /** * Returns the itemStack in the currently selected slot @@ -34,7 +35,7 @@ public interface IArrowContainer2 { * @param slot the slot index * @return The {@link #ItemStack} in the given slot. */ - public ItemStack getStackInSlot(ItemStack container, int slot); + public ItemStack getStackInSlot (ItemStack container, int slot); /** * Sets places the given item stack in the give slot @@ -42,8 +43,7 @@ public interface IArrowContainer2 { * @param slot the slot index * @param container {@link #ItemStack} representing the new stack */ - public void setStackInSlot(ItemStack container, int slot, ItemStack stack); - + public void setStackInSlot (ItemStack container, int slot, ItemStack stack); /** * @@ -52,7 +52,7 @@ public interface IArrowContainer2 { * @param player The {@link #EntityPlayer} using the bow * @return true if the item contains at least one arrow in the selected slot */ - public boolean hasArrowFor(ItemStack container, ItemStack bow, EntityPlayer player, int slot); + public boolean hasArrowFor (ItemStack container, ItemStack bow, EntityPlayer player, int slot); /** * The arrow spawned when bow is used with this non empty container equipped @@ -62,7 +62,8 @@ public interface IArrowContainer2 { * @param world * @return the arrow entity to spawn when bow is used */ - public EntityArrow getArrowType(ItemStack container, World world, EntityPlayer player, float charge); + public EntityArrow getArrowType (ItemStack container, World world, EntityPlayer player, float charge); + /** * Action to take after an arrow has been fired * Usually equal to removing an arrow from the container @@ -72,19 +73,21 @@ public interface IArrowContainer2 { * @param bow The bow which fired * @param arrow the arrow fired */ - public void onArrowFired(World world, EntityPlayer player, ItemStack container, ItemStack bow, EntityArrow arrow); + public void onArrowFired (World world, EntityPlayer player, ItemStack container, ItemStack bow, EntityArrow arrow); + /** * Called before the arrow is fired from this container * @param arrowEvent Used to decide bow damage, bow sound and arrow enchantment */ - public void onPreArrowFired(QuiverArrowEvent arrowEvent); + public void onPreArrowFired (QuiverArrowEvent arrowEvent); + /** * Called when the container is put on a crafting bench with other items * @param container The {@link #ItemStack} representing this item * @param arrowStack The {@link #ItemStack} representing other items * @return True to receive {@link #addArrows(ItemStack, ItemStack)} */ - public boolean isCraftableWithArrows(ItemStack contaner, ItemStack arrowStack); + public boolean isCraftableWithArrows (ItemStack contaner, ItemStack arrowStack); /** * Crafts the item with the items from {@link #isCraftableWithArrows(ItemStack, ItemStack)} @@ -92,8 +95,6 @@ public interface IArrowContainer2 { * @param arrows Another valid item on the crafting bench * @return Number of arrows that couldn't fit in */ - public ItemStack addArrows(ItemStack container, ItemStack newStack); - - + public ItemStack addArrows (ItemStack container, ItemStack newStack); } diff --git a/src/api/java/mods/battlegear2/api/quiver/QuiverArrowEvent.java b/src/api/java/mods/battlegear2/api/quiver/QuiverArrowEvent.java index f410261a..45586821 100644 --- a/src/api/java/mods/battlegear2/api/quiver/QuiverArrowEvent.java +++ b/src/api/java/mods/battlegear2/api/quiver/QuiverArrowEvent.java @@ -1,30 +1,30 @@ package mods.battlegear2.api.quiver; import mods.battlegear2.api.PlayerEventChild; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.player.ArrowLooseEvent; -import net.minecraftforge.event.entity.player.PlayerEvent; -public class QuiverArrowEvent extends PlayerEventChild{ +public class QuiverArrowEvent extends PlayerEventChild +{ - public int bowDamage = 1; - public float bowSoundVolume = 1.0F; - public boolean addEnchantments = true; - public ArrowLooseEvent event; + public int bowDamage = 1; + public float bowSoundVolume = 1.0F; + public boolean addEnchantments = true; + public ArrowLooseEvent event; - public QuiverArrowEvent(ArrowLooseEvent parent) { - super(parent); - this.event = parent; - } + public QuiverArrowEvent(ArrowLooseEvent parent) + { + super(parent); + this.event = parent; + } - public ItemStack getBow() - { - return event.bow; - } - - public int getCharge() - { - return event.charge; - } + public ItemStack getBow () + { + return event.bow; + } + + public int getCharge () + { + return event.charge; + } } diff --git a/src/api/java/mods/battlegear2/api/quiver/QuiverArrowRegistry.java b/src/api/java/mods/battlegear2/api/quiver/QuiverArrowRegistry.java index 3a163605..0ae463a6 100644 --- a/src/api/java/mods/battlegear2/api/quiver/QuiverArrowRegistry.java +++ b/src/api/java/mods/battlegear2/api/quiver/QuiverArrowRegistry.java @@ -1,43 +1,52 @@ package mods.battlegear2.api.quiver; -import net.minecraft.entity.projectile.EntityArrow; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - import java.util.Comparator; import java.util.Map; import java.util.TreeMap; -public class QuiverArrowRegistry { +import net.minecraft.entity.projectile.EntityArrow; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; - private static Map> map = new TreeMap>(new StackComparator()); +public class QuiverArrowRegistry +{ - public static void addArrowToRegistry(Item i, int itemMetadata, Class entityArrow){ + private static Map> map = new TreeMap>(new StackComparator()); + + public static void addArrowToRegistry (Item i, int itemMetadata, Class entityArrow) + { ItemStack stack = new ItemStack(i, 1, itemMetadata); map.put(stack, entityArrow); } - public static Class getArrowClass(ItemStack stack){ + public static Class getArrowClass (ItemStack stack) + { return map.get(stack); } - static class StackComparator implements Comparator { + static class StackComparator implements Comparator + { @Override - public int compare(ItemStack stack, ItemStack stack2) { + public int compare (ItemStack stack, ItemStack stack2) + { - if(stack == stack2){ + if (stack == stack2) + { return 0; - }else{ + } + else + { - int idDiff =0;//COMMENTED TO SHUT UP IDE= stack.itemID - stack2.itemID; - if(idDiff != 0){ + int idDiff = 0;//COMMENTED TO SHUT UP IDE= stack.itemID - stack2.itemID; + if (idDiff != 0) + { return idDiff; - }else + } + else return stack.getItemDamage() - stack2.getItemDamage(); } } } - } diff --git a/src/api/java/mods/battlegear2/api/weapons/IBackStabbable.java b/src/api/java/mods/battlegear2/api/weapons/IBackStabbable.java index 36025eca..cee2ef4f 100644 --- a/src/api/java/mods/battlegear2/api/weapons/IBackStabbable.java +++ b/src/api/java/mods/battlegear2/api/weapons/IBackStabbable.java @@ -2,13 +2,14 @@ package mods.battlegear2.api.weapons; import net.minecraft.entity.EntityLivingBase; -public interface IBackStabbable { +public interface IBackStabbable +{ - /** - * Action to perform on back stabbing - * @param entityHit - * @param entityHitting + /** + * Action to perform on back stabbing + * @param entityHit + * @param entityHitting * @return true if it adds an hitting action - */ - public boolean onBackStab(EntityLivingBase entityHit, EntityLivingBase entityHitting); + */ + public boolean onBackStab (EntityLivingBase entityHit, EntityLivingBase entityHitting); } diff --git a/src/api/java/mods/battlegear2/api/weapons/IBattlegearWeapon.java b/src/api/java/mods/battlegear2/api/weapons/IBattlegearWeapon.java index ccdceb5e..768927b0 100644 --- a/src/api/java/mods/battlegear2/api/weapons/IBattlegearWeapon.java +++ b/src/api/java/mods/battlegear2/api/weapons/IBattlegearWeapon.java @@ -1,30 +1,31 @@ package mods.battlegear2.api.weapons; -import cpw.mods.fml.relauncher.Side; import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import cpw.mods.fml.relauncher.Side; -public interface IBattlegearWeapon { +public interface IBattlegearWeapon +{ /** * Returns true if the weapon will allow other weapons to be placed in the partner offhand slot */ - public boolean willAllowOffhandWeapon(); + public boolean willAllowOffhandWeapon (); /** * Will allow shield */ - public boolean willAllowShield(); + public boolean willAllowShield (); /** * Returns true if the weapon be dual wielded in the offhand slot */ - public boolean isOffhandHandDualWeapon(); + public boolean isOffhandHandDualWeapon (); /** * Returns true if the weapon should always be sheathed on the back, false if it should be sheathed on the hip */ - public boolean sheatheOnBack(); + public boolean sheatheOnBack (); /** * Perform any function when the item is held in the offhand and the user right clicks an entity. @@ -36,7 +37,7 @@ public interface IBattlegearWeapon { * @param offhandItem the ItemStack currently being held in the left hand * @return true if the off hand swing animation should be performed */ - public boolean offhandAttackEntity(OffhandAttackEvent event, ItemStack mainhandItem, ItemStack offhandItem); + public boolean offhandAttackEntity (OffhandAttackEvent event, ItemStack mainhandItem, ItemStack offhandItem); /** * Perform any function when the item is held in the offhand and the user right clicks "Air". @@ -46,7 +47,7 @@ public interface IBattlegearWeapon { * @param offhandItem the ItemStack currently being held in the left hand * @return true if the off hand swing animation should be performed */ - public boolean offhandClickAir(PlayerInteractEvent event, ItemStack mainhandItem, ItemStack offhandItem); + public boolean offhandClickAir (PlayerInteractEvent event, ItemStack mainhandItem, ItemStack offhandItem); /** * Perform any function when the item is held in the offhand and the user right clicks a block. @@ -56,7 +57,7 @@ public interface IBattlegearWeapon { * @param mainhandItem the ItemStack currently being held in the right hand * @param offhandItem the ItemStack currently being held in the left hand */ - public boolean offhandClickBlock(PlayerInteractEvent event, ItemStack mainhandItem, ItemStack offhandItem); + public boolean offhandClickBlock (PlayerInteractEvent event, ItemStack mainhandItem, ItemStack offhandItem); /** * Perform any passive effects on each game tick when the item is held in the offhand @@ -65,6 +66,6 @@ public interface IBattlegearWeapon { * @param mainhandItem the ItemStack currently being held in the right hand * @param offhandItem the ItemStack currently being held in the left hand */ - public void performPassiveEffects(Side effectiveSide, ItemStack mainhandItem, ItemStack offhandItem); + public void performPassiveEffects (Side effectiveSide, ItemStack mainhandItem, ItemStack offhandItem); } \ No newline at end of file diff --git a/src/api/java/mods/battlegear2/api/weapons/IExtendedReachWeapon.java b/src/api/java/mods/battlegear2/api/weapons/IExtendedReachWeapon.java index fce70604..41f29774 100644 --- a/src/api/java/mods/battlegear2/api/weapons/IExtendedReachWeapon.java +++ b/src/api/java/mods/battlegear2/api/weapons/IExtendedReachWeapon.java @@ -2,11 +2,12 @@ package mods.battlegear2.api.weapons; import net.minecraft.item.ItemStack; -public interface IExtendedReachWeapon { - /** - * The distance the weapon will hit (note this will ONLY work for main hand weapons) - * @param stack - * @return - */ - public float getReachModifierInBlocks(ItemStack stack); +public interface IExtendedReachWeapon +{ + /** + * The distance the weapon will hit (note this will ONLY work for main hand weapons) + * @param stack + * @return + */ + public float getReachModifierInBlocks (ItemStack stack); } diff --git a/src/api/java/mods/battlegear2/api/weapons/IHitTimeModifier.java b/src/api/java/mods/battlegear2/api/weapons/IHitTimeModifier.java index 38afe94e..3f75afd1 100644 --- a/src/api/java/mods/battlegear2/api/weapons/IHitTimeModifier.java +++ b/src/api/java/mods/battlegear2/api/weapons/IHitTimeModifier.java @@ -1,15 +1,15 @@ package mods.battlegear2.api.weapons; -import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; -public interface IHitTimeModifier { - /** - * - * @param entityHit - * @return The amount to modify the hit shield - */ - public int getHitTime(ItemStack stack, EntityLivingBase entityHit); +public interface IHitTimeModifier +{ + /** + * + * @param entityHit + * @return The amount to modify the hit shield + */ + public int getHitTime (ItemStack stack, EntityLivingBase entityHit); } diff --git a/src/api/java/mods/battlegear2/api/weapons/IPenetrateWeapon.java b/src/api/java/mods/battlegear2/api/weapons/IPenetrateWeapon.java index ae959c99..9eab299b 100644 --- a/src/api/java/mods/battlegear2/api/weapons/IPenetrateWeapon.java +++ b/src/api/java/mods/battlegear2/api/weapons/IPenetrateWeapon.java @@ -1,13 +1,13 @@ package mods.battlegear2.api.weapons; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; -public interface IPenetrateWeapon { - /** - * The amount of damage bypassing armor - * @param stack The {@link net.minecraft.item.ItemStack} representative of the item dealing the hit. - * @return the amount of damage that bypasses armour - */ - public int getPenetratingPower(ItemStack stack); +public interface IPenetrateWeapon +{ + /** + * The amount of damage bypassing armor + * @param stack The {@link net.minecraft.item.ItemStack} representative of the item dealing the hit. + * @return the amount of damage that bypasses armour + */ + public int getPenetratingPower (ItemStack stack); } diff --git a/src/api/java/mods/battlegear2/api/weapons/IPotionEffect.java b/src/api/java/mods/battlegear2/api/weapons/IPotionEffect.java index a310ee17..75749996 100644 --- a/src/api/java/mods/battlegear2/api/weapons/IPotionEffect.java +++ b/src/api/java/mods/battlegear2/api/weapons/IPotionEffect.java @@ -1,13 +1,12 @@ package mods.battlegear2.api.weapons; +import java.util.Map; import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.PotionEffect; -import java.util.Map; - -public interface IPotionEffect { - +public interface IPotionEffect +{ /** * Returns a map containing the potion effects to apply to an entity hit by the weapon. Each effect @@ -18,6 +17,6 @@ public interface IPotionEffect { * @param entityHitting * @return A Map of {@link PotionEffect} with chance value ranging from 0 to 1, to be dealt to the entityHit */ - public Map getEffectsOnHit(EntityLivingBase entityHit, EntityLivingBase entityHitting); + public Map getEffectsOnHit (EntityLivingBase entityHit, EntityLivingBase entityHitting); } diff --git a/src/api/java/mods/battlegear2/api/weapons/ISpecialEffect.java b/src/api/java/mods/battlegear2/api/weapons/ISpecialEffect.java index 9f52e9bb..886d59a5 100644 --- a/src/api/java/mods/battlegear2/api/weapons/ISpecialEffect.java +++ b/src/api/java/mods/battlegear2/api/weapons/ISpecialEffect.java @@ -1,16 +1,14 @@ package mods.battlegear2.api.weapons; -import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -public interface ISpecialEffect { - /** - * - * @param entityHit The entity the effect will be applied to. - * @param entityHitting - * @return true if it adds an hitting action - */ - public boolean performEffects(EntityLivingBase entityHit, EntityLivingBase entityHitting); +public interface ISpecialEffect +{ + /** + * + * @param entityHit The entity the effect will be applied to. + * @param entityHitting + * @return true if it adds an hitting action + */ + public boolean performEffects (EntityLivingBase entityHit, EntityLivingBase entityHitting); } diff --git a/src/api/java/mods/battlegear2/api/weapons/OffhandAttackEvent.java b/src/api/java/mods/battlegear2/api/weapons/OffhandAttackEvent.java index 273b1d5f..3d164f5c 100644 --- a/src/api/java/mods/battlegear2/api/weapons/OffhandAttackEvent.java +++ b/src/api/java/mods/battlegear2/api/weapons/OffhandAttackEvent.java @@ -3,20 +3,22 @@ package mods.battlegear2.api.weapons; import mods.battlegear2.api.PlayerEventChild; import net.minecraft.entity.Entity; import net.minecraftforge.event.entity.player.EntityInteractEvent; -import net.minecraftforge.event.entity.player.PlayerEvent; -public class OffhandAttackEvent extends PlayerEventChild { +public class OffhandAttackEvent extends PlayerEventChild +{ public boolean swingOffhand = true; public boolean shouldAttack = true; public EntityInteractEvent event; - public OffhandAttackEvent(EntityInteractEvent parent) { + public OffhandAttackEvent(EntityInteractEvent parent) + { super(parent); this.event = parent; } - public Entity getTarget() { + public Entity getTarget () + { return event.target; } } \ No newline at end of file diff --git a/src/main/java/tconstruct/TConstruct.java b/src/main/java/tconstruct/TConstruct.java index a79e709a..ba9c7a37 100644 --- a/src/main/java/tconstruct/TConstruct.java +++ b/src/main/java/tconstruct/TConstruct.java @@ -4,10 +4,8 @@ import mantle.lib.TabTools; import net.minecraft.world.gen.structure.MapGenStructureIO; import net.minecraftforge.common.MinecraftForge; -import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.core.config.LoggerConfig; import tconstruct.achievements.TAchievements; import tconstruct.client.TControls; @@ -51,8 +49,10 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.VillagerRegistry; import cpw.mods.fml.relauncher.Side; -/** TConstruct, the tool mod. - * Craft your tools with style, then modify until the original is gone! +/** + * TConstruct, the tool mod. Craft your tools with style, then modify until the + * original is gone! + * * @author mDiyo */ @@ -79,13 +79,13 @@ public class TConstruct @SidedProxy(clientSide = "tconstruct.client.TProxyClient", serverSide = "tconstruct.common.TProxyCommon") public static TProxyCommon proxy; - //The packet pipeline + // The packet pipeline public static final PacketPipeline packetPipeline = new PacketPipeline(); public TConstruct() { - //logger.setParent(FMLCommonHandler.instance().getFMLLogger()); + // logger.setParent(FMLCommonHandler.instance().getFMLLogger()); if (Loader.isModLoaded("Natura")) { logger.info("Natura, what are we going to do tomorrow night?"); @@ -132,7 +132,7 @@ public class TConstruct GameRegistry.registerWorldGenerator(new TBaseWorldGenerator(), 0); MinecraftForge.TERRAIN_GEN_BUS.register(new TerrainGenEventHandler()); GameRegistry.registerFuelHandler(content); - //GameRegistry.registerCraftingHandler(new TCraftingHandler()); + // GameRegistry.registerCraftingHandler(new TCraftingHandler()); NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy); if (PHConstruct.addToVillages) @@ -155,7 +155,7 @@ public class TConstruct } playerTracker = new TPlayerHandler(); - //GameRegistry.registerPlayerTracker(playerTracker); + // GameRegistry.registerPlayerTracker(playerTracker); FMLCommonHandler.instance().bus().register(playerTracker); if (event.getSide() == Side.CLIENT) diff --git a/src/main/java/tconstruct/achievements/TAchievements.java b/src/main/java/tconstruct/achievements/TAchievements.java index 27692a73..1bee7609 100644 --- a/src/main/java/tconstruct/achievements/TAchievements.java +++ b/src/main/java/tconstruct/achievements/TAchievements.java @@ -9,10 +9,10 @@ import net.minecraftforge.common.AchievementPage; public class TAchievements { - //Add achievements in here before the load executes(end of TC's init event) + // Add achievements in here before the load executes(end of TC's init event) public static HashMap achievements = new HashMap(); - //Warning: Will be null until after the init stage + // Warning: Will be null until after the init stage public static AchievementPage achievementPage = null; public static void init () diff --git a/src/main/java/tconstruct/blocks/BlockFalling.java b/src/main/java/tconstruct/blocks/BlockFalling.java index 9da954ae..10f49ad2 100644 --- a/src/main/java/tconstruct/blocks/BlockFalling.java +++ b/src/main/java/tconstruct/blocks/BlockFalling.java @@ -52,9 +52,15 @@ public class BlockFalling extends Block { if (!p_149830_1_.isRemote) { - //EntityFallingBlock entityfallingblock = new EntityFallingBlock(p_149830_1_, (double)((float)p_149830_2_ + 0.5F), (double)((float)p_149830_3_ + 0.5F), (double)((float)p_149830_4_ + 0.5F), this, p_149830_1_.getBlockMetadata(p_149830_2_, p_149830_3_, p_149830_4_)); - //this.func_149829_a(entityfallingblock); - //p_149830_1_.spawnEntityInWorld(entityfallingblock); + // EntityFallingBlock entityfallingblock = new + // EntityFallingBlock(p_149830_1_, + // (double)((float)p_149830_2_ + 0.5F), + // (double)((float)p_149830_3_ + 0.5F), + // (double)((float)p_149830_4_ + 0.5F), this, + // p_149830_1_.getBlockMetadata(p_149830_2_, p_149830_3_, + // p_149830_4_)); + // this.func_149829_a(entityfallingblock); + // p_149830_1_.spawnEntityInWorld(entityfallingblock); } } else @@ -97,9 +103,10 @@ public class BlockFalling extends Block } else { - //TODO: King, take a look here when doing liquids! - //Material material = block.blockMaterial; - //return material == Material.water ? true : material == Material.lava; + // TODO: King, take a look here when doing liquids! + // Material material = block.blockMaterial; + // return material == Material.water ? true : material == + // Material.lava; return false; } } diff --git a/src/main/java/tconstruct/blocks/BlockLandmine.java b/src/main/java/tconstruct/blocks/BlockLandmine.java index dc0de345..cea88797 100644 --- a/src/main/java/tconstruct/blocks/BlockLandmine.java +++ b/src/main/java/tconstruct/blocks/BlockLandmine.java @@ -1,26 +1,44 @@ package tconstruct.blocks; -import static net.minecraftforge.common.util.ForgeDirection.*; +import static net.minecraftforge.common.util.ForgeDirection.DOWN; +import static net.minecraftforge.common.util.ForgeDirection.EAST; +import static net.minecraftforge.common.util.ForgeDirection.NORTH; +import static net.minecraftforge.common.util.ForgeDirection.SOUTH; +import static net.minecraftforge.common.util.ForgeDirection.UP; +import static net.minecraftforge.common.util.ForgeDirection.WEST; + +import java.util.Iterator; +import java.util.List; +import java.util.Random; -import java.util.*; import mantle.blocks.BlockUtils; import mantle.world.WorldHelper; -import net.minecraft.block.*; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockPressurePlate.Sensitivity; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.*; -import net.minecraft.entity.item.*; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.item.EntityTNTPrimed; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.*; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.*; -import net.minecraft.world.*; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.Explosion; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import tconstruct.TConstruct; -import tconstruct.blocks.logic.*; +import tconstruct.blocks.logic.LandmineExplodeLogic; +import tconstruct.blocks.logic.TileEntityLandmine; import tconstruct.client.block.RenderLandmine; import tconstruct.common.TProxyCommon; import tconstruct.util.landmine.Helper; @@ -33,7 +51,8 @@ import tconstruct.util.landmine.Helper; public class BlockLandmine extends BlockContainer { - // Should explode when broken instead of dropping items(may not actually work + // Should explode when broken instead of dropping items(may not actually + // work boolean explodeOnBroken = false; public BlockLandmine() @@ -445,7 +464,7 @@ public class BlockLandmine extends BlockContainer TileEntityLandmine te = (TileEntityLandmine) par1World.getTileEntity(par2, par3, par4); Sensitivity triggerType; - + // Change to return 1 if you want the landmine to blow up when the block // holding it is broken if (te == null) @@ -509,7 +528,9 @@ public class BlockLandmine extends BlockContainer protected AxisAlignedBB getSensitiveAABB (World par1World, int par2, int par3, int par4) { float f = 0.125F; - // return AxisAlignedBB.getAABBPool().getAABB((double)((float)par1 + f), (double)par2, (double)((float)par3 + f), (double)((float)(par1 + 1) - f), (double)par2 + 0.25D, (double)((float)(par3 + 1) - f)); + // return AxisAlignedBB.getAABBPool().getAABB((double)((float)par1 + f), + // (double)par2, (double)((float)par3 + f), (double)((float)(par1 + 1) - + // f), (double)par2 + 0.25D, (double)((float)(par3 + 1) - f)); int l = par1World.getBlockMetadata(par2, par3, par4); int i1 = l & 7; @@ -543,7 +564,7 @@ public class BlockLandmine extends BlockContainer TileEntityLandmine te = (TileEntityLandmine) par1World.getTileEntity(par2, par3, par4); Sensitivity triggerType; - + // Change to return 1 if you want the landmine to blow up when the // block holding it is broken if (te == null) @@ -639,16 +660,17 @@ public class BlockLandmine extends BlockContainer this.setBlockBounds(0.0F, 0.0625F, 0.0625F, 0.0625F, 1.0F - 0.0625F, 1.0F - 0.0625F); break; default: - this.setBlockBounds(0, 0, 0, 1, 1, 1); - break; + this.setBlockBounds(0, 0, 0, 1, 1, 1); + break; } } @Override - public int damageDropped (int par1){ - return par1; + public int damageDropped (int par1) + { + return par1; } - + @Override public Item getItemDropped (int par1, Random par2Random, int par3) { diff --git a/src/main/java/tconstruct/blocks/CastingChannelBlock.java b/src/main/java/tconstruct/blocks/CastingChannelBlock.java index b1a0f3cf..8aab0646 100644 --- a/src/main/java/tconstruct/blocks/CastingChannelBlock.java +++ b/src/main/java/tconstruct/blocks/CastingChannelBlock.java @@ -41,10 +41,10 @@ public class CastingChannelBlock extends BlockContainer } else { - //int amount = 0; - //if (tile.getFluid() != null) - //amount = tile.getLiquidAmount(); - //player.addChatMessage("LiquidAmount: " + amount); + // int amount = 0; + // if (tile.getFluid() != null) + // amount = tile.getLiquidAmount(); + // player.addChatMessage("LiquidAmount: " + amount); tile.setActive(true); } } diff --git a/src/main/java/tconstruct/blocks/CraftingStationBlock.java b/src/main/java/tconstruct/blocks/CraftingStationBlock.java index ae72e9a4..9ea9fd88 100644 --- a/src/main/java/tconstruct/blocks/CraftingStationBlock.java +++ b/src/main/java/tconstruct/blocks/CraftingStationBlock.java @@ -29,7 +29,7 @@ public class CraftingStationBlock extends InventoryBlock this.stepSound = Block.soundTypeWood; } - //Block.hasComparatorInputOverride and Block.getComparatorInputOverride + // Block.hasComparatorInputOverride and Block.getComparatorInputOverride /* Rendering */ @Override diff --git a/src/main/java/tconstruct/blocks/DryingRack.java b/src/main/java/tconstruct/blocks/DryingRack.java index d52c3b8d..878e1610 100644 --- a/src/main/java/tconstruct/blocks/DryingRack.java +++ b/src/main/java/tconstruct/blocks/DryingRack.java @@ -254,105 +254,50 @@ public class DryingRack extends InventoryBlock return new DryingRackLogic(); } - /*@Override - public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) - { - return true; - }*/ + /* + * @Override public boolean shouldSideBeRendered (IBlockAccess + * par1IBlockAccess, int par2, int par3, int par4, int par5) { return true; + * } + */ - /*@Override - public void getSubBlocks (int id, CreativeTabs tab, List list) - { - for (int iter = 0; iter < 3; iter++) - { - list.add(new ItemStack(id, 1, iter)); - } - }*/ + /* + * @Override public void getSubBlocks (int id, CreativeTabs tab, List list) + * { for (int iter = 0; iter < 3; iter++) { list.add(new ItemStack(id, 1, + * iter)); } } + */ - /*@Override - public void setBlockBoundsBasedOnState (IBlockAccess world, int x, int y, int z) - { - int meta = world.getBlockMetadata(x, y, z); - if (meta != 1) - { - this.setBlockBounds(0, 0, 0, 1, 1, 1); - } - else - { - FaucetLogic logic = (FaucetLogic) world.getBlockTileEntity(x, y, z); - float xMin = 0.25F; - float xMax = 0.75F; - float zMin = 0.25F; - float zMax = 0.75F; + /* + * @Override public void setBlockBoundsBasedOnState (IBlockAccess world, int + * x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); if (meta + * != 1) { this.setBlockBounds(0, 0, 0, 1, 1, 1); } else { FaucetLogic logic + * = (FaucetLogic) world.getBlockTileEntity(x, y, z); float xMin = 0.25F; + * float xMax = 0.75F; float zMin = 0.25F; float zMax = 0.75F; + * + * switch (logic.getRenderDirection()) { case 2: zMin = 0.625F; zMax = 1.0F; + * break; case 3: zMax = 0.375F; zMin = 0F; break; case 4: xMin = 0.625F; + * xMax = 1.0F; break; case 5: xMax = 0.375F; xMin = 0F; break; } + * + * this.setBlockBounds(xMin, 0.25F, zMin, xMax, 0.625F, zMax); } } + */ - switch (logic.getRenderDirection()) - { - case 2: - zMin = 0.625F; - zMax = 1.0F; - break; - case 3: - zMax = 0.375F; - zMin = 0F; - break; - case 4: - xMin = 0.625F; - xMax = 1.0F; - break; - case 5: - xMax = 0.375F; - xMin = 0F; - break; - } - - this.setBlockBounds(xMin, 0.25F, zMin, xMax, 0.625F, zMax); - } - }*/ - - /*@Override - public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z) - { - int meta = world.getBlockMetadata(x, y, z); - if (meta != 1) - { - return AxisAlignedBB.getAABBPool().getAABB(x, y, z, x + 1, y + 1, z + 1); - } - else - { - FaucetLogic logic = (FaucetLogic) world.getBlockTileEntity(x, y, z); - if (logic != null) - { - float xMin = 0.25F; - float xMax = 0.75F; - float zMin = 0.25F; - float zMax = 0.75F; - - switch (logic.getRenderDirection()) - { - case 2: - zMin = 0.625F; - zMax = 1.0F; - break; - case 3: - zMax = 0.375F; - zMin = 0F; - break; - case 4: - xMin = 0.625F; - xMax = 1.0F; - break; - case 5: - xMax = 0.375F; - xMin = 0F; - break; - } - - return AxisAlignedBB.getAABBPool().getAABB((double) ((float) x + xMin), (double) y + 0.25, (double) ((float) z + zMin), (double) ((float) x + xMax), (double) y + 0.625, (double) ((float) z + zMax)); - } - } - - return super.getCollisionBoundingBoxFromPool(world, x, y, z); - }*/ + /* + * @Override public AxisAlignedBB getCollisionBoundingBoxFromPool (World + * world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); + * if (meta != 1) { return AxisAlignedBB.getAABBPool().getAABB(x, y, z, x + + * 1, y + 1, z + 1); } else { FaucetLogic logic = (FaucetLogic) + * world.getBlockTileEntity(x, y, z); if (logic != null) { float xMin = + * 0.25F; float xMax = 0.75F; float zMin = 0.25F; float zMax = 0.75F; + * + * switch (logic.getRenderDirection()) { case 2: zMin = 0.625F; zMax = 1.0F; + * break; case 3: zMax = 0.375F; zMin = 0F; break; case 4: xMin = 0.625F; + * xMax = 1.0F; break; case 5: xMax = 0.375F; xMin = 0F; break; } + * + * return AxisAlignedBB.getAABBPool().getAABB((double) ((float) x + xMin), + * (double) y + 0.25, (double) ((float) z + zMin), (double) ((float) x + + * xMax), (double) y + 0.625, (double) ((float) z + zMax)); } } + * + * return super.getCollisionBoundingBoxFromPool(world, x, y, z); } + */ /* Redstone */ } diff --git a/src/main/java/tconstruct/blocks/EquipBlock.java b/src/main/java/tconstruct/blocks/EquipBlock.java index 236e5f84..e2cf86c2 100644 --- a/src/main/java/tconstruct/blocks/EquipBlock.java +++ b/src/main/java/tconstruct/blocks/EquipBlock.java @@ -33,7 +33,7 @@ public class EquipBlock extends InventoryBlock super(material); this.setHardness(0.3f); this.setBlockBounds(0, 0, 0, 1, 0.25f, 1); - //this.setCreativeTab(ToolConstruct.materialTab); + // this.setCreativeTab(ToolConstruct.materialTab); } @Override @@ -50,7 +50,8 @@ public class EquipBlock extends InventoryBlock @SideOnly(Side.CLIENT) public void registerBlockIcons (IIconRegister par1IconRegister) { - //this.blockIcon = par1iconRegister.registerIcon(Block.blockIron.getUnlocalizedName()); + // this.blockIcon = + // par1iconRegister.registerIcon(Block.blockIron.getUnlocalizedName()); } @Override diff --git a/src/main/java/tconstruct/blocks/GlassBlockConnected.java b/src/main/java/tconstruct/blocks/GlassBlockConnected.java index c2a48483..10e548d6 100644 --- a/src/main/java/tconstruct/blocks/GlassBlockConnected.java +++ b/src/main/java/tconstruct/blocks/GlassBlockConnected.java @@ -11,7 +11,8 @@ import net.minecraft.world.World; import tconstruct.library.TConstructRegistry; import tconstruct.util.config.PHConstruct; -/** @author fuj1n +/** + * @author fuj1n * */ @@ -32,7 +33,7 @@ public class GlassBlockConnected extends MantleBlock this.setCreativeTab(TConstructRegistry.blockTab); } - //For FMP support + // For FMP support public IIcon[] getIcons () { return icons; @@ -58,11 +59,18 @@ public class GlassBlockConnected extends MantleBlock /** * This is checked to see if the texture should connect to this block - * @param par2 x - * @param par3 y - * @param par4 z - * @param par5 ID this block is asking to connect to (may be 0 if there is no block) - * @param par6 Metadata of the block this block is trying to connect to + * + * @param par2 + * x + * @param par3 + * y + * @param par4 + * z + * @param par5 + * ID this block is asking to connect to (may be 0 if there is no + * block) + * @param par6 + * Metadata of the block this block is trying to connect to * @return true if should connect */ public boolean shouldConnectToBlock (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, Block par5, int par6) diff --git a/src/main/java/tconstruct/blocks/GlassBlockConnectedMeta.java b/src/main/java/tconstruct/blocks/GlassBlockConnectedMeta.java index 9d50add1..e0526b1a 100644 --- a/src/main/java/tconstruct/blocks/GlassBlockConnectedMeta.java +++ b/src/main/java/tconstruct/blocks/GlassBlockConnectedMeta.java @@ -12,8 +12,9 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import tconstruct.util.config.PHConstruct; -/** @author fuj1n - * +/** + * @author fuj1n + * */ public class GlassBlockConnectedMeta extends GlassBlockConnected diff --git a/src/main/java/tconstruct/blocks/GlassPaneConnected.java b/src/main/java/tconstruct/blocks/GlassPaneConnected.java index 3c2a2491..2823c2aa 100644 --- a/src/main/java/tconstruct/blocks/GlassPaneConnected.java +++ b/src/main/java/tconstruct/blocks/GlassPaneConnected.java @@ -686,11 +686,11 @@ public class GlassPaneConnected extends GlassBlockConnected @Override public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { - // if(par5 == 0 || par5 == 1){ - // return par1IBlockAccess.getBlock(par2, par3, par4) != this.blockID; - // }else{ - // return true; - // } + // if(par5 == 0 || par5 == 1){ + // return par1IBlockAccess.getBlock(par2, par3, par4) != this.blockID; + // }else{ + // return true; + // } return true; } } diff --git a/src/main/java/tconstruct/blocks/GlassPaneStained.java b/src/main/java/tconstruct/blocks/GlassPaneStained.java index 7d58ba84..877dbdde 100644 --- a/src/main/java/tconstruct/blocks/GlassPaneStained.java +++ b/src/main/java/tconstruct/blocks/GlassPaneStained.java @@ -10,7 +10,7 @@ public class GlassPaneStained extends PaneBase public GlassPaneStained() { super(Material.glass, "glass/", assembleBlockTextures()); - //TODO setHardness + // TODO setHardness this.setHardness(0.3F); this.stepSound = soundTypeGlass; this.setBlockName("tconstruct.glasspanestained"); diff --git a/src/main/java/tconstruct/blocks/GravelOre.java b/src/main/java/tconstruct/blocks/GravelOre.java index b653582a..424d0c35 100644 --- a/src/main/java/tconstruct/blocks/GravelOre.java +++ b/src/main/java/tconstruct/blocks/GravelOre.java @@ -22,7 +22,7 @@ public class GravelOre extends BlockFalling super(); this.setCreativeTab(TConstructRegistry.blockTab); this.stepSound = soundTypeGravel; - //this.blockMaterial = Material.craftedSnow; + // this.blockMaterial = Material.craftedSnow; } @Override @@ -54,15 +54,17 @@ public class GravelOre extends BlockFalling @Override public int damageDropped (int meta) { - /*if (meta == 1) - return 0;*/ + /* + * if (meta == 1) return 0; + */ return meta; } public Block idDropped (int par1, Random par2Random, int par3) { - /*if (par1 == 1) - return Item.goldNugget.itemID;*/ + /* + * if (par1 == 1) return Item.goldNugget.itemID; + */ return this; } diff --git a/src/main/java/tconstruct/blocks/LavaTankBlock.java b/src/main/java/tconstruct/blocks/LavaTankBlock.java index fee8a85f..e75d32dd 100644 --- a/src/main/java/tconstruct/blocks/LavaTankBlock.java +++ b/src/main/java/tconstruct/blocks/LavaTankBlock.java @@ -22,7 +22,6 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; -import tconstruct.TConstruct; import tconstruct.blocks.logic.LavaTankLogic; import tconstruct.client.block.TankRender; import tconstruct.library.TConstructRegistry; @@ -91,11 +90,11 @@ public class LavaTankBlock extends BlockContainer @Override public boolean shouldSideBeRendered (IBlockAccess world, int x, int y, int z, int side) { - //if (side == 0 && world.getBlockMetadata(x, y, z) == 0) - //return super.shouldSideBeRendered(world, x, y, z, side); + // if (side == 0 && world.getBlockMetadata(x, y, z) == 0) + // return super.shouldSideBeRendered(world, x, y, z, side); Block bID = world.getBlock(x, y, z); return bID == this ? false : super.shouldSideBeRendered(world, x, y, z, side); - //return true; + // return true; } @Override @@ -107,11 +106,9 @@ public class LavaTankBlock extends BlockContainer return 0; } - /*@Override - public int getRenderBlockPass() - { - return 1; - }*/ + /* + * @Override public int getRenderBlockPass() { return 1; } + */ @Override public int getRenderType () @@ -159,38 +156,10 @@ public class LavaTankBlock extends BlockContainer @Override public boolean onBlockActivated (World world, int i, int j, int k, EntityPlayer entityplayer, int par6, float par7, float par8, float par9) { - /**ItemStack current = entityplayer.inventory.getCurrentItem(); - - if (current != null) - { - FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current); - - LavaTankLogic tank = (LavaTankLogic) world.getTileEntity(i, j, k); - - if (liquid != null) - { - int qty = tank.fill(ForgeDirection.UNKNOWN, liquid, true); - - if (qty != 0 && !entityplayer.capabilities.isCreativeMode) - { - entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, consumeItem(current)); - } - - return true; - - } - else - { - - } - }*/ - ItemStack current = entityplayer.inventory.getCurrentItem(); if (current != null) { FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current); - //FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current); - TConstruct.logger.error(liquid); LavaTankLogic logic = (LavaTankLogic) world.getTileEntity(i, j, k); if (liquid != null) { @@ -208,7 +177,7 @@ public class LavaTankBlock extends BlockContainer else if (FluidContainerRegistry.isBucket(current)) { FluidTankInfo[] tanks = logic.getTankInfo(ForgeDirection.UNKNOWN); - FluidStack fillFluid = tanks[0].fluid;//getFluid(); + FluidStack fillFluid = tanks[0].fluid;// getFluid(); ItemStack fillStack = FluidContainerRegistry.fillFluidContainer(fillFluid, current); if (fillStack != null) { diff --git a/src/main/java/tconstruct/blocks/MeatBlock.java b/src/main/java/tconstruct/blocks/MeatBlock.java index 568aca75..1fadf450 100644 --- a/src/main/java/tconstruct/blocks/MeatBlock.java +++ b/src/main/java/tconstruct/blocks/MeatBlock.java @@ -24,7 +24,7 @@ public class MeatBlock extends BlockWood { this.setHardness(1.0F); this.setStepSound(Block.soundTypeWood); - //setBurnProperties(this.blockID, 5, 20); + // setBurnProperties(this.blockID, 5, 20); this.setCreativeTab(TConstructRegistry.blockTab); } @@ -36,7 +36,7 @@ public class MeatBlock extends BlockWood int orientation = metadata / 4; switch (orientation) - //Ends of logs + // Ends of logs { case 0: if (side == 0 || side == 1) @@ -73,7 +73,8 @@ public class MeatBlock extends BlockWood } /** - * ejects contained items into the world, and notifies neighbours of an update, as appropriate + * ejects contained items into the world, and notifies neighbours of an + * update, as appropriate */ public void breakBlock (World par1World, int par2, int par3, int par4, int par5, int par6) { @@ -101,7 +102,8 @@ public class MeatBlock extends BlockWood } /** - * Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata + * Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, + * side, hitX, hitY, hitZ, block metadata */ public int onBlockPlaced (World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) { @@ -127,7 +129,8 @@ public class MeatBlock extends BlockWood } /** - * Determines the damage on the item the block drops. Used in cloth and wood. + * Determines the damage on the item the block drops. Used in cloth and + * wood. */ public int damageDropped (int par1) { @@ -152,16 +155,12 @@ public class MeatBlock extends BlockWood return false; } - /*public void onBlockHarvested (World world, int x, int y, int z, int meta, EntityPlayer player) - { - if (meta % 4 == 1) - { - if (world.difficultySetting > 2) - world.createExplosion(null, x, y, z, 1.75f, false); - else - world.createExplosion(null, x, y, z, 2f, false); - } - }*/ + /* + * public void onBlockHarvested (World world, int x, int y, int z, int meta, + * EntityPlayer player) { if (meta % 4 == 1) { if (world.difficultySetting > + * 2) world.createExplosion(null, x, y, z, 1.75f, false); else + * world.createExplosion(null, x, y, z, 2f, false); } } + */ @SideOnly(Side.CLIENT) @Override @@ -171,17 +170,17 @@ public class MeatBlock extends BlockWood par3List.add(new ItemStack(b, 1, i)); } - // @Override - // public boolean canSustainLeaves (World world, int x, int y, int z) - // { - // return true; - // } + // @Override + // public boolean canSustainLeaves (World world, int x, int y, int z) + // { + // return true; + // } // - // @Override - // public boolean isWood (World world, int x, int y, int z) - // { - // return true; - // } + // @Override + // public boolean isWood (World world, int x, int y, int z) + // { + // return true; + // } public boolean isBeaconBase (World worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) { diff --git a/src/main/java/tconstruct/blocks/MetalOre.java b/src/main/java/tconstruct/blocks/MetalOre.java index 48b4f7e3..da473961 100644 --- a/src/main/java/tconstruct/blocks/MetalOre.java +++ b/src/main/java/tconstruct/blocks/MetalOre.java @@ -22,7 +22,7 @@ public class MetalOre extends TConstructBlock return 10f; else return 3f; - //return this.blockHardness; + // return this.blockHardness; } @Override diff --git a/src/main/java/tconstruct/blocks/MultiBrick.java b/src/main/java/tconstruct/blocks/MultiBrick.java index edb8206c..23e79e70 100644 --- a/src/main/java/tconstruct/blocks/MultiBrick.java +++ b/src/main/java/tconstruct/blocks/MultiBrick.java @@ -110,7 +110,7 @@ public class MultiBrick extends TConstructBlock } } - //TODO getCollisionBoundingBoxFromPool + // TODO getCollisionBoundingBoxFromPool @Override public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z) { @@ -120,11 +120,9 @@ public class MultiBrick extends TConstructBlock return super.getCollisionBoundingBoxFromPool(world, x, y, z); } - /*@Override - public int getRenderType () - { - return BrickRender.model; - }*/ + /* + * @Override public int getRenderType () { return BrickRender.model; } + */ @Override public boolean isNormalCube (IBlockAccess world, int x, int y, int z) diff --git a/src/main/java/tconstruct/blocks/MultiBrickFancy.java b/src/main/java/tconstruct/blocks/MultiBrickFancy.java index 51a972eb..cc0d6ddf 100644 --- a/src/main/java/tconstruct/blocks/MultiBrickFancy.java +++ b/src/main/java/tconstruct/blocks/MultiBrickFancy.java @@ -22,7 +22,7 @@ public class MultiBrickFancy extends TConstructBlock super(Material.rock, 3f, blockTextures); } - //TODO getBlockHardness + // TODO getBlockHardness @Override public float getBlockHardness (World world, int x, int y, int z) { @@ -104,7 +104,7 @@ public class MultiBrickFancy extends TConstructBlock } } - //TODO onEntityCollidedWithBlock + // TODO onEntityCollidedWithBlock @Override public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity) { @@ -126,11 +126,9 @@ public class MultiBrickFancy extends TConstructBlock return super.getCollisionBoundingBoxFromPool(world, x, y, z); } - /*@Override - public int getRenderType () - { - return BrickRender.model; - }*/ + /* + * @Override public int getRenderType () { return BrickRender.model; } + */ @Override public boolean isNormalCube (IBlockAccess world, int x, int y, int z) @@ -138,14 +136,14 @@ public class MultiBrickFancy extends TConstructBlock return world.getBlockMetadata(x, y, z) != 8; } - //TODO canProvidePower + // TODO canProvidePower @Override public boolean canProvidePower () { return false; } - //TODO isProvindingWeakPower + // TODO isProvindingWeakPower @Override public int isProvidingWeakPower (IBlockAccess world, int x, int y, int z, int side) { diff --git a/src/main/java/tconstruct/blocks/OreberryBush.java b/src/main/java/tconstruct/blocks/OreberryBush.java index 81ff39ac..474952b5 100644 --- a/src/main/java/tconstruct/blocks/OreberryBush.java +++ b/src/main/java/tconstruct/blocks/OreberryBush.java @@ -199,8 +199,9 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable @Override public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) { - /*if (world.isRemote) - return false;*/ + /* + * if (world.isRemote) return false; + */ int meta = world.getBlockMetadata(x, y, z); if (meta >= 12) @@ -258,7 +259,8 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable return; } - if (random1.nextInt(20) == 0)// && world.getBlockLightValue(x, y, z) <= 8) + if (random1.nextInt(20) == 0)// && world.getBlockLightValue(x, y, z) <= + // 8) { if (world.getFullBlockLightValue(x, y, z) < 10) { @@ -268,10 +270,10 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable world.setBlock(x, y, z, this, meta + 4, 3); } } - /*else if (meta < 8) - { - world.setBlock(x, y, z, blockID, meta + 4, 3); - }*/ + /* + * else if (meta < 8) { world.setBlock(x, y, z, blockID, meta + 4, + * 3); } + */ } } @@ -290,7 +292,8 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable } /** - * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) + * returns a list of items with the same ID, but different meta (eg: dye + * returns 16 items) */ @SideOnly(Side.CLIENT) @Override diff --git a/src/main/java/tconstruct/blocks/OreberryBushEssence.java b/src/main/java/tconstruct/blocks/OreberryBushEssence.java index 3ab911f9..9efe7426 100644 --- a/src/main/java/tconstruct/blocks/OreberryBushEssence.java +++ b/src/main/java/tconstruct/blocks/OreberryBushEssence.java @@ -23,7 +23,8 @@ public class OreberryBushEssence extends OreberryBush implements IPlantable return; } - if (random1.nextInt(20) == 0)// && world.getBlockLightValue(x, y, z) <= 8) + if (random1.nextInt(20) == 0)// && world.getBlockLightValue(x, y, z) <= + // 8) { int meta = world.getBlockMetadata(x, y, z); if (world.getFullBlockLightValue(x, y, z) < 10 || meta % 4 == 1) @@ -33,18 +34,19 @@ public class OreberryBushEssence extends OreberryBush implements IPlantable world.setBlock(x, y, z, (Block) this, meta + 4, 3); } } - /*else if (meta < 8) - { - world.setBlock(x, y, z, blockID, meta + 4, 3); - }*/ + /* + * else if (meta < 8) { world.setBlock(x, y, z, blockID, meta + 4, + * 3); } + */ } } public boolean canPlaceBlockAt (World world, int x, int y, int z) { return true; - /*if (world.getFullBlockLightValue(x, y, z) < 13) - return super.canPlaceBlockAt(world, x, y, z); - return false;*/ + /* + * if (world.getFullBlockLightValue(x, y, z) < 13) return + * super.canPlaceBlockAt(world, x, y, z); return false; + */ } } diff --git a/src/main/java/tconstruct/blocks/SearedBlock.java b/src/main/java/tconstruct/blocks/SearedBlock.java index ef0b0265..820c7c13 100644 --- a/src/main/java/tconstruct/blocks/SearedBlock.java +++ b/src/main/java/tconstruct/blocks/SearedBlock.java @@ -182,12 +182,12 @@ public class SearedBlock extends InventoryBlock public void addItemToInventory (EntityPlayer player, World world, int x, int y, int z, ItemStack stack) { AbilityHelper.spawnItemAtPlayer(player, stack); - /*if (!world.isRemote) - { - EntityItem entityitem = new EntityItem(world, (double) x + 0.5D, (double) y + 0.9325D, (double) z + 0.5D, stack); - world.spawnEntityInWorld(entityitem); - entityitem.onCollideWithPlayer(player); - }*/ + /* + * if (!world.isRemote) { EntityItem entityitem = new EntityItem(world, + * (double) x + 0.5D, (double) y + 0.9325D, (double) z + 0.5D, stack); + * world.spawnEntityInWorld(entityitem); + * entityitem.onCollideWithPlayer(player); } + */ } /* Rendering */ @@ -211,7 +211,7 @@ public class SearedBlock extends InventoryBlock return textureNames; } - //TODO getIcon + // TODO getIcon @Override @SideOnly(Side.CLIENT) public IIcon getIcon (int side, int meta) diff --git a/src/main/java/tconstruct/blocks/SearedSlab.java b/src/main/java/tconstruct/blocks/SearedSlab.java index f3f305b6..df62f89f 100644 --- a/src/main/java/tconstruct/blocks/SearedSlab.java +++ b/src/main/java/tconstruct/blocks/SearedSlab.java @@ -17,7 +17,7 @@ public class SearedSlab extends SlabBase { public SearedSlab() { - //TODO material.rock + // TODO material.rock super(Material.rock); this.setCreativeTab(TConstructRegistry.blockTab); setHardness(12F); diff --git a/src/main/java/tconstruct/blocks/SmelteryBlock.java b/src/main/java/tconstruct/blocks/SmelteryBlock.java index 4fe533a3..36cc03ba 100644 --- a/src/main/java/tconstruct/blocks/SmelteryBlock.java +++ b/src/main/java/tconstruct/blocks/SmelteryBlock.java @@ -96,7 +96,7 @@ public class SmelteryBlock extends InventoryBlock TileEntity logic = world.getTileEntity(x, y, z); short direction = (logic instanceof IFacingLogic) ? ((IFacingLogic) logic).getRenderDirection() : 0; int meta = world.getBlockMetadata(x, y, z); - if (meta == 0) //Smeltery + if (meta == 0) // Smeltery { if (side == direction) { @@ -114,7 +114,7 @@ public class SmelteryBlock extends InventoryBlock return icons[0]; } } - if (meta == 1) //Drain + if (meta == 1) // Drain { if (side == direction) return icons[5]; @@ -136,11 +136,9 @@ public class SmelteryBlock extends InventoryBlock } - /*@Override - public int getRenderBlockPass() - { - return 1; - }*/ + /* + * @Override public int getRenderBlockPass() { return 1; } + */ public int damageDropped (int meta) { @@ -155,7 +153,7 @@ public class SmelteryBlock extends InventoryBlock @Override public Integer getGui (World world, int x, int y, int z, EntityPlayer entityplayer) { - //return -1; + // return -1; return TConstruct.proxy.smelteryGuiID; } @@ -221,7 +219,7 @@ public class SmelteryBlock extends InventoryBlock } else { - //world.markBlockForUpdate(x, y, z); + // world.markBlockForUpdate(x, y, z); player.openGui(getModInstance(), integer, world, x, y, z); return true; } @@ -244,7 +242,7 @@ public class SmelteryBlock extends InventoryBlock else return new SmelteryDrainLogic(); case 3: - return null; //Furnace + return null; // Furnace } return new MultiServantLogic(); } @@ -263,11 +261,11 @@ public class SmelteryBlock extends InventoryBlock logic.checkValidPlacement(); } - /*@Override - public void breakBlock (World world, int x, int y, int z, int par5, int par6) //Don't drop inventory - { - world.removeBlockTileEntity(x, y, z); - }*/ + /* + * @Override public void breakBlock (World world, int x, int y, int z, int + * par5, int par6) //Don't drop inventory { world.removeBlockTileEntity(x, + * y, z); } + */ @Override public void getSubBlocks (Item id, CreativeTabs tab, List list) @@ -283,7 +281,7 @@ public class SmelteryBlock extends InventoryBlock @Override public void onNeighborBlockChange (World world, int x, int y, int z, Block nBlockID) { - //System.out.println("Neighbor changed"); + // System.out.println("Neighbor changed"); TileEntity logic = world.getTileEntity(x, y, z); if (logic instanceof IServantLogic) { diff --git a/src/main/java/tconstruct/blocks/SoilBlock.java b/src/main/java/tconstruct/blocks/SoilBlock.java index 4914b0e5..c1b9ae7a 100644 --- a/src/main/java/tconstruct/blocks/SoilBlock.java +++ b/src/main/java/tconstruct/blocks/SoilBlock.java @@ -61,12 +61,10 @@ public class SoilBlock extends TConstructBlock return Blocks.soul_sand.getCollisionBoundingBoxFromPool(world, x, y, z); } - /*public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) - { - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - if (world.getBlockMetadata(x, y, z) >= 3) - { - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.875F, 1.0F); - } - }*/ + /* + * public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, + * int z) { this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); if + * (world.getBlockMetadata(x, y, z) >= 3) { this.setBlockBounds(0.0F, 0.0F, + * 0.0F, 1.0F, 0.875F, 1.0F); } } + */ } diff --git a/src/main/java/tconstruct/blocks/SoilSlab.java b/src/main/java/tconstruct/blocks/SoilSlab.java index aaba1ece..ac13b480 100644 --- a/src/main/java/tconstruct/blocks/SoilSlab.java +++ b/src/main/java/tconstruct/blocks/SoilSlab.java @@ -38,7 +38,7 @@ public class SoilSlab extends SlabBase switch (meta % 8) { case 0: - return this.blockIcon;//Block.grass.getIcon(1, 0); + return this.blockIcon;// Block.grass.getIcon(1, 0); case 1: return Blocks.dirt.getIcon(side, 0); case 2: @@ -70,9 +70,9 @@ public class SoilSlab extends SlabBase @SideOnly(Side.CLIENT) public int getRenderColor (int par1) { - //if (par1 % 8 == 0) + // if (par1 % 8 == 0) return this.getBlockColor(); - //return 0xFFFFFF; + // return 0xFFFFFF; } @Override diff --git a/src/main/java/tconstruct/blocks/SpeedBlock.java b/src/main/java/tconstruct/blocks/SpeedBlock.java index 8fb38cdf..440b069c 100644 --- a/src/main/java/tconstruct/blocks/SpeedBlock.java +++ b/src/main/java/tconstruct/blocks/SpeedBlock.java @@ -19,7 +19,7 @@ public class SpeedBlock extends TConstructBlock public SpeedBlock() { super(Material.rock, 3.0f, textureNames); - //this.setBlockBounds(0f, 0f, 0f, 1.0f, 0.5f, 1.0f); + // this.setBlockBounds(0f, 0f, 0f, 1.0f, 0.5f, 1.0f); } @Override diff --git a/src/main/java/tconstruct/blocks/StoneTorch.java b/src/main/java/tconstruct/blocks/StoneTorch.java index ab85dc7d..d79b6883 100644 --- a/src/main/java/tconstruct/blocks/StoneTorch.java +++ b/src/main/java/tconstruct/blocks/StoneTorch.java @@ -30,8 +30,8 @@ public class StoneTorch extends MantleBlock } /** - * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been - * cleared to be reused) + * Returns a bounding box from the pool of bounding boxes (this means this + * box can change after the pool has been cleared to be reused) */ public AxisAlignedBB getCollisionBoundingBoxFromPool (World par1World, int par2, int par3, int par4) { @@ -39,8 +39,9 @@ public class StoneTorch extends MantleBlock } /** - * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two - * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. + * Is this block (a) opaque and (b) a full 1m cube? This determines whether + * or not to render the shared face of two adjacent blocks and also whether + * the player can attach torches, redstone wire, etc to this block. */ public boolean isOpaqueCube () { @@ -48,7 +49,8 @@ public class StoneTorch extends MantleBlock } /** - * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) + * If this block doesn't render as an ordinary block it will return False + * (examples: signs, buttons, stairs, etc) */ public boolean renderAsNormalBlock () { @@ -80,7 +82,8 @@ public class StoneTorch extends MantleBlock } /** - * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z + * Checks to see if its valid to put this block at the specified + * coordinates. Args: world, x, y, z */ public boolean canPlaceBlockAt (World par1World, int par2, int par3, int par4) { @@ -89,7 +92,8 @@ public class StoneTorch extends MantleBlock } /** - * Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata + * Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, + * side, hitX, hitY, hitZ, block metadata */ public int onBlockPlaced (World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) { @@ -154,8 +158,9 @@ public class StoneTorch extends MantleBlock } /** - * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are - * their own) Args: x, y, z, neighbor blockID + * Lets the block know when one of its neighbor changes. Doesn't know which + * neighbor changed (coordinates passed are their own) Args: x, y, z, + * neighbor blockID */ public void onNeighborBlockChange (World par1World, int par2, int par3, int par4, int par5) { @@ -211,8 +216,9 @@ public class StoneTorch extends MantleBlock } /** - * Tests if the block can remain at its current location and will drop as an item if it is unable to stay. Returns - * True if it can stay and False if it drops. Args: world, x, y, z + * Tests if the block can remain at its current location and will drop as an + * item if it is unable to stay. Returns True if it can stay and False if it + * drops. Args: world, x, y, z */ protected boolean dropTorchIfCantStay (World par1World, int par2, int par3, int par4) { @@ -233,8 +239,8 @@ public class StoneTorch extends MantleBlock } /** - * Ray traces through the blocks collision from start vector to end vector returning a ray trace hit. Args: world, - * x, y, z, startVec, endVec + * Ray traces through the blocks collision from start vector to end vector + * returning a ray trace hit. Args: world, x, y, z, startVec, endVec */ public MovingObjectPosition collisionRayTrace (World par1World, int par2, int par3, int par4, Vec3 par5Vec3, Vec3 par6Vec3) { diff --git a/src/main/java/tconstruct/blocks/TConstructBlock.java b/src/main/java/tconstruct/blocks/TConstructBlock.java index ce378280..bc7b51d1 100644 --- a/src/main/java/tconstruct/blocks/TConstructBlock.java +++ b/src/main/java/tconstruct/blocks/TConstructBlock.java @@ -62,7 +62,7 @@ public class TConstructBlock extends MantleBlock return 1; } - //TODO getSubBlocks + // TODO getSubBlocks @Override public void getSubBlocks (Item block, CreativeTabs tab, List list) { diff --git a/src/main/java/tconstruct/blocks/TConstructFluid.java b/src/main/java/tconstruct/blocks/TConstructFluid.java index 91ac28ac..fb5ffa07 100644 --- a/src/main/java/tconstruct/blocks/TConstructFluid.java +++ b/src/main/java/tconstruct/blocks/TConstructFluid.java @@ -18,7 +18,7 @@ public class TConstructFluid extends BlockFluidClassic { super(fluid, material); this.texture = texture; - //TODO setCreativeTab() + // TODO setCreativeTab() this.setCreativeTab(TConstructRegistry.blockTab); } @@ -34,7 +34,7 @@ public class TConstructFluid extends BlockFluidClassic return alpha ? 1 : 0; } - //TODO registerBlockIcons + // TODO registerBlockIcons @Override public void registerBlockIcons (IIconRegister iconRegister) { @@ -42,7 +42,7 @@ public class TConstructFluid extends BlockFluidClassic flowIcon = iconRegister.registerIcon("tinker:" + texture + "_flow"); } - //TODO getIcon() + // TODO getIcon() @Override public IIcon getIcon (int side, int meta) { diff --git a/src/main/java/tconstruct/blocks/ToolStationBlock.java b/src/main/java/tconstruct/blocks/ToolStationBlock.java index c64d441c..d3ce2a76 100644 --- a/src/main/java/tconstruct/blocks/ToolStationBlock.java +++ b/src/main/java/tconstruct/blocks/ToolStationBlock.java @@ -2,16 +2,6 @@ package tconstruct.blocks; import java.util.List; -import tconstruct.TConstruct; -import tconstruct.blocks.logic.PartBuilderLogic; -import tconstruct.blocks.logic.PatternChestLogic; -import tconstruct.blocks.logic.StencilTableLogic; -import tconstruct.blocks.logic.ToolStationLogic; -import tconstruct.client.block.TableRender; -import tconstruct.common.TContent; -import tconstruct.common.TRepo; -import tconstruct.library.TConstructRegistry; -import tconstruct.util.config.PHConstruct; import mantle.blocks.abstracts.InventoryBlock; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -26,6 +16,15 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import tconstruct.TConstruct; +import tconstruct.blocks.logic.PartBuilderLogic; +import tconstruct.blocks.logic.PatternChestLogic; +import tconstruct.blocks.logic.StencilTableLogic; +import tconstruct.blocks.logic.ToolStationLogic; +import tconstruct.client.block.TableRender; +import tconstruct.common.TRepo; +import tconstruct.library.TConstructRegistry; +import tconstruct.util.config.PHConstruct; public class ToolStationBlock extends InventoryBlock { @@ -37,7 +36,7 @@ public class ToolStationBlock extends InventoryBlock this.setStepSound(Block.soundTypeWood); } - //Block.hasComparatorInputOverride and Block.getComparatorInputOverride + // Block.hasComparatorInputOverride and Block.getComparatorInputOverride /* Rendering */ @Override @@ -151,8 +150,9 @@ public class ToolStationBlock extends InventoryBlock return new StencilTableLogic(); case 13: return new StencilTableLogic(); - /*case 14: - return new CastingTableLogic();*/ + /* + * case 14: return new CastingTableLogic(); + */ default: return null; } @@ -171,7 +171,7 @@ public class ToolStationBlock extends InventoryBlock else return 3; - //return -1; + // return -1; } @Override diff --git a/src/main/java/tconstruct/blocks/component/SmelteryComponent.java b/src/main/java/tconstruct/blocks/component/SmelteryComponent.java index afe5938b..27d3296d 100644 --- a/src/main/java/tconstruct/blocks/component/SmelteryComponent.java +++ b/src/main/java/tconstruct/blocks/component/SmelteryComponent.java @@ -43,8 +43,9 @@ public class SmelteryComponent extends LogicComponent public void update () { - /*if (useTime > 0 && inUse) - useTime -= 3;*/ + /* + * if (useTime > 0 && inUse) useTime -= 3; + */ if (activeTemps.length == 0) inUse = false; diff --git a/src/main/java/tconstruct/blocks/component/SmelteryScan.java b/src/main/java/tconstruct/blocks/component/SmelteryScan.java index a9dea699..7f363159 100644 --- a/src/main/java/tconstruct/blocks/component/SmelteryScan.java +++ b/src/main/java/tconstruct/blocks/component/SmelteryScan.java @@ -122,7 +122,7 @@ public class SmelteryScan extends TankLayerScan } } - //Sync lava tanks for fuel values + // Sync lava tanks for fuel values @Override public void readNetworkNBT (NBTTagCompound tags) { diff --git a/src/main/java/tconstruct/blocks/logic/AdaptiveDrainLogic.java b/src/main/java/tconstruct/blocks/logic/AdaptiveDrainLogic.java index 5640787d..8db6e7ca 100644 --- a/src/main/java/tconstruct/blocks/logic/AdaptiveDrainLogic.java +++ b/src/main/java/tconstruct/blocks/logic/AdaptiveDrainLogic.java @@ -16,7 +16,7 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandler, IFacingLogic//, ISwitchableMaster +public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandler, IFacingLogic// , ISwitchableMaster { byte direction; @@ -50,7 +50,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl if (hasValidMaster() && canDrain(from, null)) { AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); - // TConstruct.logger.info("Found master"); + // TConstruct.logger.info("Found master"); return smeltery.drain(from, maxDrain, doDrain); } return null; diff --git a/src/main/java/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java b/src/main/java/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java index b7f1a8f3..6676019a 100644 --- a/src/main/java/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java +++ b/src/main/java/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java @@ -138,7 +138,8 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc { if (!worldObj.isRemote) { - //System.out.println("Notifying of change from "+new CoordTuple(x, y, z)); + // System.out.println("Notifying of change from "+new CoordTuple(x, + // y, z)); recheckStructure = true; } } @@ -294,21 +295,22 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc static final int pixelLayer = 162; - //Do the Monster Mash~ + // Do the Monster Mash~ public void distributeFluids () { - //Calculate liquids in each block + // Calculate liquids in each block int size = structure.getAirLayerSize(); - //HashMap blocks = new HashMap(); + // HashMap blocks = new + // HashMap(); for (FluidStack fluid : multitank.fluidlist) { - //Base calculations per liquid + // Base calculations per liquid LiquidData data = new LiquidData(fluid.amount, size); int baseY = structure.airCoords.get(0).y; int layerSize = structure.getAirLayerSize(); - //Calculate where to distribute liquids + // Calculate where to distribute liquids for (int i = 0; i < structure.airCoords.size(); i++) { LiquidDataInstance instance; @@ -326,32 +328,35 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc instance = airUpdates.get(coord); } - if (instance.openLayers() > 0) //This is capable of sending negative liquid sizes to blocks without the stopgap check + if (instance.openLayers() > 0) // This is capable of sending + // negative liquid sizes to + // blocks without the stopgap + // check { if (position > data.blocksWithExtra) { - //Calculate open layers + // Calculate open layers int open = data.layers - height + 1; - if (open < 1) //Temporary stopgap check + if (open < 1) // Temporary stopgap check continue; if (open > instance.openLayers()) open = instance.openLayers(); - //Copy fluid + // Copy fluid FluidStack newFluid = fluid.copy(); newFluid.amount = pixelLayer * open; instance.addFluid(open, newFluid); - //Subtract from total + // Subtract from total data.totalAmount -= newFluid.amount; if (data.totalAmount <= 0) break; } else if (position == data.blocksWithExtra && data.leftovers > 0) { - //Calculate open layers + // Calculate open layers int open = data.layers - height + 1; - if (open < 1) //Temporary stopgap check + if (open < 1) // Temporary stopgap check continue; boolean full = false; if (open > instance.openLayers()) @@ -360,33 +365,33 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc full = true; } - //Copy fluid + // Copy fluid FluidStack newFluid = fluid.copy(); newFluid.amount = pixelLayer * open; if (!full) newFluid.amount += data.leftovers; instance.addFluid(open, newFluid); - //Subtract from total + // Subtract from total data.totalAmount -= newFluid.amount; if (data.totalAmount <= 0) break; } else { - //Calculate open layers + // Calculate open layers int open = data.layers - height; - if (open < 1) //Temporary stopgap check + if (open < 1) // Temporary stopgap check continue; if (open > instance.openLayers()) open = instance.openLayers(); - //Copy fluid + // Copy fluid FluidStack newFluid = fluid.copy(); newFluid.amount = pixelLayer * open; instance.addFluid(open, newFluid); - //Subtract from total + // Subtract from total data.totalAmount -= newFluid.amount; if (data.totalAmount <= 0) break; @@ -395,7 +400,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc } } - //Distribute liquids to each block + // Distribute liquids to each block } protected void updateFluidBlocks () diff --git a/src/main/java/tconstruct/blocks/logic/AqueductLogic.java b/src/main/java/tconstruct/blocks/logic/AqueductLogic.java index 100dfe21..270ac45c 100644 --- a/src/main/java/tconstruct/blocks/logic/AqueductLogic.java +++ b/src/main/java/tconstruct/blocks/logic/AqueductLogic.java @@ -2,43 +2,27 @@ package tconstruct.blocks.logic; import net.minecraft.tileentity.TileEntity; -public class AqueductLogic extends TileEntity //implements ITankContainer +public class AqueductLogic extends TileEntity // implements ITankContainer { - /*@Override - public int fill (ForgeDirection from, FluidStack resource, boolean doFill) - { - return 0; - } - - @Override - public int fill (int tankIndex, FluidStack resource, boolean doFill) - { - return 0; - } - - @Override - public FluidStack drain (ForgeDirection from, int maxDrain, boolean doDrain) - { - return null; - } - - @Override - public FluidStack drain (int tankIndex, int maxDrain, boolean doDrain) - { - return null; - } - - @Override - public ILiquidTank[] getTanks (ForgeDirection direction) - { - return null; - } - - @Override - public ILiquidTank getTank (ForgeDirection direction, FluidStack type) - { - return null; - }*/ + /* + * @Override public int fill (ForgeDirection from, FluidStack resource, + * boolean doFill) { return 0; } + * + * @Override public int fill (int tankIndex, FluidStack resource, boolean + * doFill) { return 0; } + * + * @Override public FluidStack drain (ForgeDirection from, int maxDrain, + * boolean doDrain) { return null; } + * + * @Override public FluidStack drain (int tankIndex, int maxDrain, boolean + * doDrain) { return null; } + * + * @Override public ILiquidTank[] getTanks (ForgeDirection direction) { + * return null; } + * + * @Override public ILiquidTank getTank (ForgeDirection direction, + * FluidStack type) { return null; } + */ } diff --git a/src/main/java/tconstruct/blocks/logic/CastingBasinLogic.java b/src/main/java/tconstruct/blocks/logic/CastingBasinLogic.java index d6453d67..1d765def 100644 --- a/src/main/java/tconstruct/blocks/logic/CastingBasinLogic.java +++ b/src/main/java/tconstruct/blocks/logic/CastingBasinLogic.java @@ -43,19 +43,19 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl } @Override - public String getInvName () //Not a gui block + public String getInvName () // Not a gui block { return null; } @Override - public String getDefaultName () //Still not a gui block + public String getDefaultName () // Still not a gui block { return null; } @Override - public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) //Definitely not a gui block + public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) // Definitely not a gui block { return null; } @@ -68,7 +68,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl return this.capacity; } - public int updateCapacity () //Only used to initialize + public int updateCapacity () // Only used to initialize { int ret = TConstruct.ingotLiquidValue; @@ -156,7 +156,9 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl else if (resource.isFluidEqual(this.liquid)) { - if (resource.amount + this.liquid.amount >= this.capacity) //Start timer here + if (resource.amount + this.liquid.amount >= this.capacity) // Start + // timer + // here { int roomInTank = this.capacity - liquid.amount; if (doFill && roomInTank > 0) @@ -189,7 +191,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl } @Override - public void markDirty () //Isn't actually called? + public void markDirty () // Isn't actually called? { super.markDirty(); worldObj.markBlockRangeForRenderUpdate(xCoord, yCoord, zCoord, xCoord, yCoord, zCoord); @@ -220,7 +222,8 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl liquid.amount -= used; } - FluidStack drained = liquid.copy();//new FluidStack(liquid.itemID, used, liquid.itemMeta); + FluidStack drained = liquid.copy();// new FluidStack(liquid.itemID, + // used, liquid.itemMeta); drained.amount = used; // Reset liquid if emptied @@ -238,9 +241,9 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl @Override public int fill (ForgeDirection from, FluidStack resource, boolean doFill) { - //if (from == ForgeDirection.UP) + // if (from == ForgeDirection.UP) return fill(resource, doFill); - //return 0; + // return 0; } @Override @@ -303,7 +306,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl { if (castingDelay > 0) { - //TConstruct.logger.info("Casting"); + // TConstruct.logger.info("Casting"); castingDelay--; if (castingDelay == 0) castLiquid(); @@ -351,8 +354,9 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl { this.liquid = FluidStack.loadFluidStackFromNBT(tags.getCompoundTag("Fluid")); } - //FluidStack fluid = FluidStack.loadFluidStackFromNBT(nbt); - //this.liquid = new FluidStack(tags.getInteger("itemID"), tags.getInteger("amount"), tags.getInteger("itemMeta")); + // FluidStack fluid = FluidStack.loadFluidStackFromNBT(nbt); + // this.liquid = new FluidStack(tags.getInteger("itemID"), + // tags.getInteger("amount"), tags.getInteger("itemMeta")); else this.liquid = null; diff --git a/src/main/java/tconstruct/blocks/logic/CastingChannelLogic.java b/src/main/java/tconstruct/blocks/logic/CastingChannelLogic.java index abd1192e..e7b95de1 100644 --- a/src/main/java/tconstruct/blocks/logic/CastingChannelLogic.java +++ b/src/main/java/tconstruct/blocks/logic/CastingChannelLogic.java @@ -52,7 +52,8 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui if (this.pullingLiquids) pullLiquids(); } - //this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); + // this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, + // this.zCoord); if (ticks == 20) { if (recentlyFilledDelay != 0) @@ -122,7 +123,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui HashMap tankMap = this.getOutputs(); if (tankMap.size() <= 0) { - //TConstruct.logger.info("Nope, no connections to go to"); + // TConstruct.logger.info("Nope, no connections to go to"); return; } boolean yFilled = false; @@ -212,7 +213,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui HashMap tankMap = this.getOutputs(); if (tankMap.size() <= 0) { - //TConstruct.logger.info("Nope, no connections to go to"); + // TConstruct.logger.info("Nope, no connections to go to"); return; } boolean yFilled = false; @@ -628,7 +629,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui @Override public void setActive (boolean flag) { - //pullingLiquids = flag; + // pullingLiquids = flag; pullingLiquids = !pullingLiquids; } diff --git a/src/main/java/tconstruct/blocks/logic/CastingTableLogic.java b/src/main/java/tconstruct/blocks/logic/CastingTableLogic.java index 9535eded..62c1d543 100644 --- a/src/main/java/tconstruct/blocks/logic/CastingTableLogic.java +++ b/src/main/java/tconstruct/blocks/logic/CastingTableLogic.java @@ -1,8 +1,5 @@ package tconstruct.blocks.logic; -import tconstruct.TConstruct; -import tconstruct.library.crafting.CastingRecipe; -import tconstruct.library.util.IPattern; import mantle.blocks.abstracts.InventoryLogic; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; @@ -20,6 +17,9 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidTank; +import tconstruct.TConstruct; +import tconstruct.library.crafting.CastingRecipe; +import tconstruct.library.util.IPattern; public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFluidHandler, ISidedInventory { @@ -43,19 +43,19 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl } @Override - public String getInvName () //Not a gui block + public String getInvName () // Not a gui block { return null; } @Override - protected String getDefaultName () //Still not a gui block + protected String getDefaultName () // Still not a gui block { return null; } @Override - public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) //Definitely not a gui block + public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) // Definitely not a gui block { return null; } @@ -68,7 +68,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl return this.capacity; } - public int updateCapacity () //Only used to initialize + public int updateCapacity () // Only used to initialize { int ret = TConstruct.ingotLiquidValue; @@ -156,7 +156,9 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl else if (resource.isFluidEqual(this.liquid)) { - if (resource.amount + this.liquid.amount >= this.capacity) //Start timer here + if (resource.amount + this.liquid.amount >= this.capacity) // Start + // timer + // here { int roomInTank = this.capacity - liquid.amount; if (doFill && roomInTank > 0) @@ -189,7 +191,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl } @Override - public void markDirty () //Isn't actually called? + public void markDirty () // Isn't actually called? { super.markDirty(); worldObj.markBlockRangeForRenderUpdate(xCoord, yCoord, zCoord, xCoord, yCoord, zCoord); @@ -220,7 +222,8 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl liquid.amount -= used; } - FluidStack drained = liquid.copy();//new FluidStack(liquid.itemID, used, liquid.itemMeta); + FluidStack drained = liquid.copy();// new FluidStack(liquid.itemID, + // used, liquid.itemMeta); drained.amount = used; // Reset liquid if emptied @@ -238,9 +241,9 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl @Override public int fill (ForgeDirection from, FluidStack resource, boolean doFill) { - //if (from == ForgeDirection.UP) + // if (from == ForgeDirection.UP) return fill(resource, doFill); - //return 0; + // return 0; } @Override @@ -304,7 +307,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl { if (castingDelay > 0) { - //TConstruct.logger.info("Casting"); + // TConstruct.logger.info("Casting"); castingDelay--; if (castingDelay == 0) castLiquid(); @@ -425,7 +428,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl return false; } - + @Override public String getInventoryName () { diff --git a/src/main/java/tconstruct/blocks/logic/CraftingStationLogic.java b/src/main/java/tconstruct/blocks/logic/CraftingStationLogic.java index f36715d8..130737d9 100644 --- a/src/main/java/tconstruct/blocks/logic/CraftingStationLogic.java +++ b/src/main/java/tconstruct/blocks/logic/CraftingStationLogic.java @@ -16,7 +16,7 @@ import tconstruct.inventory.CraftingStationContainer; public class CraftingStationLogic extends InventoryLogic implements ISidedInventory { - public WeakReference chest; //TODO: These are prototypes + public WeakReference chest; // TODO: These are prototypes public WeakReference doubleChest; public WeakReference patternChest; public WeakReference furnace; @@ -25,7 +25,8 @@ public class CraftingStationLogic extends InventoryLogic implements ISidedInvent public CraftingStationLogic() { - super(17); //9 for crafting, 1 for output, 6 for extensions, 1 for plans + super(17); // 9 for crafting, 1 for output, 6 for extensions, 1 for + // plans } @Override @@ -60,7 +61,7 @@ public class CraftingStationLogic extends InventoryLogic implements ISidedInvent } } } - + return new CraftingStationContainer(inventoryplayer, this, x, y, z); } @@ -101,7 +102,7 @@ public class CraftingStationLogic extends InventoryLogic implements ISidedInvent { return true; } - + @Override public String getInventoryName () { diff --git a/src/main/java/tconstruct/blocks/logic/FaucetLogic.java b/src/main/java/tconstruct/blocks/logic/FaucetLogic.java index 1e77b517..85e915a7 100644 --- a/src/main/java/tconstruct/blocks/logic/FaucetLogic.java +++ b/src/main/java/tconstruct/blocks/logic/FaucetLogic.java @@ -103,7 +103,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi @Override public void setDirection (int side) { - //direction = (byte) side; + // direction = (byte) side; } @Override diff --git a/src/main/java/tconstruct/blocks/logic/FrypanLogic.java b/src/main/java/tconstruct/blocks/logic/FrypanLogic.java index 937e36d5..1a3befae 100644 --- a/src/main/java/tconstruct/blocks/logic/FrypanLogic.java +++ b/src/main/java/tconstruct/blocks/logic/FrypanLogic.java @@ -88,7 +88,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic fuel = fuelGague = (int) (getItemBurnTime(inventory[1]) * 2.5); if (fuel > 0) { - if (inventory[1].getItem().hasContainerItem()) //Fuel slot + if (inventory[1].getItem().hasContainerItem()) // Fuel slot { inventory[1] = new ItemStack(inventory[1].getItem().getContainerItem()); } @@ -137,7 +137,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic if (!canCook()) return; - for (int id = 2; id < 10; id++) //Check every slot + for (int id = 2; id < 10; id++) // Check every slot { if (canCook()) { @@ -146,7 +146,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic { int ids = 2; boolean placed = false; - while (ids < 10 && !placed) //Try to merge stacks first + while (ids < 10 && !placed) // Try to merge stacks first { if (inventory[ids] != null && inventory[ids].isItemEqual(result) && inventory[ids].stackSize < inventory[ids].getMaxStackSize()) { @@ -166,7 +166,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic } ids = 2; - while (!placed && ids < 10) //Place remaining in slot + while (!placed && ids < 10) // Place remaining in slot { if (inventory[ids] == null) { @@ -187,11 +187,11 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic { for (int id = 2; id < 10; id++) { - if (inventory[id] == null) //Nothing here! + if (inventory[id] == null) // Nothing here! continue; ItemStack result = getResultFor(inventory[id]); - if (result == null) //Doesn't cook into anything + if (result == null) // Doesn't cook into anything continue; for (int slotid = 2; slotid < 10; slotid++) @@ -214,7 +214,9 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic public ItemStack getResultFor (ItemStack stack) { ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(stack); - if (result != null && result.getItem() instanceof ItemFood) //Only valid for food + if (result != null && result.getItem() instanceof ItemFood) // Only + // valid for + // food return result.copy(); return null; @@ -304,14 +306,10 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic return true; } - /*@Override - public boolean canDropInventorySlot(int slot) - { - if (slot == 0) - return false; - else - return true; - }*/ + /* + * @Override public boolean canDropInventorySlot(int slot) { if (slot == 0) + * return false; else return true; } + */ @Override public void openInventory () diff --git a/src/main/java/tconstruct/blocks/logic/FurnaceLogic.java b/src/main/java/tconstruct/blocks/logic/FurnaceLogic.java index e6b6825f..c4f3f415 100644 --- a/src/main/java/tconstruct/blocks/logic/FurnaceLogic.java +++ b/src/main/java/tconstruct/blocks/logic/FurnaceLogic.java @@ -98,7 +98,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin fuel = fuelGague = (int) (getItemBurnTime(inventory[1])); if (fuel > 0) { - if (inventory[1].getItem().hasContainerItem()) //Fuel slot + if (inventory[1].getItem().hasContainerItem()) // Fuel slot { inventory[1] = new ItemStack(inventory[1].getItem().getContainerItem()); } @@ -169,7 +169,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin public boolean canSmelt () { - if (inventory[0] == null) //Nothing here! + if (inventory[0] == null) // Nothing here! return false; else { @@ -193,7 +193,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin public ItemStack getResultFor (ItemStack stack) { ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(stack); - if (result != null) //Only valid for food + if (result != null) // Only valid for food return result.copy(); return null; @@ -321,7 +321,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin @Deprecated public void setDirection (int side) { - //Nope! + // Nope! } @Override diff --git a/src/main/java/tconstruct/blocks/logic/LavaTankLogic.java b/src/main/java/tconstruct/blocks/logic/LavaTankLogic.java index 9b84944e..81d21b0f 100644 --- a/src/main/java/tconstruct/blocks/logic/LavaTankLogic.java +++ b/src/main/java/tconstruct/blocks/logic/LavaTankLogic.java @@ -58,7 +58,7 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler @Override public boolean canFill (ForgeDirection from, Fluid fluid) { - //return tank.fill(fluid, false) > 0; + // return tank.fill(fluid, false) > 0; return false; } @@ -78,17 +78,13 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler return new FluidTankInfo[] { new FluidTankInfo(fluid, tank.getCapacity()) }; } - /*@Override - public IFluidTank[] getTanks (ForgeDirection direction) - { - return new IFluidTank[] { tank }; - } - - @Override - public IFluidTank getTank (ForgeDirection direction, FluidStack type) - { - return tank; - }*/ + /* + * @Override public IFluidTank[] getTanks (ForgeDirection direction) { + * return new IFluidTank[] { tank }; } + * + * @Override public IFluidTank getTank (ForgeDirection direction, FluidStack + * type) { return tank; } + */ public float getFluidAmountScaled () { diff --git a/src/main/java/tconstruct/blocks/logic/PartBuilderLogic.java b/src/main/java/tconstruct/blocks/logic/PartBuilderLogic.java index 0812d1ba..0f1dd79f 100644 --- a/src/main/java/tconstruct/blocks/logic/PartBuilderLogic.java +++ b/src/main/java/tconstruct/blocks/logic/PartBuilderLogic.java @@ -1,9 +1,5 @@ package tconstruct.blocks.logic; -import tconstruct.inventory.PartCrafterChestContainer; -import tconstruct.inventory.PartCrafterContainer; -import tconstruct.library.crafting.PatternBuilder; -import tconstruct.library.util.IPattern; import mantle.blocks.abstracts.InventoryLogic; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; @@ -12,6 +8,10 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import tconstruct.inventory.PartCrafterChestContainer; +import tconstruct.inventory.PartCrafterContainer; +import tconstruct.library.crafting.PatternBuilder; +import tconstruct.library.util.IPattern; public class PartBuilderLogic extends InventoryLogic implements ISidedInventory { @@ -49,7 +49,7 @@ public class PartBuilderLogic extends InventoryLogic implements ISidedInventory return new PartCrafterContainer(inventoryplayer, this); } - //Called when emptying a slot, not when another item is placed in it + // Called when emptying a slot, not when another item is placed in it public ItemStack decrStackSize (int slotID, int quantity) { ItemStack returnStack = super.decrStackSize(slotID, quantity); @@ -71,7 +71,8 @@ public class PartBuilderLogic extends InventoryLogic implements ISidedInventory int decrease = cost / value; if (cost % value != 0) decrease++; - super.decrStackSize(2, decrease); //Call super to avoid crafting again + super.decrStackSize(2, decrease); // Call super to avoid + // crafting again } } @@ -96,7 +97,8 @@ public class PartBuilderLogic extends InventoryLogic implements ISidedInventory int decrease = cost / value; if (cost % value != 0) decrease++; - super.decrStackSize(3, decrease); //Call super to avoid crafting again + super.decrStackSize(3, decrease); // Call super to avoid + // crafting again } } @@ -110,7 +112,7 @@ public class PartBuilderLogic extends InventoryLogic implements ISidedInventory buildBottomPart(); } - //Called when a slot has something placed into it. + // Called when a slot has something placed into it. public void setInventorySlotContents (int slot, ItemStack itemstack) { super.setInventorySlotContents(slot, itemstack); diff --git a/src/main/java/tconstruct/blocks/logic/PatternChestLogic.java b/src/main/java/tconstruct/blocks/logic/PatternChestLogic.java index fd304fa0..ee979a79 100644 --- a/src/main/java/tconstruct/blocks/logic/PatternChestLogic.java +++ b/src/main/java/tconstruct/blocks/logic/PatternChestLogic.java @@ -1,10 +1,10 @@ package tconstruct.blocks.logic; -import tconstruct.inventory.PatternChestContainer; import mantle.blocks.abstracts.InventoryLogic; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.world.World; +import tconstruct.inventory.PatternChestContainer; public class PatternChestLogic extends InventoryLogic { @@ -29,7 +29,7 @@ public class PatternChestLogic extends InventoryLogic { return new PatternChestContainer(inventoryplayer, this); } - + @Override public String getInventoryName () { diff --git a/src/main/java/tconstruct/blocks/logic/RedwireLogic.java b/src/main/java/tconstruct/blocks/logic/RedwireLogic.java index 406e99da..05d0825d 100644 --- a/src/main/java/tconstruct/blocks/logic/RedwireLogic.java +++ b/src/main/java/tconstruct/blocks/logic/RedwireLogic.java @@ -15,29 +15,24 @@ public class RedwireLogic extends TileEntity public void readCustomNBT (NBTTagCompound tags) { - /*hasMaster = tags.getBoolean("HasMaster"); - if (hasMaster) - { - int xCenter = tags.getInteger("xCenter"); - int yCenter = tags.getInteger("yCenter"); - int zCenter = tags.getInteger("zCenter"); - master = new CoordTuple(xCenter, yCenter, zCenter); - masterID = tags.getShort("MasterID"); - masterMeat = tags.getByte("masterMeat"); - }*/ + /* + * hasMaster = tags.getBoolean("HasMaster"); if (hasMaster) { int + * xCenter = tags.getInteger("xCenter"); int yCenter = + * tags.getInteger("yCenter"); int zCenter = tags.getInteger("zCenter"); + * master = new CoordTuple(xCenter, yCenter, zCenter); masterID = + * tags.getShort("MasterID"); masterMeat = tags.getByte("masterMeat"); } + */ } public void writeCustomNBT (NBTTagCompound tags) { - /*tags.setBoolean("HasMaster", hasMaster); - if (hasMaster) - { - tags.setInteger("xCenter", master.x); - tags.setInteger("yCenter", master.y); - tags.setInteger("zCenter", master.z); - tags.setShort("MasterID", masterID); - tags.setByte("masterMeat", masterMeat); - }*/ + /* + * tags.setBoolean("HasMaster", hasMaster); if (hasMaster) { + * tags.setInteger("xCenter", master.x); tags.setInteger("yCenter", + * master.y); tags.setInteger("zCenter", master.z); + * tags.setShort("MasterID", masterID); tags.setByte("masterMeat", + * masterMeat); } + */ } @Override diff --git a/src/main/java/tconstruct/blocks/logic/SmelteryDrainLogic.java b/src/main/java/tconstruct/blocks/logic/SmelteryDrainLogic.java index a55be862..c0e57c8c 100644 --- a/src/main/java/tconstruct/blocks/logic/SmelteryDrainLogic.java +++ b/src/main/java/tconstruct/blocks/logic/SmelteryDrainLogic.java @@ -69,13 +69,13 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl public boolean canFill (ForgeDirection from, Fluid fluid) { return true; - //return from == getForgeDirection();//.getOpposite(); + // return from == getForgeDirection();//.getOpposite(); } @Override public boolean canDrain (ForgeDirection from, Fluid fluid) { - // Check that the drain is coming from the from the front of the block + // Check that the drain is coming from the from the front of the block // and that the fluid to be drained is in the smeltery. boolean containsFluid = fluid == null; if (fluid != null) @@ -90,7 +90,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl } } } - //return from == getForgeDirection().getOpposite() && containsFluid; + // return from == getForgeDirection().getOpposite() && containsFluid; return containsFluid; } @@ -101,7 +101,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl { SmelteryLogic smeltery = (SmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); return smeltery.getMultiTankInfo(); - //return new FluidTankInfo[] { smeltery.getInfo() }; + // return new FluidTankInfo[] { smeltery.getInfo() }; } return null; } diff --git a/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java b/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java index 81a9b6b5..89270415 100644 --- a/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java +++ b/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java @@ -270,8 +270,9 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci /* Updating */ public void updateEntity () { - /*if (worldObj.isRemote) - return;*/ + /* + * if (worldObj.isRemote) return; + */ tick++; if (tick % 4 == 0) @@ -381,13 +382,15 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci private void handleItemEntity (EntityItem item) { - // Clients like to play merry hell with this and cause breakage (we update their inv on syncs) + // Clients like to play merry hell with this and cause breakage (we + // update their inv on syncs) if (worldObj.isRemote) return; item.age = 0; ItemStack istack = item.getEntityItem(); - if (istack == null || istack.stackSize <= 0) //Probably most definitely not necessary + if (istack == null || istack.stackSize <= 0) // Probably most definitely + // not necessary return; int maxSlot = this.getSizeInventory(); @@ -481,12 +484,13 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci return false; currentLiquid += liquid.amount; - //TConstruct.logger.info("Current liquid: "+currentLiquid); + // TConstruct.logger.info("Current liquid: "+currentLiquid); boolean added = false; for (int i = 0; i < moltenMetal.size(); i++) { FluidStack l = moltenMetal.get(i); - //if (l.itemID == liquid.itemID && l.itemMeta == liquid.itemMeta) + // if (l.itemID == liquid.itemID && l.itemMeta == + // liquid.itemMeta) if (l.isFluidEqual(liquid)) { l.amount += liquid.amount; @@ -559,7 +563,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci } } - void updateFuelGague () //TODO: Call this method when the GUI is opened + void updateFuelGague () // TODO: Call this method when the GUI is opened { if (activeLavaTank == null || useTime > 0) return; @@ -611,18 +615,21 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci TileEntity newTankContainer = worldObj.getTileEntity(possibleTank.x, possibleTank.y, possibleTank.z); if (newTankContainer instanceof IFluidHandler) { - //TConstruct.logger.info("Tank: "+possibleTank.toString()); + // TConstruct.logger.info("Tank: "+possibleTank.toString()); FluidStack newliquid = ((IFluidHandler) newTankContainer).drain(ForgeDirection.UNKNOWN, 150, false); if (newliquid != null && newliquid.getFluid().getBlock() == Blocks.lava && newliquid.amount > 0) { - //TConstruct.logger.info("Tank: "+possibleTank.toString()); + // TConstruct.logger.info("Tank: "+possibleTank.toString()); foundTank = true; activeLavaTank = possibleTank; iter = lavaTanks.size(); - /*IFluidTank newTank = ((IFluidHandler) newTankContainer).getTank(ForgeDirection.UNKNOWN, liquid); - liquid = newTank.getFluid(); - int capacity = newTank.getCapacity();*/ + /* + * IFluidTank newTank = ((IFluidHandler) + * newTankContainer).getTank(ForgeDirection.UNKNOWN, + * liquid); liquid = newTank.getFluid(); int + * capacity = newTank.getCapacity(); + */ FluidTankInfo[] info = ((IFluidHandler) tankContainer).getTankInfo(ForgeDirection.DOWN); liquid = info[0].fluid; int capacity = info[0].capacity; @@ -642,7 +649,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci if (iter >= lavaTanks.size()) foundTank = true; } - //TConstruct.logger.info("Searching for tank, size: "+lavaTanks.size()); + // TConstruct.logger.info("Searching for tank, size: "+lavaTanks.size()); } } } @@ -653,13 +660,11 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci } /* Inventory */ - /*public int getMaxStackStackSize (ItemStack stack) - { - FluidStack liquid = getResultFor(stack); - if (liquid == null) - return 0; - return liquid.amount; - }*/ + /* + * public int getMaxStackStackSize (ItemStack stack) { FluidStack liquid = + * getResultFor(stack); if (liquid == null) return 0; return liquid.amount; + * } + */ public int getInventoryStackLimit () { @@ -672,15 +677,16 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci updateEntity(); super.markDirty(); needsUpdate = true; - //worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - //worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord); + // worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + // worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord); } - /*@Override - public void setInventorySlotContents (int slot, ItemStack itemstack) - { - inventory[slot] = itemstack != null ? itemstack.splitStack(1) : null; //May include unintended side effects. Possible fix for max stack size of 1? - }*/ + /* + * @Override public void setInventorySlotContents (int slot, ItemStack + * itemstack) { inventory[slot] = itemstack != null ? + * itemstack.splitStack(1) : null; //May include unintended side effects. + * Possible fix for max stack size of 1? } + */ /* Multiblock */ @Override @@ -745,7 +751,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci checkValidStructure(x + 1, y, z); } - //Not valid, sorry + // Not valid, sorry } public void checkValidStructure (int x, int y, int z) @@ -759,7 +765,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci checkLayers += recurseStructureDown(x, y - 1, z, 0); } - //maxLiquid = capacity * 20000; + // maxLiquid = capacity * 20000; if (tempValidStructure != validStructure || checkLayers != this.layers) { @@ -785,7 +791,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci lavaTanks.clear(); Block block; - //Check inside + // Check inside for (int xPos = x - 1; xPos <= x + 1; xPos++) { for (int zPos = z - 1; zPos <= z + 1; zPos++) @@ -796,7 +802,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci } } - //Check outer layer + // Check outer layer for (int xPos = x - 1; xPos <= x + 1; xPos++) { numBricks += checkBricks(xPos, y, z - 2); @@ -818,7 +824,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci public int recurseStructureUp (int x, int y, int z, int count) { numBricks = 0; - //Check inside + // Check inside for (int xPos = x - 1; xPos <= x + 1; xPos++) { for (int zPos = z - 1; zPos <= z + 1; zPos++) @@ -829,7 +835,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci } } - //Check outer layer + // Check outer layer for (int xPos = x - 1; xPos <= x + 1; xPos++) { numBricks += checkBricks(xPos, y, z - 2); @@ -852,7 +858,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci public int recurseStructureDown (int x, int y, int z, int count) { numBricks = 0; - //Check inside + // Check inside for (int xPos = x - 1; xPos <= x + 1; xPos++) { for (int zPos = z - 1; zPos <= z + 1; zPos++) @@ -868,7 +874,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci } } - //Check outer layer + // Check outer layer for (int xPos = x - 1; xPos <= x + 1; xPos++) { numBricks += checkBricks(xPos, y, z - 2); @@ -908,8 +914,9 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci return count; } - /* Returns whether the brick is a lava tank or not. - * Increments bricks, sets them as part of the structure, and adds tanks to the list. + /* + * Returns whether the brick is a lava tank or not. Increments bricks, sets + * them as part of the structure, and adds tanks to the list. */ int checkBricks (int x, int y, int z) { @@ -978,7 +985,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci FluidStack liq = liquid.copy(); if (doDrain) { - //liquid = null; + // liquid = null; moltenMetal.remove(liquid); worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); currentLiquid = 0; @@ -1007,7 +1014,9 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci @Override public int fill (FluidStack resource, boolean doFill) { - if (resource != null && currentLiquid < maxLiquid)//resource.amount + currentLiquid < maxLiquid) + if (resource != null && currentLiquid < maxLiquid)// resource.amount + + // currentLiquid < + // maxLiquid) { if (resource.amount + currentLiquid > maxLiquid) resource.amount = maxLiquid - currentLiquid; @@ -1074,7 +1083,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci inventory = new ItemStack[layers * 9]; super.readFromNBT(tags); - //validStructure = tags.getBoolean("ValidStructure"); + // validStructure = tags.getBoolean("ValidStructure"); internalTemp = tags.getInteger("InternalTemp"); inUse = tags.getBoolean("InUse"); @@ -1101,8 +1110,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci if (fluid != null) moltenMetal.add(fluid); } - //adjustLayers(layers, true); - //checkValidPlacement(); + // adjustLayers(layers, true); + // checkValidPlacement(); } @Override @@ -1110,7 +1119,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci { super.writeToNBT(tags); - //tags.setBoolean("ValidStructure", validStructure); + // tags.setBoolean("ValidStructure", validStructure); tags.setInteger("InternalTemp", internalTemp); tags.setBoolean("InUse", inUse); diff --git a/src/main/java/tconstruct/blocks/logic/StencilTableLogic.java b/src/main/java/tconstruct/blocks/logic/StencilTableLogic.java index 337eaa63..a4eec56c 100644 --- a/src/main/java/tconstruct/blocks/logic/StencilTableLogic.java +++ b/src/main/java/tconstruct/blocks/logic/StencilTableLogic.java @@ -1,8 +1,5 @@ package tconstruct.blocks.logic; -import tconstruct.common.TContent; -import tconstruct.common.TRepo; -import tconstruct.inventory.PatternShaperContainer; import mantle.blocks.abstracts.InventoryLogic; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; @@ -10,6 +7,8 @@ import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import tconstruct.common.TRepo; +import tconstruct.inventory.PatternShaperContainer; public class StencilTableLogic extends InventoryLogic implements ISidedInventory { @@ -35,24 +34,25 @@ public class StencilTableLogic extends InventoryLogic implements ISidedInventory return new PatternShaperContainer(inventoryplayer, this); } - /*@Override - public void markDirty() - { - if (inventory[0] == null) - inventory[1] = null; - super.markDirty(); - }*/ + /* + * @Override public void markDirty() { if (inventory[0] == null) + * inventory[1] = null; super.markDirty(); } + */ @Override public void setInventorySlotContents (int slot, ItemStack itemstack) { super.setInventorySlotContents(slot, itemstack); - if (slot == 0 && itemstack != null && itemstack.getItem() == TRepo.blankPattern)//instanceof tconstruct.items.Pattern) + if (slot == 0 && itemstack != null && itemstack.getItem() == TRepo.blankPattern)// instanceof + // tconstruct.items.Pattern) { if (itemstack.getItemDamage() == 0) setInventorySlotContents(1, new ItemStack(TRepo.woodPattern, 1, 1)); - /*else if (itemstack.getItemDamage() == 1) - setInventorySlotContents(1, new ItemStack(TContent.metalPattern, 1, 0));*/ + /* + * else if (itemstack.getItemDamage() == 1) + * setInventorySlotContents(1, new ItemStack(TContent.metalPattern, + * 1, 0)); + */ } } @@ -121,7 +121,7 @@ public class StencilTableLogic extends InventoryLogic implements ISidedInventory { return false; } - + @Override public String getInventoryName () { diff --git a/src/main/java/tconstruct/blocks/logic/TankAirLogic.java b/src/main/java/tconstruct/blocks/logic/TankAirLogic.java index c71f9405..60dc78e5 100644 --- a/src/main/java/tconstruct/blocks/logic/TankAirLogic.java +++ b/src/main/java/tconstruct/blocks/logic/TankAirLogic.java @@ -32,8 +32,10 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide public void overrideFluids (ArrayList fluids) { - /*multitank.overrideFluids(fluids); - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);*/ + /* + * multitank.overrideFluids(fluids); worldObj.markBlockForUpdate(xCoord, + * yCoord, zCoord); + */ } public boolean hasItem () @@ -54,25 +56,26 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide @Override public void setInventorySlotContents (int slot, ItemStack itemstack) { - /*inventory[slot] = itemstack; - if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) - { - itemstack.stackSize = getInventoryStackLimit(); - worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, itemstack.getItemDamage(), 3); - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - }*/ + /* + * inventory[slot] = itemstack; if (itemstack != null && + * itemstack.stackSize > getInventoryStackLimit()) { itemstack.stackSize + * = getInventoryStackLimit(); + * worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, + * itemstack.getItemDamage(), 3); worldObj.markBlockForUpdate(xCoord, + * yCoord, zCoord); } + */ } @Override public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) { - return null; //Not a gui block + return null; // Not a gui block } @Override protected String getDefaultName () { - return null; //Not a gui block + return null; // Not a gui block } @Override @@ -84,20 +87,21 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide @Override public void notifyMasterOfChange () { - //Probably not useful here + // Probably not useful here } @Override public boolean setPotentialMaster (IMasterLogic master, World world, int xMaster, int yMaster, int zMaster) { - return false; //Master should be verified right after placement + return false; // Master should be verified right after placement } @Override public boolean verifyMaster (IMasterLogic logic, World world, int xMaster, int yMaster, int zMaster) { - /*if (master != null) //Is this even needed? - return false;*/ + /* + * if (master != null) //Is this even needed? return false; + */ master = new CoordTuple(xMaster, yMaster, zMaster); return true; @@ -127,19 +131,17 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide return false; } - /*@Override - public boolean canUpdate() - { - return false; - }*/ + /* + * @Override public boolean canUpdate() { return false; } + */ - //DELETE + // DELETE public void updateEntity () { worldObj.setBlockToAir(xCoord, yCoord, zCoord); } - //Keep TE regardless of metadata + // Keep TE regardless of metadata public boolean shouldRefresh (int oldID, int newID, int oldMeta, int newMeta, World world, int x, int y, int z) { return oldID != newID; diff --git a/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java b/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java index fb04371f..b705bb9f 100644 --- a/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java +++ b/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java @@ -13,7 +13,7 @@ import net.minecraft.tileentity.TileEntity; /** * * @author fuj1n - * + * */ public class TileEntityLandmine extends TileEntity implements IInventory { @@ -232,15 +232,16 @@ public class TileEntityLandmine extends TileEntity implements IInventory @Override public boolean isItemValidForSlot (int i, ItemStack itemstack) { - //Should automatic camo insertion be allowed. + // Should automatic camo insertion be allowed. if (i == 3) { return false; } else { - //Here for mDiyo to decide if he wants automation for insertion/extraction of the items to be an option. - //Would be useful for building automated mine laying machines. + // Here for mDiyo to decide if he wants automation for + // insertion/extraction of the items to be an option. + // Would be useful for building automated mine laying machines. return false; } } diff --git a/src/main/java/tconstruct/blocks/logic/ToolStationLogic.java b/src/main/java/tconstruct/blocks/logic/ToolStationLogic.java index e7126767..2b8cbccb 100644 --- a/src/main/java/tconstruct/blocks/logic/ToolStationLogic.java +++ b/src/main/java/tconstruct/blocks/logic/ToolStationLogic.java @@ -1,7 +1,5 @@ package tconstruct.blocks.logic; -import tconstruct.inventory.ToolStationContainer; -import tconstruct.library.crafting.ToolBuilder; import mantle.blocks.abstracts.InventoryLogic; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; @@ -9,6 +7,8 @@ import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; +import tconstruct.inventory.ToolStationContainer; +import tconstruct.library.crafting.ToolBuilder; /* Simple class for storing items in the block */ diff --git a/src/main/java/tconstruct/blocks/slime/SlimeGel.java b/src/main/java/tconstruct/blocks/slime/SlimeGel.java index 5010aff8..4da954b0 100644 --- a/src/main/java/tconstruct/blocks/slime/SlimeGel.java +++ b/src/main/java/tconstruct/blocks/slime/SlimeGel.java @@ -73,7 +73,7 @@ public class SlimeGel extends TConstructBlock { par3List.add(new ItemStack(b, 1, 0)); par3List.add(new ItemStack(b, 1, 1)); - //par3List.add(new ItemStack(par1, 1, 2)); + // par3List.add(new ItemStack(par1, 1, 2)); } public boolean canSustainLeaves (World world, int x, int y, int z) diff --git a/src/main/java/tconstruct/blocks/slime/SlimeGrass.java b/src/main/java/tconstruct/blocks/slime/SlimeGrass.java index 1a946020..5424aa56 100644 --- a/src/main/java/tconstruct/blocks/slime/SlimeGrass.java +++ b/src/main/java/tconstruct/blocks/slime/SlimeGrass.java @@ -24,7 +24,8 @@ import cpw.mods.fml.relauncher.SideOnly; public class SlimeGrass extends MantleBlock { - public String[] textureNames = { "slimegrass_green_top", "slimedirt_blue", "slimegrass_green_blue_side", "slimegrass_green_dirt_side" };//green, purple + public String[] textureNames = { "slimegrass_green_top", "slimedirt_blue", "slimegrass_green_blue_side", "slimegrass_green_dirt_side" };// green, + // purple public IIcon[] icons; public SlimeGrass() @@ -38,11 +39,11 @@ public class SlimeGrass extends MantleBlock @Override public int damageDropped (int meta) { - if (meta == 1) //dirt + if (meta == 1) // dirt return 0; else - //slime dirt + // slime dirt return 5; } diff --git a/src/main/java/tconstruct/blocks/slime/SlimeLeaves.java b/src/main/java/tconstruct/blocks/slime/SlimeLeaves.java index 13fc06b6..19d6f3ca 100644 --- a/src/main/java/tconstruct/blocks/slime/SlimeLeaves.java +++ b/src/main/java/tconstruct/blocks/slime/SlimeLeaves.java @@ -103,7 +103,8 @@ public class SlimeLeaves extends BlockLeaves } /** - * Drops the block items with a specified chance of dropping the specified items + * Drops the block items with a specified chance of dropping the specified + * items */ public void dropBlockAsItemWithChance (World world, int x, int y, int z, int meta, float chance, int fortune) { @@ -111,10 +112,9 @@ public class SlimeLeaves extends BlockLeaves { int dropChance = 35; - /*if ((meta & 3) == 3) - { - j1 = 40; - }*/ + /* + * if ((meta & 3) == 3) { j1 = 40; } + */ if (fortune > 0) { diff --git a/src/main/java/tconstruct/blocks/slime/SlimeTallGrass.java b/src/main/java/tconstruct/blocks/slime/SlimeTallGrass.java index 22095dbe..96fcbbe5 100644 --- a/src/main/java/tconstruct/blocks/slime/SlimeTallGrass.java +++ b/src/main/java/tconstruct/blocks/slime/SlimeTallGrass.java @@ -39,10 +39,9 @@ public class SlimeTallGrass extends BlockBush implements IShearable */ public IIcon getIcon (int side, int meta) { - /*if (meta >= this.iconArray.length) - { - meta = 0; - }*/ + /* + * if (meta >= this.iconArray.length) { meta = 0; } + */ return this.iconArray[meta]; } @@ -56,7 +55,8 @@ public class SlimeTallGrass extends BlockBush implements IShearable } /** - * Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' (inclusive). + * Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' + * (inclusive). */ public int quantityDroppedWithBonus (int par1, Random par2Random) { diff --git a/src/main/java/tconstruct/blocks/traps/Landmine.java b/src/main/java/tconstruct/blocks/traps/Landmine.java index f13e0297..8f7dfc95 100644 --- a/src/main/java/tconstruct/blocks/traps/Landmine.java +++ b/src/main/java/tconstruct/blocks/traps/Landmine.java @@ -64,8 +64,8 @@ public class Landmine extends MantleBlock } /** - * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been - * cleared to be reused) + * Returns a bounding box from the pool of bounding boxes (this means this + * box can change after the pool has been cleared to be reused) */ public AxisAlignedBB getCollisionBoundingBoxFromPool (World par1World, int par2, int par3, int par4) { @@ -73,8 +73,9 @@ public class Landmine extends MantleBlock } /** - * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two - * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. + * Is this block (a) opaque and (b) a full 1m cube? This determines whether + * or not to render the shared face of two adjacent blocks and also whether + * the player can attach torches, redstone wire, etc to this block. */ public boolean isOpaqueCube () { @@ -82,7 +83,8 @@ public class Landmine extends MantleBlock } /** - * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) + * If this block doesn't render as an ordinary block it will return False + * (examples: signs, buttons, stairs, etc) */ public boolean renderAsNormalBlock () { @@ -95,7 +97,8 @@ public class Landmine extends MantleBlock } /** - * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z + * Checks to see if its valid to put this block at the specified + * coordinates. Args: world, x, y, z */ public boolean canPlaceBlockAt (World par1World, int par2, int par3, int par4) { @@ -103,8 +106,9 @@ public class Landmine extends MantleBlock } /** - * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are - * their own) Args: x, y, z, neighbor blockID + * Lets the block know when one of its neighbor changes. Doesn't know which + * neighbor changed (coordinates passed are their own) Args: x, y, z, + * neighbor blockID */ public void onNeighborBlockChange (World par1World, int par2, int par3, int par4, int par5) { @@ -118,7 +122,7 @@ public class Landmine extends MantleBlock if (var6) { this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); - //par1World.setBlock(par2, par3, par4, 0); + // par1World.setBlock(par2, par3, par4, 0); } } @@ -137,7 +141,8 @@ public class Landmine extends MantleBlock } /** - * Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity + * Triggered whenever an entity collides with this block (enters into the + * block). Args: world, x, y, z, entity */ public void onEntityCollidedWithBlock (World par1World, int par2, int par3, int par4, Entity par5Entity) { @@ -151,7 +156,8 @@ public class Landmine extends MantleBlock } /** - * Checks if there are mobs on the plate. If a mob is on the plate and it is off, it turns it on, and vice versa. + * Checks if there are mobs on the plate. If a mob is on the plate and it is + * off, it turns it on, and vice versa. */ private void setStateIfMobInteractsWithPlate (World world, int posX, int posY, int posZ) { @@ -176,13 +182,14 @@ public class Landmine extends MantleBlock (double) ((float) (posZ + 1) - var7))); } - /*if (this.triggerMobType == EnumCreatureType.players) - { - var8 = world.getEntitiesWithinAABB( - EntityPlayer.class, - AxisAlignedBB.getAABBPool().getAABB((double) ((float) posX + var7), (double) posY, (double) ((float) posZ + var7), (double) ((float) (posX + 1) - var7), (double) posY + 0.25D, - (double) ((float) (posZ + 1) - var7))); - }*/ + /* + * if (this.triggerMobType == EnumCreatureType.players) { var8 = + * world.getEntitiesWithinAABB( EntityPlayer.class, + * AxisAlignedBB.getAABBPool().getAABB((double) ((float) posX + var7), + * (double) posY, (double) ((float) posZ + var7), (double) ((float) + * (posX + 1) - var7), (double) posY + 0.25D, (double) ((float) (posZ + + * 1) - var7))); } + */ if (!var8.isEmpty()) { @@ -204,30 +211,35 @@ public class Landmine extends MantleBlock { WorldHelper.setBlockToAir(world, posX, posY, posZ); world.createExplosion((Entity) null, posX, posY, posZ, 2.0F, true); - /*par1World.setBlockMetadataWithNotify(posX, posY, posZ, 1); - par1World.notifyBlocksOfNeighborChange(posX, posY, posZ, this.blockID); - par1World.notifyBlocksOfNeighborChange(posX, posY - 1, posZ, this.blockID); - par1World.markBlockRangeForRenderUpdate(posX, posY, posZ, posX, posY, posZ); - par1World.playSoundEffect((double)posX + 0.5D, (double)posY + 0.1D, (double)posZ + 0.5D, "random.click", 0.3F, 0.6F);*/ + /* + * par1World.setBlockMetadataWithNotify(posX, posY, posZ, 1); + * par1World.notifyBlocksOfNeighborChange(posX, posY, posZ, + * this.blockID); par1World.notifyBlocksOfNeighborChange(posX, posY + * - 1, posZ, this.blockID); + * par1World.markBlockRangeForRenderUpdate(posX, posY, posZ, posX, + * posY, posZ); par1World.playSoundEffect((double)posX + 0.5D, + * (double)posY + 0.1D, (double)posZ + 0.5D, "random.click", 0.3F, + * 0.6F); + */ } - /*if (!var6 && var5) - { - par1World.setBlockMetadataWithNotify(posX, posY, posZ, 0); - par1World.notifyBlocksOfNeighborChange(posX, posY, posZ, this.blockID); - par1World.notifyBlocksOfNeighborChange(posX, posY - 1, posZ, this.blockID); - par1World.markBlockRangeForRenderUpdate(posX, posY, posZ, posX, posY, posZ); - par1World.playSoundEffect((double)posX + 0.5D, (double)posY + 0.1D, (double)posZ + 0.5D, "random.click", 0.3F, 0.5F); - } - - if (var6) - { - par1World.scheduleBlockUpdate(posX, posY, posZ, this.blockID, this.tickRate()); - }*/ + /* + * if (!var6 && var5) { par1World.setBlockMetadataWithNotify(posX, posY, + * posZ, 0); par1World.notifyBlocksOfNeighborChange(posX, posY, posZ, + * this.blockID); par1World.notifyBlocksOfNeighborChange(posX, posY - 1, + * posZ, this.blockID); par1World.markBlockRangeForRenderUpdate(posX, + * posY, posZ, posX, posY, posZ); par1World.playSoundEffect((double)posX + * + 0.5D, (double)posY + 0.1D, (double)posZ + 0.5D, "random.click", + * 0.3F, 0.5F); } + * + * if (var6) { par1World.scheduleBlockUpdate(posX, posY, posZ, + * this.blockID, this.tickRate()); } + */ } /** - * ejects contained items into the world, and notifies neighbours of an update, as appropriate + * ejects contained items into the world, and notifies neighbours of an + * update, as appropriate */ public void breakBlock (World par1World, int par2, int par3, int par4, Block par5, int par6) { @@ -241,7 +253,8 @@ public class Landmine extends MantleBlock } /** - * Updates the blocks bounds based on its current state. Args: world, x, y, z + * Updates the blocks bounds based on its current state. Args: world, x, y, + * z */ public void setBlockBoundsBasedOnState (IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { @@ -270,8 +283,8 @@ public class Landmine extends MantleBlock } /** - * Returns the mobility information of the block, 0 = free, 1 = can't push but can move over, 2 = total immobility - * and stop pistons + * Returns the mobility information of the block, 0 = free, 1 = can't push + * but can move over, 2 = total immobility and stop pistons */ public int getMobilityFlag () { diff --git a/src/main/java/tconstruct/blocks/traps/Punji.java b/src/main/java/tconstruct/blocks/traps/Punji.java index fc957be0..304ba889 100644 --- a/src/main/java/tconstruct/blocks/traps/Punji.java +++ b/src/main/java/tconstruct/blocks/traps/Punji.java @@ -50,8 +50,9 @@ public class Punji extends MantleBlock @Override public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int par6, float hitX, float hitY, float hitZ) { - /*if (world.isRemote) - return false;*/ + /* + * if (world.isRemote) return false; + */ int meta = world.getBlockMetadata(x, y, z); if (meta < 4) @@ -81,8 +82,9 @@ public class Punji extends MantleBlock } /** - * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two - * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. + * Is this block (a) opaque and (b) a full 1m cube? This determines whether + * or not to render the shared face of two adjacent blocks and also whether + * the player can attach torches, redstone wire, etc to this block. */ public boolean isOpaqueCube () { @@ -90,7 +92,8 @@ public class Punji extends MantleBlock } /** - * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) + * If this block doesn't render as an ordinary block it will return False + * (examples: signs, buttons, stairs, etc) */ public boolean renderAsNormalBlock () { diff --git a/src/main/java/tconstruct/client/CustomBowRenderer.java b/src/main/java/tconstruct/client/CustomBowRenderer.java index 07253f6e..9b5daec9 100644 --- a/src/main/java/tconstruct/client/CustomBowRenderer.java +++ b/src/main/java/tconstruct/client/CustomBowRenderer.java @@ -54,7 +54,7 @@ public class CustomBowRenderer implements IItemRenderer block = BlockUtils.getBlockFromItem(stack.getItem()); } - IIcon icon = null; //living.getItemIcon(stack, renderPass); + IIcon icon = null; // living.getItemIcon(stack, renderPass); if (living instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) living; diff --git a/src/main/java/tconstruct/client/CustomFont.java b/src/main/java/tconstruct/client/CustomFont.java index 938ce882..cc5f28be 100644 --- a/src/main/java/tconstruct/client/CustomFont.java +++ b/src/main/java/tconstruct/client/CustomFont.java @@ -19,9 +19,9 @@ import org.lwjgl.opengl.GL11; /** * * @author TheObliterator - * - * A class to create and draw true type - * fonts onto the Minecraft game engine. + * + * A class to create and draw true type fonts onto the Minecraft game + * engine. */ public class CustomFont { @@ -33,15 +33,17 @@ public class CustomFont private FontMetrics metrics; /** - * Instantiates the font, filling in default start - * and end character parameters. + * Instantiates the font, filling in default start and end character + * parameters. * - * 'new CustomFont(ModLoader.getMinecraftInstance(), - * "Arial", 12); + * 'new CustomFont(ModLoader.getMinecraftInstance(), "Arial", 12); * - * @param mc The Minecraft instance for the font to be bound to. - * @param fontName The name of the font to be drawn. - * @param size The size of the font to be drawn. + * @param mc + * The Minecraft instance for the font to be bound to. + * @param fontName + * The name of the font to be drawn. + * @param size + * The size of the font to be drawn. */ public CustomFont(Minecraft mc, Object font, int size) { @@ -49,19 +51,22 @@ public class CustomFont } /** - * Instantiates the font, pre-rendering a sprite - * font image by using a true type font on a - * bitmap. Then allocating that bitmap to the - * Minecraft rendering engine for later use. + * Instantiates the font, pre-rendering a sprite font image by using a true + * type font on a bitmap. Then allocating that bitmap to the Minecraft + * rendering engine for later use. * - * 'new CustomFont(ModLoader.getMinecraftInstance(), - * "Arial", 12, 32, 126);' + * 'new CustomFont(ModLoader.getMinecraftInstance(), "Arial", 12, 32, 126);' * - * @param mc The Minecraft instance for the font to be bound to. - * @param fontName The name of the font to be drawn. - * @param size The size of the font to be drawn. - * @param startChar The starting ASCII character id to be drawable. (Default 32) - * @param endChar The ending ASCII character id to be drawable. (Default 126) + * @param mc + * The Minecraft instance for the font to be bound to. + * @param fontName + * The name of the font to be drawn. + * @param size + * The size of the font to be drawn. + * @param startChar + * The starting ASCII character id to be drawable. (Default 32) + * @param endChar + * The ending ASCII character id to be drawable. (Default 126) */ public CustomFont(Minecraft mc, Object font, int size, int startChar, int endChar) { @@ -128,17 +133,22 @@ public class CustomFont // Render the finished bitmap into the Minecraft // graphics engine. // Sadly broken by 1.6 - //texID = mc.renderEngine.allocateAndSetupTexture(img); + // texID = mc.renderEngine.allocateAndSetupTexture(img); } /** - * Draws a given string with an automatically - * calculated shadow below it. - * @param gui The gui/subclass to be drawn on - * @param text The string to be drawn - * @param x The x position to start drawing - * @param y The y position to start drawing - * @param color The color of the non-shadowed text (Hex) + * Draws a given string with an automatically calculated shadow below it. + * + * @param gui + * The gui/subclass to be drawn on + * @param text + * The string to be drawn + * @param x + * The x position to start drawing + * @param y + * The y position to start drawing + * @param color + * The color of the non-shadowed text (Hex) */ public void drawStringS (Gui gui, String text, int x, int y, int color) { @@ -151,17 +161,23 @@ public class CustomFont /** * Draws a given string onto a gui/subclass. - * @param gui The gui/subclass to be drawn on - * @param text The string to be drawn - * @param x The x position to start drawing - * @param y The y position to start drawing - * @param color The color of the non-shadowed text (Hex) + * + * @param gui + * The gui/subclass to be drawn on + * @param text + * The string to be drawn + * @param x + * The x position to start drawing + * @param y + * The y position to start drawing + * @param color + * The color of the non-shadowed text (Hex) */ public void drawString (Gui gui, String text, int x, int y, int color) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - GL11.glEnable(3553 /*GL_TEXTURE_2D*/); - GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, texID); + GL11.glEnable(3553 /* GL_TEXTURE_2D */); + GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, texID); float red = (float) (color >> 16 & 0xff) / 255F; float green = (float) (color >> 8 & 0xff) / 255F; float blue = (float) (color & 0xff) / 255F; @@ -188,9 +204,9 @@ public class CustomFont } /** - * Returns the created FontMetrics - * which is used to retrive various + * Returns the created FontMetrics which is used to retrive various * information about the True Type Font + * * @return FontMetrics of the created font. */ public FontMetrics getMetrics () @@ -199,9 +215,10 @@ public class CustomFont } /** - * Gets the drawing width of a given - * string of string. - * @param text The string to be measured + * Gets the drawing width of a given string of string. + * + * @param text + * The string to be measured * @return The width of the given string. */ public int getStringWidth (String text) @@ -210,9 +227,10 @@ public class CustomFont } /** - * Gets the drawing height of a given - * string of string. - * @param text The string to be measured + * Gets the drawing height of a given string of string. + * + * @param text + * The string to be measured * @return The height of the given string. */ public int getStringHeight (String text) @@ -221,12 +239,13 @@ public class CustomFont } /** - * A method that returns a Rectangle that - * contains the width and height demensions - * of the given string. - * @param text The string to be measured - * @return Rectangle containing width and height that - * the text will consume when drawn. + * A method that returns a Rectangle that contains the width and height + * demensions of the given string. + * + * @param text + * The string to be measured + * @return Rectangle containing width and height that the text will consume + * when drawn. */ private Rectangle getBounds (String text) { @@ -259,8 +278,7 @@ public class CustomFont } /** - * Private drawing method used within other - * drawing methods. + * Private drawing method used within other drawing methods. */ private void drawChar (Gui gui, char c, int x, int y) { diff --git a/src/main/java/tconstruct/client/TClientEvents.java b/src/main/java/tconstruct/client/TClientEvents.java index 09e938cb..9a79450a 100644 --- a/src/main/java/tconstruct/client/TClientEvents.java +++ b/src/main/java/tconstruct/client/TClientEvents.java @@ -47,12 +47,13 @@ public class TClientEvents initSounds = true; try { - /* SoundManager soundmanager = event.manager; - soundmanager.addSound("tinker:frypan_hit.ogg"); - soundmanager.addSound("tinker:little_saw.ogg"); - soundmanager.addSound("tinker:launcher_clank.ogg"); - TConstruct.logger.info("Successfully loaded sounds."); - */ + /* + * SoundManager soundmanager = event.manager; + * soundmanager.addSound("tinker:frypan_hit.ogg"); + * soundmanager.addSound("tinker:little_saw.ogg"); + * soundmanager.addSound("tinker:launcher_clank.ogg"); + * TConstruct.logger.info("Successfully loaded sounds."); + */ } catch (Exception e) { @@ -92,8 +93,8 @@ public class TClientEvents private static final ResourceLocation hearts = new ResourceLocation("tinker", "textures/gui/newhearts.png"); private static final ResourceLocation icons = new ResourceLocation("textures/gui/icons.png"); - //public static int left_height = 39; - //public static int right_height = 39; + // public static int left_height = 39; + // public static int right_height = 39; Random rand = new Random(); int updateCounter = 0; @@ -103,7 +104,8 @@ public class TClientEvents @SubscribeEvent public void renderHealthbar (RenderGameOverlayEvent.Pre event) { - if (!Loader.isModLoaded("tukmc_Vz"))// Loader check to avoid conflicting with a GUI mod (thanks Vazkii!) + if (!Loader.isModLoaded("tukmc_Vz"))// Loader check to avoid conflicting + // with a GUI mod (thanks Vazkii!) { if (event.type == ElementType.HEALTH) { @@ -171,25 +173,25 @@ public class TClientEvents if (highlight) { if (i * 2 + 1 < healthLast) - drawTexturedModalRect(x, y, MARGIN + 54, TOP, 9, 9); //6 + drawTexturedModalRect(x, y, MARGIN + 54, TOP, 9, 9); // 6 else if (i * 2 + 1 == healthLast) - drawTexturedModalRect(x, y, MARGIN + 63, TOP, 9, 9); //7 + drawTexturedModalRect(x, y, MARGIN + 63, TOP, 9, 9); // 7 } if (absorbRemaining > 0.0F) { if (absorbRemaining == absorb && absorb % 2.0F == 1.0F) - drawTexturedModalRect(x, y, MARGIN + 153, TOP, 9, 9); //17 + drawTexturedModalRect(x, y, MARGIN + 153, TOP, 9, 9); // 17 else - drawTexturedModalRect(x, y, MARGIN + 144, TOP, 9, 9); //16 + drawTexturedModalRect(x, y, MARGIN + 144, TOP, 9, 9); // 16 absorbRemaining -= 2.0F; } else { if (i * 2 + 1 < health) - drawTexturedModalRect(x, y, MARGIN + 36, TOP, 9, 9); //4 + drawTexturedModalRect(x, y, MARGIN + 36, TOP, 9, 9); // 4 else if (i * 2 + 1 == health) - drawTexturedModalRect(x, y, MARGIN + 45, TOP, 9, 9); //5 + drawTexturedModalRect(x, y, MARGIN + 45, TOP, 9, 9); // 5 } } @@ -200,7 +202,7 @@ public class TClientEvents if (potion != null) return; - //Extra hearts + // Extra hearts this.mc.getTextureManager().bindTexture(hearts); int hp = MathHelper.ceiling_float_int(this.mc.thePlayer.getHealth()); @@ -248,43 +250,28 @@ public class TClientEvents double zLevel = 0; - /*@SubscribeEvent - public void fovModifier(FOVUpdateEvent event) - { - float f = 1.0F; - - if (event.entity.capabilities.isFlying) - { - f *= 1.1F; - } - - if (event.entity.isUsingItem() && event.entity.getItemInUse().getItem() == Items.bow) - { - int i = event.entity.getItemInUseDuration(); - float f1 = (float) i / 20.0F; - - if (f1 > 1.0F) - { - f1 = 1.0F; - } - else - { - f1 *= f1; - } - - f *= 1.0F - f1 * 0.15F; - } - event.newfov = f; - }*/ + /* + * @SubscribeEvent public void fovModifier(FOVUpdateEvent event) { float f = + * 1.0F; + * + * if (event.entity.capabilities.isFlying) { f *= 1.1F; } + * + * if (event.entity.isUsingItem() && event.entity.getItemInUse().getItem() + * == Items.bow) { int i = event.entity.getItemInUseDuration(); float f1 = + * (float) i / 20.0F; + * + * if (f1 > 1.0F) { f1 = 1.0F; } else { f1 *= f1; } + * + * f *= 1.0F - f1 * 0.15F; } event.newfov = f; } + */ /* Armor */ ModelBiped model = new ModelBiped(5f); WingModel wings = new WingModel(); - /*static - { - model.bipedHead.showModel = false; - }*/ + /* + * static { model.bipedHead.showModel = false; } + */ private float interpolateRotation (float par1, float par2, float par3) { diff --git a/src/main/java/tconstruct/client/TClientTickHandler.java b/src/main/java/tconstruct/client/TClientTickHandler.java index 39ce6ede..11c6dd04 100644 --- a/src/main/java/tconstruct/client/TClientTickHandler.java +++ b/src/main/java/tconstruct/client/TClientTickHandler.java @@ -33,10 +33,8 @@ public class TClientTickHandler } } - /* @Override - public EnumSet ticks () - { - return EnumSet.of(TickType.RENDER); - } - */ + /* + * @Override public EnumSet ticks () { return + * EnumSet.of(TickType.RENDER); } + */ } diff --git a/src/main/java/tconstruct/client/TControls.java b/src/main/java/tconstruct/client/TControls.java index 0728bdaf..f6de53ae 100644 --- a/src/main/java/tconstruct/client/TControls.java +++ b/src/main/java/tconstruct/client/TControls.java @@ -16,8 +16,8 @@ import cpw.mods.fml.common.gameevent.TickEvent.Type; public class TControls extends TKeyHandler { - //static KeyBinding grabKey = new KeyBinding("key.grab", 29); - //static KeyBinding stiltsKey = new KeyBinding("key.stilts", 46); + // static KeyBinding grabKey = new KeyBinding("key.grab", 29); + // static KeyBinding stiltsKey = new KeyBinding("key.stilts", 46); public static KeyBinding armorKey = new KeyBinding("key.tarmor", 24, null); public static KeyBinding refreshCapes = new KeyBinding("key.tcapes.reload", 88, null); static KeyBinding jumpKey; @@ -32,12 +32,12 @@ public class TControls extends TKeyHandler int currentTab = 1; - //boolean onStilts = false; + // boolean onStilts = false; public TControls() { super(new KeyBinding[] { armorKey, refreshCapes }, new boolean[] { false, false }, getVanillaKeyBindings(), new boolean[] { false, false }); - //TConstruct.logger.info("Controls registered"); + // TConstruct.logger.info("Controls registered"); } private static KeyBinding[] getVanillaKeyBindings () @@ -53,11 +53,12 @@ public class TControls extends TKeyHandler { if (tickEnd && mc.theWorld != null) { - if (kb == armorKey && mc.currentScreen == null) //Extended Armor + if (kb == armorKey && mc.currentScreen == null) // Extended Armor { - openArmorGui();//mc.thePlayer.username); + openArmorGui();// mc.thePlayer.username); } - if (kb == invKey && mc.currentScreen != null && mc.currentScreen.getClass() == GuiInventory.class)// && !mc.playerController.isInCreativeMode()) + if (kb == invKey && mc.currentScreen != null && mc.currentScreen.getClass() == GuiInventory.class)// && + // !mc.playerController.isInCreativeMode()) { TabRegistry.addTabsToInventory((GuiContainer) mc.currentScreen); } @@ -65,7 +66,7 @@ public class TControls extends TKeyHandler { EventCloakRender.instance.refreshCapes(); } - if (kb == jumpKey) //Double jump + if (kb == jumpKey) // Double jump { if (mc.thePlayer.capabilities.isCreativeMode) return; @@ -88,29 +89,19 @@ public class TControls extends TKeyHandler jumping = mc.thePlayer.isAirBorne; } } - /*else if (kb == stiltsKey) //Stilts - { - float size = 1.8F; - if (!onStilts) - size = 0.8F; - TConstruct.playerTracker.updateSize(mc.thePlayer.username, size); - onStilts = !onStilts; - //updateServer(mc.thePlayer.username, (byte) 11); - if (onStilts) - { - onStilts = false; - } - else - { - onStilts = true; - } - }*/ + /* + * else if (kb == stiltsKey) //Stilts { float size = 1.8F; if + * (!onStilts) size = 0.8F; + * TConstruct.playerTracker.updateSize(mc.thePlayer.username, size); + * onStilts = !onStilts; //updateServer(mc.thePlayer.username, (byte) + * 11); if (onStilts) { onStilts = false; } else { onStilts = true; } } + */ } @Override public void keyUp (Type types, KeyBinding kb, boolean tickEnd) { - //landOnGround(); + // landOnGround(); } public void landOnGround () @@ -216,14 +207,15 @@ public class TControls extends TKeyHandler static void updateServer (ByteArrayOutputStream bos) { - /*Packet250CustomPayload packet = new Packet250CustomPayload(); - packet.channel = "TConstruct"; - packet.data = bos.toByteArray(); - packet.length = bos.size(); + /* + * Packet250CustomPayload packet = new Packet250CustomPayload(); + * packet.channel = "TConstruct"; packet.data = bos.toByteArray(); + * packet.length = bos.size(); + * + * PacketDispatcher.sendPacketToServer(packet); + */ - PacketDispatcher.sendPacketToServer(packet);*/ - - //TODO Find out what packet should be used here + // TODO Find out what packet should be used here TConstruct.packetPipeline.sendToServer(new PacketDoubleJump()); } diff --git a/src/main/java/tconstruct/client/TKeyHandler.java b/src/main/java/tconstruct/client/TKeyHandler.java index 9ea091de..dfd5a598 100644 --- a/src/main/java/tconstruct/client/TKeyHandler.java +++ b/src/main/java/tconstruct/client/TKeyHandler.java @@ -24,7 +24,7 @@ public abstract class TKeyHandler /** * Pass an array of keybindings and a repeat flag for each one - * + * * @param keyBindings * @param repeatings */ @@ -40,9 +40,9 @@ public abstract class TKeyHandler } /** - * Register the keys into the system. You will do your own keyboard management elsewhere. No events will fire - * if you use this method - * + * Register the keys into the system. You will do your own keyboard + * management elsewhere. No events will fire if you use this method + * * @param keyBindings */ public TKeyHandler(KeyBinding[] keyBindings) @@ -116,24 +116,30 @@ public abstract class TKeyHandler } /** - * Called when the key is first in the down position on any tick from the {@link #ticks()} - * set. Will be called subsequently with isRepeat set to true - * + * Called when the key is first in the down position on any tick from the + * {@link #ticks()} set. Will be called subsequently with isRepeat set to + * true + * * @see #keyUp(EnumSet, KeyBinding, boolean) - * - * @param types the type(s) of tick that fired when this key was first down - * @param tickEnd was it an end or start tick which fired the key - * @param isRepeat is it a repeat key event + * + * @param types + * the type(s) of tick that fired when this key was first down + * @param tickEnd + * was it an end or start tick which fired the key + * @param isRepeat + * is it a repeat key event */ public abstract void keyDown (Type types, KeyBinding kb, boolean tickEnd, boolean isRepeat); /** * Fired once when the key changes state from down to up - * + * * @see #keyDown(EnumSet, KeyBinding, boolean, boolean) - * - * @param types the type(s) of tick that fired when this key was first down - * @param tickEnd was it an end or start tick which fired the key + * + * @param types + * the type(s) of tick that fired when this key was first down + * @param tickEnd + * was it an end or start tick which fired the key */ public abstract void keyUp (Type types, KeyBinding kb, boolean tickEnd); diff --git a/src/main/java/tconstruct/client/TProxyClient.java b/src/main/java/tconstruct/client/TProxyClient.java index 71f52fa7..f86ea678 100644 --- a/src/main/java/tconstruct/client/TProxyClient.java +++ b/src/main/java/tconstruct/client/TProxyClient.java @@ -219,7 +219,7 @@ public class TProxyClient extends TProxyCommon tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 1.0F, 0.0F); - renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, getIcon(block.getIcon(1, meta)));//block.getIcon(1, meta)); + renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, getIcon(block.getIcon(1, meta)));// block.getIcon(1, meta)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 0.0F, -1F); @@ -597,12 +597,12 @@ public class TProxyClient extends TProxyCommon MantleClientRegistry.registerManualLargeRecipe("smelterybasin", new ItemStack(TRepo.searedBlock, 1, 2), searedbrick, null, searedbrick, searedbrick, null, searedbrick, searedbrick, searedbrick, searedbrick); - //Traps + // Traps ItemStack reed = new ItemStack(Items.sugar); MantleClientRegistry.registerManualLargeRecipe("punji", new ItemStack(TRepo.punji), reed, null, reed, null, reed, null, reed, null, reed); MantleClientRegistry.registerManualSmallRecipe("barricade", new ItemStack(TRepo.barricadeOak), null, log, null, log); - //Machines + // Machines ItemStack alubrassIngot = new ItemStack(TRepo.materials, 1, 14); ItemStack bronzeIngot = new ItemStack(TRepo.materials, 1, 13); ItemStack blankCast = new ItemStack(TRepo.blankPattern, 1, 1); @@ -1034,7 +1034,8 @@ public class TProxyClient extends TProxyCommon @Override public void postInit () { - //MinecraftForgeClient.registerItemRenderer(TRepo.armorPattern.itemID, new RenderArmorCast()); + // MinecraftForgeClient.registerItemRenderer(TRepo.armorPattern.itemID, + // new RenderArmorCast()); } private static IIcon getIcon (IIcon icon) diff --git a/src/main/java/tconstruct/client/ToolCoreRenderer.java b/src/main/java/tconstruct/client/ToolCoreRenderer.java index ab85a60e..4654bcca 100644 --- a/src/main/java/tconstruct/client/ToolCoreRenderer.java +++ b/src/main/java/tconstruct/client/ToolCoreRenderer.java @@ -52,7 +52,7 @@ public class ToolCoreRenderer implements IItemRenderer if (data.length > 1) ent = (Entity) data[1]; - int iconParts = toolIcons;//tool.getRenderPasses(item.getItemDamage()); + int iconParts = toolIcons;// tool.getRenderPasses(item.getItemDamage()); IIcon[] tempParts = new IIcon[iconParts]; label: @@ -78,7 +78,8 @@ public class ToolCoreRenderer implements IItemRenderer for (int i = 0; i < iconParts; ++i) { IIcon part = tempParts[i]; - if (part == null)// || part == ToolCore.blankSprite | part == ToolCore.emptyIcon) + if (part == null)// || part == ToolCore.blankSprite | part == + // ToolCore.emptyIcon) ++count; else parts[i - count] = part; diff --git a/src/main/java/tconstruct/client/armor/WingModel.java b/src/main/java/tconstruct/client/armor/WingModel.java index dc2f51d6..bd477c6a 100644 --- a/src/main/java/tconstruct/client/armor/WingModel.java +++ b/src/main/java/tconstruct/client/armor/WingModel.java @@ -24,16 +24,17 @@ public class WingModel extends ModelBase textureWidth = 64; textureHeight = 64; - //Right Wing + // Right Wing WingBaseRight = new ModelRenderer(this, 0, 41); WingBaseRight.addBox(-0.5F, -1F, 0F, 1, 2, 10); WingBaseRight.setRotationPoint(-1F, 1F, 0F); setRotation(WingBaseRight, 0.5235988F, -0.5235988F, 0F); - WingEdgeRight = new ModelRenderer(this, 0, 53); //Texture position - WingEdgeRight.addBox(0F, 0F, -2F, 1, 9, 2); //Offset, Size - WingEdgeRight.setRotationPoint(-0.502F, -1F, 10F); //Negative x, y - 1, Position - setRotation(WingEdgeRight, 0.5235988F, 0F, 0F); //Angle in radians + WingEdgeRight = new ModelRenderer(this, 0, 53); // Texture position + WingEdgeRight.addBox(0F, 0F, -2F, 1, 9, 2); // Offset, Size + WingEdgeRight.setRotationPoint(-0.502F, -1F, 10F); // Negative x, y - 1, + // Position + setRotation(WingEdgeRight, 0.5235988F, 0F, 0F); // Angle in radians WingInsetRight = new ModelRenderer(this, 6, 53); WingInsetRight.addBox(0F, 0F, -1F, 1, 9, 2); @@ -61,7 +62,7 @@ public class WingModel extends ModelBase WingBaseRight.addChild(WingFlangeRight); WingBaseRight.addChild(WingAuxRight); - //Left Wing + // Left Wing WingBaseLeft = new ModelRenderer(this, 42, 41); WingBaseLeft.addBox(-0.5F, -1F, 0F, 1, 2, 10); WingBaseLeft.setRotationPoint(1F, 1F, 0F); diff --git a/src/main/java/tconstruct/client/block/BarricadeRender.java b/src/main/java/tconstruct/client/block/BarricadeRender.java index 2706c3dc..09d33cda 100644 --- a/src/main/java/tconstruct/client/block/BarricadeRender.java +++ b/src/main/java/tconstruct/client/block/BarricadeRender.java @@ -26,8 +26,8 @@ public class BarricadeRender implements ISimpleBlockRenderingHandler if (meta / 4 == 0) { - //if (type >= 0) - //TODO setRenderBounds + // if (type >= 0) + // TODO setRenderBounds renderer.setRenderBounds(0.125, 0.0, 0.5, 0.375, 1.0, 0.75); renderer.renderStandardBlock(barricade, x, y, z); @@ -52,7 +52,7 @@ public class BarricadeRender implements ISimpleBlockRenderingHandler if (meta / 4 == 1) { - //if (type >= 0) + // if (type >= 0) renderer.setRenderBounds(0.25, 0.0, 0.125, 0.5, 1.0, 0.375); renderer.renderStandardBlock(barricade, x, y, z); @@ -77,7 +77,7 @@ public class BarricadeRender implements ISimpleBlockRenderingHandler if (meta / 4 == 2) { - //if (type >= 0) + // if (type >= 0) renderer.setRenderBounds(0.125, 0.0, 0.25, 0.375, 1.0, 0.5); renderer.renderStandardBlock(barricade, x, y, z); @@ -102,7 +102,7 @@ public class BarricadeRender implements ISimpleBlockRenderingHandler if (meta / 4 == 3) { - //if (type >= 0) + // if (type >= 0) renderer.setRenderBounds(0.5, 0.0, 0.125, 0.75, 1.0, 0.375); renderer.renderStandardBlock(barricade, x, y, z); diff --git a/src/main/java/tconstruct/client/block/BlockRenderCastingChannel.java b/src/main/java/tconstruct/client/block/BlockRenderCastingChannel.java index 98b5e1ba..831413fc 100644 --- a/src/main/java/tconstruct/client/block/BlockRenderCastingChannel.java +++ b/src/main/java/tconstruct/client/block/BlockRenderCastingChannel.java @@ -25,27 +25,27 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler @Override public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer) { - //Floor + // Floor renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.6875D, 0.5D, 0.6875D); this.renderStandardBlock(block, metadata, renderer); - //Channel Z- + // Channel Z- renderer.setRenderBounds(0.3125D, 0.375D, 0D, 0.6875D, 0.5D, 0.3125D); this.renderStandardBlock(block, metadata, renderer); renderer.setRenderBounds(0.3125D, 0.5D, 0D, 0.375D, 0.625D, 0.3125D); this.renderStandardBlock(block, metadata, renderer); renderer.setRenderBounds(0.625D, 0.5D, 0D, 0.6875D, 0.625D, 0.3125D); this.renderStandardBlock(block, metadata, renderer); - //Channel Z+ + // Channel Z+ renderer.setRenderBounds(0.3125D, 0.375D, 0.6875D, 0.6875D, 0.5D, 1D); this.renderStandardBlock(block, metadata, renderer); renderer.setRenderBounds(0.3125D, 0.5D, 0.6875D, 0.375D, 0.625D, 1D); this.renderStandardBlock(block, metadata, renderer); renderer.setRenderBounds(0.625D, 0.5D, 0.6875D, 0.6875D, 0.625D, 1D); this.renderStandardBlock(block, metadata, renderer); - //Wall X- + // Wall X- renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.375D, 0.625D, 0.6875D); this.renderStandardBlock(block, metadata, renderer); - //Wall X+ + // Wall X+ renderer.setRenderBounds(0.625D, 0.375D, 0.3125D, 0.6875D, 0.625D, 0.6875D); this.renderStandardBlock(block, metadata, renderer); } @@ -57,13 +57,16 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler { CastingChannelLogic tile = (CastingChannelLogic) world.getTileEntity(x, y, z); - if (!tile.hasTankConnected(ForgeDirection.DOWN))//CentrePiece, floor is removed if tank below is found + if (!tile.hasTankConnected(ForgeDirection.DOWN))// CentrePiece, + // floor is removed + // if tank below is + // found { renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.6875D, 0.5D, 0.6875D); renderer.renderStandardBlock(block, x, y, z); } else - //"Guiding Borders" when tank below is found + // "Guiding Borders" when tank below is found { renderer.setRenderBounds(0.375D, 0.125D, 0.3125D, 0.625D, 0.5D, 0.375D); renderer.renderStandardBlock(block, x, y, z); @@ -74,15 +77,17 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler renderer.setRenderBounds(0.625D, 0.125D, 0.3125D, 0.6875D, 0.5D, 0.6875D); renderer.renderStandardBlock(block, x, y, z); } - /*renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.375D, 0.625D, 0.375D); - renderer.renderStandardBlock(block, x, y, z); - renderer.setRenderBounds(0.3125D, 0.375D, 0.625D, 0.375D, 0.625D, 0.6875D); - renderer.renderStandardBlock(block, x, y, z); - renderer.setRenderBounds(0.625D, 0.375D, 0.3125D, 0.6875D, 0.625D, 0.375D); - renderer.renderStandardBlock(block, x, y, z); - renderer.setRenderBounds(0.625D, 0.375D, 0.625D, 0.6875D, 0.625D, 0.6875D); - renderer.renderStandardBlock(block, x, y, z);*/ - if (tile.hasTankConnected(ForgeDirection.NORTH))//Channel to Z- + /* + * renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.375D, + * 0.625D, 0.375D); renderer.renderStandardBlock(block, x, y, z); + * renderer.setRenderBounds(0.3125D, 0.375D, 0.625D, 0.375D, 0.625D, + * 0.6875D); renderer.renderStandardBlock(block, x, y, z); + * renderer.setRenderBounds(0.625D, 0.375D, 0.3125D, 0.6875D, + * 0.625D, 0.375D); renderer.renderStandardBlock(block, x, y, z); + * renderer.setRenderBounds(0.625D, 0.375D, 0.625D, 0.6875D, 0.625D, + * 0.6875D); renderer.renderStandardBlock(block, x, y, z); + */ + if (tile.hasTankConnected(ForgeDirection.NORTH))// Channel to Z- { renderer.setRenderBounds(0.3125D, 0.375D, 0D, 0.6875D, 0.5D, 0.3125D); renderer.renderStandardBlock(block, x, y, z); @@ -92,13 +97,13 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler renderer.renderStandardBlock(block, x, y, z); } else - //Wall to Z- + // Wall to Z- { renderer.setRenderBounds(0.375D, 0.5D, 0.3125D, 0.625D, 0.625D, 0.375D); renderer.renderStandardBlock(block, x, y, z); } - if (tile.hasTankConnected(ForgeDirection.SOUTH))//Channel to Z+ + if (tile.hasTankConnected(ForgeDirection.SOUTH))// Channel to Z+ { renderer.setRenderBounds(0.3125D, 0.375D, 0.6875D, 0.6875D, 0.5D, 1D); renderer.renderStandardBlock(block, x, y, z); @@ -108,13 +113,13 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler renderer.renderStandardBlock(block, x, y, z); } else - //Wall to Z+ + // Wall to Z+ { renderer.setRenderBounds(0.375D, 0.5D, 0.625D, 0.625D, 0.625D, 0.6875D); renderer.renderStandardBlock(block, x, y, z); } - if (tile.hasTankConnected(ForgeDirection.WEST))//Channel to X- + if (tile.hasTankConnected(ForgeDirection.WEST))// Channel to X- { renderer.setRenderBounds(0D, 0.375D, 0.3125D, 0.3125D, 0.5D, 0.6875D); renderer.renderStandardBlock(block, x, y, z); @@ -124,13 +129,13 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler renderer.renderStandardBlock(block, x, y, z); } else - //Wall to X- + // Wall to X- { renderer.setRenderBounds(0.3125D, 0.5D, 0.3125D, 0.375D, 0.625D, 0.6875D); renderer.renderStandardBlock(block, x, y, z); } - if (tile.hasTankConnected(ForgeDirection.EAST))//Channel to X+ + if (tile.hasTankConnected(ForgeDirection.EAST))// Channel to X+ { renderer.setRenderBounds(0.6875D, 0.375D, 0.3125D, 1D, 0.5D, 0.6875D); renderer.renderStandardBlock(block, x, y, z); @@ -140,7 +145,7 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler renderer.renderStandardBlock(block, x, y, z); } else - //Wall to X+ + // Wall to X+ { renderer.setRenderBounds(0.625D, 0.5D, 0.3125D, 0.6875D, 0.625D, 0.6875D); renderer.renderStandardBlock(block, x, y, z); @@ -151,12 +156,13 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler float height = tile.getLiquidAmount() / (tile.getCapacity() * 1.05F); float j = tile.liquid.amount / tile.fillMax; double startY = tile.tankBelow(); - //if(tile.nearbyChannel(ForgeDirection.DOWN))startY = -0.5D; - //else if(tile.hasTankConnected(ForgeDirection.DOWN))startY = 0D; + // if(tile.nearbyChannel(ForgeDirection.DOWN))startY = -0.5D; + // else if(tile.hasTankConnected(ForgeDirection.DOWN))startY = + // 0D; float liquidAmount = tile.liquid.amount / 288f * 0.125f; - renderer.setRenderBounds(0.375D, startY, 0.375D, 0.625D, 0.5 + liquidAmount, 0.625D); //Center + renderer.setRenderBounds(0.375D, startY, 0.375D, 0.625D, 0.5 + liquidAmount, 0.625D); // Center renderLiquidPart(world, x, y, z, block, renderer, tile); - //TConstruct.logger.info(tile.recentlyFilledDelay); + // TConstruct.logger.info(tile.recentlyFilledDelay); if (tile.hasTankConnected(ForgeDirection.NORTH)) { @@ -223,84 +229,71 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler } } - /*if(tile.lastProvider==ForgeDirection.UP && tile.recentlyFilledDelay != 0) - { - renderer.setRenderBounds(0.375D, 0.5D, 0.375D, 0.625D, 1D, 0.625D); - renderLiquidPart(world, x, y, z, block, renderer, tile); - }*/ + /* + * if(tile.lastProvider==ForgeDirection.UP && + * tile.recentlyFilledDelay != 0) { + * renderer.setRenderBounds(0.375D, 0.5D, 0.375D, 0.625D, 1D, + * 0.625D); renderLiquidPart(world, x, y, z, block, renderer, + * tile); } + */ - /*if(tile.hasTankConnected(ForgeDirection.NORTH)&&tile.lastProvider!=ForgeDirection.NORTH)//Channel to Z- - { - if(tile.recentlyFilledDelay == 0 || tile.lastProvider == ForgeDirection.UP) - { - renderer.setRenderBounds(0.375D, 0.5D, 0D, 0.625D, 0.625D, 0.375D); - renderLiquidPart(world, x, y, z, block, renderer, tile); - } - if(tile.recentlyFilledDelay != 0 && tile.lastProvider == ForgeDirection.UP) - { - renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, 0.625D); - renderLiquidPart(world, x, y, z, block, renderer, tile); - } - } - if(tile.hasTankConnected(ForgeDirection.SOUTH)&&tile.lastProvider!=ForgeDirection.SOUTH)//Channel to Z+ - { - if(tile.recentlyFilledDelay == 0 || tile.lastProvider == ForgeDirection.UP) - { - renderer.setRenderBounds(0.375D, 0.5D, 0.625D, 0.625D, 0.625D, 1D); - renderLiquidPart(world, x, y, z, block, renderer, tile); - } - if(tile.recentlyFilledDelay != 0 && tile.lastProvider == ForgeDirection.UP) - { - renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, 0.625D); - renderLiquidPart(world, x, y, z, block, renderer, tile); - } - } - if(tile.hasTankConnected(ForgeDirection.WEST)&&tile.lastProvider!=ForgeDirection.WEST)//Channel to X- - { - if(tile.recentlyFilledDelay == 0 || tile.lastProvider == ForgeDirection.UP) - { - renderer.setRenderBounds(0D, 0.5D, 0.375D, 0.375D, 0.625D, 0.625D); - renderLiquidPart(world, x, y, z, block, renderer, tile); - } - if(tile.recentlyFilledDelay != 0 && tile.lastProvider == ForgeDirection.UP) - { - renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, 0.625D); - renderLiquidPart(world, x, y, z, block, renderer, tile); - } - } - if(tile.hasTankConnected(ForgeDirection.EAST)&&tile.lastProvider!=ForgeDirection.EAST)//Channel to X+ - { - if(tile.recentlyFilledDelay == 0 || tile.lastProvider == ForgeDirection.UP) - { - renderer.setRenderBounds(0.625D, 0.5D, 0.375D, 1D, 0.625D, 0.625D); - renderLiquidPart(world, x, y, z, block, renderer, tile); - } - if(tile.recentlyFilledDelay != 0 && tile.lastProvider == ForgeDirection.UP) - { - renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, 0.625D); - renderLiquidPart(world, x, y, z, block, renderer, tile); - } - } - if(tile.lastProvider==ForgeDirection.NORTH && tile.recentlyFilledDelay != 0) - { - renderer.setRenderBounds(0.375D, 0.5D, 0.625D, 0.625D, 0.625D, 1D); - renderLiquidPart(world, x, y, z, block, renderer, tile); - } - if(tile.lastProvider==ForgeDirection.SOUTH && tile.recentlyFilledDelay != 0) - { - renderer.setRenderBounds(0.375D, 0.5D, 0D, 0.625D, 0.625D, 0.375D); - renderLiquidPart(world, x, y, z, block, renderer, tile); - } - if(tile.lastProvider==ForgeDirection.WEST && tile.recentlyFilledDelay != 0) - { - renderer.setRenderBounds(0.625D, 0.5D, 0.375D, 1D, 0.625D, 0.625D); - renderLiquidPart(world, x, y, z, block, renderer, tile); - } - if(tile.lastProvider==ForgeDirection.EAST && tile.recentlyFilledDelay != 0) - { - renderer.setRenderBounds(0D, 0.5D, 0.375D, 0.375D, 0.625D, 0.625D); - renderLiquidPart(world, x, y, z, block, renderer, tile); - }*/ + /* + * if(tile.hasTankConnected(ForgeDirection.NORTH)&&tile.lastProvider + * !=ForgeDirection.NORTH)//Channel to Z- { + * if(tile.recentlyFilledDelay == 0 || tile.lastProvider == + * ForgeDirection.UP) { renderer.setRenderBounds(0.375D, 0.5D, + * 0D, 0.625D, 0.625D, 0.375D); renderLiquidPart(world, x, y, z, + * block, renderer, tile); } if(tile.recentlyFilledDelay != 0 && + * tile.lastProvider == ForgeDirection.UP) { + * renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, + * 0.625D); renderLiquidPart(world, x, y, z, block, renderer, + * tile); } } + * if(tile.hasTankConnected(ForgeDirection.SOUTH)&&tile + * .lastProvider!=ForgeDirection.SOUTH)//Channel to Z+ { + * if(tile.recentlyFilledDelay == 0 || tile.lastProvider == + * ForgeDirection.UP) { renderer.setRenderBounds(0.375D, 0.5D, + * 0.625D, 0.625D, 0.625D, 1D); renderLiquidPart(world, x, y, z, + * block, renderer, tile); } if(tile.recentlyFilledDelay != 0 && + * tile.lastProvider == ForgeDirection.UP) { + * renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, + * 0.625D); renderLiquidPart(world, x, y, z, block, renderer, + * tile); } } + * if(tile.hasTankConnected(ForgeDirection.WEST)&&tile + * .lastProvider!=ForgeDirection.WEST)//Channel to X- { + * if(tile.recentlyFilledDelay == 0 || tile.lastProvider == + * ForgeDirection.UP) { renderer.setRenderBounds(0D, 0.5D, + * 0.375D, 0.375D, 0.625D, 0.625D); renderLiquidPart(world, x, + * y, z, block, renderer, tile); } if(tile.recentlyFilledDelay + * != 0 && tile.lastProvider == ForgeDirection.UP) { + * renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, + * 0.625D); renderLiquidPart(world, x, y, z, block, renderer, + * tile); } } + * if(tile.hasTankConnected(ForgeDirection.EAST)&&tile + * .lastProvider!=ForgeDirection.EAST)//Channel to X+ { + * if(tile.recentlyFilledDelay == 0 || tile.lastProvider == + * ForgeDirection.UP) { renderer.setRenderBounds(0.625D, 0.5D, + * 0.375D, 1D, 0.625D, 0.625D); renderLiquidPart(world, x, y, z, + * block, renderer, tile); } if(tile.recentlyFilledDelay != 0 && + * tile.lastProvider == ForgeDirection.UP) { + * renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, + * 0.625D); renderLiquidPart(world, x, y, z, block, renderer, + * tile); } } if(tile.lastProvider==ForgeDirection.NORTH && + * tile.recentlyFilledDelay != 0) { + * renderer.setRenderBounds(0.375D, 0.5D, 0.625D, 0.625D, + * 0.625D, 1D); renderLiquidPart(world, x, y, z, block, + * renderer, tile); } if(tile.lastProvider==ForgeDirection.SOUTH + * && tile.recentlyFilledDelay != 0) { + * renderer.setRenderBounds(0.375D, 0.5D, 0D, 0.625D, 0.625D, + * 0.375D); renderLiquidPart(world, x, y, z, block, renderer, + * tile); } if(tile.lastProvider==ForgeDirection.WEST && + * tile.recentlyFilledDelay != 0) { + * renderer.setRenderBounds(0.625D, 0.5D, 0.375D, 1D, 0.625D, + * 0.625D); renderLiquidPart(world, x, y, z, block, renderer, + * tile); } if(tile.lastProvider==ForgeDirection.EAST && + * tile.recentlyFilledDelay != 0) { renderer.setRenderBounds(0D, + * 0.5D, 0.375D, 0.375D, 0.625D, 0.625D); + * renderLiquidPart(world, x, y, z, block, renderer, tile); } + */ } } diff --git a/src/main/java/tconstruct/client/block/BlockSkinRenderHelper.java b/src/main/java/tconstruct/client/block/BlockSkinRenderHelper.java index 643429e7..6747937c 100644 --- a/src/main/java/tconstruct/client/block/BlockSkinRenderHelper.java +++ b/src/main/java/tconstruct/client/block/BlockSkinRenderHelper.java @@ -13,7 +13,7 @@ public class BlockSkinRenderHelper { public static boolean renderMetadataBlock (Block block, int metadata, int x, int y, int z, RenderBlocks renderer, IBlockAccess world) { - //TODO CHECK THESE!!!! + // TODO CHECK THESE!!!! int var5 = block.colorMultiplier(world, x, y, z); float var6 = (float) (var5 >> 16 & 255) / 255.0F; float var7 = (float) (var5 >> 8 & 255) / 255.0F; diff --git a/src/main/java/tconstruct/client/block/CastingBasinSpecialRender.java b/src/main/java/tconstruct/client/block/CastingBasinSpecialRender.java index 7c1579ce..1d1b8084 100644 --- a/src/main/java/tconstruct/client/block/CastingBasinSpecialRender.java +++ b/src/main/java/tconstruct/client/block/CastingBasinSpecialRender.java @@ -52,7 +52,7 @@ public class CastingBasinSpecialRender extends TileEntitySpecialRenderer entityitem.hoverStart = 0.0F; GL11.glPushMatrix(); GL11.glTranslatef(1F, 0.675F, 1.0F); - //GL11.glRotatef(90F, 1, 0F, 0F); + // GL11.glRotatef(90F, 1, 0F, 0F); GL11.glScalef(1.75F, 1.75F, 1.75F); if (stack.getItem() instanceof ItemBlock) { diff --git a/src/main/java/tconstruct/client/block/CastingTableSpecialRenderer.java b/src/main/java/tconstruct/client/block/CastingTableSpecialRenderer.java index c80325f8..037afbc9 100644 --- a/src/main/java/tconstruct/client/block/CastingTableSpecialRenderer.java +++ b/src/main/java/tconstruct/client/block/CastingTableSpecialRenderer.java @@ -23,7 +23,7 @@ public class CastingTableSpecialRenderer extends TileEntitySpecialRenderer @Override public void renderTileEntityAt (TileEntity logic, double var2, double var4, double var6, float var8) { - //TConstruct.logger.info("Render!!!"); + // TConstruct.logger.info("Render!!!"); this.render((CastingTableLogic) logic, var2, var4, var6, var8); } diff --git a/src/main/java/tconstruct/client/block/DryingRackSpecialRender.java b/src/main/java/tconstruct/client/block/DryingRackSpecialRender.java index ac9b488a..43de7c20 100644 --- a/src/main/java/tconstruct/client/block/DryingRackSpecialRender.java +++ b/src/main/java/tconstruct/client/block/DryingRackSpecialRender.java @@ -69,7 +69,7 @@ public class DryingRackSpecialRender extends TileEntitySpecialRenderer GL11.glScalef(2F, 2F, 2F); if (stack.getItem() instanceof ItemBlock) { - //GL11.glRotatef(90F, -1, 0F, 0F); + // GL11.glRotatef(90F, -1, 0F, 0F); GL11.glTranslatef(0F, 0.2125F, 0.0375F); } diff --git a/src/main/java/tconstruct/client/block/FrypanRender.java b/src/main/java/tconstruct/client/block/FrypanRender.java index 28c66131..862fbd04 100644 --- a/src/main/java/tconstruct/client/block/FrypanRender.java +++ b/src/main/java/tconstruct/client/block/FrypanRender.java @@ -13,7 +13,7 @@ public class FrypanRender implements ISimpleBlockRenderingHandler @Override public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer) { - //Inventory should be an item. This is not here! + // Inventory should be an item. This is not here! } @Override @@ -29,8 +29,8 @@ public class FrypanRender implements ISimpleBlockRenderingHandler renderer.renderStandardBlock(block, x, y, z); renderer.setRenderBounds(0.125F, 0.125F, 0.0F, 0.875F, 0.25F, 0.125F); renderer.renderStandardBlock(block, x, y, z); - // renderer.setRenderBounds(1F, 0.0F, 0.4375F, 2F, 0.125F, 0.5625F); - // renderer.renderStandardBlock(block, x, y, z); + // renderer.setRenderBounds(1F, 0.0F, 0.4375F, 2F, 0.125F, 0.5625F); + // renderer.renderStandardBlock(block, x, y, z); renderHandle(world, x, y, z, block, renderer); return true; } diff --git a/src/main/java/tconstruct/client/block/PaneConnectedRender.java b/src/main/java/tconstruct/client/block/PaneConnectedRender.java index 8583b033..ed2341f1 100644 --- a/src/main/java/tconstruct/client/block/PaneConnectedRender.java +++ b/src/main/java/tconstruct/client/block/PaneConnectedRender.java @@ -47,11 +47,11 @@ public class PaneConnectedRender implements ISimpleBlockRenderingHandler } else { - // renderer.setRenderBounds(0.45D, 0D, 0.45D, 0.55D, 1D, 0.55D); - // renderer.renderStandardBlock(block, x, y, z); + // renderer.setRenderBounds(0.45D, 0D, 0.45D, 0.55D, 1D, 0.55D); + // renderer.renderStandardBlock(block, x, y, z); } - // renderer.setOverrideBlockTexture(sideTexture); + // renderer.setOverrideBlockTexture(sideTexture); if (flag) { diff --git a/src/main/java/tconstruct/client/block/PaneRender.java b/src/main/java/tconstruct/client/block/PaneRender.java index d889c45d..146cad81 100644 --- a/src/main/java/tconstruct/client/block/PaneRender.java +++ b/src/main/java/tconstruct/client/block/PaneRender.java @@ -96,27 +96,22 @@ public class PaneRender implements ISimpleBlockRenderingHandler double d8 = (double) icon1.getInterpolatedV(8.0D); double d9 = (double) icon1.getMaxV(); - /*int blockTextureIndex; - int blockSideIndex; - - int j1 = iblockaccess.getBlockMetadata(x, y, z); - blockTextureIndex = pane.getBlockTextureFromSideAndMetadata(0, j1); - blockSideIndex = pane.getSideTextureIndex(j1); - - int k1 = (blockTextureIndex & 0xf) << 4; - int j2 = blockTextureIndex & 0xf0; - double d = (float) k1 / 256F; - double d1 = ((float) k1 + 7.99F) / 256F; - double d2 = ((float) k1 + 15.99F) / 256F; - double d3 = (float) j2 / 256F; - double d4 = ((float) j2 + 15.99F) / 256F; - int k2 = (blockSideIndex & 0xf) << 4; - int l2 = blockSideIndex & 0xf0; - double d5 = (float) (k2 + 7) / 256F; - double d6 = ((float) k2 + 8.99F) / 256F; - double d7 = (float) l2 / 256F; - double d8 = (float) (l2 + 8) / 256F; - double d9 = ((float) l2 + 15.99F) / 256F;*/ + /* + * int blockTextureIndex; int blockSideIndex; + * + * int j1 = iblockaccess.getBlockMetadata(x, y, z); blockTextureIndex = + * pane.getBlockTextureFromSideAndMetadata(0, j1); blockSideIndex = + * pane.getSideTextureIndex(j1); + * + * int k1 = (blockTextureIndex & 0xf) << 4; int j2 = blockTextureIndex & + * 0xf0; double d = (float) k1 / 256F; double d1 = ((float) k1 + 7.99F) + * / 256F; double d2 = ((float) k1 + 15.99F) / 256F; double d3 = (float) + * j2 / 256F; double d4 = ((float) j2 + 15.99F) / 256F; int k2 = + * (blockSideIndex & 0xf) << 4; int l2 = blockSideIndex & 0xf0; double + * d5 = (float) (k2 + 7) / 256F; double d6 = ((float) k2 + 8.99F) / + * 256F; double d7 = (float) l2 / 256F; double d8 = (float) (l2 + 8) / + * 256F; double d9 = ((float) l2 + 15.99F) / 256F; + */ double xBot = x; double xMid = (double) x + 0.5D; diff --git a/src/main/java/tconstruct/client/block/PunjiRender.java b/src/main/java/tconstruct/client/block/PunjiRender.java index 2e06535b..bbb07548 100644 --- a/src/main/java/tconstruct/client/block/PunjiRender.java +++ b/src/main/java/tconstruct/client/block/PunjiRender.java @@ -52,24 +52,20 @@ public class PunjiRender implements ISimpleBlockRenderingHandler renderer.setRenderBounds(0.75, 0.0, 0.125, 0.875, 0.375f, 0.25); renderer.renderStandardBlock(block, x, y, z); } - /*if (metadata == 5) - { - renderer.setRenderBounds(0.0F, 0.0, 0.0F, 1.0F, 0.875F, 1.0F); - renderer.renderStandardBlock(block, x, y, z); - } - else - { - renderer.setRenderBounds(0.0F, 0.75F, 0.0F, 1.0F, 1.0F, 1.0F); - renderer.renderStandardBlock(block, x, y, z); - renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.25F, 0.75F, 0.25F); - renderer.renderStandardBlock(block, x, y, z); - renderer.setRenderBounds(0.75F, 0.0F, 0.0F, 1.0F, 0.75F, 0.25F); - renderer.renderStandardBlock(block, x, y, z); - renderer.setRenderBounds(0.0F, 0.0F, 0.75F, 0.25F, 0.75F, 1.0F); - renderer.renderStandardBlock(block, x, y, z); - renderer.setRenderBounds(0.75F, 0.0F, 0.75F, 1.0F, 0.75F, 1.0F); - renderer.renderStandardBlock(block, x, y, z); - }*/ + /* + * if (metadata == 5) { renderer.setRenderBounds(0.0F, 0.0, 0.0F, + * 1.0F, 0.875F, 1.0F); renderer.renderStandardBlock(block, x, y, + * z); } else { renderer.setRenderBounds(0.0F, 0.75F, 0.0F, 1.0F, + * 1.0F, 1.0F); renderer.renderStandardBlock(block, x, y, z); + * renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.25F, 0.75F, 0.25F); + * renderer.renderStandardBlock(block, x, y, z); + * renderer.setRenderBounds(0.75F, 0.0F, 0.0F, 1.0F, 0.75F, 0.25F); + * renderer.renderStandardBlock(block, x, y, z); + * renderer.setRenderBounds(0.0F, 0.0F, 0.75F, 0.25F, 0.75F, 1.0F); + * renderer.renderStandardBlock(block, x, y, z); + * renderer.setRenderBounds(0.75F, 0.0F, 0.75F, 1.0F, 0.75F, 1.0F); + * renderer.renderStandardBlock(block, x, y, z); } + */ } return true; } diff --git a/src/main/java/tconstruct/client/block/RenderLandmine.java b/src/main/java/tconstruct/client/block/RenderLandmine.java index e965bce9..e6e97ab4 100644 --- a/src/main/java/tconstruct/client/block/RenderLandmine.java +++ b/src/main/java/tconstruct/client/block/RenderLandmine.java @@ -14,7 +14,7 @@ import cpw.mods.fml.client.registry.RenderingRegistry; /** * * @author fuj1n - * + * */ public class RenderLandmine implements ISimpleBlockRenderingHandler { @@ -56,7 +56,7 @@ public class RenderLandmine implements ISimpleBlockRenderingHandler ForgeDirection dir = Helper.convertMetaToForgeOrientation(i1); - //TConstruct.logger.info(i1 + " for " + dir); + // TConstruct.logger.info(i1 + " for " + dir); switch (dir) { diff --git a/src/main/java/tconstruct/client/block/RenderLiquid.java b/src/main/java/tconstruct/client/block/RenderLiquid.java index b7ed7338..1715e61e 100644 --- a/src/main/java/tconstruct/client/block/RenderLiquid.java +++ b/src/main/java/tconstruct/client/block/RenderLiquid.java @@ -14,7 +14,7 @@ import net.minecraft.world.IBlockAccess; */ public class RenderLiquid -{//TODO CHECK THIS!!!! +{// TODO CHECK THIS!!!! public static boolean renderMetadataBlock (Block block, int metadata, int x, int y, int z, RenderBlocks renderer, IBlockAccess world) { int var5 = block.colorMultiplier(world, x, y, z); diff --git a/src/main/java/tconstruct/client/block/SearedRender.java b/src/main/java/tconstruct/client/block/SearedRender.java index 6a411eb1..458e308d 100644 --- a/src/main/java/tconstruct/client/block/SearedRender.java +++ b/src/main/java/tconstruct/client/block/SearedRender.java @@ -26,11 +26,11 @@ public class SearedRender implements ISimpleBlockRenderingHandler { if (metadata == 0) { - //Top + // Top renderer.setRenderBounds(0.0F, 0.625F, 0.0F, 1.0F, 0.9375F, 1.0F); TProxyClient.renderStandardInvBlock(renderer, block, metadata); - //Lip + // Lip renderer.setRenderBounds(0.0F, 0.9375, 0.0F, 0.0625, 1.0, 1.0F); TProxyClient.renderStandardInvBlock(renderer, block, metadata); renderer.setRenderBounds(0.0625, 0.9375, 0.9375, 0.9375, 1.0, 1.0F); @@ -40,7 +40,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler renderer.setRenderBounds(0.0625, 0.9375, 0.0F, 0.9375, 1.0, 0.0625); TProxyClient.renderStandardInvBlock(renderer, block, metadata); - //Legs + // Legs renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.3125F, 0.625F, 0.3125F); TProxyClient.renderStandardInvBlock(renderer, block, metadata); renderer.setRenderBounds(0.6875, 0.0F, 0.0F, 1.0F, 0.625F, 0.25F); @@ -65,7 +65,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler renderer.setRenderBounds(0.125F, 0.125f, 0.125F, 0.875F, 0.25F, 0.875F); TProxyClient.renderStandardInvBlock(renderer, block, metadata); - //Details + // Details renderer.setRenderBounds(0.001f, 0.1245f, 0.001f, 0.1245f, 0.999f, 0.4375f); TProxyClient.renderStandardInvBlock(renderer, block, metadata); renderer.setRenderBounds(0.001f, 0.1245f, 0.5625f, 0.1245f, 0.999f, 0.999f); @@ -102,7 +102,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler renderer.setRenderBounds(0.4375f, 0.1245f, 0.001f, 0.5625f, 0.25F, 0.1245f); TProxyClient.renderStandardInvBlock(renderer, block, metadata); - //Legs + // Legs renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.3125F, 0.125, 0.3125F); TProxyClient.renderStandardInvBlock(renderer, block, metadata); renderer.setRenderBounds(0.6875F, 0.0F, 0.0F, 1.0F, 0.125, 0.3125F); @@ -112,7 +112,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler renderer.setRenderBounds(0.6875F, 0.0F, 0.6875F, 1.0F, 0.125, 1.0F); TProxyClient.renderStandardInvBlock(renderer, block, metadata); - //Outside + // Outside renderer.setRenderBounds(0.0f, 0.125, 0f, 0.125, 1.0F, 1); TProxyClient.renderStandardInvBlock(renderer, block, metadata); renderer.setRenderBounds(0.875f, 0.125, 0f, 1, 1.0F, 1); @@ -138,11 +138,11 @@ public class SearedRender implements ISimpleBlockRenderingHandler int metadata = world.getBlockMetadata(x, y, z); if (metadata == 0) { - //Top + // Top renderer.setRenderBounds(0.0F, 0.625F, 0.0F, 1.0F, 0.9375F, 1.0F); renderer.renderStandardBlock(block, x, y, z); - //Lip + // Lip renderer.setRenderBounds(0.0F, 0.9375, 0.0F, 0.0625, 1.0, 1.0F); renderer.renderStandardBlock(block, x, y, z); renderer.setRenderBounds(0.0625, 0.9375, 0.9375, 0.9375, 1.0, 1.0F); @@ -152,7 +152,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler renderer.setRenderBounds(0.0625, 0.9375, 0.0F, 0.9375, 1.0, 0.0625); renderer.renderStandardBlock(block, x, y, z); - //Legs + // Legs renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.3125F, 0.625F, 0.3125F); renderer.renderStandardBlock(block, x, y, z); renderer.setRenderBounds(0.6875, 0.0F, 0.0F, 1.0F, 0.625F, 0.25F); @@ -193,7 +193,8 @@ public class SearedRender implements ISimpleBlockRenderingHandler float percent = (float) logic.getLiquidAmount() / (float) logic.getCapacity(); float height = percent * (maxHeight - minHeight); - //float height = logic.getLiquidAmount() / (logic.getCapacity() * 1.03F) / 16F; + // float height = logic.getLiquidAmount() / + // (logic.getCapacity() * 1.03F) / 16F; renderer.setRenderBounds(minX, minHeight, minZ, maxX, minHeight + height, maxZ); Fluid fluid = logic.liquid.getFluid(); @@ -218,7 +219,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler renderer.renderStandardBlock(block, x, y, z); renderer.setRenderBounds(0.375, 0.375, 0.625, 0.625, 0.625, 1); zMin = 0.5F; - //zMin = 0.625F; + // zMin = 0.625F; break; case 3: renderer.setRenderBounds(0.25, 0.25, 0, 0.75, 0.375, 0.375); @@ -278,7 +279,8 @@ public class SearedRender implements ISimpleBlockRenderingHandler renderer.setRenderBounds(xMin, yMin, zMin, xMax, 0.625, zMax); BlockSkinRenderHelper.renderLiquidBlock(fluid.getStillIcon(), fluid.getFlowingIcon(), x, y, z, renderer, world); - //float xMin = 0.375F, zMin = 0.375F, xMax = 0.625F, zMax = 0.625F; + // float xMin = 0.375F, zMin = 0.375F, xMax = 0.625F, + // zMax = 0.625F; switch (logic.getRenderDirection()) { case 3: @@ -308,7 +310,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler renderer.setRenderBounds(0.125F, 0.125f, 0.125F, 0.875F, 0.25F, 0.875F); renderer.renderStandardBlock(block, x, y, z); - //Outside + // Outside renderer.setRenderBounds(0.0f, 0.125, 0f, 0.125, 1.0F, 1); renderer.renderStandardBlock(block, x, y, z); renderer.setRenderBounds(0.875f, 0.125, 0f, 1, 1.0F, 1); @@ -318,7 +320,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler renderer.setRenderBounds(0.125f, 0.125, 0.875f, 0.875f, 1.0F, 1); renderer.renderStandardBlock(block, x, y, z); - //Details + // Details renderer.setRenderBounds(0.001f, 0.1245f, 0.001f, 0.1245f, 0.999f, 0.4375f); renderer.renderStandardBlock(block, x, y, z); @@ -356,7 +358,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler renderer.setRenderBounds(0.4375f, 0.1245f, 0.001f, 0.5625f, 0.25F, 0.1245f); renderer.renderStandardBlock(block, x, y, z); - //Legs + // Legs renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.3125F, 0.125, 0.3125F); renderer.renderStandardBlock(block, x, y, z); renderer.setRenderBounds(0.6875F, 0.0F, 0.0F, 1.0F, 0.125, 0.3125F); @@ -366,7 +368,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler renderer.setRenderBounds(0.6875F, 0.0F, 0.6875F, 1.0F, 0.125, 1.0F); renderer.renderStandardBlock(block, x, y, z); - //Liquids + // Liquids if (world.getTileEntity(x, y, z) instanceof CastingBasinLogic) { CastingBasinLogic logic = (CastingBasinLogic) world.getTileEntity(x, y, z); @@ -398,7 +400,8 @@ public class SearedRender implements ISimpleBlockRenderingHandler float percent = (float) logic.getLiquidAmount() / (float) logic.getCapacity(); float height = percent * (maxHeight - minHeight); - //float height = (logic.getLiquidAmount() / (logic.getCapacity() * 1.05F) * 0.6875F) / maxHeight; + // float height = (logic.getLiquidAmount() / + // (logic.getCapacity() * 1.05F) * 0.6875F) / maxHeight; renderer.setRenderBounds(minX, minHeight, minZ, maxX, minHeight + height, maxZ); Fluid fluid = logic.liquid.getFluid(); diff --git a/src/main/java/tconstruct/client/block/SlimeChannelRender.java b/src/main/java/tconstruct/client/block/SlimeChannelRender.java index f861b288..90467fd0 100644 --- a/src/main/java/tconstruct/client/block/SlimeChannelRender.java +++ b/src/main/java/tconstruct/client/block/SlimeChannelRender.java @@ -46,7 +46,7 @@ public class SlimeChannelRender implements ISimpleBlockRenderingHandler Tessellator tessellator = Tessellator.instance; int bMeta = world.getBlockMetadata(x, y, z); IIcon iconStill = block.getIcon(1, bMeta); - float flowDir = (float) (bMeta / 8f * 2 * Math.PI); //Tau, radians + float flowDir = (float) (bMeta / 8f * 2 * Math.PI); // Tau, radians double u1, u2, u3, u4, v1, v2, v3, v4; @@ -87,19 +87,15 @@ public class SlimeChannelRender implements ISimpleBlockRenderingHandler tessellator.addVertexWithUV(x + 1, y + 0.5, z + 0, u3, v3); } renderer.renderStandardBlock(block, x, y, z); - /*int direction = world.getBlockMetadata(x, y, z) % 4; - if (direction == 0) - renderer.uvRotateTop = 2; - if (direction == 1) - renderer.uvRotateTop = 1; - if (direction == 2) - renderer.uvRotateTop = 0; - if (direction == 3) - renderer.uvRotateTop = 3; - - boolean flag = renderer.renderStandardBlock(block, x, y, z); - renderer.uvRotateTop = 0; - return flag;*/ + /* + * int direction = world.getBlockMetadata(x, y, z) % 4; if (direction == + * 0) renderer.uvRotateTop = 2; if (direction == 1) renderer.uvRotateTop + * = 1; if (direction == 2) renderer.uvRotateTop = 0; if (direction == + * 3) renderer.uvRotateTop = 3; + * + * boolean flag = renderer.renderStandardBlock(block, x, y, z); + * renderer.uvRotateTop = 0; return flag; + */ return true; } diff --git a/src/main/java/tconstruct/client/block/SlimePadRender.java b/src/main/java/tconstruct/client/block/SlimePadRender.java index b33341f1..3c063b83 100644 --- a/src/main/java/tconstruct/client/block/SlimePadRender.java +++ b/src/main/java/tconstruct/client/block/SlimePadRender.java @@ -41,7 +41,7 @@ public class SlimePadRender implements ISimpleBlockRenderingHandler float[] size (int meta) { - //xMin, zMin, xMax, zMax + // xMin, zMin, xMax, zMax switch (meta) { case 0: diff --git a/src/main/java/tconstruct/client/block/SmelteryRender.java b/src/main/java/tconstruct/client/block/SmelteryRender.java index d825fb60..2d74b8bd 100644 --- a/src/main/java/tconstruct/client/block/SmelteryRender.java +++ b/src/main/java/tconstruct/client/block/SmelteryRender.java @@ -47,7 +47,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler if (logic.validStructure) { int posX = logic.centerPos.x - 1, posY = logic.centerPos.y, posZ = logic.centerPos.z - 1; - //Melting + // Melting if (logic.getSizeInventory() > 0) { for (int i = 0; i < logic.layers; i++) @@ -56,7 +56,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler } } - //Liquids + // Liquids float base = 0F; int yBase = 0; int liquidBase = 0; @@ -70,7 +70,8 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler liquidSize -= countSize; float height = countSize > 20000 ? 1.0F : countSize / 20000F; - //renderer.setRenderBounds(0, base, 0, 1, height + base, 1); + // renderer.setRenderBounds(0, base, 0, 1, height + base, + // 1); float renderBase = base; float renderHeight = height + base; base += height; @@ -89,33 +90,27 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler else BlockSkinRenderHelper.renderLiquidBlock(fluid.getStillIcon(), fluid.getFlowingIcon(), posX + i % 3, posY + yBase, posZ + i / 3, renderer, world); } - /*if (liquid.itemID < 4096) //Block - { - Block liquidBlock = Block.blocksList[liquid.itemID]; - for (int i = 0; i < 9; i++) - { - float minX = i % 3 == 0 ? -0.001F : 0F; - float minZ = i / 3 == 0 ? -0.001F : 0F; - float maxX = i % 3 == 2 ? 1.001F : 1F; - float maxZ = i / 3 == 2 ? 1.001F : 1F; - renderer.setRenderBounds(minX, renderBase, minZ, maxX, renderHeight, maxZ); - BlockSkinRenderHelper.renderMetadataBlock(liquidBlock, liquid.itemMeta, posX + i % 3, posY + yBase, posZ + i / 3, renderer, world); - } - } - else - //Item - { - Item liquidItem = Item.itemsList[liquid.itemID]; - for (int i = 0; i < 9; i++) - { - float minX = i % 3 == 0 ? -0.001F : 0F; - float minZ = i / 3 == 0 ? -0.001F : 0F; - float maxX = i % 3 == 2 ? 1.001F : 1F; - float maxZ = i / 3 == 2 ? 1.001F : 1F; - renderer.setRenderBounds(minX, renderBase, minZ, maxX, renderHeight, maxZ); - BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(liquid.itemMeta), posX, posY + yBase, posZ, renderer, world); - } - }*/ + /* + * if (liquid.itemID < 4096) //Block { Block liquidBlock = + * Block.blocksList[liquid.itemID]; for (int i = 0; i < 9; + * i++) { float minX = i % 3 == 0 ? -0.001F : 0F; float minZ + * = i / 3 == 0 ? -0.001F : 0F; float maxX = i % 3 == 2 ? + * 1.001F : 1F; float maxZ = i / 3 == 2 ? 1.001F : 1F; + * renderer.setRenderBounds(minX, renderBase, minZ, maxX, + * renderHeight, maxZ); + * BlockSkinRenderHelper.renderMetadataBlock(liquidBlock, + * liquid.itemMeta, posX + i % 3, posY + yBase, posZ + i / + * 3, renderer, world); } } else //Item { Item liquidItem = + * Item.itemsList[liquid.itemID]; for (int i = 0; i < 9; + * i++) { float minX = i % 3 == 0 ? -0.001F : 0F; float minZ + * = i / 3 == 0 ? -0.001F : 0F; float maxX = i % 3 == 2 ? + * 1.001F : 1F; float maxZ = i / 3 == 2 ? 1.001F : 1F; + * renderer.setRenderBounds(minX, renderBase, minZ, maxX, + * renderHeight, maxZ); + * BlockSkinRenderHelper.renderFakeBlock + * (liquidItem.getIconFromDamage(liquid.itemMeta), posX, + * posY + yBase, posZ, renderer, world); } } + */ if (countSize == room) { @@ -143,20 +138,21 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler float blockHeight = input.stackSize / (float) blockToRender.stackSize; renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, MathHelper.clamp_float(blockHeight, 0.01F, 1.0F), 1.0F); - //TODO is this needed??? - //if (blockToRender.itemID < 4096) //Block + // TODO is this needed??? + // if (blockToRender.itemID < 4096) //Block // { Block liquidBlock = BlockUtils.getBlockFromItemStack(blockToRender); BlockSkinRenderHelper.renderMetadataBlock(liquidBlock, blockToRender.getItemDamage(), posX + i % 3, posY, posZ + i / 3, renderer, world); - //} + // } - /*else //No items, only blocks - //Item - { - Item liquidItem = Item.itemsList[blockToRender.itemID]; - int metadata = blockToRender.getItemDamage(); - BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(metadata), posX + i % 3, posY, posZ + i / 3, renderer, world); - }*/ + /* + * else //No items, only blocks //Item { Item liquidItem = + * Item.itemsList[blockToRender.itemID]; int metadata = + * blockToRender.getItemDamage(); + * BlockSkinRenderHelper.renderFakeBlock + * (liquidItem.getIconFromDamage(metadata), posX + i % 3, + * posY, posZ + i / 3, renderer, world); } + */ } } } diff --git a/src/main/java/tconstruct/client/block/TankAirRender.java b/src/main/java/tconstruct/client/block/TankAirRender.java index c4b429ac..adb28819 100644 --- a/src/main/java/tconstruct/client/block/TankAirRender.java +++ b/src/main/java/tconstruct/client/block/TankAirRender.java @@ -21,7 +21,7 @@ public class TankAirRender implements ISimpleBlockRenderingHandler @Override public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer) { - //No inventory block + // No inventory block } @Override @@ -47,7 +47,8 @@ public class TankAirRender implements ISimpleBlockRenderingHandler for (FluidStack fluidstack : logic.getFluids()) { Fluid fluid = fluidstack.getFluid(); - //System.out.println("Base: "+getBaseAmount(base)+", Height: "+getHeightAmount(base, fluidstack.amount)+", fluid amount: "+fluidstack.amount); + // System.out.println("Base: "+getBaseAmount(base)+", Height: "+getHeightAmount(base, + // fluidstack.amount)+", fluid amount: "+fluidstack.amount); renderer.setRenderBounds(0.0, getBaseAmount(base), 0.0, 1.0, getHeightAmount(base, fluidstack.amount), 1.0); if (fluid.canBePlacedInWorld()) BlockSkinRenderHelper.renderMetadataBlock(fluid.getBlock(), 0, x, y, z, renderer, world); diff --git a/src/main/java/tconstruct/client/block/TankRender.java b/src/main/java/tconstruct/client/block/TankRender.java index 2bfadd07..f4e040b6 100644 --- a/src/main/java/tconstruct/client/block/TankRender.java +++ b/src/main/java/tconstruct/client/block/TankRender.java @@ -38,7 +38,7 @@ public class TankRender implements ISimpleBlockRenderingHandler { if (modelID == tankModelID) { - //Liquid + // Liquid LavaTankLogic logic = (LavaTankLogic) world.getTileEntity(x, y, z); if (logic.containsFluid()) { @@ -53,7 +53,7 @@ public class TankRender implements ISimpleBlockRenderingHandler renderer.setRenderBounds(00, 0.001, 0.001, 0.999, logic.getFluidAmountScaled(), 0.999); } - //Block + // Block int meta = world.getBlockMetadata(x, y, z); if (meta == 0 && world.getBlock(x, y + 1, z) == Blocks.air) { diff --git a/src/main/java/tconstruct/client/entity/CartRender.java b/src/main/java/tconstruct/client/entity/CartRender.java index b5da3fb8..14ca873c 100644 --- a/src/main/java/tconstruct/client/entity/CartRender.java +++ b/src/main/java/tconstruct/client/entity/CartRender.java @@ -90,7 +90,7 @@ public class CartRender extends Render if (cart.getCartType() != 0) { - //this.loadTexture("/terrain.png"); + // this.loadTexture("/terrain.png"); float var29 = 0.75F; GL11.glScalef(var29, var29, var29); @@ -111,20 +111,22 @@ public class CartRender extends Render GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); } - //GL11.glScalef(1.0F / var29, 1.0F / var29, 1.0F / var29); + // GL11.glScalef(1.0F / var29, 1.0F / var29, 1.0F / var29); } - //this.loadTexture("/tinkertextures/entity/pullcart.png"); + // this.loadTexture("/tinkertextures/entity/pullcart.png"); GL11.glScalef(-1.0F, -1.0F, 1.0F); this.modelCart.render(cart, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render 0 && shouldSpreadItems()) { float x = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F; @@ -320,7 +321,7 @@ public class FancyItemRender extends Render int i1; float f1; float f2; - //TODO make this be the block equivalent to k + // TODO make this be the block equivalent to k Block block = BlockUtils.getBlockFromItem(k); if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(block.getRenderType())) { @@ -439,25 +440,20 @@ public class FancyItemRender extends Render this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5, true); } - /* Modders must handle this themselves if they use custom renderers! - if (par3ItemStack.hasEffect()) - { - GL11.glDepthFunc(GL11.GL_GREATER); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDepthMask(false); - par2TextureManager.bindTexture(RES_ITEM_GLINT); - this.zLevel -= 50.0F; - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR); - GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F); - this.renderGlint(par4 * 431278612 + par5 * 32178161, par4 - 2, par5 - 2, 20, 20); - GL11.glDisable(GL11.GL_BLEND); - GL11.glDepthMask(true); - this.zLevel += 50.0F; - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glDepthFunc(GL11.GL_LEQUAL); - } - */ + /* + * Modders must handle this themselves if they use custom renderers! + * if (par3ItemStack.hasEffect()) { + * GL11.glDepthFunc(GL11.GL_GREATER); + * GL11.glDisable(GL11.GL_LIGHTING); GL11.glDepthMask(false); + * par2TextureManager.bindTexture(RES_ITEM_GLINT); this.zLevel -= + * 50.0F; GL11.glEnable(GL11.GL_BLEND); + * GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR); + * GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F); this.renderGlint(par4 * + * 431278612 + par5 * 32178161, par4 - 2, par5 - 2, 20, 20); + * GL11.glDisable(GL11.GL_BLEND); GL11.glDepthMask(true); + * this.zLevel += 50.0F; GL11.glEnable(GL11.GL_LIGHTING); + * GL11.glDepthFunc(GL11.GL_LEQUAL); } + */ } } @@ -498,8 +494,8 @@ public class FancyItemRender extends Render } /** - * Renders the item's overlay information. Examples being stack count or damage on top of the item's image at the - * specified position. + * Renders the item's overlay information. Examples being stack count or + * damage on top of the item's image at the specified position. */ public void renderItemOverlayIntoGUI (FontRenderer par1FontRenderer, TextureManager par2TextureManager, ItemStack par3ItemStack, int par4, int par5) { @@ -542,8 +538,8 @@ public class FancyItemRender extends Render } /** - * Adds a quad to the tesselator at the specified position with the set width and height and color. Args: - * tessellator, x, y, width, height, color + * Adds a quad to the tesselator at the specified position with the set + * width and height and color. Args: tessellator, x, y, width, height, color */ private void renderQuad (Tessellator par1Tessellator, int par2, int par3, int par4, int par5, int par6) { @@ -573,10 +569,12 @@ public class FancyItemRender extends Render } /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render 0 && shouldSpreadItems()) { float x = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F; @@ -273,10 +274,12 @@ public class ArrowRender extends Render } /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render= xScroll && mouseY >= yScroll && mouseX < scrollwidth && mouseY < scrollheight) + if (!this.wasClicking && mouseDown && mouseX >= xScroll && mouseY >= yScroll && mouseX < scrollWidth && mouseY < scrollHeight) { this.isScrolling = true; } @@ -92,7 +92,7 @@ public class AdaptiveSmelteryGui extends NewContainerGui if (this.isScrolling) { - this.currentScroll = (mouseY - yScroll - 7.5F) / (scrollheight - yScroll - 15.0F); + this.currentScroll = (mouseY - yScroll - 7.5F) / (scrollHeight - yScroll - 15.0F); if (this.currentScroll < 0.0F) { @@ -182,7 +182,7 @@ public class AdaptiveSmelteryGui extends NewContainerGui int cornerY = (height - ySize) / 2; drawTexturedModalRect(cornerX + 46, cornerY, 0, 0, 176, ySize); - //Fuel - Lava + // Fuel - Lava this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture); if (scomp.fuelGague > 0) { @@ -208,7 +208,7 @@ public class AdaptiveSmelteryGui extends NewContainerGui capacity += info[i].capacity; } - //Liquids - molten metal + // Liquids - molten metal int base = 0; for (int i = 0; i < info.length - 1; i++) { @@ -234,35 +234,32 @@ public class AdaptiveSmelteryGui extends NewContainerGui } } - //Liquid gague + // Liquid gague GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(background); drawTexturedModalRect(cornerX + 54, cornerY + 16, 176, 76, 52, 52); - //Side inventory + // Side inventory GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(backgroundSide); - //if (logic.layers > 0) + // if (logic.layers > 0) { - /*if (logic.layers == 1) - { - drawTexturedModalRect(cornerX - 46, cornerY, 0, 0, 98, 43); - drawTexturedModalRect(cornerX - 46, cornerY + 43, 0, 133, 98, 25); - } - else if (logic.layers == 2) - { - drawTexturedModalRect(cornerX - 46, cornerY, 0, 0, 98, 61); - drawTexturedModalRect(cornerX - 46, cornerY + 61, 0, 97, 98, 61); - } - else*/ + /* + * if (logic.layers == 1) { drawTexturedModalRect(cornerX - 46, + * cornerY, 0, 0, 98, 43); drawTexturedModalRect(cornerX - 46, + * cornerY + 43, 0, 133, 98, 25); } else if (logic.layers == 2) { + * drawTexturedModalRect(cornerX - 46, cornerY, 0, 0, 98, 61); + * drawTexturedModalRect(cornerX - 46, cornerY + 61, 0, 97, 98, 61); + * } else + */ { drawTexturedModalRect(cornerX - 46, cornerY, 0, 0, 98, ySize - 8); } drawTexturedModalRect(cornerX + 32, (int) (cornerY + 8 + 127 * currentScroll), 98, 0, 12, 15); } - //Temperature + // Temperature int slotSize = logic.getSizeInventory(); if (slotSize > 24) slotSize = 24; @@ -297,7 +294,7 @@ public class AdaptiveSmelteryGui extends NewContainerGui ArrayList list = new ArrayList(); if (liquid.fluidID == -37) { - list.add("\u00A7f" + (StatCollector.translateToLocal("gui.smeltery1"))); + list.add("\u00A7f" + StatCollector.translateToLocal("gui.smeltery1")); list.add("mB: " + liquid.amount); } else @@ -431,80 +428,54 @@ public class AdaptiveSmelteryGui extends NewContainerGui { Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); - tessellator.addVertexWithUV(startU + 0, startV + endV, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());//Bottom left - tessellator.addVertexWithUV(startU + endU, startV + endV, this.zLevel, par3Icon.getMaxU(), par3Icon.getMaxV());//Bottom right - tessellator.addVertexWithUV(startU + endU, startV + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());//Top right - tessellator.addVertexWithUV(startU + 0, startV + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV()); //Top left + tessellator.addVertexWithUV(startU + 0, startV + endV, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());// Bottom left + tessellator.addVertexWithUV(startU + endU, startV + endV, this.zLevel, par3Icon.getMaxU(), par3Icon.getMaxV());// Bottom right + tessellator.addVertexWithUV(startU + endU, startV + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());// Top right + tessellator.addVertexWithUV(startU + 0, startV + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV()); // Top left tessellator.draw(); } - /*@Override - public void mouseClicked(int mouseX, int mouseY, int mouseButton) - { - super.mouseClicked(mouseX, mouseY, mouseButton); - - int base = 0; - int cornerX = (width - xSize) / 2 + 36; - int cornerY = (height - ySize) / 2; - int fluidToBeBroughtUp = -1; - - for (FluidStack liquid : multitank.getAllFluids()) - { - int basePos = 54; - int initialLiquidSize = 0; - int liquidSize = 0;//liquid.amount * 52 / liquidLayers; - if (multitank.getCapacity() > 0) - { - int total = multitank.getFluidAmount(); - int liquidLayers = (total / 20000 + 1) * 20000; - if (liquidLayers > 0) - { - liquidSize = liquid.amount * 52 / liquidLayers; - if (liquidSize == 0) - liquidSize = 1; - base += liquidSize; - } - } - - int leftX = cornerX + basePos; - int topY = (cornerY + 68) - base; - int sizeX = 52; - int sizeY = liquidSize; - if (mouseX >= leftX && mouseX <= leftX + sizeX && mouseY >= topY && mouseY < topY + sizeY) - { - fluidToBeBroughtUp = liquid.fluidID; - - Packet250CustomPayload packet = new Packet250CustomPayload(); - - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - DataOutputStream dos = new DataOutputStream(bos); - - try - { - dos.write(11); - - dos.writeInt(logic.getWorld().provider.dimensionId); - dos.writeInt(logic.xCoord); - dos.writeInt(logic.yCoord); - dos.writeInt(logic.zCoord); - - dos.writeBoolean(this.isShiftKeyDown()); - - dos.writeInt(fluidToBeBroughtUp); - } - catch (Exception e) - { - e.printStackTrace(); - } - - packet.channel = "TConstruct"; - packet.data = bos.toByteArray(); - packet.length = bos.size(); - - PacketDispatcher.sendPacketToServer(packet); - } - } - }*/ + /* + * @Override public void mouseClicked(int mouseX, int mouseY, int + * mouseButton) { super.mouseClicked(mouseX, mouseY, mouseButton); + * + * int base = 0; int cornerX = (width - xSize) / 2 + 36; int cornerY = + * (height - ySize) / 2; int fluidToBeBroughtUp = -1; + * + * for (FluidStack liquid : multitank.getAllFluids()) { int basePos = 54; + * int initialLiquidSize = 0; int liquidSize = 0;//liquid.amount * 52 / + * liquidLayers; if (multitank.getCapacity() > 0) { int total = + * multitank.getFluidAmount(); int liquidLayers = (total / 20000 + 1) * + * 20000; if (liquidLayers > 0) { liquidSize = liquid.amount * 52 / + * liquidLayers; if (liquidSize == 0) liquidSize = 1; base += liquidSize; } + * } + * + * int leftX = cornerX + basePos; int topY = (cornerY + 68) - base; int + * sizeX = 52; int sizeY = liquidSize; if (mouseX >= leftX && mouseX <= + * leftX + sizeX && mouseY >= topY && mouseY < topY + sizeY) { + * fluidToBeBroughtUp = liquid.fluidID; + * + * Packet250CustomPayload packet = new Packet250CustomPayload(); + * + * ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream + * dos = new DataOutputStream(bos); + * + * try { dos.write(11); + * + * dos.writeInt(logic.worldObj.provider.dimensionId); + * dos.writeInt(logic.xCoord); dos.writeInt(logic.yCoord); + * dos.writeInt(logic.zCoord); + * + * dos.writeBoolean(this.isShiftKeyDown()); + * + * dos.writeInt(fluidToBeBroughtUp); } catch (Exception e) { + * e.printStackTrace(); } + * + * packet.channel = "TConstruct"; packet.data = bos.toByteArray(); + * packet.length = bos.size(); + * + * PacketDispatcher.sendPacketToServer(packet); } } } + */ @Override public void onGuiClosed () diff --git a/src/main/java/tconstruct/client/gui/ArmorExtendedGui.java b/src/main/java/tconstruct/client/gui/ArmorExtendedGui.java index f92d2e49..9f8f908a 100644 --- a/src/main/java/tconstruct/client/gui/ArmorExtendedGui.java +++ b/src/main/java/tconstruct/client/gui/ArmorExtendedGui.java @@ -39,11 +39,13 @@ public class ArmorExtendedGui extends InventoryEffectRenderer int cornerY = (this.width - this.ySize) / 2; this.buttonList.clear(); - // InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new ItemStack(Block.workbench), 0); - // this.buttonList.add(tab); - // tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new ItemStack(Item.plateDiamond), 1); - // tab.enabled = false; - // this.buttonList.add(tab); + // InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new + // ItemStack(Block.workbench), 0); + // this.buttonList.add(tab); + // tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new + // ItemStack(Item.plateDiamond), 1); + // tab.enabled = false; + // this.buttonList.add(tab); TabRegistry.updateTabValues(cornerX, cornerY, InventoryTabArmorExtended.class); TabRegistry.addTabsToList(this.buttonList); @@ -51,8 +53,10 @@ public class ArmorExtendedGui extends InventoryEffectRenderer protected void drawGuiContainerForegroundLayer (int par1, int par2) { - //fontRenderer.drawString(StatCollector.translateToLocal("inventory.armorextended"), 60, 6, 0x404040); - //fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 17, (ySize - 96) + 2, 0x404040); + // fontRenderer.drawString(StatCollector.translateToLocal("inventory.armorextended"), + // 60, 6, 0x404040); + // fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), + // 17, (ySize - 96) + 2, 0x404040); } public void drawScreen (int par1, int par2, float par3) @@ -60,23 +64,25 @@ public class ArmorExtendedGui extends InventoryEffectRenderer super.drawScreen(par1, par2, par3); this.xSize_lo = (float) par1; this.ySize_lo = (float) par2; - // if (stats.inventory[2] != null && stats.inventory[2].getItem() == TContent.knapsack) - // { - // if (this.buttonList.size() < 3) - // { - // int cornerX = guiLeft; - // int cornerY = (this.height - this.ySize) / 2; - // InventoryTab tab = new InventoryTab(4, cornerX + 56, cornerY - 28, new ItemStack(TContent.knapsack), 1); - // this.buttonList.add(tab); - // } - // } - // else - // { - // if (this.buttonList.size() >= 3) - // { - // buttonList.remove(2); - // } - // } + // if (stats.inventory[2] != null && stats.inventory[2].getItem() == + // TContent.knapsack) + // { + // if (this.buttonList.size() < 3) + // { + // int cornerX = guiLeft; + // int cornerY = (this.height - this.ySize) / 2; + // InventoryTab tab = new InventoryTab(4, cornerX + 56, cornerY - 28, + // new ItemStack(TContent.knapsack), 1); + // this.buttonList.add(tab); + // } + // } + // else + // { + // if (this.buttonList.size() >= 3) + // { + // buttonList.remove(2); + // } + // } } private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/armorextended.png"); @@ -84,7 +90,7 @@ public class ArmorExtendedGui extends InventoryEffectRenderer protected void drawGuiContainerBackgroundLayer (float f, int i, int j) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - //mc.renderEngine.bindTexture("/mods/tinker/textures/gui/armorextended.png"); + // mc.renderEngine.bindTexture("/mods/tinker/textures/gui/armorextended.png"); this.mc.getTextureManager().bindTexture(background); int cornerX = guiLeft; int cornerY = (width - ySize) / 2; @@ -143,13 +149,10 @@ public class ArmorExtendedGui extends InventoryEffectRenderer OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); } - /*protected void keyTyped(char par1, int par2) - { - if (par2 == TControls.armorKey.keyCode) - { - this.mc.thePlayer.closeScreen(); - } - - super.keyTyped(par1, par2); - }*/ + /* + * protected void keyTyped(char par1, int par2) { if (par2 == + * TControls.armorKey.keyCode) { this.mc.thePlayer.closeScreen(); } + * + * super.keyTyped(par1, par2); } + */ } diff --git a/src/main/java/tconstruct/client/gui/CraftingStationGui.java b/src/main/java/tconstruct/client/gui/CraftingStationGui.java index 237e1c69..2831b7ee 100644 --- a/src/main/java/tconstruct/client/gui/CraftingStationGui.java +++ b/src/main/java/tconstruct/client/gui/CraftingStationGui.java @@ -32,8 +32,9 @@ public class CraftingStationGui extends GuiContainer { super(logic.getGuiContainer(inventory, world, x, y, z)); this.logic = logic; - //text = new GuiTextField(this.fontRendererObj, this.xSize / 2 - 5, 8, 30, 12); - //this.text.setText(""); + // text = new GuiTextField(this.fontRendererObj, this.xSize / 2 - 5, 8, + // 30, 12); + // this.text.setText(""); title = "\u00A7n" + StatCollector.translateToLocal("gui.toolforge1"); body = StatCollector.translateToLocal("gui.toolforge2"); toolName = ""; @@ -46,7 +47,8 @@ public class CraftingStationGui extends GuiContainer this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 0x202020); if (logic.chest != null) this.fontRendererObj.drawString(StatCollector.translateToLocal(logic.chest.get().getInventoryName()), -108, this.ySize - 160, 0x202020); - //this.fontRendererObj.drawString(toolName + "_", this.xSize / 2 - 18, 8, 0xffffff); + // this.fontRendererObj.drawString(toolName + "_", this.xSize / 2 - 18, + // 8, 0xffffff); if (logic.tinkerTable) { @@ -111,7 +113,7 @@ public class CraftingStationGui extends GuiContainer final int maxDur = tags.getInteger("TotalDurability"); int availableDurability = maxDur - durability; - //Durability + // Durability int base = 24; int offset = 0; if (maxDur > 0) @@ -131,7 +133,7 @@ public class CraftingStationGui extends GuiContainer } final float stonebound = tags.getFloat("Shoddy"); - //Attack + // Attack if (categories.contains("weapon")) { int attack = (int) (tags.getInteger("Attack")); @@ -202,12 +204,15 @@ public class CraftingStationGui extends GuiContainer offset++; this.fontRendererObj.drawString(StatCollector.translateToLocal("gui.toolstation9") + df.format(accuracy - 4) + "%", xSize + 8, base + offset * 10, 0xffffff); offset++; - /*this.fontRendererObj.drawString("Chance to break: " + df.format(shatter)+"%", xSize + 8, base + offset * 10, 0xffffff); - offset++;*/ + /* + * this.fontRendererObj.drawString("Chance to break: " + + * df.format(shatter)+"%", xSize + 8, base + offset * 10, 0xffffff); + * offset++; + */ offset++; } - //Mining + // Mining if (categories.contains("dualharvest")) { float mineSpeed = tags.getInteger("MiningSpeed") / 100f; @@ -371,7 +376,7 @@ public class CraftingStationGui extends GuiContainer GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(icons); - //Draw chest side + // Draw chest side if (logic.chest != null) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); diff --git a/src/main/java/tconstruct/client/gui/FurnaceGui.java b/src/main/java/tconstruct/client/gui/FurnaceGui.java index f1489fa4..09399c74 100644 --- a/src/main/java/tconstruct/client/gui/FurnaceGui.java +++ b/src/main/java/tconstruct/client/gui/FurnaceGui.java @@ -25,7 +25,8 @@ public class FurnaceGui extends GuiContainer } /** - * Draw the foreground layer for the GuiContainer (everything in front of the items) + * Draw the foreground layer for the GuiContainer (everything in front of + * the items) */ protected void drawGuiContainerForegroundLayer (int par1, int par2) { @@ -35,7 +36,8 @@ public class FurnaceGui extends GuiContainer } /** - * Draw the background layer for the GuiContainer (everything behind the items) + * Draw the background layer for the GuiContainer (everything behind the + * items) */ protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3) { diff --git a/src/main/java/tconstruct/client/gui/GuiButtonTool.java b/src/main/java/tconstruct/client/gui/GuiButtonTool.java index 329056cc..7ebb2a2d 100644 --- a/src/main/java/tconstruct/client/gui/GuiButtonTool.java +++ b/src/main/java/tconstruct/client/gui/GuiButtonTool.java @@ -14,13 +14,16 @@ import cpw.mods.fml.relauncher.SideOnly; public class GuiButtonTool extends GuiButton { /** - * True for pointing right (next page), false for pointing left (previous page). + * True for pointing right (next page), false for pointing left (previous + * page). */ int textureX; int textureY; public String texture; public ToolGuiElement element; - private static ResourceLocation background;// = new ResourceLocation("tinker", "textures/gui/armorextended.png"); + private static ResourceLocation background;// = new + // ResourceLocation("tinker", + // "textures/gui/armorextended.png"); public GuiButtonTool(int id, int posX, int posY, int texX, int texY, String domain, String tex, ToolGuiElement e) { diff --git a/src/main/java/tconstruct/client/gui/GuiLandmine.java b/src/main/java/tconstruct/client/gui/GuiLandmine.java index 659a828d..b663fe7c 100644 --- a/src/main/java/tconstruct/client/gui/GuiLandmine.java +++ b/src/main/java/tconstruct/client/gui/GuiLandmine.java @@ -47,7 +47,7 @@ public class GuiLandmine extends GuiContainer { if (k == 0) { - list.set(k, par1ItemStack.getRarity().rarityColor + (String)list.get(k)); + list.set(k, par1ItemStack.getRarity().rarityColor + (String) list.get(k)); } else { diff --git a/src/main/java/tconstruct/client/gui/KnapsackGui.java b/src/main/java/tconstruct/client/gui/KnapsackGui.java index ab5d6396..155d6781 100644 --- a/src/main/java/tconstruct/client/gui/KnapsackGui.java +++ b/src/main/java/tconstruct/client/gui/KnapsackGui.java @@ -35,13 +35,16 @@ public class KnapsackGui extends GuiContainer TabRegistry.updateTabValues(cornerX, cornerY, InventoryTabKnapsack.class); TabRegistry.addTabsToList(this.buttonList); - // InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new ItemStack(Block.workbench), 0); - // this.buttonList.add(tab); - // tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new ItemStack(Item.plateDiamond), 1); - // this.buttonList.add(tab); - // tab = new InventoryTab(4, cornerX + 56, cornerY - 28, new ItemStack(TContent.knapsack), 1); - // tab.enabled = false; - // this.buttonList.add(tab); + // InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new + // ItemStack(Block.workbench), 0); + // this.buttonList.add(tab); + // tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new + // ItemStack(Item.plateDiamond), 1); + // this.buttonList.add(tab); + // tab = new InventoryTab(4, cornerX + 56, cornerY - 28, new + // ItemStack(TContent.knapsack), 1); + // tab.enabled = false; + // this.buttonList.add(tab); } protected void drawGuiContainerForegroundLayer (int par1, int par2) @@ -61,13 +64,10 @@ public class KnapsackGui extends GuiContainer drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize); } - /*protected void keyTyped(char par1, int par2) - { - if (par2 == TControls.armorKey.keyCode) - { - this.mc.thePlayer.closeScreen(); - } - - super.keyTyped(par1, par2); - }*/ + /* + * protected void keyTyped(char par1, int par2) { if (par2 == + * TControls.armorKey.keyCode) { this.mc.thePlayer.closeScreen(); } + * + * super.keyTyped(par1, par2); } + */ } diff --git a/src/main/java/tconstruct/client/gui/NewContainerGui.java b/src/main/java/tconstruct/client/gui/NewContainerGui.java index 9b4557d4..79fc4f6c 100644 --- a/src/main/java/tconstruct/client/gui/NewContainerGui.java +++ b/src/main/java/tconstruct/client/gui/NewContainerGui.java @@ -145,26 +145,20 @@ public abstract class NewContainerGui extends GuiScreen } } - /*for (int slotIter = 0; slotIter < this.container.otherInventorySlots.size(); ++slotIter) - { - ActiveSlot slot = (ActiveSlot) this.container.otherInventorySlots.get(slotIter); - if (slot.getActive()) - { - this.drawSlotInventory(slot); - - if (this.isMouseOverSlot(slot, mouseX, mouseY)) - { - this.mainSlot = slot; - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_DEPTH_TEST); - slotXPos = slot.xDisplayPosition; - slotYPos = slot.yDisplayPosition; - this.drawGradientRect(slotXPos, slotYPos, slotXPos + 16, slotYPos + 16, -2130706433, -2130706433); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_DEPTH_TEST); - } - } - }*/ + /* + * for (int slotIter = 0; slotIter < + * this.container.otherInventorySlots.size(); ++slotIter) { ActiveSlot + * slot = (ActiveSlot) this.container.otherInventorySlots.get(slotIter); + * if (slot.getActive()) { this.drawSlotInventory(slot); + * + * if (this.isMouseOverSlot(slot, mouseX, mouseY)) { this.mainSlot = + * slot; GL11.glDisable(GL11.GL_LIGHTING); + * GL11.glDisable(GL11.GL_DEPTH_TEST); slotXPos = slot.xDisplayPosition; + * slotYPos = slot.yDisplayPosition; this.drawGradientRect(slotXPos, + * slotYPos, slotXPos + 16, slotYPos + 16, -2130706433, -2130706433); + * GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); } + * } } + */ this.drawGuiContainerForegroundLayer(mouseX, mouseY); InventoryPlayer inventoryplayer = this.mc.thePlayer.inventory; @@ -256,8 +250,9 @@ public abstract class NewContainerGui extends GuiScreen } /** - * Draws the text when mouse is over creative inventory tab. Params: current creative tab to be checked, current - * mouse x position, current mouse y position. + * Draws the text when mouse is over creative inventory tab. Params: current + * creative tab to be checked, current mouse x position, current mouse y + * position. */ protected void drawCreativeTabHoveringText (String par1Str, int par2, int par3) { @@ -343,14 +338,16 @@ public abstract class NewContainerGui extends GuiScreen } /** - * Draw the foreground layer for the GuiContainer (everything in front of the items) + * Draw the foreground layer for the GuiContainer (everything in front of + * the items) */ protected void drawGuiContainerForegroundLayer (int par1, int par2) { } /** - * Draw the background layer for the GuiContainer (everything behind the items) + * Draw the background layer for the GuiContainer (everything behind the + * items) */ protected abstract void drawGuiContainerBackgroundLayer (float f, int i, int j); @@ -635,8 +632,9 @@ public abstract class NewContainerGui extends GuiScreen } /** - * Called when the mouse is moved or a mouse button is released. Signature: (mouseX, mouseY, which) which==-1 is - * mouseMove, which==0 or which==1 is mouseUp + * Called when the mouse is moved or a mouse button is released. Signature: + * (mouseX, mouseY, which) which==-1 is mouseMove, which==0 or which==1 is + * mouseUp */ protected void mouseMovedOrUp (int par1, int par2, int par3) { @@ -802,8 +800,8 @@ public abstract class NewContainerGui extends GuiScreen } /** - * Args: left, top, width, height, pointX, pointY. Note: left, top are local to Gui, pointX, pointY are local to - * screen + * Args: left, top, width, height, pointX, pointY. Note: left, top are local + * to Gui, pointX, pointY are local to screen */ protected boolean isPointInRegion (int par1, int par2, int par3, int par4, int par5, int par6) { @@ -825,7 +823,8 @@ public abstract class NewContainerGui extends GuiScreen } /** - * Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e). + * Fired when a key is typed. This is the equivalent of + * KeyListener.keyTyped(KeyEvent e). */ protected void keyTyped (char par1, int par2) { @@ -850,7 +849,8 @@ public abstract class NewContainerGui extends GuiScreen } /** - * This function is what controls the hotbar shortcut check when you press a number key when hovering a stack. + * This function is what controls the hotbar shortcut check when you press a + * number key when hovering a stack. */ protected boolean checkHotbarKeys (int par1) { @@ -870,7 +870,8 @@ public abstract class NewContainerGui extends GuiScreen } /** - * Called when the screen is unloaded. Used to disable keyboard repeat events + * Called when the screen is unloaded. Used to disable keyboard repeat + * events */ public void onGuiClosed () { @@ -881,7 +882,8 @@ public abstract class NewContainerGui extends GuiScreen } /** - * Returns true if this GUI should pause the game when it is displayed in single-player + * Returns true if this GUI should pause the game when it is displayed in + * single-player */ public boolean doesGuiPauseGame () { diff --git a/src/main/java/tconstruct/client/gui/PartCrafterGui.java b/src/main/java/tconstruct/client/gui/PartCrafterGui.java index bcc7aa47..4afeedc5 100644 --- a/src/main/java/tconstruct/client/gui/PartCrafterGui.java +++ b/src/main/java/tconstruct/client/gui/PartCrafterGui.java @@ -57,9 +57,9 @@ public class PartCrafterGui extends NewContainerGui void drawMaterialInformation () { ItemStack top = logic.getStackInSlot(2); - //ItemStack topResult = logic.getStackInSlot(4); + // ItemStack topResult = logic.getStackInSlot(4); ItemStack bottom = logic.getStackInSlot(3); - //ItemStack bottomResult = logic.getStackInSlot(6); + // ItemStack bottomResult = logic.getStackInSlot(6); if (topMaterial != top) { topMaterial = top; diff --git a/src/main/java/tconstruct/client/gui/SmelteryGui.java b/src/main/java/tconstruct/client/gui/SmelteryGui.java index ef1e2223..b9142898 100644 --- a/src/main/java/tconstruct/client/gui/SmelteryGui.java +++ b/src/main/java/tconstruct/client/gui/SmelteryGui.java @@ -62,10 +62,10 @@ public class SmelteryGui extends NewContainerGui int topo = this.guiTop; int xScroll = lefto + 67; int yScroll = topo + 8; - int scrollwidth = xScroll + 14; - int scrollheight = yScroll + 144; + int scrollWidth = xScroll + 14; + int scrollHeight = yScroll + 144; - if (!this.wasClicking && mouseDown && mouseX >= xScroll && mouseY >= yScroll && mouseX < scrollwidth && mouseY < scrollheight) + if (!this.wasClicking && mouseDown && mouseX >= xScroll && mouseY >= yScroll && mouseX < scrollWidth && mouseY < scrollHeight) { this.isScrolling = true; } @@ -84,7 +84,7 @@ public class SmelteryGui extends NewContainerGui if (this.isScrolling) { - this.currentScroll = (mouseY - yScroll - 7.5F) / (scrollheight - yScroll - 15.0F); + this.currentScroll = (mouseY - yScroll - 7.5F) / (scrollHeight - yScroll - 15.0F); if (this.currentScroll < 0.0F) { @@ -117,7 +117,7 @@ public class SmelteryGui extends NewContainerGui { int basePos = 54; int initialLiquidSize = 0; - int liquidSize = 0;//liquid.amount * 52 / liquidLayers; + int liquidSize = 0;// liquid.amount * 52 / liquidLayers; if (logic.getCapacity() > 0) { int total = logic.getTotalLiquid(); @@ -167,7 +167,7 @@ public class SmelteryGui extends NewContainerGui int cornerY = (height - ySize) / 2; drawTexturedModalRect(cornerX + 46, cornerY, 0, 0, 176, ySize); - //Fuel - Lava + // Fuel - Lava this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture); if (logic.fuelGague > 0) { @@ -183,7 +183,7 @@ public class SmelteryGui extends NewContainerGui } } - //Liquids - molten metal + // Liquids - molten metal int base = 0; for (FluidStack liquid : logic.moltenMetal) { @@ -215,13 +215,13 @@ public class SmelteryGui extends NewContainerGui } } - //Liquid gague + // Liquid gague GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(background); drawTexturedModalRect(cornerX + 54, cornerY + 16, 176, 76, 52, 52); - //Side inventory + // Side inventory GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(backgroundSide); if (logic.layers > 0) @@ -243,7 +243,7 @@ public class SmelteryGui extends NewContainerGui drawTexturedModalRect(cornerX + 32, (int) (cornerY + 8 + 127 * currentScroll), 98, 0, 12, 15); } - //Temperature + // Temperature int slotSize = logic.layers * 9; if (slotSize > 24) slotSize = 24; @@ -412,10 +412,10 @@ public class SmelteryGui extends NewContainerGui { Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); - tessellator.addVertexWithUV(startU + 0, startV + endV, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());//Bottom left - tessellator.addVertexWithUV(startU + endU, startV + endV, this.zLevel, par3Icon.getMaxU(), par3Icon.getMaxV());//Bottom right - tessellator.addVertexWithUV(startU + endU, startV + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());//Top right - tessellator.addVertexWithUV(startU + 0, startV + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV()); //Top left + tessellator.addVertexWithUV(startU + 0, startV + endV, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());// Bottom left + tessellator.addVertexWithUV(startU + endU, startV + endV, this.zLevel, par3Icon.getMaxU(), par3Icon.getMaxV());// Bottom right + tessellator.addVertexWithUV(startU + endU, startV + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());// Top right + tessellator.addVertexWithUV(startU + 0, startV + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV()); // Top left tessellator.draw(); } @@ -433,7 +433,7 @@ public class SmelteryGui extends NewContainerGui { int basePos = 54; int initialLiquidSize = 0; - int liquidSize = 0;//liquid.amount * 52 / liquidLayers; + int liquidSize = 0;// liquid.amount * 52 / liquidLayers; if (logic.getCapacity() > 0) { int total = logic.getTotalLiquid(); @@ -453,38 +453,8 @@ public class SmelteryGui extends NewContainerGui int sizeY = liquidSize; if (mouseX >= leftX && mouseX <= leftX + sizeX && mouseY >= topY && mouseY < topY + sizeY) { - //TODO Update fluid stuff fluidToBeBroughtUp = liquid.fluidID; - /*Packet250CustomPayload packet = new Packet250CustomPayload(); - - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - DataOutputStream dos = new DataOutputStream(bos); - - try - { - dos.write(11); - - dos.writeInt(logic.getWorld().provider.dimensionId); - dos.writeInt(logic.xCoord); - dos.writeInt(logic.yCoord); - dos.writeInt(logic.zCoord); - - dos.writeBoolean(this.isShiftKeyDown()); - - dos.writeInt(fluidToBeBroughtUp); - } - catch (Exception e) - { - e.printStackTrace(); - } - - packet.channel = "TConstruct"; - packet.data = bos.toByteArray(); - packet.length = bos.size(); - - PacketDispatcher.sendPacketToServer(packet);*/ - TConstruct.packetPipeline .sendToServer(new PacketSmeltery(logic.getWorldObj().provider.dimensionId, logic.xCoord, logic.yCoord, logic.zCoord, this.isShiftKeyDown(), fluidToBeBroughtUp)); } diff --git a/src/main/java/tconstruct/client/gui/StencilTableGui.java b/src/main/java/tconstruct/client/gui/StencilTableGui.java index 1aeafa6f..77cd92b3 100644 --- a/src/main/java/tconstruct/client/gui/StencilTableGui.java +++ b/src/main/java/tconstruct/client/gui/StencilTableGui.java @@ -1,8 +1,5 @@ package tconstruct.client.gui; -import java.io.ByteArrayOutputStream; -import java.io.DataOutputStream; - import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; @@ -15,7 +12,6 @@ import org.lwjgl.opengl.GL11; import tconstruct.TConstruct; import tconstruct.blocks.logic.StencilTableLogic; -import tconstruct.common.TContent; import tconstruct.common.TRepo; import tconstruct.inventory.PatternShaperContainer; import tconstruct.util.network.packet.PacketStencilTable; @@ -66,20 +62,27 @@ public class StencilTableGui extends GuiContainer int cornerY = (this.height - this.ySize) / 2; this.buttonList.clear(); - /*ToolGuiElement repair = TConstruct.toolButtons.get(0); - GuiButtonTool repairButton = new GuiButtonTool(0, cornerX - 110, cornerY, repair.buttonIconX, repair.buttonIconY, repair.texture); // Repair - repairButton.enabled = false; - this.buttonList.add(repairButton);*/ + /* + * ToolGuiElement repair = TConstruct.toolButtons.get(0); GuiButtonTool + * repairButton = new GuiButtonTool(0, cornerX - 110, cornerY, + * repair.buttonIconX, repair.buttonIconY, repair.texture); // Repair + * repairButton.enabled = false; this.buttonList.add(repairButton); + */ this.buttonList.add(new GuiButton(0, cornerX - 120, cornerY, 120, 20, (StatCollector.translateToLocal("gui.stenciltable1")))); this.buttonList.add(new GuiButton(1, cornerX - 120, cornerY + 20, 120, 20, (StatCollector.translateToLocal("gui.stenciltable2")))); - //for (int iter = 0; iter < TConstructContent.patternOutputs.length; iter++) - //{ + // for (int iter = 0; iter < TConstructContent.patternOutputs.length; + // iter++) + // { - /*ToolGuiElement element = TConstruct.toolButtons.get(iter); - GuiButtonTool button = new GuiButtonTool(iter, cornerX - 110 + 22 * (iter % 5), cornerY + 22 * (iter / 5), element.buttonIconX, element.buttonIconY, element.texture); // Repair - this.buttonList.add(button);*/ - //} + /* + * ToolGuiElement element = TConstruct.toolButtons.get(iter); + * GuiButtonTool button = new GuiButtonTool(iter, cornerX - 110 + 22 * + * (iter % 5), cornerY + 22 * (iter / 5), element.buttonIconX, + * element.buttonIconY, element.texture); // Repair + * this.buttonList.add(button); + */ + // } } protected void actionPerformed (GuiButton button) @@ -110,12 +113,11 @@ public class StencilTableGui extends GuiContainer logic.setInventorySlotContents(1, stack); updateServer(stack); } - /*else if (meta == 1 || meta == 2) - { - ItemStack stack = new ItemStack(TContent.metalPattern, 1, 0); - logic.setInventorySlotContents(1, stack); - updateServer(stack); - }*/ + /* + * else if (meta == 1 || meta == 2) { ItemStack stack = new + * ItemStack(TContent.metalPattern, 1, 0); + * logic.setInventorySlotContents(1, stack); updateServer(stack); } + */ } } diff --git a/src/main/java/tconstruct/client/gui/ToolStationGui.java b/src/main/java/tconstruct/client/gui/ToolStationGui.java index 190b8db0..10c5cab4 100644 --- a/src/main/java/tconstruct/client/gui/ToolStationGui.java +++ b/src/main/java/tconstruct/client/gui/ToolStationGui.java @@ -151,7 +151,8 @@ public class ToolStationGui extends NewContainerGui } /** - * Draw the foreground layer for the GuiContainer (everything in front of the items) + * Draw the foreground layer for the GuiContainer (everything in front of + * the items) */ protected void drawGuiContainerForegroundLayer (int par1, int par2) { @@ -185,7 +186,7 @@ public class ToolStationGui extends NewContainerGui final int maxDur = tags.getInteger("TotalDurability"); int availableDurability = maxDur - durability; - //Durability + // Durability int base = 24; int offset = 0; if (maxDur > 0) @@ -205,7 +206,7 @@ public class ToolStationGui extends NewContainerGui } final float stonebound = tags.getFloat("Shoddy"); - //Attack + // Attack if (categories.contains("weapon")) { int attack = (int) (tags.getInteger("Attack")); @@ -276,12 +277,15 @@ public class ToolStationGui extends NewContainerGui offset++; this.fontRendererObj.drawString(StatCollector.translateToLocal("gui.toolstation9") + df.format(accuracy - 4) + "%", xSize + 8, base + offset * 10, 0xffffff); offset++; - /*this.fontRendererObj.drawString("Chance to break: " + df.format(shatter)+"%", xSize + 8, base + offset * 10, 0xffffff); - offset++;*/ + /* + * this.fontRendererObj.drawString("Chance to break: " + + * df.format(shatter)+"%", xSize + 8, base + offset * 10, 0xffffff); + * offset++; + */ offset++; } - //Mining + // Mining if (categories.contains("dualharvest")) { float mineSpeed = tags.getInteger("MiningSpeed") / 100f; @@ -406,7 +410,7 @@ public class ToolStationGui extends NewContainerGui case 2: return StatCollector.translateToLocal("gui.partcrafter.mining3"); case 3: - return StatCollector.translateToLocal("gui.partcrafter.mining4"); //Mithril + return StatCollector.translateToLocal("gui.partcrafter.mining4"); // Mithril case 4: return StatCollector.translateToLocal("gui.partcrafter.mining5"); case 5: @@ -421,7 +425,8 @@ public class ToolStationGui extends NewContainerGui private static final ResourceLocation description = new ResourceLocation("tinker", "textures/gui/description.png"); /** - * Draw the background layer for the GuiContainer (everything behind the items) + * Draw the background layer for the GuiContainer (everything behind the + * items) */ protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3) { @@ -479,35 +484,29 @@ public class ToolStationGui extends NewContainerGui void updateServer (String name) { - /*ByteArrayOutputStream bos = new ByteArrayOutputStream(8); - DataOutputStream outputStream = new DataOutputStream(bos); - try - { - outputStream.writeByte(1); - outputStream.writeInt(logic.getWorld().provider.dimensionId); - outputStream.writeInt(logic.xCoord); - outputStream.writeInt(logic.yCoord); - outputStream.writeInt(logic.zCoord); - outputStream.writeUTF(name); - } - catch (Exception ex) - { - ex.printStackTrace(); - } - - Packet250CustomPayload packet = new Packet250CustomPayload(); - packet.channel = "TConstruct"; - packet.data = bos.toByteArray(); - packet.length = bos.size(); - - PacketDispatcher.sendPacketToServer(packet);*/ + /* + * ByteArrayOutputStream bos = new ByteArrayOutputStream(8); + * DataOutputStream outputStream = new DataOutputStream(bos); try { + * outputStream.writeByte(1); + * outputStream.writeInt(logic.getWorld().provider.dimensionId); + * outputStream.writeInt(logic.xCoord); + * outputStream.writeInt(logic.yCoord); + * outputStream.writeInt(logic.zCoord); outputStream.writeUTF(name); } + * catch (Exception ex) { ex.printStackTrace(); } + * + * Packet250CustomPayload packet = new Packet250CustomPayload(); + * packet.channel = "TConstruct"; packet.data = bos.toByteArray(); + * packet.length = bos.size(); + * + * PacketDispatcher.sendPacketToServer(packet); + */ TConstruct.packetPipeline.sendToServer(new PacketToolStation(logic.xCoord, logic.yCoord, logic.zCoord, name)); } - /*protected void mouseClicked(int par1, int par2, int par3) - { - super.mouseClicked(par1, par2, par3); - text.mouseClicked(par1, par2, par3); - }*/ + /* + * protected void mouseClicked(int par1, int par2, int par3) { + * super.mouseClicked(par1, par2, par3); text.mouseClicked(par1, par2, + * par3); } + */ } diff --git a/src/main/java/tconstruct/client/pages/MaterialPage.java b/src/main/java/tconstruct/client/pages/MaterialPage.java index 6d670f6e..5e0f8402 100644 --- a/src/main/java/tconstruct/client/pages/MaterialPage.java +++ b/src/main/java/tconstruct/client/pages/MaterialPage.java @@ -107,7 +107,8 @@ public class MaterialPage extends BookPage GL11.glEnable(GL12.GL_RESCALE_NORMAL); RenderHelper.enableGUIStandardItemLighting(); manual.renderitem.zLevel = 100; - //renderitem.renderItemAndEffectIntoGUI(fonts, getMC().renderEngine, icons[0], localWidth + 50, localHeight + 0); + // renderitem.renderItemAndEffectIntoGUI(fonts, getMC().renderEngine, + // icons[0], localWidth + 50, localHeight + 0); manual.renderitem.renderItemAndEffectIntoGUI(manual.fonts, manual.getMC().renderEngine, icons[1], localWidth + 108, localHeight + 50); manual.renderitem.renderItemAndEffectIntoGUI(manual.fonts, manual.getMC().renderEngine, icons[2], localWidth + 108, localHeight + 82); manual.renderitem.renderItemAndEffectIntoGUI(manual.fonts, manual.getMC().renderEngine, icons[3], localWidth + 108, localHeight + 114); diff --git a/src/main/java/tconstruct/client/tabs/TabRegistry.java b/src/main/java/tconstruct/client/tabs/TabRegistry.java index 94745bca..f49775d7 100644 --- a/src/main/java/tconstruct/client/tabs/TabRegistry.java +++ b/src/main/java/tconstruct/client/tabs/TabRegistry.java @@ -26,7 +26,7 @@ public class TabRegistry { if (gui.getClass() == GuiInventory.class) { - //Values are public at runtime. + // Values are public at runtime. int cornerX = gui.xSize; int cornerY = gui.guiTop; gui.buttonList.clear(); diff --git a/src/main/java/tconstruct/common/TContent.java b/src/main/java/tconstruct/common/TContent.java index 92d30829..2b34443a 100644 --- a/src/main/java/tconstruct/common/TContent.java +++ b/src/main/java/tconstruct/common/TContent.java @@ -137,8 +137,9 @@ import cpw.mods.fml.common.registry.GameRegistry; public class TContent implements IFuelHandler { - //Temporary items - //public static Item armorTest = new ArmorStandard(2445, 4, EnumArmorPart.HELMET).setCreativeTab(CreativeTabs.tabAllSearch); + // Temporary items + // public static Item armorTest = new ArmorStandard(2445, 4, + // EnumArmorPart.HELMET).setCreativeTab(CreativeTabs.tabAllSearch); public TContent() { @@ -165,15 +166,17 @@ public class TContent implements IFuelHandler EntityRegistry.registerModEntity(ArrowEntity.class, "Arrow", 4, TConstruct.instance, 32, 5, true); EntityRegistry.registerModEntity(EntityLandmineFirework.class, "LandmineFirework", 5, TConstruct.instance, 32, 5, true); EntityRegistry.registerModEntity(ExplosivePrimed.class, "SlimeExplosive", 6, TConstruct.instance, 32, 5, true); - //EntityRegistry.registerModEntity(CartEntity.class, "Small Wagon", 1, TConstruct.instance, 32, 5, true); + // EntityRegistry.registerModEntity(CartEntity.class, "Small Wagon", 1, + // TConstruct.instance, 32, 5, true); EntityRegistry.registerModEntity(BlueSlime.class, "EdibleSlime", 12, TConstruct.instance, 64, 5, true); - //EntityRegistry.registerModEntity(MetalSlime.class, "MetalSlime", 13, TConstruct.instance, 64, 5, true); + // EntityRegistry.registerModEntity(MetalSlime.class, "MetalSlime", 13, + // TConstruct.instance, 64, 5, true); } void registerBlocks () { - //Tool Station + // Tool Station TRepo.toolStationWood = new ToolStationBlock(Material.wood).setBlockName("ToolStation"); TRepo.toolForge = new ToolForgeBlock(Material.iron).setBlockName("ToolForge"); TRepo.craftingStationWood = new CraftingStationBlock(Material.wood).setBlockName("CraftingStation"); @@ -202,7 +205,7 @@ public class TContent implements IFuelHandler TRepo.woolSlab2 = new SlabBase(Material.cloth, Blocks.wool, 8, 8).setBlockName("cloth"); TRepo.woolSlab2.setStepSound(Block.soundTypeCloth).setCreativeTab(CreativeTabs.tabDecorations); - //Smeltery + // Smeltery TRepo.smeltery = new SmelteryBlock().setBlockName("Smeltery"); TRepo.smelteryNether = new SmelteryBlock("nether").setBlockName("Smeltery"); TRepo.lavaTank = new LavaTankBlock().setBlockName("LavaTank"); @@ -216,7 +219,7 @@ public class TContent implements IFuelHandler TRepo.tankAir = new TankAirBlock(Material.leaves).setBlockUnbreakable().setBlockName("tconstruct.tank.air"); - //Traps + // Traps TRepo.landmine = new BlockLandmine().setHardness(0.5F).setResistance(0F).setStepSound(Block.soundTypeMetal).setCreativeTab(CreativeTabs.tabRedstone).setBlockName("landmine"); TRepo.punji = new Punji().setBlockName("trap.punji"); TRepo.barricadeOak = new BarricadeBlock(Blocks.log, 0).setBlockName("trap.barricade.oak"); @@ -227,7 +230,7 @@ public class TContent implements IFuelHandler TRepo.dryingRack = new DryingRack().setBlockName("Armor.DryingRack"); - //Liquids + // Liquids TRepo.liquidMetal = new MaterialLiquid(MapColor.tntColor); TRepo.moltenIronFluid = new Fluid("iron.molten"); @@ -430,7 +433,7 @@ public class TContent implements IFuelHandler FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenEnderFluid, 1000), new ItemStack(TRepo.buckets, 1, 23), new ItemStack(Items.bucket))); } - //Slime + // Slime TRepo.slimeStep = new StepSoundSlime("mob.slime", 1.0f, 1.0f); TRepo.blueSlimeFluid = new Fluid("slime.blue"); @@ -441,7 +444,7 @@ public class TContent implements IFuelHandler TRepo.blueSlimeFluid.setBlock(TRepo.slimePool); FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.blueSlimeFluid, 1000), new ItemStack(TRepo.buckets, 1, 24), new ItemStack(Items.bucket))); - //Glue + // Glue TRepo.glueFluid = new Fluid("glue").setDensity(6000).setViscosity(6000).setTemperature(200); if (!FluidRegistry.registerFluid(TRepo.glueFluid)) TRepo.glueFluid = FluidRegistry.getFluid("glue"); @@ -462,7 +465,7 @@ public class TContent implements IFuelHandler TRepo.fluidBlocks = new Block[] { TRepo.moltenIron, TRepo.moltenGold, TRepo.moltenCopper, TRepo.moltenTin, TRepo.moltenAluminum, TRepo.moltenCobalt, TRepo.moltenArdite, TRepo.moltenBronze, TRepo.moltenAlubrass, TRepo.moltenManyullyn, TRepo.moltenAlumite, TRepo.moltenObsidian, TRepo.moltenSteel, TRepo.moltenGlass, TRepo.moltenStone, TRepo.moltenEmerald, TRepo.blood, TRepo.moltenNickel, TRepo.moltenLead, TRepo.moltenSilver, TRepo.moltenShiny, TRepo.moltenInvar, TRepo.moltenElectrum, TRepo.moltenEnder, TRepo.slimePool, TRepo.glueFluidBlock }; - //Slime Islands + // Slime Islands TRepo.slimeGel = new SlimeGel().setStepSound(TRepo.slimeStep).setLightOpacity(0).setBlockName("slime.gel"); TRepo.slimeGrass = new SlimeGrass().setStepSound(Block.soundTypeGrass).setLightOpacity(0).setBlockName("slime.grass"); TRepo.slimeTallGrass = new SlimeTallGrass().setStepSound(Block.soundTypeGrass).setBlockName("slime.grass.tall"); @@ -472,13 +475,13 @@ public class TContent implements IFuelHandler TRepo.bloodChannel = new ConveyorBase(Material.water, "liquid_cow").setHardness(0.3f).setStepSound(TRepo.slimeStep).setBlockName("blood.channel"); TRepo.slimePad = new SlimePad(Material.cloth).setStepSound(TRepo.slimeStep).setHardness(0.3f).setBlockName("slime.pad"); - //Decoration + // Decoration TRepo.stoneTorch = new StoneTorch().setBlockName("decoration.stonetorch"); TRepo.stoneLadder = new StoneLadder().setBlockName("decoration.stoneladder"); TRepo.multiBrick = new MultiBrick().setBlockName("Decoration.Brick"); TRepo.multiBrickFancy = new MultiBrickFancy().setBlockName("Decoration.BrickFancy"); - //Ores + // Ores String[] berryOres = new String[] { "berry_iron", "berry_gold", "berry_copper", "berry_tin", "berry_iron_ripe", "berry_gold_ripe", "berry_copper_ripe", "berry_tin_ripe" }; TRepo.oreBerry = (OreberryBush) new OreberryBush(berryOres, 0, 4, new String[] { "oreIron", "oreGold", "oreCopper", "oreTin" }).setBlockName("ore.berries.one"); String[] berryOresTwo = new String[] { "berry_aluminum", "berry_essence", "", "", "berry_aluminum_ripe", "berry_essence_ripe", "", "" }; @@ -502,7 +505,7 @@ public class TContent implements IFuelHandler TRepo.speedBlock = new SpeedBlock().setBlockName("SpeedBlock"); - //Glass + // Glass TRepo.clearGlass = new GlassBlockConnected("clear", false).setBlockName("GlassBlock"); TRepo.clearGlass.stepSound = Block.soundTypeGlass; TRepo.glassPane = new GlassPaneConnected("clear", false); @@ -511,7 +514,7 @@ public class TContent implements IFuelHandler TRepo.stainedGlassClear.stepSound = Block.soundTypeGlass; TRepo.stainedGlassClearPane = new GlassPaneStained(); - //Rail + // Rail TRepo.woodenRail = new WoodRail().setStepSound(Block.soundTypeWood).setCreativeTab(TConstructRegistry.blockTab).setBlockName("rail.wood"); } @@ -529,16 +532,18 @@ public class TContent implements IFuelHandler TRepo.toolShard = new ToolShard("_chunk").setUnlocalizedName("tconstruct.ToolShard"); TRepo.woodPattern = new Pattern("pattern_", "materials/").setUnlocalizedName("tconstruct.Pattern"); TRepo.metalPattern = new MetalPattern("cast_", "materials/").setUnlocalizedName("tconstruct.MetalPattern"); - //armorPattern = new ArmorPattern(PHConstruct.armorPattern, "armorcast_", "materials/").setUnlocalizedName("tconstruct.ArmorPattern"); + // armorPattern = new ArmorPattern(PHConstruct.armorPattern, + // "armorcast_", + // "materials/").setUnlocalizedName("tconstruct.ArmorPattern"); GameRegistry.registerItem(TRepo.materials, "materials"); GameRegistry.registerItem(TRepo.woodPattern, "woodPattern"); GameRegistry.registerItem(TRepo.metalPattern, "metalPattern"); - //GameRegistry.registerItem(TRepo.armorPattern, "armorPattern"); + // GameRegistry.registerItem(TRepo.armorPattern, "armorPattern"); TConstructRegistry.addItemToDirectory("blankPattern", TRepo.blankPattern); TConstructRegistry.addItemToDirectory("woodPattern", TRepo.woodPattern); TConstructRegistry.addItemToDirectory("metalPattern", TRepo.metalPattern); - //TConstructRegistry.addItemToDirectory("armorPattern", armorPattern); + // TConstructRegistry.addItemToDirectory("armorPattern", armorPattern); String[] patternTypes = { "ingot", "toolRod", "pickaxeHead", "shovelHead", "hatchetHead", "swordBlade", "wideGuard", "handGuard", "crossbar", "binding", "frypanHead", "signHead", "knifeBlade", "chiselHead", "toughRod", "toughBinding", "largePlate", "broadAxeHead", "scytheHead", "excavatorHead", "largeBlade", "hammerHead", "fullGuard" }; @@ -551,11 +556,12 @@ public class TContent implements IFuelHandler { TConstructRegistry.addItemStackToDirectory(patternTypes[i] + "Cast", new ItemStack(TRepo.metalPattern, 1, i)); } - /*String[] armorPartTypes = { "helmet", "chestplate", "leggings", "boots" }; - for (int i = 1; i < armorPartTypes.length; i++) - { - TConstructRegistry.addItemStackToDirectory(armorPartTypes[i] + "Cast", new ItemStack(armorPattern, 1, i)); - }*/ + /* + * String[] armorPartTypes = { "helmet", "chestplate", "leggings", + * "boots" }; for (int i = 1; i < armorPartTypes.length; i++) { + * TConstructRegistry.addItemStackToDirectory(armorPartTypes[i] + + * "Cast", new ItemStack(armorPattern, 1, i)); } + */ TRepo.manualBook = new Manual(); GameRegistry.registerItem(TRepo.manualBook, "manualBook"); @@ -638,7 +644,8 @@ public class TContent implements IFuelHandler for (int i = 0; i < toolParts.length; i++) { - GameRegistry.registerItem(toolParts[i], toolPartStrings[i]); // 1.7 compat + GameRegistry.registerItem(toolParts[i], toolPartStrings[i]); // 1.7 + // compat TConstructRegistry.addItemToDirectory(toolPartStrings[i], toolParts[i]); } @@ -658,17 +665,20 @@ public class TContent implements IFuelHandler TRepo.jerky = new Jerky(foodOverhaul).setUnlocalizedName("tconstruct.jerky"); GameRegistry.registerItem(TRepo.jerky, "jerky"); - //Wearables - //heavyHelmet = new TArmorBase(PHConstruct.heavyHelmet, 0).setUnlocalizedName("tconstruct.HeavyHelmet"); + // Wearables + // heavyHelmet = new TArmorBase(PHConstruct.heavyHelmet, + // 0).setUnlocalizedName("tconstruct.HeavyHelmet"); TRepo.heartCanister = new HeartCanister().setUnlocalizedName("tconstruct.canister"); - //heavyBoots = new TArmorBase(PHConstruct.heavyBoots, 3).setUnlocalizedName("tconstruct.HeavyBoots"); - //glove = new Glove(PHConstruct.glove).setUnlocalizedName("tconstruct.Glove"); + // heavyBoots = new TArmorBase(PHConstruct.heavyBoots, + // 3).setUnlocalizedName("tconstruct.HeavyBoots"); + // glove = new + // Glove(PHConstruct.glove).setUnlocalizedName("tconstruct.Glove"); TRepo.knapsack = new Knapsack().setUnlocalizedName("tconstruct.storage"); TRepo.goldHead = new GoldenHead(4, 1.2F, false).setAlwaysEdible().setPotionEffect(Potion.regeneration.id, 10, 0, 1.0F).setUnlocalizedName("goldenhead"); - //GameRegistry.registerItem(TRepo.heavyHelmet, "heavyHelmet"); + // GameRegistry.registerItem(TRepo.heavyHelmet, "heavyHelmet"); GameRegistry.registerItem(TRepo.heartCanister, "heartCanister"); - //GameRegistry.registerItem(TRepo.heavyBoots, "heavyBoots"); - //GameRegistry.registerItem(TRepo.glove, "glove"); + // GameRegistry.registerItem(TRepo.heavyBoots, "heavyBoots"); + // GameRegistry.registerItem(TRepo.glove, "glove"); GameRegistry.registerItem(TRepo.knapsack, "knapsack"); GameRegistry.registerItem(TRepo.goldHead, "goldHead"); @@ -712,17 +722,17 @@ public class TContent implements IFuelHandler TConstructRegistry.addItemStackToDirectory("miniRedHeart", new ItemStack(TRepo.heartCanister, 1, 1)); TConstructRegistry.addItemStackToDirectory("canisterRedHeart", new ItemStack(TRepo.heartCanister, 1, 2)); - //Vanilla stack sizes + // Vanilla stack sizes Items.wooden_door.setMaxStackSize(16); Items.iron_door.setMaxStackSize(16); Items.snowball.setMaxStackSize(64); Items.boat.setMaxStackSize(16); Items.minecart.setMaxStackSize(3); - //Items.minecartEmpty.setMaxStackSize(3); - //Items.minecartCrate.setMaxStackSize(3); - //Items.minecartPowered.setMaxStackSize(3); + // Items.minecartEmpty.setMaxStackSize(3); + // Items.minecartCrate.setMaxStackSize(3); + // Items.minecartPowered.setMaxStackSize(3); Items.cake.setMaxStackSize(16); - //Block.torchWood.setTickRandomly(false); + // Block.torchWood.setTickRandomly(false); } void registerMaterials () @@ -747,53 +757,54 @@ public class TContent implements IFuelHandler TConstructRegistry.addToolMaterial(17, "BlueSlime", "Slime ", 0, 1200, 150, 0, 2.0F, 0, 0f, "\u00A7b", ""); TConstructRegistry.addToolMaterial(18, "PigIron", "Pig Iron ", 3, 250, 600, 2, 1.3F, 1, 0f, "\u00A7c", "Tasty"); - TConstructRegistry.addBowMaterial(0, 384, 20, 1.0f); //Wood - TConstructRegistry.addBowMaterial(1, 10, 80, 0.2f); //Stone - TConstructRegistry.addBowMaterial(2, 576, 40, 1.2f); //Iron - TConstructRegistry.addBowMaterial(3, 10, 80, 0.2f); //Flint - TConstructRegistry.addBowMaterial(4, 384, 20, 1.0f); //Cactus - TConstructRegistry.addBowMaterial(5, 192, 30, 1.0f); //Bone - TConstructRegistry.addBowMaterial(6, 10, 80, 0.2f); //Obsidian - TConstructRegistry.addBowMaterial(7, 10, 80, 0.2f); //Netherrack - TConstructRegistry.addBowMaterial(8, 1536, 20, 1.2f); //Slime - TConstructRegistry.addBowMaterial(9, 48, 25, 0.5f); //Paper - TConstructRegistry.addBowMaterial(10, 1152, 40, 1.2f); //Cobalt - TConstructRegistry.addBowMaterial(11, 960, 40, 1.2f); //Ardite - TConstructRegistry.addBowMaterial(12, 1536, 40, 1.2f); //Manyullyn - TConstructRegistry.addBowMaterial(13, 384, 40, 1.2f); //Copper - TConstructRegistry.addBowMaterial(14, 576, 40, 1.2f); //Bronze - TConstructRegistry.addBowMaterial(15, 768, 40, 1.2f); //Alumite - TConstructRegistry.addBowMaterial(16, 768, 40, 1.2f); //Steel - TConstructRegistry.addBowMaterial(17, 576, 20, 1.2f); //Blue Slime - TConstructRegistry.addBowMaterial(18, 384, 20, 1.2f); //Slime + TConstructRegistry.addBowMaterial(0, 384, 20, 1.0f); // Wood + TConstructRegistry.addBowMaterial(1, 10, 80, 0.2f); // Stone + TConstructRegistry.addBowMaterial(2, 576, 40, 1.2f); // Iron + TConstructRegistry.addBowMaterial(3, 10, 80, 0.2f); // Flint + TConstructRegistry.addBowMaterial(4, 384, 20, 1.0f); // Cactus + TConstructRegistry.addBowMaterial(5, 192, 30, 1.0f); // Bone + TConstructRegistry.addBowMaterial(6, 10, 80, 0.2f); // Obsidian + TConstructRegistry.addBowMaterial(7, 10, 80, 0.2f); // Netherrack + TConstructRegistry.addBowMaterial(8, 1536, 20, 1.2f); // Slime + TConstructRegistry.addBowMaterial(9, 48, 25, 0.5f); // Paper + TConstructRegistry.addBowMaterial(10, 1152, 40, 1.2f); // Cobalt + TConstructRegistry.addBowMaterial(11, 960, 40, 1.2f); // Ardite + TConstructRegistry.addBowMaterial(12, 1536, 40, 1.2f); // Manyullyn + TConstructRegistry.addBowMaterial(13, 384, 40, 1.2f); // Copper + TConstructRegistry.addBowMaterial(14, 576, 40, 1.2f); // Bronze + TConstructRegistry.addBowMaterial(15, 768, 40, 1.2f); // Alumite + TConstructRegistry.addBowMaterial(16, 768, 40, 1.2f); // Steel + TConstructRegistry.addBowMaterial(17, 576, 20, 1.2f); // Blue Slime + TConstructRegistry.addBowMaterial(18, 384, 20, 1.2f); // Slime - //Material ID, mass, fragility - TConstructRegistry.addArrowMaterial(0, 0.69F, 1.0F, 100F); //Wood - TConstructRegistry.addArrowMaterial(1, 2.5F, 5.0F, 100F); //Stone - TConstructRegistry.addArrowMaterial(2, 7.2F, 0.5F, 100F); //Iron - TConstructRegistry.addArrowMaterial(3, 2.65F, 1.0F, 100F); //Flint - TConstructRegistry.addArrowMaterial(4, 0.76F, 1.0F, 100F); //Cactus - TConstructRegistry.addArrowMaterial(5, 0.69F, 1.0F, 100); //Bone - TConstructRegistry.addArrowMaterial(6, 2.4F, 1.0F, 100F); //Obsidian - TConstructRegistry.addArrowMaterial(7, 3.5F, 1.0F, 100F); //Netherrack - TConstructRegistry.addArrowMaterial(8, 0.42F, 0.0F, 100F); //Slime - TConstructRegistry.addArrowMaterial(9, 1.1F, 3.0F, 90F); //Paper - TConstructRegistry.addArrowMaterial(10, 8.9F, 0.25F, 100F); //Cobalt - TConstructRegistry.addArrowMaterial(11, 7.2F, 0.25F, 100F); //Ardite - TConstructRegistry.addArrowMaterial(12, 10.6F, 0.1F, 100F); //Manyullyn - TConstructRegistry.addArrowMaterial(13, 8.96F, 0.5F, 100F); //Copper - TConstructRegistry.addArrowMaterial(14, 7.9F, 0.25F, 100F); //Bronze - TConstructRegistry.addArrowMaterial(15, 4.7F, 0.25F, 100F); //Alumite - TConstructRegistry.addArrowMaterial(16, 7.6F, 0.25F, 100F); //Steel - TConstructRegistry.addArrowMaterial(17, 0.42F, 0.0F, 100F); //Blue Slime - TConstructRegistry.addArrowMaterial(18, 6.8F, 0.5F, 100F); //Iron + // Material ID, mass, fragility + TConstructRegistry.addArrowMaterial(0, 0.69F, 1.0F, 100F); // Wood + TConstructRegistry.addArrowMaterial(1, 2.5F, 5.0F, 100F); // Stone + TConstructRegistry.addArrowMaterial(2, 7.2F, 0.5F, 100F); // Iron + TConstructRegistry.addArrowMaterial(3, 2.65F, 1.0F, 100F); // Flint + TConstructRegistry.addArrowMaterial(4, 0.76F, 1.0F, 100F); // Cactus + TConstructRegistry.addArrowMaterial(5, 0.69F, 1.0F, 100); // Bone + TConstructRegistry.addArrowMaterial(6, 2.4F, 1.0F, 100F); // Obsidian + TConstructRegistry.addArrowMaterial(7, 3.5F, 1.0F, 100F); // Netherrack + TConstructRegistry.addArrowMaterial(8, 0.42F, 0.0F, 100F); // Slime + TConstructRegistry.addArrowMaterial(9, 1.1F, 3.0F, 90F); // Paper + TConstructRegistry.addArrowMaterial(10, 8.9F, 0.25F, 100F); // Cobalt + TConstructRegistry.addArrowMaterial(11, 7.2F, 0.25F, 100F); // Ardite + TConstructRegistry.addArrowMaterial(12, 10.6F, 0.1F, 100F); // Manyullyn + TConstructRegistry.addArrowMaterial(13, 8.96F, 0.5F, 100F); // Copper + TConstructRegistry.addArrowMaterial(14, 7.9F, 0.25F, 100F); // Bronze + TConstructRegistry.addArrowMaterial(15, 4.7F, 0.25F, 100F); // Alumite + TConstructRegistry.addArrowMaterial(16, 7.6F, 0.25F, 100F); // Steel + TConstructRegistry.addArrowMaterial(17, 0.42F, 0.0F, 100F); // Blue + // Slime + TConstructRegistry.addArrowMaterial(18, 6.8F, 0.5F, 100F); // Iron - TConstructRegistry.addBowstringMaterial(0, 2, new ItemStack(Items.string), new ItemStack(TRepo.bowstring, 1, 0), 1F, 1F, 1f); //String - TConstructRegistry.addFletchingMaterial(0, 2, new ItemStack(Items.feather), new ItemStack(TRepo.fletching, 1, 0), 100F, 0F, 0.05F); //Feather + TConstructRegistry.addBowstringMaterial(0, 2, new ItemStack(Items.string), new ItemStack(TRepo.bowstring, 1, 0), 1F, 1F, 1f); // String + TConstructRegistry.addFletchingMaterial(0, 2, new ItemStack(Items.feather), new ItemStack(TRepo.fletching, 1, 0), 100F, 0F, 0.05F); // Feather for (int i = 0; i < 4; i++) - TConstructRegistry.addFletchingMaterial(1, 2, new ItemStack(Blocks.leaves, 1, i), new ItemStack(TRepo.fletching, 1, 1), 75F, 0F, 0.2F); //All four vanialla Leaves - TConstructRegistry.addFletchingMaterial(2, 2, new ItemStack(TRepo.materials, 1, 1), new ItemStack(TRepo.fletching, 1, 2), 100F, 0F, 0.12F); //Slime - TConstructRegistry.addFletchingMaterial(3, 2, new ItemStack(TRepo.materials, 1, 17), new ItemStack(TRepo.fletching, 1, 3), 100F, 0F, 0.12F); //BlueSlime + TConstructRegistry.addFletchingMaterial(1, 2, new ItemStack(Blocks.leaves, 1, i), new ItemStack(TRepo.fletching, 1, 1), 75F, 0F, 0.2F); // All four vanialla Leaves + TConstructRegistry.addFletchingMaterial(2, 2, new ItemStack(TRepo.materials, 1, 1), new ItemStack(TRepo.fletching, 1, 2), 100F, 0F, 0.12F); // Slime + TConstructRegistry.addFletchingMaterial(3, 2, new ItemStack(TRepo.materials, 1, 17), new ItemStack(TRepo.fletching, 1, 3), 100F, 0F, 0.12F); // BlueSlime PatternBuilder pb = PatternBuilder.instance; if (PHConstruct.enableTWood) @@ -876,13 +887,13 @@ public class TContent implements IFuelHandler compound.getCompoundTag("InfiTool").setInteger("RenderAccessory", 10); tool.setTagCompound(compound); - //TConstruct. + // TConstruct. TConstructRegistry.toolTab.init(tool); } public void addLoot () { - //Item, min, max, weight + // Item, min, max, weight ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(TRepo.heartCanister, 1, 1), 1, 1, 5)); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(TRepo.heartCanister, 1, 1), 1, 1, 10)); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(TRepo.heartCanister, 1, 1), 1, 1, 10)); @@ -923,7 +934,7 @@ public class TContent implements IFuelHandler { HashMap achievements = TAchievements.achievements; - achievements.put("tconstruct.beginner", new Achievement("" + 2741, "tconstruct.beginner", 0, 0, TRepo.manualBook, null));//.setIndependent()); + achievements.put("tconstruct.beginner", new Achievement("" + 2741, "tconstruct.beginner", 0, 0, TRepo.manualBook, null));// .setIndependent()); achievements.put("tconstruct.pattern", new Achievement("" + 2742, "tconstruct.pattern", 2, 1, TRepo.blankPattern, achievements.get("tconstruct.beginner"))); achievements.put("tconstruct.tinkerer", new Achievement("" + 2743, "tconstruct.tinkerer", 2, 2, new ItemStack(TRepo.titleIcon, 1, 4096), achievements.get("tconstruct.pattern"))); achievements.put("tconstruct.preparedFight", new Achievement("" + 2744, "tconstruct.preparedFight", 1, 3, new ItemStack(TRepo.titleIcon, 1, 4097), achievements.get("tconstruct.tinkerer"))); diff --git a/src/main/java/tconstruct/common/TProxyCommon.java b/src/main/java/tconstruct/common/TProxyCommon.java index cf278dbc..dcffe064 100644 --- a/src/main/java/tconstruct/common/TProxyCommon.java +++ b/src/main/java/tconstruct/common/TProxyCommon.java @@ -28,10 +28,10 @@ public class TProxyCommon implements IGuiHandler public static int smelteryGuiID = 7; public static int furnaceID = 8; - // public static int drawbridgeID = 9; // Moved to TMechworks + // public static int drawbridgeID = 9; // Moved to TMechworks public static int landmineID = 10; public static int craftingStationID = 11; - // public static int advDrawbridgeID = 12; // Moved to TMechworks + // public static int advDrawbridgeID = 12; // Moved to TMechworks public static int inventoryGui = 100; public static int armorGuiID = 101; public static int knapsackGuiID = 102; @@ -61,7 +61,7 @@ public class TProxyCommon implements IGuiHandler { if (ID == inventoryGui) { - //GuiInventory inv = new GuiInventory(player); + // GuiInventory inv = new GuiInventory(player); return player.inventoryContainer; } if (ID == armorGuiID) @@ -86,7 +86,7 @@ public class TProxyCommon implements IGuiHandler public void registerTickHandler () { - //TickRegistry.registerTickHandler(new TimeTicker(), Side.SERVER); + // TickRegistry.registerTickHandler(new TimeTicker(), Side.SERVER); } /* Registers any rendering code. Does nothing server-side */ @@ -97,7 +97,8 @@ public class TProxyCommon implements IGuiHandler /* Ties an internal name to a visible one. */ public void addNames () { - // As of 1.6.x, this is now handled by Minecraft itself for the most part. + // As of 1.6.x, this is now handled by Minecraft itself for the most + // part. LanguageRegistry.addName(TRepo.potionLauncher, "Potion Launcher"); LanguageRegistry.addName(TRepo.knapsack, "Knapsack"); diff --git a/src/main/java/tconstruct/common/TRecipes.java b/src/main/java/tconstruct/common/TRecipes.java index 3c43ca2f..324f5b2e 100644 --- a/src/main/java/tconstruct/common/TRecipes.java +++ b/src/main/java/tconstruct/common/TRecipes.java @@ -120,7 +120,7 @@ public class TRecipes { static void registerBlockRecipes () { - //Tool Tables + // Tool Tables GameRegistry.registerBlock(TRepo.toolStationWood, ToolStationItemBlock.class, "ToolStationBlock"); GameRegistry.registerTileEntity(ToolStationLogic.class, "ToolStation"); GameRegistry.registerTileEntity(PartBuilderLogic.class, "PartCrafter"); @@ -154,7 +154,7 @@ public class TRecipes GameRegistry.registerBlock(TRepo.woolSlab1, WoolSlab1Item.class, "WoolSlab1"); GameRegistry.registerBlock(TRepo.woolSlab2, WoolSlab2Item.class, "WoolSlab2"); - //Smeltery stuff + // Smeltery stuff GameRegistry.registerBlock(TRepo.smeltery, SmelteryItemBlock.class, "Smeltery"); GameRegistry.registerBlock(TRepo.smelteryNether, SmelteryItemBlock.class, "SmelteryNether"); if (PHConstruct.newSmeltery) @@ -184,7 +184,7 @@ public class TRecipes GameRegistry.registerBlock(TRepo.tankAir, "TankAir"); GameRegistry.registerTileEntity(TankAirLogic.class, "tconstruct.tank.air"); - //Traps + // Traps GameRegistry.registerBlock(TRepo.landmine, ItemBlockLandmine.class, "Redstone.Landmine"); GameRegistry.registerTileEntity(TileEntityLandmine.class, "Landmine"); GameRegistry.registerBlock(TRepo.punji, "trap.punji"); @@ -196,9 +196,9 @@ public class TRecipes GameRegistry.registerBlock(TRepo.dryingRack, "Armor.DryingRack"); GameRegistry.registerTileEntity(DryingRackLogic.class, "Armor.DryingRack"); - //fluids + // fluids - //Slime Islands + // Slime Islands GameRegistry.registerBlock(TRepo.slimeGel, SlimeGelItemBlock.class, "slime.gel"); GameRegistry.registerBlock(TRepo.slimeGrass, SlimeGrassItemBlock.class, "slime.grass"); GameRegistry.registerBlock(TRepo.slimeTallGrass, SlimeTallGrassItem.class, "slime.grass.tall"); @@ -207,18 +207,19 @@ public class TRecipes GameRegistry.registerBlock(TRepo.slimeChannel, "slime.channel"); GameRegistry.registerBlock(TRepo.bloodChannel, "blood.channel"); GameRegistry.registerBlock(TRepo.slimePad, "slime.pad"); - //TODO fix this - /*TConstructRegistry.drawbridgeState[TRepo.slimePad] = 1; - TConstructRegistry.drawbridgeState[TRepo.bloodChannel] = 1; - */ + // TODO fix this + /* + * TConstructRegistry.drawbridgeState[TRepo.slimePad] = 1; + * TConstructRegistry.drawbridgeState[TRepo.bloodChannel] = 1; + */ - //Decoration + // Decoration GameRegistry.registerBlock(TRepo.stoneTorch, "decoration.stonetorch"); GameRegistry.registerBlock(TRepo.stoneLadder, "decoration.stoneladder"); GameRegistry.registerBlock(TRepo.multiBrick, MultiBrickItem.class, "decoration.multibrick"); GameRegistry.registerBlock(TRepo.multiBrickFancy, MultiBrickFancyItem.class, "decoration.multibrickfancy"); - //Ores + // Ores GameRegistry.registerBlock(TRepo.oreBerry, OreberryBushItem.class, "ore.berries.one"); GameRegistry.registerBlock(TRepo.oreBerrySecond, OreberryBushSecondItem.class, "ore.berries.two"); GameRegistry.registerBlock(TRepo.oreSlag, MetalOreItemBlock.class, "SearedBrick"); @@ -226,13 +227,13 @@ public class TRecipes GameRegistry.registerBlock(TRepo.speedBlock, SpeedBlockItem.class, "SpeedBlock"); - //Glass + // Glass GameRegistry.registerBlock(TRepo.clearGlass, GlassBlockItem.class, "GlassBlock"); GameRegistry.registerBlock(TRepo.glassPane, GlassPaneItem.class, "GlassPane"); GameRegistry.registerBlock(TRepo.stainedGlassClear, StainedGlassClearItem.class, "GlassBlock.StainedClear"); GameRegistry.registerBlock(TRepo.stainedGlassClearPane, StainedGlassClearPaneItem.class, "GlassPaneClearStained"); - //Rail + // Rail GameRegistry.registerBlock(TRepo.woodenRail, "rail.wood"); } @@ -275,7 +276,7 @@ public class TRecipes registerPatternMaterial("block" + ft.toString(), 18, ft.toString()); } } - //Obsidian, different dust amount + // Obsidian, different dust amount { FluidType ft = FluidType.Obsidian; Smeltery.addDictionaryMelting("nugget" + ft.toString(), ft, -100, TConstruct.nuggetLiquidValue); @@ -304,7 +305,7 @@ public class TRecipes } } - //Compressed materials + // Compressed materials for (int i = 1; i <= 8; i++) { Smeltery.addDictionaryMelting("compressedCobblestone" + i + "x", FluidType.Stone, 0, TConstruct.ingotLiquidValue / 18 * (9 ^ i)); @@ -444,21 +445,21 @@ public class TRecipes ItemStack ingotcast = new ItemStack(TRepo.metalPattern, 1, 0); ItemStack gemcast = new ItemStack(TRepo.metalPattern, 1, 26); LiquidCasting tableCasting = TConstructRegistry.instance.getTableCasting(); - //Blank + // Blank tableCasting.addCastingRecipe(new ItemStack(TRepo.blankPattern, 1, 1), new FluidStack(TRepo.moltenAlubrassFluid, TConstruct.ingotLiquidValue), 80); tableCasting.addCastingRecipe(new ItemStack(TRepo.blankPattern, 1, 2), new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 2), 80); tableCasting.addCastingRecipe(gemcast, new FluidStack(TRepo.moltenAlubrassFluid, TConstruct.ingotLiquidValue), new ItemStack(Items.emerald), 80); tableCasting.addCastingRecipe(gemcast, new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 2), new ItemStack(Items.emerald), 80); - //Ingots - tableCasting.addCastingRecipe(new ItemStack(TRepo.materials, 1, 2), new FluidStack(TRepo.moltenStoneFluid, TConstruct.ingotLiquidValue / 4), ingotcast, 80); //stone + // Ingots + tableCasting.addCastingRecipe(new ItemStack(TRepo.materials, 1, 2), new FluidStack(TRepo.moltenStoneFluid, TConstruct.ingotLiquidValue / 4), ingotcast, 80); // stone - //Misc + // Misc tableCasting.addCastingRecipe(new ItemStack(Items.emerald), new FluidStack(TRepo.moltenEmeraldFluid, 640), gemcast, 80); tableCasting.addCastingRecipe(new ItemStack(TRepo.materials, 1, 36), new FluidStack(TRepo.glueFluid, TConstruct.ingotLiquidValue), null, 50); tableCasting.addCastingRecipe(new ItemStack(TRepo.strangeFood, 1, 1), new FluidStack(TRepo.bloodFluid, 160), null, 50); - //Buckets + // Buckets ItemStack bucket = new ItemStack(Items.bucket); for (int sc = 0; sc < 24; sc++) @@ -474,7 +475,9 @@ public class TRecipes TRepo.liquids = new FluidStack[] { new FluidStack(TRepo.moltenIronFluid, 1), new FluidStack(TRepo.moltenCopperFluid, 1), new FluidStack(TRepo.moltenCobaltFluid, 1), new FluidStack(TRepo.moltenArditeFluid, 1), new FluidStack(TRepo.moltenManyullynFluid, 1), new FluidStack(TRepo.moltenBronzeFluid, 1), new FluidStack(TRepo.moltenAlumiteFluid, 1), new FluidStack(TRepo.moltenObsidianFluid, 1), new FluidStack(TRepo.moltenSteelFluid, 1), new FluidStack(TRepo.pigIronFluid, 1) }; - int[] liquidDamage = new int[] { 2, 13, 10, 11, 12, 14, 15, 6, 16, 18 }; //ItemStack damage value + int[] liquidDamage = new int[] { 2, 13, 10, 11, 12, 14, 15, 6, 16, 18 }; // ItemStack + // damage + // value int fluidAmount = 0; Fluid fs = null; @@ -527,15 +530,19 @@ public class TRecipes protected static void addRecipesForFurnace () { - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 3), new ItemStack(TRepo.craftedSoil, 1, 4), 0.2f); //Concecrated Soil + FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 3), new ItemStack(TRepo.craftedSoil, 1, 4), 0.2f); // Concecrated + // Soil - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 0), new ItemStack(TRepo.materials, 1, 1), 2f); //Slime - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 1), new ItemStack(TRepo.materials, 1, 2), 2f); //Seared brick item - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 2), new ItemStack(TRepo.materials, 1, 17), 2f); //Blue Slime - FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 6), new ItemStack(TRepo.materials, 1, 37), 2f); //Nether seared brick + FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 0), new ItemStack(TRepo.materials, 1, 1), 2f); // Slime + FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 1), new ItemStack(TRepo.materials, 1, 2), 2f); // Seared brick item + FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 2), new ItemStack(TRepo.materials, 1, 17), 2f); // Blue Slime + FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.craftedSoil, 6), new ItemStack(TRepo.materials, 1, 37), 2f); // Nether seared + // brick - //FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreSlag, 1, new ItemStack(TRepo.materials, 1, 3), 3f); - //FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreSlag, 2, new ItemStack(TRepo.materials, 1, 4), 3f); + // FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreSlag, + // 1, new ItemStack(TRepo.materials, 1, 3), 3f); + // FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreSlag, + // 2, new ItemStack(TRepo.materials, 1, 4), 3f); FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreSlag, 3), new ItemStack(TRepo.materials, 1, 9), 0.5f); FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreSlag, 4), new ItemStack(TRepo.materials, 1, 10), 0.5f); FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreSlag, 5), new ItemStack(TRepo.materials, 1, 11), 0.5f); @@ -545,7 +552,9 @@ public class TRecipes FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreBerries, 2), new ItemStack(TRepo.materials, 1, 20), 0.2f); FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreBerries, 3), new ItemStack(TRepo.materials, 1, 21), 0.2f); FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreBerries, 4), new ItemStack(TRepo.materials, 1, 22), 0.2f); - //FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreBerries, 5, new ItemStack(TRepo.materials, 1, 23), 0.2f); + // FurnaceRecipes.smelting().func_151394_a(new + // ItemStack(TRepo.oreBerries, 5, new ItemStack(TRepo.materials, 1, 23), + // 0.2f); FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreGravel, 0), new ItemStack(Items.iron_ingot), 0.2f); FurnaceRecipes.smelting().func_151394_a(new ItemStack(TRepo.oreGravel, 1), new ItemStack(Items.gold_ingot), 0.2f); @@ -657,7 +666,8 @@ public class TRecipes GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 3), patBlock, '#', new ItemStack(TRepo.materials, 1, 9)); // Copper GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 5), patBlock, '#', new ItemStack(TRepo.materials, 1, 10)); // Tin GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 6), patBlock, '#', new ItemStack(TRepo.materials, 1, 11)); // Aluminum - //GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 6), patBlock, '#', new ItemStack(TRepo.materials, 1, 12)); // Aluminum + // GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 6), + // patBlock, '#', new ItemStack(TRepo.materials, 1, 12)); // Aluminum GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 4), patBlock, '#', new ItemStack(TRepo.materials, 1, 13)); // Bronze GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 7), patBlock, '#', new ItemStack(TRepo.materials, 1, 14)); // AluBrass GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 0), patBlock, '#', new ItemStack(TRepo.materials, 1, 3)); // Cobalt @@ -665,45 +675,47 @@ public class TRecipes GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 2), patBlock, '#', new ItemStack(TRepo.materials, 1, 5)); // Manyullyn GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 8), patBlock, '#', new ItemStack(TRepo.materials, 1, 15)); // Alumite GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 9), patBlock, '#', new ItemStack(TRepo.materials, 1, 16)); // Steel - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 11), patBlock, '#', new ItemStack(TRepo.materials, 1, 12)); //Aluminum raw -> ingot + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 11), patBlock, '#', new ItemStack(TRepo.materials, 1, 12)); // Aluminum raw -> + // ingot - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 9), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 3)); //Copper - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 10), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 5)); //Tin - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 11), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 6)); //Aluminum - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 13), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 4)); //Bronze - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 14), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 7)); //AluBrass - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 3), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 0)); //Cobalt - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 4), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 1)); //Ardite - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 5), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 2)); //Manyullyn - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 15), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 8)); //Alumite - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 16), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 9)); //Steel + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 9), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 3)); // Copper + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 10), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 5)); // Tin + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 11), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 6)); // Aluminum + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 13), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 4)); // Bronze + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 14), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 7)); // AluBrass + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 3), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 0)); // Cobalt + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 4), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 1)); // Ardite + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 5), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 2)); // Manyullyn + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 15), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 8)); // Alumite + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 16), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 9)); // Steel - GameRegistry.addRecipe(new ItemStack(Items.iron_ingot), patBlock, '#', new ItemStack(TRepo.materials, 1, 19)); //Iron - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 9), patBlock, '#', new ItemStack(TRepo.materials, 1, 20)); //Copper - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 10), patBlock, '#', new ItemStack(TRepo.materials, 1, 21)); //Tin - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 11), patBlock, '#', new ItemStack(TRepo.materials, 1, 22)); //Aluminum - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 14), patBlock, '#', new ItemStack(TRepo.materials, 1, 24)); //Aluminum Brass - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 18), patBlock, '#', new ItemStack(TRepo.materials, 1, 27)); //Obsidian - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 3), patBlock, '#', new ItemStack(TRepo.materials, 1, 28)); //Cobalt - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 4), patBlock, '#', new ItemStack(TRepo.materials, 1, 29)); //Ardite - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 5), patBlock, '#', new ItemStack(TRepo.materials, 1, 30)); //Manyullyn - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 13), patBlock, '#', new ItemStack(TRepo.materials, 1, 31)); //Bronze - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 15), patBlock, '#', new ItemStack(TRepo.materials, 1, 32)); //Alumite - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 16), patBlock, '#', new ItemStack(TRepo.materials, 1, 33)); //Steel + GameRegistry.addRecipe(new ItemStack(Items.iron_ingot), patBlock, '#', new ItemStack(TRepo.materials, 1, 19)); // Iron + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 9), patBlock, '#', new ItemStack(TRepo.materials, 1, 20)); // Copper + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 10), patBlock, '#', new ItemStack(TRepo.materials, 1, 21)); // Tin + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 11), patBlock, '#', new ItemStack(TRepo.materials, 1, 22)); // Aluminum + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 14), patBlock, '#', new ItemStack(TRepo.materials, 1, 24)); // Aluminum Brass + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 18), patBlock, '#', new ItemStack(TRepo.materials, 1, 27)); // Obsidian + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 3), patBlock, '#', new ItemStack(TRepo.materials, 1, 28)); // Cobalt + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 4), patBlock, '#', new ItemStack(TRepo.materials, 1, 29)); // Ardite + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 5), patBlock, '#', new ItemStack(TRepo.materials, 1, 30)); // Manyullyn + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 13), patBlock, '#', new ItemStack(TRepo.materials, 1, 31)); // Bronze + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 15), patBlock, '#', new ItemStack(TRepo.materials, 1, 32)); // Alumite + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 16), patBlock, '#', new ItemStack(TRepo.materials, 1, 33)); // Steel - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 19), "m", 'm', new ItemStack(Items.iron_ingot)); //Iron - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 20), "m", 'm', new ItemStack(TRepo.materials, 1, 9)); //Copper - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 21), "m", 'm', new ItemStack(TRepo.materials, 1, 10)); //Tin - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 22), "m", 'm', new ItemStack(TRepo.materials, 1, 11)); //Aluminum - //GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 22), "m", 'm', new ItemStack(TRepo.materials, 1, 12)); //Aluminum - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 24), "m", 'm', new ItemStack(TRepo.materials, 1, 14)); //Aluminum Brass - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 27), "m", 'm', new ItemStack(TRepo.materials, 1, 18)); //Obsidian - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 28), "m", 'm', new ItemStack(TRepo.materials, 1, 3)); //Cobalt - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 29), "m", 'm', new ItemStack(TRepo.materials, 1, 4)); //Ardite - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 30), "m", 'm', new ItemStack(TRepo.materials, 1, 5)); //Manyullyn - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 31), "m", 'm', new ItemStack(TRepo.materials, 1, 13)); //Bronze - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 32), "m", 'm', new ItemStack(TRepo.materials, 1, 15)); //Alumite - GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 33), "m", 'm', new ItemStack(TRepo.materials, 1, 16)); //Steel + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 19), "m", 'm', new ItemStack(Items.iron_ingot)); // Iron + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 20), "m", 'm', new ItemStack(TRepo.materials, 1, 9)); // Copper + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 21), "m", 'm', new ItemStack(TRepo.materials, 1, 10)); // Tin + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 22), "m", 'm', new ItemStack(TRepo.materials, 1, 11)); // Aluminum + // GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 22), "m", + // 'm', new ItemStack(TRepo.materials, 1, 12)); //Aluminum + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 24), "m", 'm', new ItemStack(TRepo.materials, 1, 14)); // Aluminum Brass + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 27), "m", 'm', new ItemStack(TRepo.materials, 1, 18)); // Obsidian + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 28), "m", 'm', new ItemStack(TRepo.materials, 1, 3)); // Cobalt + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 29), "m", 'm', new ItemStack(TRepo.materials, 1, 4)); // Ardite + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 30), "m", 'm', new ItemStack(TRepo.materials, 1, 5)); // Manyullyn + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 31), "m", 'm', new ItemStack(TRepo.materials, 1, 13)); // Bronze + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 32), "m", 'm', new ItemStack(TRepo.materials, 1, 15)); // Alumite + GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 33), "m", 'm', new ItemStack(TRepo.materials, 1, 16)); // Steel // stained Glass Recipes String[] dyeTypes = { "dyeBlack", "dyeRed", "dyeGreen", "dyeBrown", "dyeBlue", "dyePurple", "dyeCyan", "dyeLightGray", "dyeGray", "dyePink", "dyeLime", "dyeYellow", "dyeLightBlue", @@ -731,28 +743,28 @@ public class TRecipes // Smeltery Components Recipes ItemStack searedBrick = new ItemStack(TRepo.materials, 1, 2); - GameRegistry.addRecipe(new ItemStack(TRepo.smeltery, 1, 0), "bbb", "b b", "bbb", 'b', searedBrick); //Controller - GameRegistry.addRecipe(new ItemStack(TRepo.smeltery, 1, 1), "b b", "b b", "b b", 'b', searedBrick); //Drain - GameRegistry.addRecipe(new ItemStack(TRepo.smeltery, 1, 2), "bb", "bb", 'b', searedBrick); //Bricks - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTank, 1, 0), patSurround, '#', searedBrick, 'm', "glass")); //Tank - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTank, 1, 1), "bgb", "ggg", "bgb", 'b', searedBrick, 'g', "glass")); //Glass - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTank, 1, 2), "bgb", "bgb", "bgb", 'b', searedBrick, 'g', "glass")); //Window - GameRegistry.addRecipe(new ItemStack(TRepo.searedBlock, 1, 0), "bbb", "b b", "b b", 'b', searedBrick); //Table - GameRegistry.addRecipe(new ItemStack(TRepo.searedBlock, 1, 1), "b b", " b ", 'b', searedBrick); //Faucet - GameRegistry.addRecipe(new ItemStack(TRepo.searedBlock, 1, 2), "b b", "b b", "bbb", 'b', searedBrick); //Basin - GameRegistry.addRecipe(new ItemStack(TRepo.castingChannel, 4, 0), "b b", "bbb", 'b', searedBrick); //Channel + GameRegistry.addRecipe(new ItemStack(TRepo.smeltery, 1, 0), "bbb", "b b", "bbb", 'b', searedBrick); // Controller + GameRegistry.addRecipe(new ItemStack(TRepo.smeltery, 1, 1), "b b", "b b", "b b", 'b', searedBrick); // Drain + GameRegistry.addRecipe(new ItemStack(TRepo.smeltery, 1, 2), "bb", "bb", 'b', searedBrick); // Bricks + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTank, 1, 0), patSurround, '#', searedBrick, 'm', "glass")); // Tank + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTank, 1, 1), "bgb", "ggg", "bgb", 'b', searedBrick, 'g', "glass")); // Glass + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTank, 1, 2), "bgb", "bgb", "bgb", 'b', searedBrick, 'g', "glass")); // Window + GameRegistry.addRecipe(new ItemStack(TRepo.searedBlock, 1, 0), "bbb", "b b", "b b", 'b', searedBrick); // Table + GameRegistry.addRecipe(new ItemStack(TRepo.searedBlock, 1, 1), "b b", " b ", 'b', searedBrick); // Faucet + GameRegistry.addRecipe(new ItemStack(TRepo.searedBlock, 1, 2), "b b", "b b", "bbb", 'b', searedBrick); // Basin + GameRegistry.addRecipe(new ItemStack(TRepo.castingChannel, 4, 0), "b b", "bbb", 'b', searedBrick); // Channel searedBrick = new ItemStack(TRepo.materials, 1, 37); - GameRegistry.addRecipe(new ItemStack(TRepo.smelteryNether, 1, 0), "bbb", "b b", "bbb", 'b', searedBrick); //Controller - GameRegistry.addRecipe(new ItemStack(TRepo.smelteryNether, 1, 1), "b b", "b b", "b b", 'b', searedBrick); //Drain - GameRegistry.addRecipe(new ItemStack(TRepo.smelteryNether, 1, 2), "bb", "bb", 'b', searedBrick); //Bricks - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTankNether, 1, 0), patSurround, '#', searedBrick, 'm', "glass")); //Tank - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTankNether, 1, 1), "bgb", "ggg", "bgb", 'b', searedBrick, 'g', "glass")); //Glass - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTankNether, 1, 2), "bgb", "bgb", "bgb", 'b', searedBrick, 'g', "glass")); //Window - GameRegistry.addRecipe(new ItemStack(TRepo.searedBlockNether, 1, 0), "bbb", "b b", "b b", 'b', searedBrick); //Table - GameRegistry.addRecipe(new ItemStack(TRepo.searedBlockNether, 1, 1), "b b", " b ", 'b', searedBrick); //Faucet - GameRegistry.addRecipe(new ItemStack(TRepo.searedBlockNether, 1, 2), "b b", "b b", "bbb", 'b', searedBrick); //Basin - GameRegistry.addRecipe(new ItemStack(TRepo.castingChannel, 4, 0), "b b", "bbb", 'b', searedBrick); //Channel + GameRegistry.addRecipe(new ItemStack(TRepo.smelteryNether, 1, 0), "bbb", "b b", "bbb", 'b', searedBrick); // Controller + GameRegistry.addRecipe(new ItemStack(TRepo.smelteryNether, 1, 1), "b b", "b b", "b b", 'b', searedBrick); // Drain + GameRegistry.addRecipe(new ItemStack(TRepo.smelteryNether, 1, 2), "bb", "bb", 'b', searedBrick); // Bricks + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTankNether, 1, 0), patSurround, '#', searedBrick, 'm', "glass")); // Tank + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTankNether, 1, 1), "bgb", "ggg", "bgb", 'b', searedBrick, 'g', "glass")); // Glass + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTankNether, 1, 2), "bgb", "bgb", "bgb", 'b', searedBrick, 'g', "glass")); // Window + GameRegistry.addRecipe(new ItemStack(TRepo.searedBlockNether, 1, 0), "bbb", "b b", "b b", 'b', searedBrick); // Table + GameRegistry.addRecipe(new ItemStack(TRepo.searedBlockNether, 1, 1), "b b", " b ", 'b', searedBrick); // Faucet + GameRegistry.addRecipe(new ItemStack(TRepo.searedBlockNether, 1, 2), "b b", "b b", "bbb", 'b', searedBrick); // Basin + GameRegistry.addRecipe(new ItemStack(TRepo.castingChannel, 4, 0), "b b", "bbb", 'b', searedBrick); // Channel // Jack o'Latern Recipe - Stone Torch GameRegistry.addRecipe(new ItemStack(Blocks.lit_pumpkin, 1, 0), "p", "s", 'p', new ItemStack(Blocks.pumpkin), 's', new ItemStack(TRepo.stoneTorch)); @@ -765,16 +777,18 @@ public class TRecipes // Stonesticks Recipes GameRegistry.addRecipe(new ItemStack(TRepo.toolRod, 4, 1), "c", "c", 'c', new ItemStack(Blocks.stone)); GameRegistry.addRecipe(new ItemStack(TRepo.toolRod, 2, 1), "c", "c", 'c', new ItemStack(Blocks.cobblestone)); - // + // ItemStack aluBrass = new ItemStack(TRepo.materials, 1, 14); // Clock Recipe - Vanilla alternativ GameRegistry.addRecipe(new ItemStack(Items.clock), " i ", "iri", " i ", 'i', aluBrass, 'r', new ItemStack(Items.redstone)); - // Gold Pressure Plate - Vanilla alternativ + // Gold Pressure Plate - Vanilla alternativ GameRegistry.addRecipe(new ItemStack(Blocks.light_weighted_pressure_plate), "ii", 'i', aluBrass); - //Accessories + // Accessories GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.heartCanister, 1, 0), "##", "##", '#', "ingotAluminum")); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.heartCanister, 1, 0), "##", "##", '#', "ingotAluminium")); - //GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.heartCanister, 1, 0), "##", "##", '#', "ingotNaturalAluminum")); + // GameRegistry.addRecipe(new ShapedOreRecipe(new + // ItemStack(TRepo.heartCanister, 1, 0), "##", "##", '#', + // "ingotNaturalAluminum")); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.heartCanister, 1, 0), " # ", "#B#", " # ", '#', "ingotTin", 'B', Items.bone)); GameRegistry.addRecipe(new ItemStack(TRepo.diamondApple), " d ", "d#d", " d ", 'd', new ItemStack(Items.diamond), '#', new ItemStack(Items.apple)); @@ -785,7 +799,7 @@ public class TRecipes GameRegistry.addRecipe(new ItemStack(TRepo.knapsack, 1, 0), "###", "rmr", "###", '#', new ItemStack(Items.leather), 'r', new ItemStack(TRepo.toughRod, 1, 2), 'm', aluBrass); // Drying Rack Recipes GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.dryingRack, 1, 0), "bbb", 'b', "slabWood")); - //Landmine Recipes + // Landmine Recipes GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.landmine, 1, 0), "mcm", "rpr", 'm', "plankWood", 'c', new ItemStack(TRepo.blankPattern, 1, 1), 'r', Items.redstone, 'p', Blocks.stone_pressure_plate)); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.landmine, 1, 1), "mcm", "rpr", 'm', Blocks.stone, 'c', new ItemStack(TRepo.blankPattern, 1, 1), 'r', Items.redstone, 'p', @@ -795,7 +809,7 @@ public class TRecipes GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.landmine, 1, 3), "mcm", "rpr", 'm', Items.repeater, 'c', new ItemStack(TRepo.blankPattern, 1, 1), 'r', Items.redstone, 'p', Blocks.stone_pressure_plate)); - //Ultra hardcore recipes + // Ultra hardcore recipes GameRegistry.addRecipe(new ItemStack(TRepo.goldHead), patSurround, '#', new ItemStack(Items.gold_ingot), 'm', new ItemStack(Items.skull, 1, 3)); // Slab Smeltery Components Recipes @@ -822,7 +836,7 @@ public class TRecipes GameRegistry.addShapelessRecipe(new ItemStack(Blocks.wool, 1, sc + 8), new ItemStack(TRepo.woolSlab2, 1, sc), new ItemStack(TRepo.woolSlab2, 1, sc)); } GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.wool, 1, 0), "slabCloth", "slabCloth")); - //Trap Recipes + // Trap Recipes GameRegistry.addRecipe(new ItemStack(TRepo.punji, 5, 0), "b b", " b ", "b b", 'b', new ItemStack(Items.reeds)); GameRegistry.addRecipe(new ItemStack(TRepo.barricadeSpruce, 1, 0), "b", "b", 'b', new ItemStack(Blocks.log, 1, 1)); GameRegistry.addRecipe(new ItemStack(TRepo.barricadeBirch, 1, 0), "b", "b", 'b', new ItemStack(Blocks.log, 1, 2)); @@ -831,7 +845,7 @@ public class TRecipes // Advanced WorkBench Recipes GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.craftingStationWood, 1, 0), "b", 'b', "crafterWood")); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.craftingStationWood, 1, 0), "b", 'b', "craftingTableWood")); - //Slab crafters + // Slab crafters GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.craftingSlabWood, 6, 0), "bbb", 'b', "crafterWood")); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.craftingSlabWood, 6, 0), "bbb", 'b', "craftingTableWood")); GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 0), "b", 'b', new ItemStack(TRepo.craftingStationWood, 1, 0)); @@ -847,12 +861,12 @@ public class TRecipes GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 3), "b", 'b', new ItemStack(TRepo.toolStationWood, 1, 13)); GameRegistry.addRecipe(new ItemStack(TRepo.craftingSlabWood, 1, 5), "b", 'b', new ItemStack(TRepo.toolForge, 1, Short.MAX_VALUE)); // EssenceExtractor Recipe - //Slime Recipes + // Slime Recipes GameRegistry.addRecipe(new ItemStack(TRepo.slimeGel, 1, 0), "##", "##", '#', TRepo.strangeFood); GameRegistry.addRecipe(new ItemStack(TRepo.strangeFood, 4, 0), "#", '#', new ItemStack(TRepo.slimeGel, 1, 0)); GameRegistry.addRecipe(new ItemStack(TRepo.slimeGel, 1, 1), "##", "##", '#', Items.slime_ball); GameRegistry.addRecipe(new ItemStack(Items.slime_ball, 4, 0), "#", '#', new ItemStack(TRepo.slimeGel, 1, 1)); - //slimeExplosive + // slimeExplosive GameRegistry.addShapelessRecipe(new ItemStack(TRepo.slimeExplosive, 1, 0), Items.slime_ball, Blocks.tnt); GameRegistry.addShapelessRecipe(new ItemStack(TRepo.slimeExplosive, 1, 2), TRepo.strangeFood, Blocks.tnt); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.slimeExplosive, 1, 0), "slimeball", Blocks.tnt)); @@ -866,17 +880,19 @@ public class TRecipes protected static void addRecipesForDryingRack () { - //Drying rack + // Drying rack DryingRackRecipes.addDryingRecipe(Items.beef, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 0)); DryingRackRecipes.addDryingRecipe(Items.chicken, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 1)); DryingRackRecipes.addDryingRecipe(Items.porkchop, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 2)); - //DryingRackRecipes.addDryingRecipe(Item.muttonRaw, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 3)); + // DryingRackRecipes.addDryingRecipe(Item.muttonRaw, 20 * 60 * 5, new + // ItemStack(TRepo.jerky, 1, 3)); DryingRackRecipes.addDryingRecipe(Items.fish, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 4)); DryingRackRecipes.addDryingRecipe(Items.rotten_flesh, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 5)); DryingRackRecipes.addDryingRecipe(new ItemStack(TRepo.strangeFood, 1, 0), 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 6)); DryingRackRecipes.addDryingRecipe(new ItemStack(TRepo.strangeFood, 1, 1), 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 7)); - //DryingRackRecipes.addDryingRecipe(new ItemStack(TRepo.jerky, 1, 5), 20 * 60 * 10, Item.leather); + // DryingRackRecipes.addDryingRecipe(new ItemStack(TRepo.jerky, 1, 5), + // 20 * 60 * 10, Item.leather); } protected static void addRecipesForChisel () @@ -894,8 +910,10 @@ public class TRecipes chiseling.addDetailing(Blocks.sandstone, 0, Blocks.sandstone, 2, TRepo.chisel); chiseling.addDetailing(Blocks.sandstone, 2, Blocks.sandstone, 1, TRepo.chisel); chiseling.addDetailing(Blocks.sandstone, 1, TRepo.multiBrick, 1, TRepo.chisel); - //chiseling.addDetailing(Block.netherrack, 0, TRepo.multiBrick, 2, TRepo.chisel); - //chiseling.addDetailing(Block.stone_refined, 0, TRepo.multiBrick, 3, TRepo.chisel); + // chiseling.addDetailing(Block.netherrack, 0, TRepo.multiBrick, 2, + // TRepo.chisel); + // chiseling.addDetailing(Block.stone_refined, 0, TRepo.multiBrick, 3, + // TRepo.chisel); chiseling.addDetailing(Items.iron_ingot, 0, TRepo.multiBrick, 4, TRepo.chisel); chiseling.addDetailing(Items.gold_ingot, 0, TRepo.multiBrick, 5, TRepo.chisel); chiseling.addDetailing(Items.dye, 4, TRepo.multiBrick, 6, TRepo.chisel); @@ -916,8 +934,11 @@ public class TRecipes chiseling.addDetailing(Blocks.stonebrick, 0, TRepo.multiBrickFancy, 15, TRepo.chisel); chiseling.addDetailing(TRepo.multiBrickFancy, 15, TRepo.multiBrickFancy, 14, TRepo.chisel); chiseling.addDetailing(TRepo.multiBrickFancy, 14, Blocks.stonebrick, 3, TRepo.chisel); - /*chiseling.addDetailing(TRepo.multiBrick, 14, TRepo.multiBrickFancy, 14, TRepo.chisel); - chiseling.addDetailing(TRepo.multiBrick, 15, TRepo.multiBrickFancy, 15, TRepo.chisel);*/ + /* + * chiseling.addDetailing(TRepo.multiBrick, 14, TRepo.multiBrickFancy, + * 14, TRepo.chisel); chiseling.addDetailing(TRepo.multiBrick, 15, + * TRepo.multiBrickFancy, 15, TRepo.chisel); + */ chiseling.addDetailing(TRepo.smeltery, 4, TRepo.smeltery, 6, TRepo.chisel); chiseling.addDetailing(TRepo.smeltery, 6, TRepo.smeltery, 11, TRepo.chisel); @@ -1028,7 +1049,7 @@ public class TRecipes BlockDispenser.dispenseBehaviorRegistry.putObject(TRepo.arrow, new TDispenserBehaviorArrow()); - //Vanilla stuff + // Vanilla stuff OreDictionary.registerOre("slimeball", new ItemStack(Items.slime_ball)); OreDictionary.registerOre("slimeball", new ItemStack(TRepo.strangeFood, 1, 0)); OreDictionary.registerOre("slimeball", new ItemStack(TRepo.strangeFood, 1, 1)); @@ -1190,59 +1211,67 @@ public class TRecipes { LiquidCasting basinCasting = TConstructRegistry.getBasinCasting(); // Block Casting - basinCasting.addCastingRecipe(new ItemStack(Blocks.iron_block), new FluidStack(TRepo.moltenIronFluid, TConstruct.blockLiquidValue), null, true, 100); //Iron - basinCasting.addCastingRecipe(new ItemStack(Blocks.gold_block), new FluidStack(TRepo.moltenGoldFluid, TConstruct.blockLiquidValue), null, true, 100); //gold - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 3), new FluidStack(TRepo.moltenCopperFluid, TConstruct.blockLiquidValue), null, true, 100); //copper - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 5), new FluidStack(TRepo.moltenTinFluid, TConstruct.blockLiquidValue), null, true, 100); //tin - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 6), new FluidStack(TRepo.moltenAluminumFluid, TConstruct.blockLiquidValue), null, true, 100); //aluminum - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 0), new FluidStack(TRepo.moltenCobaltFluid, TConstruct.blockLiquidValue), null, true, 100); //cobalt - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 1), new FluidStack(TRepo.moltenArditeFluid, TConstruct.blockLiquidValue), null, true, 100); //ardite - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 4), new FluidStack(TRepo.moltenBronzeFluid, TConstruct.blockLiquidValue), null, true, 100); //bronze - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 7), new FluidStack(TRepo.moltenAlubrassFluid, TConstruct.blockLiquidValue), null, true, 100); //albrass - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 2), new FluidStack(TRepo.moltenManyullynFluid, TConstruct.blockLiquidValue), null, true, 100); //manyullyn - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 8), new FluidStack(TRepo.moltenAlumiteFluid, TConstruct.blockLiquidValue), null, true, 100); //alumite + basinCasting.addCastingRecipe(new ItemStack(Blocks.iron_block), new FluidStack(TRepo.moltenIronFluid, TConstruct.blockLiquidValue), null, true, 100); // Iron + basinCasting.addCastingRecipe(new ItemStack(Blocks.gold_block), new FluidStack(TRepo.moltenGoldFluid, TConstruct.blockLiquidValue), null, true, 100); // gold + basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 3), new FluidStack(TRepo.moltenCopperFluid, TConstruct.blockLiquidValue), null, true, 100); // copper + basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 5), new FluidStack(TRepo.moltenTinFluid, TConstruct.blockLiquidValue), null, true, 100); // tin + basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 6), new FluidStack(TRepo.moltenAluminumFluid, TConstruct.blockLiquidValue), null, true, 100); // aluminum + basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 0), new FluidStack(TRepo.moltenCobaltFluid, TConstruct.blockLiquidValue), null, true, 100); // cobalt + basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 1), new FluidStack(TRepo.moltenArditeFluid, TConstruct.blockLiquidValue), null, true, 100); // ardite + basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 4), new FluidStack(TRepo.moltenBronzeFluid, TConstruct.blockLiquidValue), null, true, 100); // bronze + basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 7), new FluidStack(TRepo.moltenAlubrassFluid, TConstruct.blockLiquidValue), null, true, 100); // albrass + basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 2), new FluidStack(TRepo.moltenManyullynFluid, TConstruct.blockLiquidValue), null, true, 100); // manyullyn + basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 8), new FluidStack(TRepo.moltenAlumiteFluid, TConstruct.blockLiquidValue), null, true, 100); // alumite basinCasting.addCastingRecipe(new ItemStack(Blocks.obsidian), new FluidStack(TRepo.moltenObsidianFluid, TConstruct.oreLiquidValue), null, true, 100);// obsidian - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 9), new FluidStack(TRepo.moltenSteelFluid, TConstruct.blockLiquidValue), null, true, 100); //steel - basinCasting.addCastingRecipe(new ItemStack(TRepo.clearGlass, 1, 0), new FluidStack(TRepo.moltenGlassFluid, FluidContainerRegistry.BUCKET_VOLUME), null, true, 100); //glass - basinCasting.addCastingRecipe(new ItemStack(TRepo.smeltery, 1, 4), new FluidStack(TRepo.moltenStoneFluid, TConstruct.ingotLiquidValue), null, true, 100); //seared stone + basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 9), new FluidStack(TRepo.moltenSteelFluid, TConstruct.blockLiquidValue), null, true, 100); // steel + basinCasting.addCastingRecipe(new ItemStack(TRepo.clearGlass, 1, 0), new FluidStack(TRepo.moltenGlassFluid, FluidContainerRegistry.BUCKET_VOLUME), null, true, 100); // glass + basinCasting.addCastingRecipe(new ItemStack(TRepo.smeltery, 1, 4), new FluidStack(TRepo.moltenStoneFluid, TConstruct.ingotLiquidValue), null, true, 100); // seared + // stone basinCasting.addCastingRecipe(new ItemStack(TRepo.smeltery, 1, 5), new FluidStack(TRepo.moltenStoneFluid, TConstruct.chunkLiquidValue), new ItemStack(Blocks.cobblestone), true, 100); - basinCasting.addCastingRecipe(new ItemStack(Blocks.emerald_block), new FluidStack(TRepo.moltenEmeraldFluid, 640 * 9), null, true, 100); //emerald - basinCasting.addCastingRecipe(new ItemStack(TRepo.speedBlock, 1, 0), new FluidStack(TRepo.moltenTinFluid, TConstruct.nuggetLiquidValue), new ItemStack(Blocks.gravel), true, 100); //brownstone + basinCasting.addCastingRecipe(new ItemStack(Blocks.emerald_block), new FluidStack(TRepo.moltenEmeraldFluid, 640 * 9), null, true, 100); // emerald + basinCasting.addCastingRecipe(new ItemStack(TRepo.speedBlock, 1, 0), new FluidStack(TRepo.moltenTinFluid, TConstruct.nuggetLiquidValue), new ItemStack(Blocks.gravel), true, 100); // brownstone if (PHConstruct.craftEndstone) { basinCasting.addCastingRecipe(new ItemStack(Blocks.end_stone), new FluidStack(TRepo.moltenEnderFluid, 50), new ItemStack(Blocks.obsidian), true, 100); basinCasting.addCastingRecipe(new ItemStack(Blocks.end_stone), new FluidStack(TRepo.moltenEnderFluid, 250), new ItemStack(Blocks.sandstone), true, 100); } - basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 10), new FluidStack(TRepo.moltenEnderFluid, 1000), null, true, 100); //ender - basinCasting.addCastingRecipe(new ItemStack(TRepo.glueBlock), new FluidStack(TRepo.glueFluid, TConstruct.blockLiquidValue), null, true, 100); //glue + basinCasting.addCastingRecipe(new ItemStack(TRepo.metalBlock, 1, 10), new FluidStack(TRepo.moltenEnderFluid, 1000), null, true, 100); // ender + basinCasting.addCastingRecipe(new ItemStack(TRepo.glueBlock), new FluidStack(TRepo.glueFluid, TConstruct.blockLiquidValue), null, true, 100); // glue - // basinCasting.addCastingRecipe(new ItemStack(slimeGel, 1, 0), new FluidStack(blueSlimeFluid, FluidContainerRegistry.BUCKET_VOLUME), null, true, 100); + // basinCasting.addCastingRecipe(new ItemStack(slimeGel, 1, 0), new + // FluidStack(blueSlimeFluid, FluidContainerRegistry.BUCKET_VOLUME), + // null, true, 100); - //Armor casts - /*FluidRenderProperties frp = new FluidRenderProperties(Applications.BASIN.minHeight, 0.65F, Applications.BASIN); - FluidStack aluFlu = new FluidStack(TRepo.moltenAlubrassFluid, TConstruct.ingotLiquidValue * 10); - FluidStack gloFlu = new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 10); - ItemStack[] armor = { new ItemStack(helmetWood), new ItemStack(chestplateWood), new ItemStack(leggingsWood), new ItemStack(bootsWood) }; - for (int sc = 0; sc < armor.length; sc++) - { - basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, sc), aluFlu, armor[sc], 50, frp); - basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, sc), gloFlu, armor[sc], 50, frp); - }*/ + // Armor casts + /* + * FluidRenderProperties frp = new + * FluidRenderProperties(Applications.BASIN.minHeight, 0.65F, + * Applications.BASIN); FluidStack aluFlu = new + * FluidStack(TRepo.moltenAlubrassFluid, TConstruct.ingotLiquidValue * + * 10); FluidStack gloFlu = new FluidStack(TRepo.moltenGoldFluid, + * TConstruct.ingotLiquidValue * 10); ItemStack[] armor = { new + * ItemStack(helmetWood), new ItemStack(chestplateWood), new + * ItemStack(leggingsWood), new ItemStack(bootsWood) }; for (int sc = 0; + * sc < armor.length; sc++) { basinCasting.addCastingRecipe(new + * ItemStack(armorPattern, 1, sc), aluFlu, armor[sc], 50, frp); + * basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, sc), + * gloFlu, armor[sc], 50, frp); } + */ } protected static void addRecipesForSmeltery () { - //Alloy Smelting + // Alloy Smelting Smeltery.addAlloyMixing(new FluidStack(TRepo.moltenBronzeFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsBronzeAlloy)), new FluidStack(TRepo.moltenCopperFluid, - TConstruct.ingotLiquidValue * 3), new FluidStack(TRepo.moltenTinFluid, TConstruct.ingotLiquidValue)); //Bronze + TConstruct.ingotLiquidValue * 3), new FluidStack(TRepo.moltenTinFluid, TConstruct.ingotLiquidValue)); // Bronze Smeltery.addAlloyMixing(new FluidStack(TRepo.moltenAlubrassFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsAluminumBrassAlloy)), new FluidStack(TRepo.moltenAluminumFluid, - TConstruct.ingotLiquidValue * 3), new FluidStack(TRepo.moltenCopperFluid, TConstruct.ingotLiquidValue * 1)); //Aluminum Brass + TConstruct.ingotLiquidValue * 3), new FluidStack(TRepo.moltenCopperFluid, TConstruct.ingotLiquidValue * 1)); // Aluminum Brass Smeltery.addAlloyMixing(new FluidStack(TRepo.moltenAlumiteFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsAlumiteAlloy)), new FluidStack(TRepo.moltenAluminumFluid, - TConstruct.ingotLiquidValue * 5), new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue * 2), new FluidStack(TRepo.moltenObsidianFluid, TConstruct.ingotLiquidValue * 2)); //Alumite + TConstruct.ingotLiquidValue * 5), new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue * 2), new FluidStack(TRepo.moltenObsidianFluid, TConstruct.ingotLiquidValue * 2)); // Alumite Smeltery.addAlloyMixing(new FluidStack(TRepo.moltenManyullynFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsManyullynAlloy)), new FluidStack(TRepo.moltenCobaltFluid, - TConstruct.ingotLiquidValue), new FluidStack(TRepo.moltenArditeFluid, TConstruct.ingotLiquidValue)); //Manyullyn + TConstruct.ingotLiquidValue), new FluidStack(TRepo.moltenArditeFluid, TConstruct.ingotLiquidValue)); // Manyullyn Smeltery.addAlloyMixing(new FluidStack(TRepo.pigIronFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsPigironAlloy)), new FluidStack(TRepo.moltenIronFluid, - TConstruct.ingotLiquidValue), new FluidStack(TRepo.moltenEmeraldFluid, 640), new FluidStack(TRepo.bloodFluid, 80)); //Pigiron + TConstruct.ingotLiquidValue), new FluidStack(TRepo.moltenEmeraldFluid, 640), new FluidStack(TRepo.bloodFluid, 80)); // Pigiron // Stone parts for (int sc = 0; sc < TRepo.patternOutputs.length; sc++) @@ -1286,14 +1315,14 @@ public class TRecipes Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.shears), 0, TConstruct.ingotLiquidValue * 2); Smeltery.addMelting(FluidType.Emerald, new ItemStack(Items.emerald), -50, 640); - //Blocks melt as themselves! - //Ore + // Blocks melt as themselves! + // Ore Smeltery.addMelting(Blocks.iron_ore, 0, 600, new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue * 2)); Smeltery.addMelting(Blocks.gold_ore, 0, 400, new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 2)); Smeltery.addMelting(TRepo.oreGravel, 0, 600, new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue * 2)); Smeltery.addMelting(TRepo.oreGravel, 1, 400, new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 2)); - //Blocks + // Blocks Smeltery.addMelting(Blocks.iron_block, 0, 600, new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue * 9)); Smeltery.addMelting(Blocks.gold_block, 0, 400, new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue * 9)); Smeltery.addMelting(Blocks.obsidian, 0, 800, new FluidStack(TRepo.moltenObsidianFluid, TConstruct.ingotLiquidValue * 2)); @@ -1318,7 +1347,7 @@ public class TRecipes Smeltery.addMelting(TRepo.stainedGlassClearPane, i, 350, new FluidStack(TRepo.moltenGlassFluid, 250)); } - //Bricks + // Bricks Smeltery.addMelting(TRepo.multiBrick, 4, 600, new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue)); Smeltery.addMelting(TRepo.multiBrickFancy, 4, 600, new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue)); Smeltery.addMelting(TRepo.multiBrick, 5, 400, new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue)); @@ -1326,7 +1355,7 @@ public class TRecipes Smeltery.addMelting(TRepo.multiBrick, 0, 800, new FluidStack(TRepo.moltenObsidianFluid, TConstruct.ingotLiquidValue * 2)); Smeltery.addMelting(TRepo.multiBrickFancy, 0, 800, new FluidStack(TRepo.moltenObsidianFluid, TConstruct.ingotLiquidValue * 2)); - //Vanilla blocks + // Vanilla blocks Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.iron_bars), 0, TConstruct.ingotLiquidValue * 6 / 16); Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.heavy_weighted_pressure_plate), 0, TConstruct.oreLiquidValue); Smeltery.addMelting(FluidType.Gold, new ItemStack(Blocks.light_weighted_pressure_plate, 4), 0, TConstruct.oreLiquidValue); @@ -1335,13 +1364,14 @@ public class TRecipes Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.detector_rail), 0, TConstruct.ingotLiquidValue); Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.activator_rail), 0, TConstruct.ingotLiquidValue); Smeltery.addMelting(FluidType.Obsidian, new ItemStack(Blocks.enchanting_table), 0, TConstruct.ingotLiquidValue * 4); - //Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.cauldron), 0, TConstruct.ingotLiquidValue * 7); + // Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.cauldron), + // 0, TConstruct.ingotLiquidValue * 7); Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.anvil, 1, 0), 200, TConstruct.ingotLiquidValue * 31); Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.anvil, 1, 1), 200, TConstruct.ingotLiquidValue * 31); Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.anvil, 1, 2), 200, TConstruct.ingotLiquidValue * 31); Smeltery.addMelting(FluidType.Iron, new ItemStack(Blocks.hopper), 0, TConstruct.ingotLiquidValue * 5); - //Vanilla Armor + // Vanilla Armor Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_helmet, 1, 0), 50, TConstruct.ingotLiquidValue * 5); Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_chestplate, 1, 0), 50, TConstruct.ingotLiquidValue * 8); Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_leggings, 1, 0), 50, TConstruct.ingotLiquidValue * 7); @@ -1360,7 +1390,7 @@ public class TRecipes Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_horse_armor, 1), 100, TConstruct.ingotLiquidValue * 8); Smeltery.addMelting(FluidType.Gold, new ItemStack(Items.golden_horse_armor, 1), 100, TConstruct.ingotLiquidValue * 8); - //Vanilla tools + // Vanilla tools Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_hoe, 1, 0), 0, TConstruct.oreLiquidValue); Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_sword, 1, 0), 0, TConstruct.oreLiquidValue); Smeltery.addMelting(FluidType.Iron, new ItemStack(Items.iron_shovel, 1, 0), 0, TConstruct.ingotLiquidValue); @@ -1383,7 +1413,7 @@ public class TRecipes GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 2, 6), Items.nether_wart, taintedSoil, heatSand); ItemStack ironpick = ToolBuilder.instance.buildTool(new ItemStack(TRepo.pickaxeHead, 1, 6), new ItemStack(TRepo.toolRod, 1, 2), new ItemStack(TRepo.binding, 1, 6), ""); - /*TE3 Flux*/ + /* TE3 Flux */ ItemStack batHardened = GameRegistry.findItemStack("ThermalExpansion", "capacitorHardened", 1); if (batHardened != null) { @@ -1432,7 +1462,7 @@ public class TRecipes } catch (Exception e) { - } //No need to handle + } // No need to handle } ItemStack ingotcast = new ItemStack(TRepo.metalPattern, 1, 0); @@ -1465,14 +1495,14 @@ public class TRecipes { tableCasting.addCastingRecipe(ores.get(0), new FluidStack(TRepo.moltenInvarFluid, TConstruct.ingotLiquidValue), ingotcast, 80); Smeltery.addAlloyMixing(new FluidStack(TRepo.moltenInvarFluid, TConstruct.ingotLiquidValue * 3), new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue * 2), new FluidStack( - TRepo.moltenNickelFluid, TConstruct.ingotLiquidValue * 1)); //Invar + TRepo.moltenNickelFluid, TConstruct.ingotLiquidValue * 1)); // Invar } ores = OreDictionary.getOres("ingotElectrum"); if (ores.size() > 0) { tableCasting.addCastingRecipe(ores.get(0), new FluidStack(TRepo.moltenElectrumFluid, TConstruct.ingotLiquidValue), ingotcast, 80); Smeltery.addAlloyMixing(new FluidStack(TRepo.moltenElectrumFluid, TConstruct.ingotLiquidValue * 2), new FluidStack(TRepo.moltenGoldFluid, TConstruct.ingotLiquidValue), new FluidStack( - TRepo.moltenSilverFluid, TConstruct.ingotLiquidValue)); //Electrum + TRepo.moltenSilverFluid, TConstruct.ingotLiquidValue)); // Electrum } ores = OreDictionary.getOres("blockNickel"); @@ -1512,7 +1542,8 @@ public class TRecipes { basinCasting.addCastingRecipe(new ItemStack(TRepo.speedBlock, 9), new FluidStack(TRepo.moltenElectrumFluid, TConstruct.blockLiquidValue), ores.get(0), 100); } - ores = OreDictionary.getOres("compressedGravel2x"); //Higher won't save properly + ores = OreDictionary.getOres("compressedGravel2x"); // Higher won't save + // properly if (ores.size() > 0) { basinCasting.addCastingRecipe(new ItemStack(TRepo.speedBlock, 81), new FluidStack(TRepo.moltenElectrumFluid, TConstruct.blockLiquidValue * 9), ores.get(0), 100); diff --git a/src/main/java/tconstruct/common/TRepo.java b/src/main/java/tconstruct/common/TRepo.java index c839507c..7d6c952a 100644 --- a/src/main/java/tconstruct/common/TRepo.java +++ b/src/main/java/tconstruct/common/TRepo.java @@ -21,14 +21,14 @@ public class TRepo // Supresses console spam when iguana's tweaks remove stuff public static boolean supressMissingToolLogs = false; - //Patterns and other materials + // Patterns and other materials public static Item blankPattern; public static Item materials; public static Item toolRod; public static Item toolShard; public static Item woodPattern; public static Item metalPattern; - //public static Item armorPattern; + // public static Item armorPattern; public static Item manualBook; public static Item buckets; @@ -37,10 +37,10 @@ public class TRepo public static Item strangeFood; public static Item diamondApple; public static Item jerky; - //public static Item stonePattern; - //public static Item netherPattern; + // public static Item stonePattern; + // public static Item netherPattern; - //Tools + // Tools public static ToolCore pickaxe; public static ToolCore shovel; public static ToolCore hatchet; @@ -67,7 +67,7 @@ public class TRepo public static Item potionLauncher; - //Tool parts + // Tool parts public static Item binding; public static Item toughBinding; public static Item toughRod; @@ -97,7 +97,7 @@ public class TRepo public static Item arrowhead; public static Item fletching; - //Crafting blocks + // Crafting blocks public static Block toolStationWood; public static Block toolStationStone; public static Block toolForge; @@ -120,7 +120,7 @@ public class TRepo public static Block dryingRack; - //Decoration + // Decoration public static Block stoneTorch; public static Block stoneLadder; public static Block multiBrick; @@ -134,7 +134,7 @@ public class TRepo public static Block woolSlab2; public static Block glueBlock; - //Traps + // Traps public static Block landmine; public static Block punji; public static Block barricadeOak; @@ -143,19 +143,19 @@ public class TRepo public static Block barricadeJungle; public static Block slimeExplosive; - //InfiBlocks + // InfiBlocks public static Block speedBlock; public static Block clearGlass; - //public static Block stainedGlass; + // public static Block stainedGlass; public static Block stainedGlassClear; public static Block glassPane; - //public static Block stainedGlassPane; + // public static Block stainedGlassPane; public static Block stainedGlassClearPane; public static Block glassMagicSlab; public static Block stainedGlassMagicSlab; public static Block stainedGlassClearMagicSlab; - //Liquids + // Liquids public static Material liquidMetal; public static Fluid moltenIronFluid; @@ -210,7 +210,7 @@ public class TRepo public static Block moltenElectrum; public static Block moltenEnder; - //Slime + // Slime public static SoundType slimeStep; public static Block slimePool; public static Block slimeGel; @@ -223,23 +223,23 @@ public class TRepo public static Block slimePad; public static Block bloodChannel; - //Glue + // Glue public static Fluid glueFluid; public static Block glueFluidBlock; - //Ores + // Ores public static Block oreSlag; public static Block oreGravel; public static OreberryBush oreBerry; public static OreberryBush oreBerrySecond; public static Item oreBerries; - //Tool modifiers + // Tool modifiers public static ModFlux modFlux; public static ModLapis modLapis; public static ModAttack modAttack; - //Wearables + // Wearables public static Item heavyHelmet; public static Item heavyChestplate; public static Item heavyPants; @@ -250,21 +250,21 @@ public class TRepo public static Item heartCanister; public static Item goldHead; - //Rail-related + // Rail-related public static Block woodenRail; - //Chest hooks + // Chest hooks public static ChestGenHooks tinkerHouseChest; public static ChestGenHooks tinkerHousePatterns; - //Armor - basic + // Armor - basic public static Item helmetWood; public static Item chestplateWood; public static Item leggingsWood; public static Item bootsWood; public static ArmorMaterial materialWood; - //Armor - exosuit + // Armor - exosuit public static Item exoGoggles; public static Item exoChest; public static Item exoPants; @@ -273,7 +273,7 @@ public class TRepo public static Fluid[] fluids = new Fluid[27]; public static Block[] fluidBlocks = new Block[26]; - //recipe stuff + // recipe stuff public static boolean thaumcraftAvailable; public static boolean initRecipes; public static Item[] patternOutputs; diff --git a/src/main/java/tconstruct/entity/BlueSlime.java b/src/main/java/tconstruct/entity/BlueSlime.java index b75b94c5..7ce3279a 100644 --- a/src/main/java/tconstruct/entity/BlueSlime.java +++ b/src/main/java/tconstruct/entity/BlueSlime.java @@ -39,7 +39,7 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData public BlueSlime(World world) { super(world); - //this.texture = "/mods/tinker/textures/mob/slimeedible.png"; + // this.texture = "/mods/tinker/textures/mob/slimeedible.png"; int offset = this.rand.nextInt(299); if (offset < 149) offset = 1; @@ -262,7 +262,7 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData { super.readEntityFromNBT(par1NBTTagCompound); this.setSlimeSize(par1NBTTagCompound.getInteger("Size") + 1); - //this.dataWatcher.updateObject(17, Integer.valueOf(this.health)); + // this.dataWatcher.updateObject(17, Integer.valueOf(this.health)); } /** @@ -325,7 +325,7 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData protected void updateEntityActionState () { - //Minecraft.getMinecraft().getLogAgent().logInfo("Collided with "+entity.getEntityName()); + // Minecraft.getMinecraft().getLogAgent().logInfo("Collided with "+entity.getEntityName()); this.despawnEntity(); EntityPlayer entityplayer = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D); @@ -485,7 +485,8 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData } /** - * Indicates weather the slime is able to damage the player (based upon the slime's size) + * Indicates weather the slime is able to damage the player (based upon the + * slime's size) */ protected boolean canDamagePlayer () { @@ -493,7 +494,8 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData } /** - * Gets the amount of damage dealt to the player when "attacked" by the slime. + * Gets the amount of damage dealt to the player when "attacked" by the + * slime. */ protected int getAttackStrength () { @@ -533,8 +535,8 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData } /** - * The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently - * use in wolves. + * The speed it takes to move the entityliving's rotationPitch through the + * faceEntity method. This is only currently use in wolves. */ public int getVerticalFaceSpeed () { @@ -542,7 +544,8 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData } /** - * Returns true if the slime makes a sound when it jumps (based upon the slime's size) + * Returns true if the slime makes a sound when it jumps (based upon the + * slime's size) */ protected boolean makesSoundOnJump () { @@ -550,16 +553,16 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData } /** - * Returns true if the slime makes a sound when it lands after a jump (based upon the slime's size) + * Returns true if the slime makes a sound when it lands after a jump (based + * upon the slime's size) */ protected boolean makesSoundOnLand () { return this.getSlimeSize() > 2; } - /*@Override - public int getBossHealth () - { - return this.dataWatcher.getWatchableObjectInt(17); - }*/ + /* + * @Override public int getBossHealth () { return + * this.dataWatcher.getWatchableObjectInt(17); } + */ } diff --git a/src/main/java/tconstruct/entity/CartEntity.java b/src/main/java/tconstruct/entity/CartEntity.java index f1c0dc51..c4e9fc0e 100644 --- a/src/main/java/tconstruct/entity/CartEntity.java +++ b/src/main/java/tconstruct/entity/CartEntity.java @@ -119,8 +119,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to - * prevent them from trampling crops + * returns if this entity triggers Block.onEntityWalking on the blocks they + * walk on. used for spiders and wolves to prevent them from trampling crops */ protected boolean canTriggerWalking () { @@ -136,8 +136,9 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Returns a boundingBox used to collide the entity with other entities and blocks. This enables the entity to be - * pushable on contact, like boats or minecarts. + * Returns a boundingBox used to collide the entity with other entities and + * blocks. This enables the entity to be pushable on contact, like boats or + * minecarts. */ public AxisAlignedBB getCollisionBox (Entity par1Entity) { @@ -153,7 +154,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Returns true if this entity should push and be pushed by other entities when colliding. + * Returns true if this entity should push and be pushed by other entities + * when colliding. */ public boolean canBePushed () { @@ -161,7 +163,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Returns the Y offset from the entity's position for any entity riding this one. + * Returns the Y offset from the entity's position for any entity riding + * this one. */ public double getMountedYOffset () { @@ -223,7 +226,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Returns true if other Entities should be prevented from moving through this Entity. + * Returns true if other Entities should be prevented from moving through + * this Entity. */ public boolean canBeCollidedWith () { @@ -279,7 +283,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Teleports the entity to another dimension. Params: Dimension number to teleport to + * Teleports the entity to another dimension. Params: Dimension number to + * teleport to */ public void travelToDimension (int par1) { @@ -325,38 +330,26 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS if (var1.getAllowNether()) { /* - if (this.ridingEntity == null && this.timeInPortal++ >= var2) - { - this.timeInPortal = var2; - this.timeUntilPortal = this.getPortalCooldown(); - byte var3; - - if (this.worldObj.provider.dimensionId == -1) - { - var3 = 0; - } - else - { - var3 = -1; - } - - this.travelToDimension(var3); - } - - this.inPortal = false;*/ + * if (this.ridingEntity == null && this.timeInPortal++ >= + * var2) { this.timeInPortal = var2; this.timeUntilPortal = + * this.getPortalCooldown(); byte var3; + * + * if (this.worldObj.provider.dimensionId == -1) { var3 = 0; + * } else { var3 = -1; } + * + * this.travelToDimension(var3); } + * + * this.inPortal = false; + */ } } else { - /*if (this.timeInPortal > 0) - { - this.timeInPortal -= 4; - } - - if (this.timeInPortal < 0) - { - this.timeInPortal = 0; - }*/ + /* + * if (this.timeInPortal > 0) { this.timeInPortal -= 4; } + * + * if (this.timeInPortal < 0) { this.timeInPortal = 0; } + */ } if (this.timeUntilPortal > 0) @@ -468,18 +461,14 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS void moveTowardsEntity (Entity entity) { - //TConstruct.logger.info("Moving towards entity"); - /*double distX = this.posX - entity.posX; - double distZ = this.posZ - entity.posZ; - //posY = posY + 0.1; - - if (entity.posY > this.posY) - motionY += 0.1; - if (distX > 0.5 && distZ > 0.5) - { - motionX = -distX; - motionZ = -distZ; - }*/ + // TConstruct.logger.info("Moving towards entity"); + /* + * double distX = this.posX - entity.posX; double distZ = this.posZ - + * entity.posZ; //posY = posY + 0.1; + * + * if (entity.posY > this.posY) motionY += 0.1; if (distX > 0.5 && distZ + * > 0.5) { motionX = -distX; motionZ = -distZ; } + */ double var15 = entity.posX; double var19 = entity.posZ; @@ -529,28 +518,22 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } } - /*if (entity.posY > this.posY) - motionY += 0.1;*/ + /* + * if (entity.posY > this.posY) motionY += 0.1; + */ } public double calculateDistance (double pos1, double pos2) { - double distance = Math.abs(pos1 - pos2); //0.0D; - /*double absPos1 = Math.abs(pos1); - double absPos2 = Math.abs(pos2); - - if ((pos1 <= 0.0D || pos2 <= 0.0D) && (pos1 >= 0.0D || pos2 >= 0.0D)) - { - distance = absPos1 + absPos2; - } - else if (absPos1 > absPos2) - { - distance = absPos1 - absPos2; - } - else if (absPos2 > absPos1) - { - distance = absPos2 - absPos1; - }*/ + double distance = Math.abs(pos1 - pos2); // 0.0D; + /* + * double absPos1 = Math.abs(pos1); double absPos2 = Math.abs(pos2); + * + * if ((pos1 <= 0.0D || pos2 <= 0.0D) && (pos1 >= 0.0D || pos2 >= 0.0D)) + * { distance = absPos1 + absPos2; } else if (absPos1 > absPos2) { + * distance = absPos1 - absPos2; } else if (absPos2 > absPos1) { + * distance = absPos2 - absPos1; } + */ return distance; } @@ -727,7 +710,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Applies a velocity to each of the entities pushing them away from each other. Args: entity + * Applies a velocity to each of the entities pushing them away from each + * other. Args: entity */ public void applyEntityCollision (Entity par1Entity) { @@ -839,8 +823,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a - * new stack. + * Removes from an inventory slot (first arg) up to a specified number + * (second arg) of items and returns them in a new stack. */ public ItemStack decrStackSize (int par1, int par2) { @@ -873,8 +857,9 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - - * like when you close a workbench GUI. + * When some containers are closed they call this on each slot, then drop + * whatever it returns as an EntityItem - like when you close a workbench + * GUI. */ public ItemStack getStackInSlotOnClosing (int par1) { @@ -891,7 +876,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). + * Sets the given item stack to the specified slot in the inventory (can be + * crafting or armor sections). */ public void setInventorySlotContents (int par1, ItemStack par2ItemStack) { @@ -912,8 +898,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't - * this more of a set than a get?* + * Returns the maximum stack size for a inventory slot. Seems to always be + * 64, possibly will be extended. *Isn't this more of a set than a get?* */ public int getInventoryStackLimit () { @@ -928,7 +914,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. + * Called when a player interacts with a mob. e.g. gets milk from a cow, + * gets into the saddle on a pig. */ public boolean interact (EntityPlayer player) { @@ -937,14 +924,14 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS if (entityFollowing == null) { entityFollowing = player; - //if (!worldObj.isRemote) - //player.addChatMessage("The cart is following you"); + // if (!worldObj.isRemote) + // player.addChatMessage("The cart is following you"); } else { entityFollowing = null; - //if (!worldObj.isRemote) - //player.addChatMessage("The cart has stopped following you"); + // if (!worldObj.isRemote) + // player.addChatMessage("The cart has stopped following you"); } return true; } @@ -1018,7 +1005,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Do not make give this method the name canInteractWith because it clashes with Container + * Do not make give this method the name canInteractWith because it clashes + * with Container */ public boolean isUseableByPlayer (EntityPlayer par1EntityPlayer) { @@ -1057,8 +1045,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Sets the current amount of damage the minecart has taken. Decreases over time. The cart breaks when this is over - * 40. + * Sets the current amount of damage the minecart has taken. Decreases over + * time. The cart breaks when this is over 40. */ public void setDamage (int par1) { @@ -1066,8 +1054,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Gets the current amount of damage the minecart has taken. Decreases over time. The cart breaks when this is over - * 40. + * Gets the current amount of damage the minecart has taken. Decreases over + * time. The cart breaks when this is over 40. */ public int getDamage () { @@ -1095,7 +1083,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Drops the cart as a item. The exact item dropped is defined by getItemDropped(). + * Drops the cart as a item. The exact item dropped is defined by + * getItemDropped(). */ public void dropCartAsItem () { @@ -1106,44 +1095,42 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Override this to define which items your cart drops when broken. - * This does not include items contained in the inventory, - * that is handled elsewhere. + * Override this to define which items your cart drops when broken. This + * does not include items contained in the inventory, that is handled + * elsewhere. + * * @return A list of items dropped. */ public List getItemsDropped () { - /*List items = new ArrayList(); - items.add(new ItemStack(Item.minecartEmpty)); - - switch(cartType) - { - case 1: - items.add(new ItemStack(Block.chest)); - break; - case 2: - items.add(new ItemStack(Block.stoneOvenIdle)); - break; - } - return items;*/ + /* + * List items = new ArrayList(); items.add(new + * ItemStack(Item.minecartEmpty)); + * + * switch(cartType) { case 1: items.add(new ItemStack(Block.chest)); + * break; case 2: items.add(new ItemStack(Block.stoneOvenIdle)); break; + * } return items; + */ return new ArrayList(); } /** - * This function returns an ItemStack that represents this cart. - * This should be an ItemStack that can be used by the player to place the cart. - * This is the item that was registered with the cart via the registerMinecart function, - * but is not necessary the item the cart drops when destroyed. + * This function returns an ItemStack that represents this cart. This should + * be an ItemStack that can be used by the player to place the cart. This is + * the item that was registered with the cart via the registerMinecart + * function, but is not necessary the item the cart drops when destroyed. + * * @return An ItemStack that can be used to place the cart. */ public ItemStack getCartItem () { return null; - //return MinecartRegistry.getItemForCart(this); + // return MinecartRegistry.getItemForCart(this); } /** * Returns true if this cart is self propelled. + * * @return True if powered. */ public boolean isPoweredCart () @@ -1152,9 +1139,10 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Returns true if this cart is a storage cart - * Some carts may have inventories but not be storage carts - * and some carts without inventories may be storage carts. + * Returns true if this cart is a storage cart Some carts may have + * inventories but not be storage carts and some carts without inventories + * may be storage carts. + * * @return True if this cart should be classified as a storage cart. */ public boolean isStorageCart () @@ -1164,6 +1152,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS /** * Returns true if this cart can be ridden by an Entity. + * * @return True if this cart can be ridden. */ public boolean canBeRidden () @@ -1176,8 +1165,9 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Returns true if this cart can currently use rails. - * This function is mainly used to gracefully detach a minecart from a rail. + * Returns true if this cart can currently use rails. This function is + * mainly used to gracefully detach a minecart from a rail. + * * @return True if the minecart can use rails. */ public boolean canUseRail () @@ -1186,9 +1176,11 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Set whether the minecart can use rails. - * This function is mainly used to gracefully detach a minecart from a rail. - * @param use Whether the minecart can currently use rails. + * Set whether the minecart can use rails. This function is mainly used to + * gracefully detach a minecart from a rail. + * + * @param use + * Whether the minecart can currently use rails. */ public void setCanUseRail (boolean use) { @@ -1196,7 +1188,9 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Return false if this cart should not call IRail.onMinecartPass() and should ignore Powered Rails. + * Return false if this cart should not call IRail.onMinecartPass() and + * should ignore Powered Rails. + * * @return True if this cart should call IRail.onMinecartPass(). */ public boolean shouldDoRailFunctions () @@ -1206,6 +1200,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS /** * Simply returns the minecartType variable. + * * @return minecartType */ public int getCartType () @@ -1215,6 +1210,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS /** * Carts should return their drag factor here + * * @return The drag rate. */ protected double getDrag () @@ -1223,8 +1219,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Moved to allow overrides. - * This code applies drag and updates push forces. + * Moved to allow overrides. This code applies drag and updates push forces. */ protected void applyDragAndPushForces () { @@ -1255,8 +1250,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Moved to allow overrides. - * This code updates push forces. + * Moved to allow overrides. This code updates push forces. */ protected void updatePushForces () { @@ -1282,8 +1276,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Moved to allow overrides. - * This code handles minecart movement and speed capping when not on a rail. + * Moved to allow overrides. This code handles minecart movement and speed + * capping when not on a rail. */ protected void moveMinecartOffRail (int i, int j, int k) { @@ -1326,8 +1320,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS } /** - * Moved to allow overrides. - * This code applies fuel consumption. + * Moved to allow overrides. This code applies fuel consumption. */ protected void updateFuel () { @@ -1340,7 +1333,9 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS /** * Moved to allow overrides, This code handle slopes affecting velocity. - * @param metadata The blocks position metadata + * + * @param metadata + * The blocks position metadata */ protected void adjustSlopeVelocities (int metadata) { @@ -1368,11 +1363,11 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS */ /** - * Returns the carts max speed. - * Carts going faster than 1.1 cause issues with chunk loading. - * Carts cant traverse slopes or corners at greater than 0.5 - 0.6. - * This value is compared with the rails max speed to determine + * Returns the carts max speed. Carts going faster than 1.1 cause issues + * with chunk loading. Carts cant traverse slopes or corners at greater than + * 0.5 - 0.6. This value is compared with the rails max speed to determine * the carts current max speed. A normal rails max speed is 0.4. + * * @return Carts max speed. */ public float getMaxSpeedRail () @@ -1448,7 +1443,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS @Override public String getInventoryName () { - //TODO get inventory name + // TODO get inventory name return null; } diff --git a/src/main/java/tconstruct/entity/Crystal.java b/src/main/java/tconstruct/entity/Crystal.java index fabd5c15..c7a9fd20 100644 --- a/src/main/java/tconstruct/entity/Crystal.java +++ b/src/main/java/tconstruct/entity/Crystal.java @@ -9,7 +9,7 @@ public class Crystal extends EntityCreeper public Crystal(World par1World) { super(par1World); - //texture = "/mods/tinker/textures/mob/crystalwater.png"; + // texture = "/mods/tinker/textures/mob/crystalwater.png"; } } diff --git a/src/main/java/tconstruct/entity/CrystalGuardian.java b/src/main/java/tconstruct/entity/CrystalGuardian.java index 63eb9337..f3f92d81 100644 --- a/src/main/java/tconstruct/entity/CrystalGuardian.java +++ b/src/main/java/tconstruct/entity/CrystalGuardian.java @@ -9,13 +9,11 @@ public class CrystalGuardian extends EntityLiving public CrystalGuardian(World par1World) { super(par1World); - //this.texture = "/mods/tinker/textures/mob/crystalguardamber.png"; + // this.texture = "/mods/tinker/textures/mob/crystalguardamber.png"; } - /*@Override - public int getMaxHealth () - { - return 100; - }*/ + /* + * @Override public int getMaxHealth () { return 100; } + */ } diff --git a/src/main/java/tconstruct/entity/MetalSlime.java b/src/main/java/tconstruct/entity/MetalSlime.java index d9b03404..045319be 100644 --- a/src/main/java/tconstruct/entity/MetalSlime.java +++ b/src/main/java/tconstruct/entity/MetalSlime.java @@ -10,7 +10,7 @@ public class MetalSlime extends BlueSlime public MetalSlime(World world) { super(world); - //this.texture = "/mods/tinker/textures/mob/slimemetal.png"; + // this.texture = "/mods/tinker/textures/mob/slimemetal.png"; this.setHealth(getMaxHealthForSize()); } @@ -40,25 +40,16 @@ public class MetalSlime extends BlueSlime this.isDead = true; } - /*protected void dropFewItems (boolean par1, int par2) - { - int j = this.getDropItemId(); - - if (j > 0) - { - int k = rand.nextInt(3) + rand.nextInt(this.getSlimeSize()); - - if (par2 > 0) - { - k += this.rand.nextInt(par2 + 1); - } - - for (int l = 0; l < k; ++l) - { - this.dropItem(j, 1); - } - } - }*/ + /* + * protected void dropFewItems (boolean par1, int par2) { int j = + * this.getDropItemId(); + * + * if (j > 0) { int k = rand.nextInt(3) + rand.nextInt(this.getSlimeSize()); + * + * if (par2 > 0) { k += this.rand.nextInt(par2 + 1); } + * + * for (int l = 0; l < k; ++l) { this.dropItem(j, 1); } } } + */ protected void updateEntityActionState () { diff --git a/src/main/java/tconstruct/entity/Skyla.java b/src/main/java/tconstruct/entity/Skyla.java index ef201dad..ee588694 100644 --- a/src/main/java/tconstruct/entity/Skyla.java +++ b/src/main/java/tconstruct/entity/Skyla.java @@ -9,23 +9,18 @@ public class Skyla extends EntityCreeper public Skyla(World par1World) { super(par1World); - //username = "Skyla"; - //texture = "/mods/tinker/textures/mob/skyla.png"; + // username = "Skyla"; + // texture = "/mods/tinker/textures/mob/skyla.png"; } - /*@Override - public void sendChatToPlayer (String var1) {} - - @Override - public boolean canCommandSenderUseCommand (int var1, String var2) - { - return false; - } - - @Override - public ChunkCoordinates getPlayerCoordinates () - { - return null; - }*/ + /* + * @Override public void sendChatToPlayer (String var1) {} + * + * @Override public boolean canCommandSenderUseCommand (int var1, String + * var2) { return false; } + * + * @Override public ChunkCoordinates getPlayerCoordinates () { return null; + * } + */ } diff --git a/src/main/java/tconstruct/entity/item/EntityLandmineFirework.java b/src/main/java/tconstruct/entity/item/EntityLandmineFirework.java index 31b6b794..f7b73895 100644 --- a/src/main/java/tconstruct/entity/item/EntityLandmineFirework.java +++ b/src/main/java/tconstruct/entity/item/EntityLandmineFirework.java @@ -15,7 +15,8 @@ public class EntityLandmineFirework extends Entity private int fireworkAge; /** - * The lifetime of the firework in ticks. When the age reaches the lifetime the firework explodes. + * The lifetime of the firework in ticks. When the age reaches the lifetime + * the firework explodes. */ private int lifetime; diff --git a/src/main/java/tconstruct/entity/item/ExplosivePrimed.java b/src/main/java/tconstruct/entity/item/ExplosivePrimed.java index c89b751e..fe60320f 100644 --- a/src/main/java/tconstruct/entity/item/ExplosivePrimed.java +++ b/src/main/java/tconstruct/entity/item/ExplosivePrimed.java @@ -46,8 +46,8 @@ public class ExplosivePrimed extends Entity } /** - * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to - * prevent them from trampling crops + * returns if this entity triggers Block.onEntityWalking on the blocks they + * walk on. used for spiders and wolves to prevent them from trampling crops */ protected boolean canTriggerWalking () { @@ -55,7 +55,8 @@ public class ExplosivePrimed extends Entity } /** - * Returns true if other Entities should be prevented from moving through this Entity. + * Returns true if other Entities should be prevented from moving through + * this Entity. */ public boolean canBeCollidedWith () { @@ -111,7 +112,7 @@ public class ExplosivePrimed extends Entity explosion.isSmoking = true; explosion.doExplosionA(); explosion.doExplosionB(true); - //return explosion; + // return explosion; } /** diff --git a/src/main/java/tconstruct/entity/projectile/ArrowEntity.java b/src/main/java/tconstruct/entity/projectile/ArrowEntity.java index 417666ff..e20dc30c 100644 --- a/src/main/java/tconstruct/entity/projectile/ArrowEntity.java +++ b/src/main/java/tconstruct/entity/projectile/ArrowEntity.java @@ -291,7 +291,9 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa && this.shootingEntity instanceof EntityPlayerMP) { ((EntityPlayerMP) this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0)); - //TConstruct.packetPipeline.sendTo(new S2BPacketChangeGameState(6, 0), (EntityPlayerMP) this.shootingEntity); + // TConstruct.packetPipeline.sendTo(new + // S2BPacketChangeGameState(6, 0), + // (EntityPlayerMP) this.shootingEntity); } } @@ -425,23 +427,15 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa { int stackSize; - /*if (par1ItemStack.isItemDamaged()) - { - slotID = this.getFirstEmptyStack(living); - - if (slotID >= 0) - { - living.setCurrentItemOrArmor(slotID, par1ItemStack); - living.setEquipmentDropChance(slotID, 2.0f); - par1ItemStack.stackSize = 0; - return true; - } - else - { - return false; - } - } - else*/ + /* + * if (par1ItemStack.isItemDamaged()) { slotID = + * this.getFirstEmptyStack(living); + * + * if (slotID >= 0) { living.setCurrentItemOrArmor(slotID, + * par1ItemStack); living.setEquipmentDropChance(slotID, 2.0f); + * par1ItemStack.stackSize = 0; return true; } else { return + * false; } } else + */ { do { @@ -456,10 +450,12 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa { CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Adding item to inventory"); CrashReportCategory crashreportcategory = crashreport.makeCategory("Item being added"); - //TODO is this needed??? - //crashreportcategory.addCrashSection("Item ID", Integer.valueOf(par1ItemStack.itemID)); + // TODO is this needed??? + // crashreportcategory.addCrashSection("Item ID", + // Integer.valueOf(par1ItemStack.itemID)); crashreportcategory.addCrashSection("Item data", Integer.valueOf(par1ItemStack.getItemDamage())); - //crashreportcategory.addCrashSectionCallable("Item name", new CallableItemName(this, par1ItemStack)); + // crashreportcategory.addCrashSectionCallable("Item name", new + // CallableItemName(this, par1ItemStack)); throw new ReportedException(crashreport); } } @@ -494,10 +490,10 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa } else { - /*if (this.mainInventory[k] == null) - { - this.mainInventory[k] = par1ItemStack; - }*/ + /* + * if (this.mainInventory[k] == null) { this.mainInventory[k] = + * par1ItemStack; } + */ if (living.getEquipmentInSlot(slotID) == null) { living.setCurrentItemOrArmor(slotID, par1ItemStack); diff --git a/src/main/java/tconstruct/entity/projectile/DaggerEntity.java b/src/main/java/tconstruct/entity/projectile/DaggerEntity.java index 7298d6a1..2205d2b6 100644 --- a/src/main/java/tconstruct/entity/projectile/DaggerEntity.java +++ b/src/main/java/tconstruct/entity/projectile/DaggerEntity.java @@ -22,7 +22,7 @@ public class DaggerEntity extends RotatingBase public DaggerEntity(ItemStack itemstack, World world, EntityPlayer entityplayer) { super(world, entityplayer, 0.75F, 0.8F); - //TConstruct.logger.info("Stack: "+itemstack); + // TConstruct.logger.info("Stack: "+itemstack); returnStackSlot = entityplayer.inventory.currentItem; returnStack = itemstack; } @@ -32,10 +32,9 @@ public class DaggerEntity extends RotatingBase super(world, entityplayer, f, g); } - /*public void entityInit () - { - super.entityInit(); - }*/ + /* + * public void entityInit () { super.entityInit(); } + */ @Override public void onHit (MovingObjectPosition movingobjectposition) diff --git a/src/main/java/tconstruct/entity/projectile/LaunchedPotion.java b/src/main/java/tconstruct/entity/projectile/LaunchedPotion.java index 1cb4acd4..62bda107 100644 --- a/src/main/java/tconstruct/entity/projectile/LaunchedPotion.java +++ b/src/main/java/tconstruct/entity/projectile/LaunchedPotion.java @@ -80,7 +80,8 @@ public class LaunchedPotion extends EntityThrowable } /** - * Returns the damage value of the thrown potion that this EntityPotion represents. + * Returns the damage value of the thrown potion that this EntityPotion + * represents. */ public int getPotionDamage () { diff --git a/src/main/java/tconstruct/entity/projectile/RotatingBase.java b/src/main/java/tconstruct/entity/projectile/RotatingBase.java index f1739233..e33fddf4 100644 --- a/src/main/java/tconstruct/entity/projectile/RotatingBase.java +++ b/src/main/java/tconstruct/entity/projectile/RotatingBase.java @@ -65,16 +65,14 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData setArrowHeading(motionX, motionY, motionZ, f, f1); } - /*public void setOnGround(boolean flag) - { - onGround = flag; - this.dataWatcher.updateObject(6, Byte.valueOf((byte) (flag == true ? 1 : 0))); - } - - public boolean getOnGround() - { - return this.dataWatcher.getWatchableObjectByte(0) == 1 ? true : false; - }*/ + /* + * public void setOnGround(boolean flag) { onGround = flag; + * this.dataWatcher.updateObject(6, Byte.valueOf((byte) (flag == true ? 1 : + * 0))); } + * + * public boolean getOnGround() { return + * this.dataWatcher.getWatchableObjectByte(0) == 1 ? true : false; } + */ @Override protected void entityInit () @@ -94,27 +92,17 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData worldObj.spawnParticle("snowballpoof", posX, posY, posZ, 0.0D, 0.0D, 0.0D); } - //kill(); + // kill(); } } /* - public void returnToPlayer() - { - damageDagger(0, true); - if(returnStack.stackSize < 1) - { - return; - } - if(returnStackSlot > 0) - { - mod_Infi2x2.forceAddToInv((EntityPlayer)returnsTo, returnStack, returnStackSlot, true); - } else - { - mod_Infi2x2.addToInv((EntityPlayer)returnsTo, returnStack, true); - } - } - */ + * public void returnToPlayer() { damageDagger(0, true); + * if(returnStack.stackSize < 1) { return; } if(returnStackSlot > 0) { + * mod_Infi2x2.forceAddToInv((EntityPlayer)returnsTo, returnStack, + * returnStackSlot, true); } else { + * mod_Infi2x2.addToInv((EntityPlayer)returnsTo, returnStack, true); } } + */ public void determineRotation () { @@ -190,18 +178,13 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData } else { - /*this.motionX = 0; - this.motionY = 0; - this.motionZ = 0;*/ - /*ticksInGround++; - if (ticksInGround == 1200) - { - setDead(); - } - if (ticksInGround == maxGroundTicks) - { - setDead(); - }*/ + /* + * this.motionX = 0; this.motionY = 0; this.motionZ = 0; + */ + /* + * ticksInGround++; if (ticksInGround == 1200) { setDead(); } if + * (ticksInGround == maxGroundTicks) { setDead(); } + */ if (!hasHitGround) { hasHitGround = true; @@ -303,34 +286,24 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData } } - /*public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) - { - super.readEntityFromNBT(par1NBTTagCompound); - - if (par1NBTTagCompound.hasKey("Potion")) - { - this.potionDamage = ItemStack.loadItemStackFromNBT(par1NBTTagCompound.getCompoundTag("Potion")); - } - else - { - this.setPotionDamage(par1NBTTagCompound.getInteger("potionValue")); - } - - if (this.potionDamage == null) - { - this.setDead(); - } - } - - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) - { - super.writeEntityToNBT(par1NBTTagCompound); - - if (this.potionDamage != null) - { - - } - }*/ + /* + * public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) { + * super.readEntityFromNBT(par1NBTTagCompound); + * + * if (par1NBTTagCompound.hasKey("Potion")) { this.potionDamage = + * ItemStack.loadItemStackFromNBT + * (par1NBTTagCompound.getCompoundTag("Potion")); } else { + * this.setPotionDamage(par1NBTTagCompound.getInteger("potionValue")); } + * + * if (this.potionDamage == null) { this.setDead(); } } + * + * public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) { + * super.writeEntityToNBT(par1NBTTagCompound); + * + * if (this.potionDamage != null) { + * + * } } + */ public void writeEntityToNBT (NBTTagCompound tags) { @@ -346,14 +319,14 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData public void readEntityFromNBT (NBTTagCompound tags) { - //super.readEntityFromNBT(tags); + // super.readEntityFromNBT(tags); this.returnStack = ItemStack.loadItemStackFromNBT(tags.getCompoundTag("Throwable")); xTile = tags.getShort("xTile"); yTile = tags.getShort("yTile"); zTile = tags.getShort("zTile"); - //TODO fix this\/ - //inTile = tags.getString("inTile"); + // TODO fix this\/ + // inTile = tags.getString("inTile"); arrowShake = tags.getByte("shake") & 0xff; onGround = tags.getByte("onGround") == 1; doNotRetrieve = tags.getBoolean("Retrieval"); diff --git a/src/main/java/tconstruct/inventory/AdaptiveSmelteryContainer.java b/src/main/java/tconstruct/inventory/AdaptiveSmelteryContainer.java index 6b68714c..59a5d9cf 100644 --- a/src/main/java/tconstruct/inventory/AdaptiveSmelteryContainer.java +++ b/src/main/java/tconstruct/inventory/AdaptiveSmelteryContainer.java @@ -55,7 +55,7 @@ public class AdaptiveSmelteryContainer extends ActiveContainer if (invRow != slotRow) { slotRow = invRow; - //TConstruct.logger.info(invRow); + // TConstruct.logger.info(invRow); int basePos = invRow * 3; for (int iter = 0; iter < activeInventorySlots.size(); iter++) { @@ -135,7 +135,7 @@ public class AdaptiveSmelteryContainer extends ActiveContainer @Override protected boolean mergeItemStack (ItemStack inputStack, int startSlot, int endSlot, boolean flag) { - //TConstruct.logger.info("Merge"); + // TConstruct.logger.info("Merge"); boolean merged = false; int slotPos = startSlot; @@ -147,44 +147,27 @@ public class AdaptiveSmelteryContainer extends ActiveContainer Slot slot; ItemStack slotStack; - /*if (inputStack.isStackable() && startSlot >= logic.getSizeInventory()) - { - TConstruct.logger.info("Rawr!"); - while (inputStack.stackSize > 0 && (!flag && slotPos < endSlot || flag && slotPos >= startSlot)) - { - slot = (Slot) this.inventorySlots.get(slotPos); - slotStack = slot.getStack(); - - if (slotStack != null && ItemStack.areItemStacksEqual(inputStack, slotStack) && !inputStack.getHasSubtypes()) - { - int totalSize = slotStack.stackSize + inputStack.stackSize; - - if (totalSize <= inputStack.getMaxStackSize()) - { - inputStack.stackSize = 0; - slotStack.stackSize = totalSize; - slot.onSlotChanged(); - merged = true; - } - else if (slotStack.stackSize < inputStack.getMaxStackSize()) - { - inputStack.stackSize -= inputStack.getMaxStackSize() - slotStack.stackSize; - slotStack.stackSize = inputStack.getMaxStackSize(); - slot.onSlotChanged(); - merged = true; - } - } - - if (flag) - { - --slotPos; - } - else - { - ++slotPos; - } - } - }*/ + /* + * if (inputStack.isStackable() && startSlot >= + * logic.getSizeInventory()) { TConstruct.logger.info("Rawr!"); while + * (inputStack.stackSize > 0 && (!flag && slotPos < endSlot || flag && + * slotPos >= startSlot)) { slot = (Slot) + * this.inventorySlots.get(slotPos); slotStack = slot.getStack(); + * + * if (slotStack != null && ItemStack.areItemStacksEqual(inputStack, + * slotStack) && !inputStack.getHasSubtypes()) { int totalSize = + * slotStack.stackSize + inputStack.stackSize; + * + * if (totalSize <= inputStack.getMaxStackSize()) { inputStack.stackSize + * = 0; slotStack.stackSize = totalSize; slot.onSlotChanged(); merged = + * true; } else if (slotStack.stackSize < inputStack.getMaxStackSize()) + * { inputStack.stackSize -= inputStack.getMaxStackSize() - + * slotStack.stackSize; slotStack.stackSize = + * inputStack.getMaxStackSize(); slot.onSlotChanged(); merged = true; } + * } + * + * if (flag) { --slotPos; } else { ++slotPos; } } } + */ if (inputStack.isStackable() && startSlot >= logic.getSizeInventory()) { @@ -193,7 +176,8 @@ public class AdaptiveSmelteryContainer extends ActiveContainer slot = (Slot) this.inventorySlots.get(slotPos); slotStack = slot.getStack(); - if (slotStack != null && (!inputStack.getHasSubtypes() || inputStack.getItemDamage() == slotStack.getItemDamage()) && ItemStack.areItemStackTagsEqual(inputStack, slotStack)) + if (slotStack != null && slotStack.getItem() == inputStack.getItem() && (!inputStack.getHasSubtypes() || inputStack.getItemDamage() == slotStack.getItemDamage()) + && ItemStack.areItemStackTagsEqual(inputStack, slotStack)) { int l = slotStack.stackSize + inputStack.stackSize; diff --git a/src/main/java/tconstruct/inventory/CraftingStationContainer.java b/src/main/java/tconstruct/inventory/CraftingStationContainer.java index 2ac61f54..360a0c76 100644 --- a/src/main/java/tconstruct/inventory/CraftingStationContainer.java +++ b/src/main/java/tconstruct/inventory/CraftingStationContainer.java @@ -50,7 +50,7 @@ public class CraftingStationContainer extends Container } } - //Player Inventory + // Player Inventory for (row = 0; row < 3; ++row) { for (column = 0; column < 9; ++column) @@ -64,7 +64,7 @@ public class CraftingStationContainer extends Container this.addSlotToContainer(new Slot(inventorplayer, column, 8 + column * 18, 142)); } - //Side inventory + // Side inventory if (logic.chest != null) { IInventory chest = logic.chest.get(); diff --git a/src/main/java/tconstruct/inventory/FurnaceContainer.java b/src/main/java/tconstruct/inventory/FurnaceContainer.java index 9099ae75..c4834dcc 100644 --- a/src/main/java/tconstruct/inventory/FurnaceContainer.java +++ b/src/main/java/tconstruct/inventory/FurnaceContainer.java @@ -107,7 +107,8 @@ public class FurnaceContainer extends Container } /** - * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. + * Called when a player shift-clicks on a slot. You must override this or + * you will crash when someone does that. */ public ItemStack transferStackInSlot (EntityPlayer par1EntityPlayer, int par2) { diff --git a/src/main/java/tconstruct/inventory/InventoryCraftingStation.java b/src/main/java/tconstruct/inventory/InventoryCraftingStation.java index 98045d8b..5fcf74c2 100644 --- a/src/main/java/tconstruct/inventory/InventoryCraftingStation.java +++ b/src/main/java/tconstruct/inventory/InventoryCraftingStation.java @@ -12,7 +12,8 @@ public class InventoryCraftingStation extends InventoryCrafting private int inventoryWidth; /** - * Class containing the callbacks for the events on_GUIClosed and on_CraftMaxtrixChanged. + * Class containing the callbacks for the events on_GUIClosed and + * on_CraftMaxtrixChanged. */ private Container eventHandler; private InventoryLogic logic; @@ -67,8 +68,8 @@ public class InventoryCraftingStation extends InventoryCrafting } /** - * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a - * new stack. + * Removes from an inventory slot (first arg) up to a specified number + * (second arg) of items and returns them in a new stack. */ @Override public ItemStack decrStackSize (int slotID, int par2) @@ -106,7 +107,8 @@ public class InventoryCraftingStation extends InventoryCrafting } /** - * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). + * Sets the given item stack to the specified slot in the inventory (can be + * crafting or armor sections). */ public void setInventorySlotContents (int slot, ItemStack itemstack) { @@ -115,8 +117,8 @@ public class InventoryCraftingStation extends InventoryCrafting } /** - * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't - * this more of a set than a get?* + * Returns the maximum stack size for a inventory slot. Seems to always be + * 64, possibly will be extended. *Isn't this more of a set than a get?* */ public int getInventoryStackLimit () { @@ -131,7 +133,8 @@ public class InventoryCraftingStation extends InventoryCrafting } /** - * Do not make give this method the name canInteractWith because it clashes with Container + * Do not make give this method the name canInteractWith because it clashes + * with Container */ public boolean isUseableByPlayer (EntityPlayer par1EntityPlayer) { @@ -147,7 +150,8 @@ public class InventoryCraftingStation extends InventoryCrafting } /** - * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot. + * Returns true if automation is allowed to insert the given stack (ignoring + * stack size) into the given slot. */ public boolean isStackValidForSlot (int par1, ItemStack par2ItemStack) { diff --git a/src/main/java/tconstruct/inventory/InventoryCraftingStationResult.java b/src/main/java/tconstruct/inventory/InventoryCraftingStationResult.java index 74817896..4a63a357 100644 --- a/src/main/java/tconstruct/inventory/InventoryCraftingStationResult.java +++ b/src/main/java/tconstruct/inventory/InventoryCraftingStationResult.java @@ -27,7 +27,7 @@ public class InventoryCraftingStationResult extends InventoryCraftResult */ public ItemStack getStackInSlot (int par1) { - return logic.getStackInSlot(0);//this.stackResult[0]; + return logic.getStackInSlot(0);// this.stackResult[0]; } /** @@ -39,8 +39,9 @@ public class InventoryCraftingStationResult extends InventoryCraftResult } /** - * If this returns false, the inventory name will be used as an unlocalized name, and translated into the player's - * language. Otherwise it will be used directly. + * If this returns false, the inventory name will be used as an unlocalized + * name, and translated into the player's language. Otherwise it will be + * used directly. */ public boolean isInvNameLocalized () { @@ -48,8 +49,8 @@ public class InventoryCraftingStationResult extends InventoryCraftResult } /** - * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a - * new stack. + * Removes from an inventory slot (first arg) up to a specified number + * (second arg) of items and returns them in a new stack. */ public ItemStack decrStackSize (int par1, int par2) { @@ -67,8 +68,9 @@ public class InventoryCraftingStationResult extends InventoryCraftResult } /** - * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - - * like when you close a workbench GUI. + * When some containers are closed they call this on each slot, then drop + * whatever it returns as an EntityItem - like when you close a workbench + * GUI. */ public ItemStack getStackInSlotOnClosing (int par1) { @@ -76,7 +78,8 @@ public class InventoryCraftingStationResult extends InventoryCraftResult } /** - * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). + * Sets the given item stack to the specified slot in the inventory (can be + * crafting or armor sections). */ @Override public void setInventorySlotContents (int par1, ItemStack par2ItemStack) @@ -85,8 +88,8 @@ public class InventoryCraftingStationResult extends InventoryCraftResult } /** - * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't - * this more of a set than a get?* + * Returns the maximum stack size for a inventory slot. Seems to always be + * 64, possibly will be extended. *Isn't this more of a set than a get?* */ public int getInventoryStackLimit () { @@ -101,7 +104,8 @@ public class InventoryCraftingStationResult extends InventoryCraftResult } /** - * Do not make give this method the name canInteractWith because it clashes with Container + * Do not make give this method the name canInteractWith because it clashes + * with Container */ public boolean isUseableByPlayer (EntityPlayer par1EntityPlayer) { @@ -117,7 +121,8 @@ public class InventoryCraftingStationResult extends InventoryCraftResult } /** - * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot. + * Returns true if automation is allowed to insert the given stack (ignoring + * stack size) into the given slot. */ public boolean isStackValidForSlot (int par1, ItemStack par2ItemStack) { diff --git a/src/main/java/tconstruct/inventory/PatternShaperContainer.java b/src/main/java/tconstruct/inventory/PatternShaperContainer.java index 2b0009b9..a3185d50 100644 --- a/src/main/java/tconstruct/inventory/PatternShaperContainer.java +++ b/src/main/java/tconstruct/inventory/PatternShaperContainer.java @@ -1,11 +1,11 @@ package tconstruct.inventory; -import tconstruct.blocks.logic.StencilTableLogic; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import tconstruct.blocks.logic.StencilTableLogic; public class PatternShaperContainer extends Container { @@ -16,13 +16,11 @@ public class PatternShaperContainer extends Container logic = shaper; this.addSlotToContainer(new Slot(shaper, 0, 48, 35)); this.addSlotToContainer(new SlotOnlyTake(shaper, 1, 106, 35)); - /*for (int i = 0; i < 3; i++) - { - for (int l = 0; l < 3; l++) - { - this.addSlotToContainer(new Slot(craftMatrix, l + i * 3, 30 + l * 18, 17 + i * 18)); - } - }*/ + /* + * for (int i = 0; i < 3; i++) { for (int l = 0; l < 3; l++) { + * this.addSlotToContainer(new Slot(craftMatrix, l + i * 3, 30 + l * 18, + * 17 + i * 18)); } } + */ /* Player inventory */ for (int column = 0; column < 3; column++) @@ -39,25 +37,19 @@ public class PatternShaperContainer extends Container } } - /*public void onCraftMatrixChanged(IInventory iinventory) - { - craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj)); - }*/ + /* + * public void onCraftMatrixChanged(IInventory iinventory) { + * craftResult.setInventorySlotContents(0, + * CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj)); + * } + */ - /*@Override - public void onContainerClosed(EntityPlayer entityplayer) - { - super.onContainerClosed(entityplayer); - if (logic.worldObj.isRemote) - { - return; - } - ItemStack itemstack = logic.getStackInSlot(0); - if (itemstack != null) - { - entityplayer.dropPlayerItem(itemstack); - } - }*/ + /* + * @Override public void onContainerClosed(EntityPlayer entityplayer) { + * super.onContainerClosed(entityplayer); if (logic.worldObj.isRemote) { + * return; } ItemStack itemstack = logic.getStackInSlot(0); if (itemstack != + * null) { entityplayer.dropPlayerItem(itemstack); } } + */ @Override public boolean canInteractWith (EntityPlayer entityplayer) @@ -69,37 +61,24 @@ public class PatternShaperContainer extends Container public ItemStack transferStackInSlot (EntityPlayer player, int slotID) { return null; - /*ItemStack stack = null; - Slot slot = (Slot)this.inventorySlots.get(slotID); - - if (slot != null && slot.getHasStack()) - { - ItemStack slotStack = slot.getStack(); - stack = slotStack.copy(); - - if (slotID < logic.getSizeInventory()) - { - if (!this.mergeItemStack(slotStack, logic.getSizeInventory(), this.inventorySlots.size(), true)) - { - return null; - } - } - else if (!this.mergeItemStack(slotStack, 0, logic.getSizeInventory()-1, false)) - { - return null; - } - - if (slotStack.stackSize == 0) - { - slot.putStack((ItemStack)null); - } - else - { - slot.onSlotChanged(); - } - } - - return stack;*/ + /* + * ItemStack stack = null; Slot slot = + * (Slot)this.inventorySlots.get(slotID); + * + * if (slot != null && slot.getHasStack()) { ItemStack slotStack = + * slot.getStack(); stack = slotStack.copy(); + * + * if (slotID < logic.getSizeInventory()) { if + * (!this.mergeItemStack(slotStack, logic.getSizeInventory(), + * this.inventorySlots.size(), true)) { return null; } } else if + * (!this.mergeItemStack(slotStack, 0, logic.getSizeInventory()-1, + * false)) { return null; } + * + * if (slotStack.stackSize == 0) { slot.putStack((ItemStack)null); } + * else { slot.onSlotChanged(); } } + * + * return stack; + */ } } \ No newline at end of file diff --git a/src/main/java/tconstruct/inventory/SlotArmorCopy.java b/src/main/java/tconstruct/inventory/SlotArmorCopy.java index 18e6c529..867e32fe 100644 --- a/src/main/java/tconstruct/inventory/SlotArmorCopy.java +++ b/src/main/java/tconstruct/inventory/SlotArmorCopy.java @@ -14,12 +14,14 @@ import cpw.mods.fml.relauncher.SideOnly; public class SlotArmorCopy extends Slot { /** - * The armor type that can be placed on that slot, it uses the same values of armorType field on ItemArmor. + * The armor type that can be placed on that slot, it uses the same values + * of armorType field on ItemArmor. */ final int armorType; /** - * The parent class of this clot, ContainerPlayer, SlotArmor is a Anon inner class. + * The parent class of this clot, ContainerPlayer, SlotArmor is a Anon inner + * class. */ final Container parent; @@ -31,8 +33,8 @@ public class SlotArmorCopy extends Slot } /** - * Returns the maximum stack size for a given slot (usually the same as getInventoryStackLimit(), but 1 in the case - * of armor slots) + * Returns the maximum stack size for a given slot (usually the same as + * getInventoryStackLimit(), but 1 in the case of armor slots) */ public int getSlotStackLimit () { @@ -40,7 +42,8 @@ public class SlotArmorCopy extends Slot } /** - * Check if the stack is a valid item for this slot. Always true beside for the armor slots. + * Check if the stack is a valid item for this slot. Always true beside for + * the armor slots. */ public boolean isItemValid (ItemStack par1ItemStack) { diff --git a/src/main/java/tconstruct/inventory/SlotBehavedOnly.java b/src/main/java/tconstruct/inventory/SlotBehavedOnly.java index f07d5b0c..4ba4fd39 100644 --- a/src/main/java/tconstruct/inventory/SlotBehavedOnly.java +++ b/src/main/java/tconstruct/inventory/SlotBehavedOnly.java @@ -39,7 +39,7 @@ public class SlotBehavedOnly extends Slot } return false; - //return b != null; + // return b != null; } public int getSlotStackLimit (ItemStack par1ItemStack) diff --git a/src/main/java/tconstruct/inventory/SlotBlocksOnly.java b/src/main/java/tconstruct/inventory/SlotBlocksOnly.java index 5ed9bef5..9ebed822 100644 --- a/src/main/java/tconstruct/inventory/SlotBlocksOnly.java +++ b/src/main/java/tconstruct/inventory/SlotBlocksOnly.java @@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack; /** * * @author fuj1n - * + * */ public class SlotBlocksOnly extends Slot { diff --git a/src/main/java/tconstruct/inventory/SlotCanister.java b/src/main/java/tconstruct/inventory/SlotCanister.java index 29e54fb9..d53b054c 100644 --- a/src/main/java/tconstruct/inventory/SlotCanister.java +++ b/src/main/java/tconstruct/inventory/SlotCanister.java @@ -14,8 +14,8 @@ public class SlotCanister extends Slot } /** - * Returns the maximum stack size for a given slot (usually the same as getInventoryStackLimit(), but 1 in the case - * of armor slots) + * Returns the maximum stack size for a given slot (usually the same as + * getInventoryStackLimit(), but 1 in the case of armor slots) */ public int getSlotStackLimit () { @@ -23,7 +23,8 @@ public class SlotCanister extends Slot } /** - * Check if the stack is a valid item for this slot. Always true beside for the armor slots. + * Check if the stack is a valid item for this slot. Always true beside for + * the armor slots. */ public boolean isItemValid (ItemStack par1ItemStack) { diff --git a/src/main/java/tconstruct/inventory/SlotKnapsack.java b/src/main/java/tconstruct/inventory/SlotKnapsack.java index 8fe92c8a..f308ce54 100644 --- a/src/main/java/tconstruct/inventory/SlotKnapsack.java +++ b/src/main/java/tconstruct/inventory/SlotKnapsack.java @@ -14,8 +14,8 @@ public class SlotKnapsack extends Slot } /** - * Returns the maximum stack size for a given slot (usually the same as getInventoryStackLimit(), but 1 in the case - * of armor slots) + * Returns the maximum stack size for a given slot (usually the same as + * getInventoryStackLimit(), but 1 in the case of armor slots) */ public int getSlotStackLimit () { @@ -23,7 +23,8 @@ public class SlotKnapsack extends Slot } /** - * Check if the stack is a valid item for this slot. Always true beside for the armor slots. + * Check if the stack is a valid item for this slot. Always true beside for + * the armor slots. */ public boolean isItemValid (ItemStack par1ItemStack) { diff --git a/src/main/java/tconstruct/inventory/SlotOnlyTake.java b/src/main/java/tconstruct/inventory/SlotOnlyTake.java index 3744558b..15af8616 100644 --- a/src/main/java/tconstruct/inventory/SlotOnlyTake.java +++ b/src/main/java/tconstruct/inventory/SlotOnlyTake.java @@ -13,7 +13,8 @@ public class SlotOnlyTake extends Slot } /** - * Check if the stack is a valid item for this slot. Always true beside for the armor slots. + * Check if the stack is a valid item for this slot. Always true beside for + * the armor slots. */ public boolean isItemValid (ItemStack stack) { diff --git a/src/main/java/tconstruct/inventory/SlotPattern.java b/src/main/java/tconstruct/inventory/SlotPattern.java index ddc0abbe..055a3e3e 100644 --- a/src/main/java/tconstruct/inventory/SlotPattern.java +++ b/src/main/java/tconstruct/inventory/SlotPattern.java @@ -13,7 +13,8 @@ public class SlotPattern extends Slot } /** - * Check if the stack is a valid item for this slot. Always true beside for the armor slots. + * Check if the stack is a valid item for this slot. Always true beside for + * the armor slots. */ public boolean isItemValid (ItemStack stack) { diff --git a/src/main/java/tconstruct/inventory/SlotTool.java b/src/main/java/tconstruct/inventory/SlotTool.java index 6133940a..7606750f 100644 --- a/src/main/java/tconstruct/inventory/SlotTool.java +++ b/src/main/java/tconstruct/inventory/SlotTool.java @@ -24,33 +24,36 @@ public class SlotTool extends Slot } /** - * Check if the stack is a valid item for this slot. Always true beside for the armor slots. + * Check if the stack is a valid item for this slot. Always true beside for + * the armor slots. */ public boolean isItemValid (ItemStack stack) { return false; - //return stack.getItem() instanceof ToolCore; + // return stack.getItem() instanceof ToolCore; } public void onPickupFromSlot (EntityPlayer par1EntityPlayer, ItemStack stack) { this.onCrafting(stack); - //stack.setUnlocalizedName("\u00A7f" + toolName); + // stack.setUnlocalizedName("\u00A7f" + toolName); super.onPickupFromSlot(par1EntityPlayer, stack); } /** - * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood. Typically increases an - * internal count then calls onCrafting(item). + * the itemStack passed in is the output - ie, iron ingots, and pickaxes, + * not ore and wood. Typically increases an internal count then calls + * onCrafting(item). */ protected void onCrafting (ItemStack stack, int par2) { - //this.field_75228_b += par2; + // this.field_75228_b += par2; this.onCrafting(stack); } /** - * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood. + * the itemStack passed in is the output - ie, iron ingots, and pickaxes, + * not ore and wood. */ protected void onCrafting (ItemStack stack) { @@ -65,7 +68,8 @@ public class SlotTool extends Slot inventory.decrStackSize(1, amount); if (!player.worldObj.isRemote && full) player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "tinker:little_saw", 1.0F, (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F); - //player.worldObj.playAuxSFX(1021, (int)player.posX, (int)player.posY, (int)player.posZ, 0); + // player.worldObj.playAuxSFX(1021, (int)player.posX, + // (int)player.posY, (int)player.posZ, 0); MinecraftForge.EVENT_BUS.post(new ToolCraftedEvent(this.inventory, player, stack)); } } diff --git a/src/main/java/tconstruct/inventory/SlotUnused.java b/src/main/java/tconstruct/inventory/SlotUnused.java index e9941251..3ac26ba7 100644 --- a/src/main/java/tconstruct/inventory/SlotUnused.java +++ b/src/main/java/tconstruct/inventory/SlotUnused.java @@ -12,8 +12,8 @@ public class SlotUnused extends Slot } /** - * Returns the maximum stack size for a given slot (usually the same as getInventoryStackLimit(), but 1 in the case - * of armor slots) + * Returns the maximum stack size for a given slot (usually the same as + * getInventoryStackLimit(), but 1 in the case of armor slots) */ public int getSlotStackLimit () { @@ -21,7 +21,8 @@ public class SlotUnused extends Slot } /** - * Check if the stack is a valid item for this slot. Always true beside for the armor slots. + * Check if the stack is a valid item for this slot. Always true beside for + * the armor slots. */ public boolean isItemValid (ItemStack par1ItemStack) { diff --git a/src/main/java/tconstruct/inventory/SmelteryContainer.java b/src/main/java/tconstruct/inventory/SmelteryContainer.java index a62e713f..bd4a94d4 100644 --- a/src/main/java/tconstruct/inventory/SmelteryContainer.java +++ b/src/main/java/tconstruct/inventory/SmelteryContainer.java @@ -49,7 +49,7 @@ public class SmelteryContainer extends ActiveContainer if (invRow != slotRow) { slotRow = invRow; - //TConstruct.logger.info(invRow); + // TConstruct.logger.info(invRow); int basePos = invRow * 3; for (int iter = 0; iter < activeInventorySlots.size(); iter++) { @@ -80,29 +80,20 @@ public class SmelteryContainer extends ActiveContainer } @Override - public void detectAndSendChanges () //TODO: Sync with this + public void detectAndSendChanges () // TODO: Sync with this { super.detectAndSendChanges(); - /*for (int i = 0; i < crafters.size(); i++) - { - ICrafting icrafting = (ICrafting)crafters.get(i); - if (progress != logic.progress) - { - icrafting.sendProgressBarUpdate(this, 0, logic.progress); - } - if (fuel != logic.fuel) - { - icrafting.sendProgressBarUpdate(this, 1, logic.fuel); - } - if (fuelGague != logic.fuelGague) - { - icrafting.sendProgressBarUpdate(this, 2, logic.fuelGague); - } - } - - progress = logic.progress; - fuel = logic.fuel; - fuelGague = logic.fuelGague;*/ + /* + * for (int i = 0; i < crafters.size(); i++) { ICrafting icrafting = + * (ICrafting)crafters.get(i); if (progress != logic.progress) { + * icrafting.sendProgressBarUpdate(this, 0, logic.progress); } if (fuel + * != logic.fuel) { icrafting.sendProgressBarUpdate(this, 1, + * logic.fuel); } if (fuelGague != logic.fuelGague) { + * icrafting.sendProgressBarUpdate(this, 2, logic.fuelGague); } } + * + * progress = logic.progress; fuel = logic.fuel; fuelGague = + * logic.fuelGague; + */ } public void updateProgressBar (int id, int value) @@ -111,14 +102,12 @@ public class SmelteryContainer extends ActiveContainer { logic.fuelGague = value; } - /* if (id == 1) - { - logic.fuel = value; - }*/ - /*if (id == 2) - { - logic.fuelGague = value; - }*/ + /* + * if (id == 1) { logic.fuel = value; } + */ + /* + * if (id == 2) { logic.fuelGague = value; } + */ } @Override @@ -166,7 +155,7 @@ public class SmelteryContainer extends ActiveContainer @Override protected boolean mergeItemStack (ItemStack inputStack, int startSlot, int endSlot, boolean flag) { - //TConstruct.logger.info("Merge"); + // TConstruct.logger.info("Merge"); boolean merged = false; int slotPos = startSlot; @@ -178,44 +167,27 @@ public class SmelteryContainer extends ActiveContainer Slot slot; ItemStack slotStack; - /*if (inputStack.isStackable() && startSlot >= logic.getSizeInventory()) - { - TConstruct.logger.info("Rawr!"); - while (inputStack.stackSize > 0 && (!flag && slotPos < endSlot || flag && slotPos >= startSlot)) - { - slot = (Slot) this.inventorySlots.get(slotPos); - slotStack = slot.getStack(); - - if (slotStack != null && ItemStack.areItemStacksEqual(inputStack, slotStack) && !inputStack.getHasSubtypes()) - { - int totalSize = slotStack.stackSize + inputStack.stackSize; - - if (totalSize <= inputStack.getMaxStackSize()) - { - inputStack.stackSize = 0; - slotStack.stackSize = totalSize; - slot.onSlotChanged(); - merged = true; - } - else if (slotStack.stackSize < inputStack.getMaxStackSize()) - { - inputStack.stackSize -= inputStack.getMaxStackSize() - slotStack.stackSize; - slotStack.stackSize = inputStack.getMaxStackSize(); - slot.onSlotChanged(); - merged = true; - } - } - - if (flag) - { - --slotPos; - } - else - { - ++slotPos; - } - } - }*/ + /* + * if (inputStack.isStackable() && startSlot >= + * logic.getSizeInventory()) { TConstruct.logger.info("Rawr!"); while + * (inputStack.stackSize > 0 && (!flag && slotPos < endSlot || flag && + * slotPos >= startSlot)) { slot = (Slot) + * this.inventorySlots.get(slotPos); slotStack = slot.getStack(); + * + * if (slotStack != null && ItemStack.areItemStacksEqual(inputStack, + * slotStack) && !inputStack.getHasSubtypes()) { int totalSize = + * slotStack.stackSize + inputStack.stackSize; + * + * if (totalSize <= inputStack.getMaxStackSize()) { inputStack.stackSize + * = 0; slotStack.stackSize = totalSize; slot.onSlotChanged(); merged = + * true; } else if (slotStack.stackSize < inputStack.getMaxStackSize()) + * { inputStack.stackSize -= inputStack.getMaxStackSize() - + * slotStack.stackSize; slotStack.stackSize = + * inputStack.getMaxStackSize(); slot.onSlotChanged(); merged = true; } + * } + * + * if (flag) { --slotPos; } else { ++slotPos; } } } + */ if (inputStack.isStackable() && startSlot >= logic.getSizeInventory()) { @@ -224,7 +196,8 @@ public class SmelteryContainer extends ActiveContainer slot = (Slot) this.inventorySlots.get(slotPos); slotStack = slot.getStack(); - if (slotStack != null && (!inputStack.getHasSubtypes() || inputStack.getItemDamage() == slotStack.getItemDamage()) && ItemStack.areItemStackTagsEqual(inputStack, slotStack)) + if (slotStack != null && slotStack.getItem() == inputStack.getItem() && (!inputStack.getHasSubtypes() || inputStack.getItemDamage() == slotStack.getItemDamage()) + && ItemStack.areItemStackTagsEqual(inputStack, slotStack)) { int l = slotStack.stackSize + inputStack.stackSize; diff --git a/src/main/java/tconstruct/inventory/ToolForgeContainer.java b/src/main/java/tconstruct/inventory/ToolForgeContainer.java index 625c178b..f6cb778e 100644 --- a/src/main/java/tconstruct/inventory/ToolForgeContainer.java +++ b/src/main/java/tconstruct/inventory/ToolForgeContainer.java @@ -43,7 +43,7 @@ public class ToolForgeContainer extends ToolStationContainer } } - //posX and posY must be the same length + // posX and posY must be the same length public void resetSlots (int[] posX, int[] posY) { inventorySlots.clear(); diff --git a/src/main/java/tconstruct/inventory/ToolStationContainer.java b/src/main/java/tconstruct/inventory/ToolStationContainer.java index 6bf620e7..7d750574 100644 --- a/src/main/java/tconstruct/inventory/ToolStationContainer.java +++ b/src/main/java/tconstruct/inventory/ToolStationContainer.java @@ -50,7 +50,7 @@ public class ToolStationContainer extends ActiveContainer } } - //posX and posY must be the same length + // posX and posY must be the same length public void resetSlots (int[] posX, int[] posY) { /* Station inventory */ @@ -154,43 +154,27 @@ public class ToolStationContainer extends ActiveContainer Slot otherInventorySlot; ItemStack copyStack = null; - /*if (stack.isStackable()) - { - while (stack.stackSize > 0 && (!playerInventory && slotIndex < slotsTotal || playerInventory && slotIndex >= slotsStart)) - { - otherInventorySlot = (Slot)this.inventorySlots.get(slotIndex); - copyStack = otherInventorySlot.getStack(); - - if (copyStack != null && copyStack.itemID == stack.itemID && (!stack.getHasSubtypes() || stack.getItemDamage() == copyStack.getItemDamage()) && ItemStack.areItemStackTagsEqual(stack, copyStack)) - { - int totalSize = copyStack.stackSize + stack.stackSize; - - if (totalSize <= stack.getMaxStackSize()) - { - stack.stackSize = 0; - copyStack.stackSize = totalSize; - otherInventorySlot.onSlotChanged(); - failedToMerge = true; - } - else if (copyStack.stackSize < stack.getMaxStackSize()) - { - stack.stackSize -= stack.getMaxStackSize() - copyStack.stackSize; - copyStack.stackSize = stack.getMaxStackSize(); - otherInventorySlot.onSlotChanged(); - failedToMerge = true; - } - } - - if (playerInventory) - { - --slotIndex; - } - else - { - ++slotIndex; - } - } - }*/ + /* + * if (stack.isStackable()) { while (stack.stackSize > 0 && + * (!playerInventory && slotIndex < slotsTotal || playerInventory && + * slotIndex >= slotsStart)) { otherInventorySlot = + * (Slot)this.inventorySlots.get(slotIndex); copyStack = + * otherInventorySlot.getStack(); + * + * if (copyStack != null && copyStack.itemID == stack.itemID && + * (!stack.getHasSubtypes() || stack.getItemDamage() == + * copyStack.getItemDamage()) && ItemStack.areItemStackTagsEqual(stack, + * copyStack)) { int totalSize = copyStack.stackSize + stack.stackSize; + * + * if (totalSize <= stack.getMaxStackSize()) { stack.stackSize = 0; + * copyStack.stackSize = totalSize; otherInventorySlot.onSlotChanged(); + * failedToMerge = true; } else if (copyStack.stackSize < + * stack.getMaxStackSize()) { stack.stackSize -= stack.getMaxStackSize() + * - copyStack.stackSize; copyStack.stackSize = stack.getMaxStackSize(); + * otherInventorySlot.onSlotChanged(); failedToMerge = true; } } + * + * if (playerInventory) { --slotIndex; } else { ++slotIndex; } } } + */ if (stack.stackSize > 0) { @@ -229,10 +213,13 @@ public class ToolStationContainer extends ActiveContainer } } - /*boolean emptySlots = ( ((Slot) inventorySlots.get(2)).getStack() == null && ((Slot) inventorySlots.get(3)).getStack() == null ); - TConstruct.logger.info("Empty slots"); - if (!failedToMerge && emptySlots) - player.worldObj.playAuxSFX(1021, (int)player.posX, (int)player.posY, (int)player.posZ, 0);*/ + /* + * boolean emptySlots = ( ((Slot) inventorySlots.get(2)).getStack() == + * null && ((Slot) inventorySlots.get(3)).getStack() == null ); + * TConstruct.logger.info("Empty slots"); if (!failedToMerge && + * emptySlots) player.worldObj.playAuxSFX(1021, (int)player.posX, + * (int)player.posY, (int)player.posZ, 0); + */ return failedToMerge; } diff --git a/src/main/java/tconstruct/items/FilledBucket.java b/src/main/java/tconstruct/items/FilledBucket.java index 6879cc63..882db1e8 100644 --- a/src/main/java/tconstruct/items/FilledBucket.java +++ b/src/main/java/tconstruct/items/FilledBucket.java @@ -27,8 +27,8 @@ public class FilledBucket extends ItemBucket public FilledBucket(Block b) { super(b); - //setTextureFile(TRepo.craftingTexture); - //setIconIndex(224); + // setTextureFile(TRepo.craftingTexture); + // setIconIndex(224); setUnlocalizedName("tconstruct.bucket"); setContainerItem(Items.bucket); this.setHasSubtypes(true); @@ -49,31 +49,21 @@ public class FilledBucket extends ItemBucket } else { - /*FillBucketEvent event = new FillBucketEvent(player, stack, world, position); - if (MinecraftForge.EVENT_BUS.post(event)) - { - return stack; - } - - if (event.getResult() == Event.Result.ALLOW) - { - if (player.capabilities.isCreativeMode) - { - return stack; - } - - if (--stack.stackSize <= 0) - { - return event.result; - } - - if (!player.inventory.addItemStackToInventory(event.result)) - { - player.dropPlayerItem(event.result); - } - - return stack; - }*/ + /* + * FillBucketEvent event = new FillBucketEvent(player, stack, world, + * position); if (MinecraftForge.EVENT_BUS.post(event)) { return + * stack; } + * + * if (event.getResult() == Event.Result.ALLOW) { if + * (player.capabilities.isCreativeMode) { return stack; } + * + * if (--stack.stackSize <= 0) { return event.result; } + * + * if (!player.inventory.addItemStackToInventory(event.result)) { + * player.dropPlayerItem(event.result); } + * + * return stack; } + */ if (position.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { @@ -145,7 +135,7 @@ public class FilledBucket extends ItemBucket if (TRepo.fluidBlocks[type] instanceof BlockFluidFinite) metadata = 7; - world.setBlock(clickX, clickY, clickZ, TRepo.fluidBlocks[type], metadata, 3); //TODO: Merge liquids + world.setBlock(clickX, clickY, clickZ, TRepo.fluidBlocks[type], metadata, 3); // TODO: Merge liquids } catch (ArrayIndexOutOfBoundsException ex) { diff --git a/src/main/java/tconstruct/items/Manual.java b/src/main/java/tconstruct/items/Manual.java index d4bc687c..4d479b52 100644 --- a/src/main/java/tconstruct/items/Manual.java +++ b/src/main/java/tconstruct/items/Manual.java @@ -29,9 +29,13 @@ public class Manual extends CraftingItem { player.addStat(TAchievements.achievements.get("tconstruct.beginner"), 1); player.openGui(TConstruct.instance, mantle.client.MProxyClient.manualGuiID, world, 0, 0, 0); - /*Side side = FMLCommonHandler.instance().getEffectiveSide(); - if (side.isClient()) - FMLClientHandler.instance().displayGuiScreen(player, new GuiManual(player.getCurrentEquippedItem(), getManualFromStack(stack)));*/ + /* + * Side side = FMLCommonHandler.instance().getEffectiveSide(); if + * (side.isClient()) + * FMLClientHandler.instance().displayGuiScreen(player, new + * GuiManual(player.getCurrentEquippedItem(), + * getManualFromStack(stack))); + */ return stack; } diff --git a/src/main/java/tconstruct/items/Pattern.java b/src/main/java/tconstruct/items/Pattern.java index faef2c37..3c82ed70 100644 --- a/src/main/java/tconstruct/items/Pattern.java +++ b/src/main/java/tconstruct/items/Pattern.java @@ -46,7 +46,7 @@ public class Pattern extends CraftingItem implements IPattern { for (int i = 1; i < patternName.length; i++) { - //if (i != 23) + // if (i != 23) list.add(new ItemStack(b, 1, i)); } } @@ -80,7 +80,7 @@ public class Pattern extends CraftingItem implements IPattern } } - //2 for full material, 1 for half. + // 2 for full material, 1 for half. @Override public int getPatternCost (ItemStack pattern) { diff --git a/src/main/java/tconstruct/items/TitleIcon.java b/src/main/java/tconstruct/items/TitleIcon.java index f8623bd2..ab33e734 100644 --- a/src/main/java/tconstruct/items/TitleIcon.java +++ b/src/main/java/tconstruct/items/TitleIcon.java @@ -79,7 +79,7 @@ public class TitleIcon extends Item return achievementIcons[index]; } } - //Not returning null to prevent crashes + // Not returning null to prevent crashes return itemIcon; } diff --git a/src/main/java/tconstruct/items/ToolPart.java b/src/main/java/tconstruct/items/ToolPart.java index ffd673d1..fd746bfc 100644 --- a/src/main/java/tconstruct/items/ToolPart.java +++ b/src/main/java/tconstruct/items/ToolPart.java @@ -32,19 +32,20 @@ public class ToolPart extends CraftingItem implements IToolPart return name; - /*StringBuilder builder = new StringBuilder(); - builder.append(StatCollector.translateToLocal("parttype." + toolTextureNames[par1ItemStack.getItemDamage()])).append(" ").append(StatCollector.translateToLocal("toolpart." + partName)); - return builder.toString(); - -- - String s = ("" + StatCollector.translateToLocal("toolpart."+partName)).trim(); - String s1 = toolMaterialNames[par1ItemStack.getItemDamage()]; - - if (s1 != null) - { - s = s + " " + StatCollector.translateToLocal(s1); - } - - return s;*/ + /* + * StringBuilder builder = new StringBuilder(); + * builder.append(StatCollector.translateToLocal("parttype." + + * toolTextureNames + * [par1ItemStack.getItemDamage()])).append(" ").append(StatCollector + * .translateToLocal("toolpart." + partName)); return + * builder.toString(); -- String s = ("" + + * StatCollector.translateToLocal("toolpart."+partName)).trim(); String + * s1 = toolMaterialNames[par1ItemStack.getItemDamage()]; + * + * if (s1 != null) { s = s + " " + StatCollector.translateToLocal(s1); } + * + * return s; + */ } private static String[] buildTextureNames (String textureType) diff --git a/src/main/java/tconstruct/items/armor/ExoArmor.java b/src/main/java/tconstruct/items/armor/ExoArmor.java index 77b64ac7..19da8e11 100644 --- a/src/main/java/tconstruct/items/armor/ExoArmor.java +++ b/src/main/java/tconstruct/items/armor/ExoArmor.java @@ -45,7 +45,7 @@ public class ExoArmor extends ArmorCore @Override public void damageArmor (EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { - //Deimplemented for now + // Deimplemented for now } @SideOnly(Side.CLIENT) diff --git a/src/main/java/tconstruct/items/armor/Knapsack.java b/src/main/java/tconstruct/items/armor/Knapsack.java index 3a0a1df6..52411353 100644 --- a/src/main/java/tconstruct/items/armor/Knapsack.java +++ b/src/main/java/tconstruct/items/armor/Knapsack.java @@ -31,23 +31,17 @@ public class Knapsack extends CraftingItem } } - //TODO feel fix this so that stuff ticks in backpacks - /*@Override - public void onArmorTickUpdate (World world, EntityPlayer player, ItemStack itemStack) - { - TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.getDisplayName()); - KnapsackInventory inv = stats.knapsack; - - if (stats != null && inv != null) - { - for (int i = 0; i < inv.getSizeInventory(); i++) - { - if (inv.getStackInSlot(i) != null) - { - inv.getStackInSlot(i).getItem().onUpdate(inv.getStackInSlot(i), player.worldObj, player, i, false); - } - } - } - }*/ + // TODO feel fix this so that stuff ticks in backpacks + /* + * @Override public void onArmorTickUpdate (World world, EntityPlayer + * player, ItemStack itemStack) { TPlayerStats stats = + * TConstruct.playerTracker.getPlayerStats(player.getDisplayName()); + * KnapsackInventory inv = stats.knapsack; + * + * if (stats != null && inv != null) { for (int i = 0; i < + * inv.getSizeInventory(); i++) { if (inv.getStackInSlot(i) != null) { + * inv.getStackInSlot(i).getItem().onUpdate(inv.getStackInSlot(i), + * player.worldObj, player, i, false); } } } } + */ } diff --git a/src/main/java/tconstruct/items/armor/TArmorBase.java b/src/main/java/tconstruct/items/armor/TArmorBase.java index 66fb8a77..ab6a89b4 100644 --- a/src/main/java/tconstruct/items/armor/TArmorBase.java +++ b/src/main/java/tconstruct/items/armor/TArmorBase.java @@ -14,13 +14,13 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class TArmorBase extends ItemArmor -//implements ISpecialArmor +// implements ISpecialArmor { IIcon[] icons; String[] iconNames = { "wood_boots" }; - //static Minecraft mc = Minecraft.getMinecraft(); - //private ModelBiped modelArmor; + // static Minecraft mc = Minecraft.getMinecraft(); + // private ModelBiped modelArmor; public TArmorBase(int armorSlot) { @@ -30,8 +30,8 @@ public class TArmorBase extends ItemArmor setNoRepair(); canRepair = false; this.setCreativeTab(CreativeTabs.tabMisc); - //this.modelArmor = new ModelBiped(0.75F); - //this.setCreativeTab(TConstructRegistry.toolTab); + // this.modelArmor = new ModelBiped(0.75F); + // this.setCreativeTab(TConstructRegistry.toolTab); } public void onArmorTickUpdate (World world, EntityPlayer player, ItemStack itemStack) @@ -40,16 +40,21 @@ public class TArmorBase extends ItemArmor } /** - * Called by RenderBiped and RenderPlayer to determine the armor texture that - * should be use for the currently equiped item. - * This will only be called on instances of ItemArmor. + * Called by RenderBiped and RenderPlayer to determine the armor texture + * that should be use for the currently equiped item. This will only be + * called on instances of ItemArmor. * * Returning null from this function will use the default value. * - * @param stack ItemStack for the equpt armor - * @param entity The entity wearing the armor - * @param slot The slot the armor is in - * @param layer The render layer, either 1 or 2, 2 is only used for CLOTH armor by default + * @param stack + * ItemStack for the equpt armor + * @param entity + * The entity wearing the armor + * @param slot + * The slot the armor is in + * @param layer + * The render layer, either 1 or 2, 2 is only used for CLOTH + * armor by default * @return Path of texture to bind, or null to use default */ @Override @@ -62,11 +67,14 @@ public class TArmorBase extends ItemArmor /** * Override this method to have an item handle its own armor rendering. * - * @param entityLiving The entity wearing the armor - * @param itemStack The itemStack to render the model of - * @param armorSlot 0=head, 1=torso, 2=legs, 3=feet + * @param entityLiving + * The entity wearing the armor + * @param itemStack + * The itemStack to render the model of + * @param armorSlot + * 0=head, 1=torso, 2=legs, 3=feet * - * @return A ModelBiped to render instead of the default + * @return A ModelBiped to render instead of the default */ @Override @SideOnly(Side.CLIENT) @@ -100,24 +108,18 @@ public class TArmorBase extends ItemArmor } } - /*@Override - public ArmorProperties getProperties (EntityLiving player, ItemStack armor, DamageSource source, double damage, int slot) - { - // TODO Auto-generated method stub - return null; - } - - @Override - public int getArmorDisplay (EntityPlayer player, ItemStack armor, int slot) - { - // TODO Auto-generated method stub - return 0; - } - - @Override - public void damageArmor (EntityLiving entity, ItemStack stack, DamageSource source, int damage, int slot) - { - // TODO Auto-generated method stub - - }*/ + /* + * @Override public ArmorProperties getProperties (EntityLiving player, + * ItemStack armor, DamageSource source, double damage, int slot) { // TODO + * Auto-generated method stub return null; } + * + * @Override public int getArmorDisplay (EntityPlayer player, ItemStack + * armor, int slot) { // TODO Auto-generated method stub return 0; } + * + * @Override public void damageArmor (EntityLiving entity, ItemStack stack, + * DamageSource source, int damage, int slot) { // TODO Auto-generated + * method stub + * + * } + */ } diff --git a/src/main/java/tconstruct/items/blocks/BarricadeItem.java b/src/main/java/tconstruct/items/blocks/BarricadeItem.java index 2782724b..7f47250c 100644 --- a/src/main/java/tconstruct/items/blocks/BarricadeItem.java +++ b/src/main/java/tconstruct/items/blocks/BarricadeItem.java @@ -86,7 +86,7 @@ public class BarricadeItem extends ItemBlock else if (world.canPlaceEntityOnSide(this.b, x, y, z, false, side, player, stack)) { Block block = this.b; - //int meta = this.getMetadata(stack.getItemDamage()); + // int meta = this.getMetadata(stack.getItemDamage()); int rotation = MathHelper.floor_double((double) (player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; int meta = rotation * 4; int metadata = this.b.onBlockPlaced(world, x, y, z, side, hitX, hitY, hitZ, meta); diff --git a/src/main/java/tconstruct/items/blocks/GlassBlockItem.java b/src/main/java/tconstruct/items/blocks/GlassBlockItem.java index 3368ef35..e8a8e8a3 100644 --- a/src/main/java/tconstruct/items/blocks/GlassBlockItem.java +++ b/src/main/java/tconstruct/items/blocks/GlassBlockItem.java @@ -10,7 +10,8 @@ import net.minecraft.nbt.NBTTagCompound; public class GlassBlockItem extends MultiItemBlock { - public static final String blockTypes[] = { "pure" };//, "soul", "soul.pure" }; + public static final String blockTypes[] = { "pure" };// , "soul", + // "soul.pure" }; public GlassBlockItem(Block b) { diff --git a/src/main/java/tconstruct/items/blocks/HamboneItemBlock.java b/src/main/java/tconstruct/items/blocks/HamboneItemBlock.java index 2f6f6aee..68146ab3 100644 --- a/src/main/java/tconstruct/items/blocks/HamboneItemBlock.java +++ b/src/main/java/tconstruct/items/blocks/HamboneItemBlock.java @@ -52,12 +52,14 @@ public class HamboneItemBlock extends ItemBlock private final boolean isWolfsFavoriteMeat; /** - * If this field is true, the food can be consumed even if the player don't need to eat. + * If this field is true, the food can be consumed even if the player don't + * need to eat. */ private boolean alwaysEdible; /** - * represents the potion effect that will occurr upon eating this food. Set by setPotionEffect + * represents the potion effect that will occurr upon eating this food. Set + * by setPotionEffect */ private int potionId; @@ -70,20 +72,15 @@ public class HamboneItemBlock extends ItemBlock /** probably of the set potion effect occurring */ private float potionEffectProbability; - /*public ItemFood(int par1, int par2, float par3, boolean par4) - { - super(par1); - this.itemUseDuration = 32; - this.healAmount = par2; - this.isWolfsFavoriteMeat = par4; - this.saturationModifier = par3; - this.setCreativeTab(CreativeTabs.tabFood); - } - - public ItemFood(int par1, int par2, boolean par3) - { - this(par1, par2, 0.6F, par3); - }*/ + /* + * public ItemFood(int par1, int par2, float par3, boolean par4) { + * super(par1); this.itemUseDuration = 32; this.healAmount = par2; + * this.isWolfsFavoriteMeat = par4; this.saturationModifier = par3; + * this.setCreativeTab(CreativeTabs.tabFood); } + * + * public ItemFood(int par1, int par2, boolean par3) { this(par1, par2, + * 0.6F, par3); } + */ public ItemStack onEaten (ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { @@ -111,7 +108,8 @@ public class HamboneItemBlock extends ItemBlock } /** - * returns the action that specifies what animation to play when the items is being used + * returns the action that specifies what animation to play when the items + * is being used */ public EnumAction getItemUseAction (ItemStack par1ItemStack) { @@ -119,7 +117,8 @@ public class HamboneItemBlock extends ItemBlock } /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer + * Called whenever this item is equipped and the right mouse button is + * pressed. Args: itemStack, world, entityPlayer */ public ItemStack onItemRightClick (ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { diff --git a/src/main/java/tconstruct/items/blocks/ItemBlockLandmine.java b/src/main/java/tconstruct/items/blocks/ItemBlockLandmine.java index 361ec652..d3ac2bd3 100644 --- a/src/main/java/tconstruct/items/blocks/ItemBlockLandmine.java +++ b/src/main/java/tconstruct/items/blocks/ItemBlockLandmine.java @@ -15,7 +15,7 @@ import tconstruct.common.TRepo; /** * * @author fuj1n - * + * */ public class ItemBlockLandmine extends ItemBlock { diff --git a/src/main/java/tconstruct/items/tools/Arrow.java b/src/main/java/tconstruct/items/tools/Arrow.java index a6a6b033..4c6add38 100644 --- a/src/main/java/tconstruct/items/tools/Arrow.java +++ b/src/main/java/tconstruct/items/tools/Arrow.java @@ -34,7 +34,7 @@ public class Arrow extends ToolCore case 0: return "_arrow_head"; case 1: - return ""; //Doesn't break + return ""; // Doesn't break case 2: return "_arrow_shaft"; case 3: @@ -96,7 +96,7 @@ public class Arrow extends ToolCore @Override public void getSubItems (Item id, CreativeTabs tab, List list) { - //Vanilla style arrow + // Vanilla style arrow Item accessory = getAccessoryItem(); ItemStack accessoryStack = accessory != null ? new ItemStack(getAccessoryItem(), 1, 0) : null; Item extra = getExtraItem(); @@ -117,7 +117,7 @@ public class Arrow extends ToolCore list.add(tool); } - //Random arrow + // Random arrow accessory = getAccessoryItem(); accessoryStack = accessory != null ? new ItemStack(getAccessoryItem(), 1, random.nextInt(4)) : null; extra = getExtraItem(); @@ -182,7 +182,7 @@ public class Arrow extends ToolCore if (tags.hasKey("Energy")) { String color = ""; - //double joules = this.getJoules(stack); + // double joules = this.getJoules(stack); int power = tags.getInteger("Energy"); if (power != 0) diff --git a/src/main/java/tconstruct/items/tools/BattleSign.java b/src/main/java/tconstruct/items/tools/BattleSign.java index 82f12c4c..ba6909d0 100644 --- a/src/main/java/tconstruct/items/tools/BattleSign.java +++ b/src/main/java/tconstruct/items/tools/BattleSign.java @@ -14,87 +14,48 @@ public class BattleSign extends Weapon this.setUnlocalizedName("InfiTool.Battlesign"); } - /*public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) - { - if (!player.isSneaking()) - player.setItemInUse(stack, this.getMaxItemUseDuration(stack)); - return stack; - }*/ + /* + * public ItemStack onItemRightClick(ItemStack stack, World world, + * EntityPlayer player) { if (!player.isSneaking()) + * player.setItemInUse(stack, this.getMaxItemUseDuration(stack)); return + * stack; } + */ public String getToolName () { return "Battlesign"; } - /*public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer player, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) - { - if (par7 == 0 || !player.isSneaking()) - { - return false; - } - else if (!par3World.getBlockMaterial(par4, par5, par6).isSolid()) - { - return false; - } - else - { - if (par7 == 1) - { - ++par5; - } - - if (par7 == 2) - { - --par6; - } - - if (par7 == 3) - { - ++par6; - } - - if (par7 == 4) - { - --par4; - } - - if (par7 == 5) - { - ++par4; - } - - if (!player.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) - { - return false; - } - else if (!Block.signPost.canPlaceBlockAt(par3World, par4, par5, par6)) - { - return false; - } - else - { - if (par7 == 1) - { - int var11 = MathHelper.floor_double((double)((player.rotationYaw + 180.0F) * 16.0F / 360.0F) + 0.5D) & 15; - par3World.setBlock(par4, par5, par6, Block.signPost.blockID, var11); - } - else - { - par3World.setBlock(par4, par5, par6, Block.signWall.blockID, par7); - } - - //--par1ItemStack.stackSize; - TileEntitySign var12 = (TileEntitySign)par3World.getBlockTileEntity(par4, par5, par6); - - if (var12 != null) - { - player.displayGUIEditSign(var12); - } - - return true; - } - } - }*/ + /* + * public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer player, + * World par3World, int par4, int par5, int par6, int par7, float par8, + * float par9, float par10) { if (par7 == 0 || !player.isSneaking()) { + * return false; } else if (!par3World.getBlockMaterial(par4, par5, + * par6).isSolid()) { return false; } else { if (par7 == 1) { ++par5; } + * + * if (par7 == 2) { --par6; } + * + * if (par7 == 3) { ++par6; } + * + * if (par7 == 4) { --par4; } + * + * if (par7 == 5) { ++par4; } + * + * if (!player.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) { + * return false; } else if (!Block.signPost.canPlaceBlockAt(par3World, par4, + * par5, par6)) { return false; } else { if (par7 == 1) { int var11 = + * MathHelper.floor_double((double)((player.rotationYaw + 180.0F) * 16.0F / + * 360.0F) + 0.5D) & 15; par3World.setBlock(par4, par5, par6, + * Block.signPost.blockID, var11); } else { par3World.setBlock(par4, par5, + * par6, Block.signWall.blockID, par7); } + * + * //--par1ItemStack.stackSize; TileEntitySign var12 = + * (TileEntitySign)par3World.getBlockTileEntity(par4, par5, par6); + * + * if (var12 != null) { player.displayGUIEditSign(var12); } + * + * return true; } } } + */ @Override public Item getHeadItem () diff --git a/src/main/java/tconstruct/items/tools/Battleaxe.java b/src/main/java/tconstruct/items/tools/Battleaxe.java index a462bbc9..57fd8d7b 100644 --- a/src/main/java/tconstruct/items/tools/Battleaxe.java +++ b/src/main/java/tconstruct/items/tools/Battleaxe.java @@ -169,18 +169,18 @@ public class Battleaxe extends HarvestTool @Override public ItemStack onItemRightClick (ItemStack stack, World world, EntityPlayer player) { - //player.rotationYaw += 1; - //if (player.onGround) - //{ + // player.rotationYaw += 1; + // if (player.onGround) + // { player.setItemInUse(stack, this.getMaxItemUseDuration(stack)); - //} + // } return stack; } @Override public void onPlayerStoppedUsing (ItemStack stack, World world, EntityPlayer player, int useCount) { - //if (player.onGround) + // if (player.onGround) { int time = this.getMaxItemUseDuration(stack) - useCount; int boost = time / 100; diff --git a/src/main/java/tconstruct/items/tools/BowBase.java b/src/main/java/tconstruct/items/tools/BowBase.java index 3d968805..ef7f6fec 100644 --- a/src/main/java/tconstruct/items/tools/BowBase.java +++ b/src/main/java/tconstruct/items/tools/BowBase.java @@ -89,7 +89,7 @@ public abstract class BowBase extends ToolCore } EntityArrow arrowEntity = null; - //if (tinkerArrow != null) + // if (tinkerArrow != null) if (slotID != -1 && (arrowID == -1 || slotID < arrowID)) { ItemStack arrowStack = tinkerArrow.copy(); @@ -117,7 +117,7 @@ public abstract class BowBase extends ToolCore if (slotID != -1 && (arrowID == -1 || slotID < arrowID)) ((ArrowEntity) arrowEntity).setKnockbackModStrength(toolTag.getFloat("Knockback")); - //var10 += toolTag.getFloat("Knockback"); + // var10 += toolTag.getFloat("Knockback"); if (var10 > 0) { @@ -146,7 +146,7 @@ public abstract class BowBase extends ToolCore } else { - //if (tinkerArrow != null) + // if (tinkerArrow != null) if (slotID != -1 && (arrowID == -1 || slotID < arrowID)) { player.inventory.consumeInventoryItem(TRepo.arrow); @@ -191,7 +191,8 @@ public abstract class BowBase extends ToolCore } /** - * returns the action that specifies what animation to play when the items is being used + * returns the action that specifies what animation to play when the items + * is being used */ public EnumAction getItemUseAction (ItemStack par1ItemStack) { @@ -199,7 +200,8 @@ public abstract class BowBase extends ToolCore } /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer + * Called whenever this item is equipped and the right mouse button is + * pressed. Args: itemStack, world, entityPlayer */ public ItemStack onItemRightClick (ItemStack stack, World par2World, EntityPlayer player) { @@ -471,8 +473,8 @@ public abstract class BowBase extends ToolCore public void registerPartPaths (int index, String[] location) { headStrings.put(index, location[0]); - //brokenHeadStrings.put(index, location[1]); - //handleStrings.put(index, location[2]); + // brokenHeadStrings.put(index, location[1]); + // handleStrings.put(index, location[2]); if (location.length > 3) accessoryStrings.put(index, location[3]); if (location.length > 4) diff --git a/src/main/java/tconstruct/items/tools/Broadsword.java b/src/main/java/tconstruct/items/tools/Broadsword.java index 9a067a06..ef0a7114 100644 --- a/src/main/java/tconstruct/items/tools/Broadsword.java +++ b/src/main/java/tconstruct/items/tools/Broadsword.java @@ -59,19 +59,15 @@ public class Broadsword extends Weapon return "broadsword"; } - /*@Override - @SideOnly(Side.CLIENT) - public void onUpdate (ItemStack stack, World world, Entity entity, int par4, boolean par5) - { - super.onUpdate(stack, world, entity, par4, par5); - if (entity instanceof EntityPlayerSP) - { - EntityPlayerSP player = (EntityPlayerSP) entity; - if (player.itemInUse != null && player.itemInUse.getItem() == this) - { - player.movementInput.moveForward *= 5.0F; - player.movementInput.moveStrafe *= 5.0F; - } - } - }*/ + /* + * @Override + * + * @SideOnly(Side.CLIENT) public void onUpdate (ItemStack stack, World + * world, Entity entity, int par4, boolean par5) { super.onUpdate(stack, + * world, entity, par4, par5); if (entity instanceof EntityPlayerSP) { + * EntityPlayerSP player = (EntityPlayerSP) entity; if (player.itemInUse != + * null && player.itemInUse.getItem() == this) { + * player.movementInput.moveForward *= 5.0F; player.movementInput.moveStrafe + * *= 5.0F; } } } + */ } diff --git a/src/main/java/tconstruct/items/tools/Cleaver.java b/src/main/java/tconstruct/items/tools/Cleaver.java index 7771187d..50d5a1cb 100644 --- a/src/main/java/tconstruct/items/tools/Cleaver.java +++ b/src/main/java/tconstruct/items/tools/Cleaver.java @@ -129,15 +129,13 @@ public class Cleaver extends Weapon { entity.hurtResistantTime += 7; - /*if (entity instanceof EntityLiving) - { - EntityLiving living = (EntityLiving) entity; - if (living.getHealth() <= 0) - { - - } - }*/ - //if (entity.getHealth() <= 0) + /* + * if (entity instanceof EntityLiving) { EntityLiving living = + * (EntityLiving) entity; if (living.getHealth() <= 0) { + * + * } } + */ + // if (entity.getHealth() <= 0) } return true; } @@ -156,12 +154,10 @@ public class Cleaver extends Weapon } } - /*@Override - public boolean onEntitySwing (EntityLiving entity, ItemStack stack) - { - entity.swingProgressInt /= 2; - return false; - }*/ + /* + * @Override public boolean onEntitySwing (EntityLiving entity, ItemStack + * stack) { entity.swingProgressInt /= 2; return false; } + */ @Override public boolean willAllowOffhandWeapon () diff --git a/src/main/java/tconstruct/items/tools/FryingPan.java b/src/main/java/tconstruct/items/tools/FryingPan.java index b4c20aa6..99a4c764 100644 --- a/src/main/java/tconstruct/items/tools/FryingPan.java +++ b/src/main/java/tconstruct/items/tools/FryingPan.java @@ -32,7 +32,10 @@ public class FryingPan extends Weapon public boolean hitEntity (ItemStack stack, EntityLivingBase mob, EntityLivingBase player) { AbilityHelper.knockbackEntity(mob, 1.7f); - mob.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 0)); //5 seconds of stun + mob.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 0)); // 5 + // seconds + // of + // stun return true; } diff --git a/src/main/java/tconstruct/items/tools/Hammer.java b/src/main/java/tconstruct/items/tools/Hammer.java index 86602aed..8e39216b 100644 --- a/src/main/java/tconstruct/items/tools/Hammer.java +++ b/src/main/java/tconstruct/items/tools/Hammer.java @@ -362,8 +362,10 @@ public class Hammer extends HarvestTool } } - /*if (block == Block.silverfish) - return getblockSpeed(tags, block, meta);*/ + /* + * if (block == Block.silverfish) return getblockSpeed(tags, block, + * meta); + */ return super.getDigSpeed(stack, block, meta); } @@ -401,20 +403,15 @@ public class Hammer extends HarvestTool return 0.1f; } - /*@Override - public void onUpdate (ItemStack stack, World world, Entity entity, int par4, boolean par5) - { - super.onUpdate(stack, world, entity, par4, par5); - if (entity instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) entity; - ItemStack equipped = player.getCurrentEquippedItem(); - if (equipped == stack) - { - player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 1)); - } - } - }*/ + /* + * @Override public void onUpdate (ItemStack stack, World world, Entity + * entity, int par4, boolean par5) { super.onUpdate(stack, world, entity, + * par4, par5); if (entity instanceof EntityPlayer) { EntityPlayer player = + * (EntityPlayer) entity; ItemStack equipped = + * player.getCurrentEquippedItem(); if (equipped == stack) { + * player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 1)); } + * } } + */ @Override public String[] toolCategories () diff --git a/src/main/java/tconstruct/items/tools/Hatchet.java b/src/main/java/tconstruct/items/tools/Hatchet.java index 2fe0edc0..b8187506 100644 --- a/src/main/java/tconstruct/items/tools/Hatchet.java +++ b/src/main/java/tconstruct/items/tools/Hatchet.java @@ -42,7 +42,10 @@ public class Hatchet extends HarvestTool return AbilityHelper.onBlockChanged(itemstack, world, block, x, y, z, player, random); } - static Material[] materials = { Material.wood, Material.leaves, Material.vine, Material.circuits, Material.cactus };//TODO find this//, Material.pumpkin }; + static Material[] materials = { Material.wood, Material.leaves, Material.vine, Material.circuits, Material.cactus };// TODO find + // this//, + // Material.pumpkin + // }; @Override public Item getHeadItem () diff --git a/src/main/java/tconstruct/items/tools/Longsword.java b/src/main/java/tconstruct/items/tools/Longsword.java index 6f36245a..aead7fb9 100644 --- a/src/main/java/tconstruct/items/tools/Longsword.java +++ b/src/main/java/tconstruct/items/tools/Longsword.java @@ -42,27 +42,23 @@ public class Longsword extends Weapon public void onPlayerStoppedUsing (ItemStack stack, World world, EntityPlayer player, int useCount) { - /*if (player.onGround) - { - int time = this.getMaxItemUseDuration(stack) - useCount; - if (time > 5) - { - player.addExhaustion(0.2F); - player.setSprinting(true); - - float speed = 0.05F * time; - if (speed > 0.925f) - speed = 0.925f; - - float increase = (float) (0.02 * time + 0.2); - if (increase > 0.56f) - increase = 0.56f; - player.motionY += increase + speed/3; - - player.motionX = (double) (-MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI) * speed); - player.motionZ = (double) (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI) * speed); - } - }*/ + /* + * if (player.onGround) { int time = this.getMaxItemUseDuration(stack) - + * useCount; if (time > 5) { player.addExhaustion(0.2F); + * player.setSprinting(true); + * + * float speed = 0.05F * time; if (speed > 0.925f) speed = 0.925f; + * + * float increase = (float) (0.02 * time + 0.2); if (increase > 0.56f) + * increase = 0.56f; player.motionY += increase + speed/3; + * + * player.motionX = (double) (-MathHelper.sin(player.rotationYaw / + * 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / + * 180.0F * (float) Math.PI) * speed); player.motionZ = (double) + * (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI) * + * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI) * + * speed); } } + */ int time = this.getMaxItemUseDuration(stack) - useCount; if (time > 5) { diff --git a/src/main/java/tconstruct/items/tools/LumberAxe.java b/src/main/java/tconstruct/items/tools/LumberAxe.java index b7dd18a5..e1dab91c 100644 --- a/src/main/java/tconstruct/items/tools/LumberAxe.java +++ b/src/main/java/tconstruct/items/tools/LumberAxe.java @@ -62,24 +62,20 @@ public class LumberAxe extends HarvestTool return AbilityHelper.onBlockChanged(itemstack, world, block, x, y, z, player, random); } - static Material[] materials = { Material.wood, Material.vine, Material.circuits, Material.cactus };//TODO find this//, Material.pumpkin }; + static Material[] materials = { Material.wood, Material.vine, Material.circuits, Material.cactus };// TODO find this//, + // Material.pumpkin }; /* Lumber axe specific */ - /*@Override - public void onUpdate (ItemStack stack, World world, Entity entity, int par4, boolean par5) - { - super.onUpdate(stack, world, entity, par4, par5); - if (entity instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) entity; - ItemStack equipped = player.getCurrentEquippedItem(); - if (equipped == stack) - { - player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 1)); - } - } - }*/ + /* + * @Override public void onUpdate (ItemStack stack, World world, Entity + * entity, int par4, boolean par5) { super.onUpdate(stack, world, entity, + * par4, par5); if (entity instanceof EntityPlayer) { EntityPlayer player = + * (EntityPlayer) entity; ItemStack equipped = + * player.getCurrentEquippedItem(); if (equipped == stack) { + * player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 1)); } + * } } + */ @Override public float getDigSpeed (ItemStack stack, Block block, int meta) @@ -232,12 +228,16 @@ public class LumberAxe extends HarvestTool { if (localblock == bID && world.getBlockMetadata(xPos, yPos, zPos) % 4 == meta % 4) { - /* world.setBlock(xPos, yPos, zPos, 0, 0, 3); - if (!player.capabilities.isCreativeMode) - { - Block.blocksList[bID].harvestBlock(world, player, xPos, yPos, zPos, meta); - onBlockDestroyed(stack, world, bID, xPos, yPos, zPos, player); - }*/ + /* + * world.setBlock(xPos, yPos, zPos, 0, + * 0, 3); if + * (!player.capabilities.isCreativeMode) + * { + * Block.blocksList[bID].harvestBlock(world + * , player, xPos, yPos, zPos, meta); + * onBlockDestroyed(stack, world, bID, + * xPos, yPos, zPos, player); } + */ if (!player.capabilities.isCreativeMode) { if (block.removedByPlayer(world, player, xPos, yPos, zPos)) @@ -254,19 +254,19 @@ public class LumberAxe extends HarvestTool } breakTree(world, xPos, yPos, zPos, stack, tags, bID, meta, player); } - /*else - { - Block leaves = Block.blocksList[localID]; - if (leaves != null && leaves.isLeaves(world, xPos, yPos, zPos)) - { - WorldHelper.setBlockToAir(world, xPos, yPos, zPos); - if (!player.capabilities.isCreativeMode) - { - Block.blocksList[bID].harvestBlock(world, player, xPos, yPos, zPos, meta); - onBlockDestroyed(stack, world, bID, xPos, yPos, zPos, player); - } - } - }*/ + /* + * else { Block leaves = + * Block.blocksList[localID]; if (leaves != + * null && leaves.isLeaves(world, xPos, + * yPos, zPos)) { + * WorldHelper.setBlockToAir(world, xPos, + * yPos, zPos); if + * (!player.capabilities.isCreativeMode) { + * Block.blocksList[bID].harvestBlock(world, + * player, xPos, yPos, zPos, meta); + * onBlockDestroyed(stack, world, bID, xPos, + * yPos, zPos, player); } } } + */ } } } @@ -306,7 +306,7 @@ public class LumberAxe extends HarvestTool WorldHelper.setBlockToAir(world, xPos, yPos, zPos); if (!player.capabilities.isCreativeMode) { - //TODO harvestBlock + // TODO harvestBlock block.harvestBlock(world, player, xPos, yPos, zPos, meta); onBlockDestroyed(stack, world, block, xPos, yPos, zPos, player); } diff --git a/src/main/java/tconstruct/items/tools/Mattock.java b/src/main/java/tconstruct/items/tools/Mattock.java index 1aeeca9d..d2796add 100644 --- a/src/main/java/tconstruct/items/tools/Mattock.java +++ b/src/main/java/tconstruct/items/tools/Mattock.java @@ -47,7 +47,13 @@ public class Mattock extends DualHarvestTool return "shovel"; } - static Material[] axeMaterials = { Material.wood, Material.cactus };//TODO find this//, Material.pumpkin, Material.plants, Material.vine }; + static Material[] axeMaterials = { Material.wood, Material.cactus };// TODO + // find + // this//, + // Material.pumpkin, + // Material.plants, + // Material.vine + // }; static Material[] shovelMaterials = { Material.grass, Material.ground, Material.clay }; @Override diff --git a/src/main/java/tconstruct/items/tools/PotionLauncher.java b/src/main/java/tconstruct/items/tools/PotionLauncher.java index f30f16ca..218fc3ca 100644 --- a/src/main/java/tconstruct/items/tools/PotionLauncher.java +++ b/src/main/java/tconstruct/items/tools/PotionLauncher.java @@ -82,7 +82,8 @@ public class PotionLauncher extends Item } /** - * returns the action that specifies what animation to play when the items is being used + * returns the action that specifies what animation to play when the items + * is being used */ public EnumAction getItemUseAction (ItemStack stack) { @@ -131,7 +132,7 @@ public class PotionLauncher extends Item if (tags.getBoolean("Loaded")) { NBTTagCompound potionTag = tags.getCompoundTag("LoadedPotion"); - ItemStack potion = ItemStack.loadItemStackFromNBT(potionTag);//findPotion(player);InventoryLogic + ItemStack potion = ItemStack.loadItemStackFromNBT(potionTag);// findPotion(player);InventoryLogic if (potion != null) { World world = player.worldObj; diff --git a/src/main/java/tconstruct/items/tools/Rapier.java b/src/main/java/tconstruct/items/tools/Rapier.java index 7e68d2b0..19c7573a 100644 --- a/src/main/java/tconstruct/items/tools/Rapier.java +++ b/src/main/java/tconstruct/items/tools/Rapier.java @@ -40,8 +40,8 @@ public class Rapier extends Weapon @Override public boolean hitEntity (ItemStack stack, EntityLivingBase mob, EntityLivingBase player) { - //AbilityHelper.hitEntity(stack, mob, player, damageVsEntity); - //AbilityHelper.knockbackEntity(mob, 0.8f); + // AbilityHelper.hitEntity(stack, mob, player, damageVsEntity); + // AbilityHelper.knockbackEntity(mob, 0.8f); mob.motionY *= 0.8; if (mob.hurtResistantTime > 18) mob.hurtResistantTime -= 5; @@ -60,10 +60,9 @@ public class Rapier extends Weapon return 0.8f; } - /*public float chargeAttack () - { - return 1.0f; - }*/ + /* + * public float chargeAttack () { return 1.0f; } + */ public boolean pierceArmor () { diff --git a/src/main/java/tconstruct/items/tools/Scythe.java b/src/main/java/tconstruct/items/tools/Scythe.java index 216e4b34..274ec451 100644 --- a/src/main/java/tconstruct/items/tools/Scythe.java +++ b/src/main/java/tconstruct/items/tools/Scythe.java @@ -28,11 +28,9 @@ public class Scythe extends Weapon this.setUnlocalizedName("InfiTool.Scythe"); } - /*@Override - protected String getHarvestType() - { - return "sword"; - }*/ + /* + * @Override protected String getHarvestType() { return "sword"; } + */ @Override protected Material[] getEffectiveMaterials () @@ -40,7 +38,9 @@ public class Scythe extends Weapon return materials; } - static Material[] materials = new Material[] { Material.web, Material.cactus };//TODO find this//, Material.pumpkin, Material.plants, Material.vine, Material.leaves }; + static Material[] materials = new Material[] { Material.web, Material.cactus };// TODO find this//, Material.pumpkin, + // Material.plants, Material.vine, + // Material.leaves }; @Override public Item getHeadItem () @@ -178,7 +178,10 @@ public class Scythe extends Weapon if (!cancelHarvest) { Block block = world.getBlock(xPos, yPos, zPos); - if (block != null)// && (block.getMaterial() == Material.leaves || block.isLeaves(world, xPos, yPos, zPos))) + if (block != null)// && (block.getMaterial() == + // Material.leaves || + // block.isLeaves(world, xPos, + // yPos, zPos))) { for (int iter = 0; iter < materials.length; iter++) { diff --git a/src/main/java/tconstruct/items/tools/Shortbow.java b/src/main/java/tconstruct/items/tools/Shortbow.java index cd015720..5ad781b1 100644 --- a/src/main/java/tconstruct/items/tools/Shortbow.java +++ b/src/main/java/tconstruct/items/tools/Shortbow.java @@ -103,7 +103,7 @@ public class Shortbow extends BowBase if (tags.hasKey("Energy")) { String color = ""; - //double joules = this.getJoules(stack); + // double joules = this.getJoules(stack); int power = tags.getInteger("Energy"); if (power != 0) @@ -188,7 +188,7 @@ public class Shortbow extends BowBase default: return ""; } - //return TConstructRegistry.getMaterial(type).ability(); + // return TConstructRegistry.getMaterial(type).ability(); } @Override diff --git a/src/main/java/tconstruct/items/tools/Shovel.java b/src/main/java/tconstruct/items/tools/Shovel.java index 79a1cac5..65601b75 100644 --- a/src/main/java/tconstruct/items/tools/Shovel.java +++ b/src/main/java/tconstruct/items/tools/Shovel.java @@ -96,42 +96,26 @@ public class Shovel extends HarvestTool return false; } - /*@Override - public Icon getIcon (ItemStack stack, int renderPass) - { - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - - if (renderPass == 0) // Handle - { - return (handleIcons.get(tags.getInteger("RenderHandle"))); - } - - if (renderPass == 1) // Head - { - if (tags.getBoolean("Broken")) - return (brokenHeadIcons.get(tags.getInteger("RenderHead"))); - else - return (headIcons.get(tags.getInteger("RenderHead"))); - } - - if (renderPass == 2) - { - if (tags.hasKey("Effect1")) - return (effectIcons.get(tags.getInteger("Effect1"))); - } - - if (renderPass == 3) - { - if (tags.hasKey("Effect2")) - return (effectIcons.get(tags.getInteger("Effect2"))); - } - - if (renderPass == 4) - { - if (tags.hasKey("Effect3")) - return (effectIcons.get(tags.getInteger("Effect3"))); - } - - return TProxyClient.blankSprite; - }*/ + /* + * @Override public Icon getIcon (ItemStack stack, int renderPass) { + * NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); + * + * if (renderPass == 0) // Handle { return + * (handleIcons.get(tags.getInteger("RenderHandle"))); } + * + * if (renderPass == 1) // Head { if (tags.getBoolean("Broken")) return + * (brokenHeadIcons.get(tags.getInteger("RenderHead"))); else return + * (headIcons.get(tags.getInteger("RenderHead"))); } + * + * if (renderPass == 2) { if (tags.hasKey("Effect1")) return + * (effectIcons.get(tags.getInteger("Effect1"))); } + * + * if (renderPass == 3) { if (tags.hasKey("Effect2")) return + * (effectIcons.get(tags.getInteger("Effect2"))); } + * + * if (renderPass == 4) { if (tags.hasKey("Effect3")) return + * (effectIcons.get(tags.getInteger("Effect3"))); } + * + * return TProxyClient.blankSprite; } + */ } diff --git a/src/main/java/tconstruct/library/ActiveToolMod.java b/src/main/java/tconstruct/library/ActiveToolMod.java index 8648c759..e371d5e8 100644 --- a/src/main/java/tconstruct/library/ActiveToolMod.java +++ b/src/main/java/tconstruct/library/ActiveToolMod.java @@ -21,7 +21,7 @@ public class ActiveToolMod return false; } - public boolean afterBlockBreak () //Unfinished, not called + public boolean afterBlockBreak () // Unfinished, not called { return false; } @@ -33,7 +33,7 @@ public class ActiveToolMod return 0; } - //Calculated after sprinting and enchant bonuses + // Calculated after sprinting and enchant bonuses public float knockback (float modKnockback, float currentKnockback, ToolCore tool, NBTTagCompound tags, NBTTagCompound toolTags, ItemStack stack, EntityLivingBase player, Entity entity) { return 0f; @@ -44,7 +44,7 @@ public class ActiveToolMod return 0; } - public void lateAttackEntity () //Unfinished, not called + public void lateAttackEntity () // Unfinished, not called { } diff --git a/src/main/java/tconstruct/library/TConstructRegistry.java b/src/main/java/tconstruct/library/TConstructRegistry.java index 620c21c2..b1fc8a1f 100644 --- a/src/main/java/tconstruct/library/TConstructRegistry.java +++ b/src/main/java/tconstruct/library/TConstructRegistry.java @@ -21,7 +21,8 @@ import tconstruct.library.tools.FletchingMaterial; import tconstruct.library.tools.TToolMaterial; import tconstruct.library.tools.ToolCore; -/** A registry to store any relevant API work +/** + * A registry to store any relevant API work * * @author mDiyo */ @@ -39,29 +40,30 @@ public class TConstructRegistry /* Items */ - /** A directory of crafting items and tools used by the mod. + /** + * A directory of crafting items and tools used by the mod. * - * Tools: - * pickaxe, shovel, hatchet, broadsword, longsword, rapier, dagger, cutlass - * frypan, battlesign, mattock, chisel - * lumberaxe, cleaver, scythe, excavator, hammer, battleaxe + * Tools: pickaxe, shovel, hatchet, broadsword, longsword, rapier, dagger, + * cutlass frypan, battlesign, mattock, chisel lumberaxe, cleaver, scythe, + * excavator, hammer, battleaxe * - * Patterns: - * blankPattern, woodPattern, metalPattern + * Patterns: blankPattern, woodPattern, metalPattern * - * Tool crafting parts: - * toolRod, toolShard, binding, toughBinding, toughRod, heavyPlate - * pickaxeHead, shovelhead, hatchetHead, swordBlade, wideguard, handGuard, crossbar, knifeBlade, - * fullGuard, frypanHead, signHead, chiselHead - * scytheBlade, broadAxeHead, excavatorHead, largeSwordBlade, hammerHead - * bowstring, fletching, arrowhead + * Tool crafting parts: toolRod, toolShard, binding, toughBinding, toughRod, + * heavyPlate pickaxeHead, shovelhead, hatchetHead, swordBlade, wideguard, + * handGuard, crossbar, knifeBlade, fullGuard, frypanHead, signHead, + * chiselHead scytheBlade, broadAxeHead, excavatorHead, largeSwordBlade, + * hammerHead bowstring, fletching, arrowhead */ public static HashMap itemDirectory = new HashMap(); - /** Adds an item to the directory + /** + * Adds an item to the directory * - * @param name Associates the name with the stack - * @param itemstack The stack to add to the directory + * @param name + * Associates the name with the stack + * @param itemstack + * The stack to add to the directory */ public static void addItemToDirectory (String name, Item itemstack) @@ -73,9 +75,11 @@ public class TConstructRegistry itemDirectory.put(name, itemstack); } - /** Retrieves an itemstack from the directory + /** + * Retrieves an itemstack from the directory * - * @param name The name of the item to get + * @param name + * The name of the item to get * @return Item associated with the name, or null if not present. */ @@ -88,26 +92,33 @@ public class TConstructRegistry return ret; } - /** A directory of ItemStacks. Contains mostly crafting items + /** + * A directory of ItemStacks. Contains mostly crafting items * - * Materials: - * paperStack, greenSlimeCrystal, blueSlimeCrystal, searedBrick, mossBall, lavaCrystal, necroticBone, silkyCloth, silkyJewel - * ingotCobalt, ingotArdite, ingotManyullyn, ingotCopper, ingotTin, ingotAluminum, rawAluminum, - * ingotBronze, ingotAluminumBrass, ingotAlumite, ingotSteel, ingotObsidian - * nuggetIron, nuggetCopper, nuggetTin, nuggetAluminum, nuggetSilver, nuggetAluminumBrass - * oreberryIron, oreberryGold, oreberryCopper, oreberryTin, oreberryTin, oreberrySilver, - * diamondApple, blueSlimeFood, canisterEmpty, miniRedHeart, canisterRedHeart + * Materials: paperStack, greenSlimeCrystal, blueSlimeCrystal, searedBrick, + * mossBall, lavaCrystal, necroticBone, silkyCloth, silkyJewel ingotCobalt, + * ingotArdite, ingotManyullyn, ingotCopper, ingotTin, ingotAluminum, + * rawAluminum, ingotBronze, ingotAluminumBrass, ingotAlumite, ingotSteel, + * ingotObsidian nuggetIron, nuggetCopper, nuggetTin, nuggetAluminum, + * nuggetSilver, nuggetAluminumBrass oreberryIron, oreberryGold, + * oreberryCopper, oreberryTin, oreberryTin, oreberrySilver, diamondApple, + * blueSlimeFood, canisterEmpty, miniRedHeart, canisterRedHeart * * Patterns - These have a suffix of Pattern or Cast. ex: hatchetHeadPattern - * ingot, toolRod, pickaxeHead, shovelHead, hatchetHead, swordBlade, wideGuard, handGuard, crossbar, binding, frypanHead, signHead, - * knifeBlade, chiselHead, toughRod, toughBinding, largePlate, broadAxeHead, scytheHead, excavatorHead, largeBlade, hammerHead, fullGuard, bowstring + * ingot, toolRod, pickaxeHead, shovelHead, hatchetHead, swordBlade, + * wideGuard, handGuard, crossbar, binding, frypanHead, signHead, + * knifeBlade, chiselHead, toughRod, toughBinding, largePlate, broadAxeHead, + * scytheHead, excavatorHead, largeBlade, hammerHead, fullGuard, bowstring */ static HashMap itemstackDirectory = new HashMap(); - /** Adds an itemstack to the directory + /** + * Adds an itemstack to the directory * - * @param name Associates the name with the stack - * @param itemstack The stack to add to the directory + * @param name + * Associates the name with the stack + * @param itemstack + * The stack to add to the directory */ public static void addItemStackToDirectory (String name, ItemStack itemstack) @@ -119,9 +130,11 @@ public class TConstructRegistry itemstackDirectory.put(name, itemstack); } - /** Retrieves an itemstack from the directory + /** + * Retrieves an itemstack from the directory * - * @param name The name of the item to get + * @param name + * The name of the item to get * @return Item associated with the name, or null if not present. */ @@ -136,19 +149,25 @@ public class TConstructRegistry public static ArrayList tools = new ArrayList(20); - //Parts + // Parts - /** List: Item ID, metadata, material ID - * ItemStack: Output. Ex: Cactus Binding + /** + * List: Item ID, metadata, material ID ItemStack: Output. Ex: Cactus + * Binding */ public static HashMap patternPartMapping = new HashMap(); - /** Maps an item and a material ID to an output part + /** + * Maps an item and a material ID to an output part * - * @param woodPattern ID to check against - * @param patternMeta Metadata to check against - * @param materialID Material that goes with the item - * @param output The resulting part + * @param woodPattern + * ID to check against + * @param patternMeta + * Metadata to check against + * @param materialID + * Material that goes with the item + * @param output + * The resulting part */ public static void addPartMapping (Item woodPattern, int patternMeta, int materialID, ItemStack output) { @@ -163,9 +182,10 @@ public class TConstructRegistry return null; } - //Tools + // Tools - /** Internal tool mapping, used for adding textures + /** + * Internal tool mapping, used for adding textures * * @param tool */ @@ -175,7 +195,8 @@ public class TConstructRegistry tools.add(tool); } - /** Internal tool mapping, used for adding textures + /** + * Internal tool mapping, used for adding textures * * @return List of tools */ @@ -185,13 +206,16 @@ public class TConstructRegistry return tools; } - /** Registers a tool to its crafting parts. - * If an output is registered multiple times the parts are added to the recipe's input list - * Valid part amounts are 2, 3, and 4. + /** + * Registers a tool to its crafting parts. If an output is registered + * multiple times the parts are added to the recipe's input list Valid part + * amounts are 2, 3, and 4. * * @see ToolBuidler - * @param output The ToolCore to craft - * @param parts Pieces to make the tool with + * @param output + * The ToolCore to craft + * @param parts + * Pieces to make the tool with */ public static void addToolRecipe (ToolCore output, Item... parts) { @@ -202,22 +226,36 @@ public class TConstructRegistry tb.addToolRecipe(output, parts); } - //Materials + // Materials public static HashMap toolMaterials = new HashMap(40); public static HashMap toolMaterialStrings = new HashMap(40); - /** Adds a tool material to the registry + /** + * Adds a tool material to the registry * - * @param materialID Unique ID, stored for each part - * @exception materialID must be unique - * @param materialName Unique name for data lookup purposes - * @param harvestLevel The materials which the tool can harvest. Pickaxe levels - 0: Wood, 1: Stone, 2: Redstone/Diamond, 3: Obsidian, 4: Cobalt/Ardite, 5: Manyullyn - * @param durability Base durability of the tool, affects tool heads. - * @param miningspeed Base mining speed, divided by 100 in use - * @param attack Base attack - * @param handleModifier Durability multiplier on the tool - * @param reinforced Reinforced level - * @param stonebound Amount of Stonebound to put on the tool. Negative numbers are Spiny. + * @param materialID + * Unique ID, stored for each part + * @exception materialID + * must be unique + * @param materialName + * Unique name for data lookup purposes + * @param harvestLevel + * The materials which the tool can harvest. Pickaxe levels - 0: + * Wood, 1: Stone, 2: Redstone/Diamond, 3: Obsidian, 4: + * Cobalt/Ardite, 5: Manyullyn + * @param durability + * Base durability of the tool, affects tool heads. + * @param miningspeed + * Base mining speed, divided by 100 in use + * @param attack + * Base attack + * @param handleModifier + * Durability multiplier on the tool + * @param reinforced + * Reinforced level + * @param stonebound + * Amount of Stonebound to put on the tool. Negative numbers are + * Spiny. */ public static void addToolMaterial (int materialID, String materialName, int harvestLevel, int durability, int miningspeed, int attack, float handleModifier, int reinforced, float stonebound, @@ -234,19 +272,34 @@ public class TConstructRegistry throw new IllegalArgumentException("[TCon API] Material ID " + materialID + " is already occupied by " + mat.materialName); } - /** Adds a tool material to the registry + /** + * Adds a tool material to the registry * - * @param materialID Unique ID, stored for each part - * @exception materialID must be unique - * @param materialName Unique name for data lookup purposes - * @param displayName Prefix for creative mode tools - * @param harvestLevel The materials which the tool can harvest. Pickaxe levels - 0: Wood, 1: Stone, 2: Redstone/Diamond, 3: Obsidian, 4: Cobalt/Ardite, 5: Manyullyn - * @param durability Base durability of the tool, affects tool heads. - * @param miningspeed Base mining speed, divided by 100 in use - * @param attack Base attack - * @param handleModifier Durability multiplier on the tool - * @param reinforced Reinforced level - * @param stonebound Amount of Stonebound to put on the tool. Negative numbers are Spiny. + * @param materialID + * Unique ID, stored for each part + * @exception materialID + * must be unique + * @param materialName + * Unique name for data lookup purposes + * @param displayName + * Prefix for creative mode tools + * @param harvestLevel + * The materials which the tool can harvest. Pickaxe levels - 0: + * Wood, 1: Stone, 2: Redstone/Diamond, 3: Obsidian, 4: + * Cobalt/Ardite, 5: Manyullyn + * @param durability + * Base durability of the tool, affects tool heads. + * @param miningspeed + * Base mining speed, divided by 100 in use + * @param attack + * Base attack + * @param handleModifier + * Durability multiplier on the tool + * @param reinforced + * Reinforced level + * @param stonebound + * Amount of Stonebound to put on the tool. Negative numbers are + * Spiny. */ public static void addToolMaterial (int materialID, String materialName, String displayName, int harvestLevel, int durability, int miningspeed, int attack, float handleModifier, int reinforced, @@ -263,11 +316,16 @@ public class TConstructRegistry throw new IllegalArgumentException("[TCon API] Material ID " + materialID + " is already occupied by " + mat.materialName); } - /** Adds a tool material to the registry + /** + * Adds a tool material to the registry * - * @param materialID Unique ID, stored for each part - * @exception materialID must be unique - * @param material Complete tool material to add. Uses the name in the material for lookup purposes. + * @param materialID + * Unique ID, stored for each part + * @exception materialID + * must be unique + * @param material + * Complete tool material to add. Uses the name in the material + * for lookup purposes. */ public static void addtoolMaterial (int materialID, TToolMaterial material) @@ -282,9 +340,11 @@ public class TConstructRegistry throw new IllegalArgumentException("[TCon API] Material ID " + materialID + " is already occupied by " + mat.materialName); } - /** Looks up a tool material by ID + /** + * Looks up a tool material by ID * - * @param key The ID to look up + * @param key + * The ID to look up * @return Tool Material */ @@ -293,9 +353,11 @@ public class TConstructRegistry return (toolMaterials.get(key)); } - /** Looks up a tool material by name + /** + * Looks up a tool material by name * - * @param key the name to look up + * @param key + * the name to look up * @return Tool Material */ @@ -304,7 +366,7 @@ public class TConstructRegistry return (toolMaterialStrings.get(key)); } - //Bow materials + // Bow materials public static HashMap bowMaterials = new HashMap(40); public static void addBowMaterial (int materialID, int durability, int drawSpeed, float speedMax) @@ -353,7 +415,7 @@ public class TConstructRegistry return arrowMaterials.get(materialID); } - //Custom materials - bowstrings, fletching, etc + // Custom materials - bowstrings, fletching, etc public static ArrayList customMaterials = new ArrayList(); public static void addCustomMaterial (CustomMaterial mat) @@ -394,41 +456,26 @@ public class TConstructRegistry return null; } - /*public static CustomMaterial getCustomMaterial(ItemStack input, ItemStack pattern) - { - for (CustomMaterial mat : customMaterials) - { - if (mat.matches(input, pattern)) - return mat; - } - return null; - }*/ + /* + * public static CustomMaterial getCustomMaterial(ItemStack input, ItemStack + * pattern) { for (CustomMaterial mat : customMaterials) { if + * (mat.matches(input, pattern)) return mat; } return null; } + */ - /*public static ItemStack craftBowString(ItemStack stack) - { - if (stack.stackSize < 3) - return null; - - for (BowstringMaterial mat : bowstringMaterials) - { - if (stack.isItemEqual(mat.input)) - return mat.craftingItem.copy(); - } - return null; - } - - public static BowstringMaterial getBowstringMaterial(ItemStack stack) - { - if (stack.stackSize < 3) - return null; - - for (BowstringMaterial mat : bowstringMaterials) - { - if (stack.isItemEqual(mat.input)) - return mat; - } - return null; - }*/ + /* + * public static ItemStack craftBowString(ItemStack stack) { if + * (stack.stackSize < 3) return null; + * + * for (BowstringMaterial mat : bowstringMaterials) { if + * (stack.isItemEqual(mat.input)) return mat.craftingItem.copy(); } return + * null; } + * + * public static BowstringMaterial getBowstringMaterial(ItemStack stack) { + * if (stack.stackSize < 3) return null; + * + * for (BowstringMaterial mat : bowstringMaterials) { if + * (stack.isItemEqual(mat.input)) return mat; } return null; } + */ public static LiquidCasting getTableCasting () { @@ -500,181 +547,173 @@ public class TConstructRegistry activeModifiers.add(mod); } - /* Used to determine how blocks are laid out in the drawbridge - * 0: Metadata has to match - * 1: Metadata has no meaning - * 2: Should not be placed - * 3: Has rotational metadata - * 4: Rails - * 5: Has rotational TileEntity data - * 6: Custom placement logic + /* + * Used to determine how blocks are laid out in the drawbridge 0: Metadata + * has to match 1: Metadata has no meaning 2: Should not be placed 3: Has + * rotational metadata 4: Rails 5: Has rotational TileEntity data 6: Custom + * placement logic */ - //moved to TMech - //public static HashMap drawbridgeState = new HashMap(); - /* Blocks that are interchangable with each other. Ex: Still and flowing water */ - // static HashMap interchangableBlockMapping = new HashMap (); - /*Blocks that place items, and vice versa */ - // public static HashBiMap blockToItemMapping; + // moved to TMech + // public static HashMap drawbridgeState = new + // HashMap(); + /* + * Blocks that are interchangable with each other. Ex: Still and flowing + * water + */ + // static HashMap interchangableBlockMapping = new + // HashMap (); + /* Blocks that place items, and vice versa */ + // public static HashBiMap blockToItemMapping; static void initializeDrawbridgeState () { - //TODO fix this mess and move to TMech - /* drawbridgeState[Blocks.stone] = 1; - drawbridgeState[Blocks.grass] = 1; - drawbridgeState[Blocks.dirt] = 1; - drawbridgeState[Blocks.cobblestone] = 1; - drawbridgeState[Blocks.bedrock] = 2; - drawbridgeState[Blocks.water] = 1; - drawbridgeState[Blocks.lava] = 1; - drawbridgeState[Blocks.sand] = 1; - drawbridgeState[Blocks.gravel] = 1; - drawbridgeState[Blocks.gold_ore] = 1; - drawbridgeState[Blocks.iron_ore] = 1; - drawbridgeState[Blocks.coal_ore] = 1; - drawbridgeState[Blocks.sponge] = 1; - drawbridgeState[Blocks.lapis_ore] = 1; - drawbridgeState[Blocks.lapis_block] = 1; - drawbridgeState[Blocks.dispenser] = 3; - drawbridgeState[Blocks.music] = 1; - drawbridgeState[Blocks.bed] = 2; - drawbridgeState[Blocks.railPowered] = 4; - drawbridgeState[Blocks.railDetector] = 4; - drawbridgeState[Blocks.sticky_piston] = 3; - drawbridgeState[Blocks.web] = 1; - drawbridgeState[Blocks.piston] = 3; - drawbridgeState[Blocks.piston_extension] = 2; - drawbridgeState[Blocks.plantYellow] = 1; - drawbridgeState[Blocks.plantRed] = 1; - drawbridgeState[Blocks.mushroomBrown] = 1; - drawbridgeState[Blocks.mushroomRed] = 1; - drawbridgeState[Blocks.gold_block] = 1; - drawbridgeState[Blocks.iron_block] = 1; - drawbridgeState[Blocks.brick_block] = 1; - drawbridgeState[Blocks.tnt] = 1; - drawbridgeState[Blocks.bookshelf] = 1; - drawbridgeState[Blocks.mossy_cobblestone] = 1; - drawbridgeState[Blocks.obsidian] = 1; - drawbridgeState[Blocks.torchWood] = 1; - drawbridgeState[Blocks.fire] = 1; - drawbridgeState[Blocks.mobSpawner] = 2; - drawbridgeState[Blocks.stairsWoodOak] = 3; - drawbridgeState[Blocks.chest] = 5; - drawbridgeState[Blocks.redstoneWire] = 1; - blockToItemMapping[Blocks.redstoneWire] = Items.redstone; - blockToItemMapping[Items.redstone] = Blocks.redstoneWire; - drawbridgeState[Blocks.diamond_ore] = 1; - drawbridgeState[Blocks.diamond_block] = 1; - drawbridgeState[Blocks.crafting_table] = 1; - drawbridgeState[Blocks.crops] = 2; - drawbridgeState[Blocks.tilledField] = 1; - drawbridgeState[Blocks.furnaceIdle] = 3; - drawbridgeState[Blocks.furnaceBurning] = 3; - interchangableBlockMapping[Blocks.furnaceIdle] = Blocks.furnaceBurning; - interchangableBlockMapping[Blocks.furnaceBurning] = Blocks.furnaceIdle; - drawbridgeState[Blocks.tilledField] = 1; - drawbridgeState[Blocks.signPost] = 3; - drawbridgeState[Blocks.doorWood] = 2; - drawbridgeState[Blocks.ladder] = 1; - drawbridgeState[Blocks.rail] = 4; - drawbridgeState[Blocks.stairsCobblestone] = 3; - drawbridgeState[Blocks.signWall] = 3; - drawbridgeState[Blocks.lever] = 3; - drawbridgeState[Blocks.pressurePlateStone] = 1; - drawbridgeState[Blocks.doorIron] = 2; - drawbridgeState[Blocks.pressurePlatePlanks] = 1; - drawbridgeState[Blocks.oreRedstone] = 1; - drawbridgeState[Blocks.oreRedstoneGlowing] = 1; - drawbridgeState[Blocks.torchRedstoneIdle] = 1; - drawbridgeState[Blocks.torchRedstoneActive] = 1; - drawbridgeState[Blocks.stoneButton] = 3; - drawbridgeState[Blocks.snow] = 1; - drawbridgeState[Blocks.ice] = 1; - drawbridgeState[Blocks.blockSnow] = 1; - drawbridgeState[Blocks.cactus] = 2; - drawbridgeState[Blocks.blockClay] = 1; - drawbridgeState[Blocks.reed] = 1; - drawbridgeState[Blocks.jukebox] = 1; - drawbridgeState[Blocks.fence] = 1; - drawbridgeState[Blocks.pumpkin] = 1; - drawbridgeState[Blocks.netherrack] = 1; - drawbridgeState[Blocks.slowSand] = 1; - drawbridgeState[Blocks.glowStone] = 1; - drawbridgeState[Blocks.portal] = 2; - drawbridgeState[Blocks.pumpkinLantern] = 1; - drawbridgeState[Blocks.cake] = 2; - drawbridgeState[Blocks.redstoneRepeaterIdle] = 3; - drawbridgeState[Blocks.redstoneRepeaterActive] = 3; - interchangableBlockMapping[Blocks.redstoneRepeaterIdle] = Blocks.redstoneRepeaterActive; - interchangableBlockMapping[Blocks.redstoneRepeaterActive] = Blocks.redstoneRepeaterIdle; - blockToItemMapping[Blocks.redstoneRepeaterIdle] = Items.redstoneRepeater.itemID; - blockToItemMapping[Blocks.redstoneRepeaterActive] = Items.redstoneRepeater.itemID; - blockToItemMapping[Items.redstoneRepeater] = Blocks.redstoneRepeaterIdle; - drawbridgeState[Blocks.lockedChest] = 5; - drawbridgeState[Blocks.trapdoor] = 3; - drawbridgeState[Blocks.mushroomCapBrown] = 1; - drawbridgeState[Blocks.mushroomCapRed] = 1; - drawbridgeState[Blocks.fenceIron] = 1; - drawbridgeState[Blocks.thinGlass] = 1; - drawbridgeState[Blocks.melon] = 1; - drawbridgeState[Blocks.pumpkinStem] = 2; - drawbridgeState[Blocks.melonStem] = 2; - drawbridgeState[Blocks.vine] = 3; - drawbridgeState[Blocks.fenceGate] = 3; - drawbridgeState[Blocks.stairsBrick] = 3; - drawbridgeState[Blocks.stairsStoneBrick] = 3; - drawbridgeState[Blocks.mycelium] = 1; - drawbridgeState[Blocks.waterlily] = 1; - drawbridgeState[Blocks.netherBrick] = 1; - drawbridgeState[Blocks.netherFence] = 1; - drawbridgeState[Blocks.netherFence] = 3; - drawbridgeState[Blocks.netherStalk] = 2; - drawbridgeState[Blocks.enchantmentTable] = 1; - drawbridgeState[Blocks.brewingStand] = 1; - drawbridgeState[Blocks.cauldron] = 1; - drawbridgeState[Blocks.endPortal] = 2; - drawbridgeState[Blocks.dragonEgg] = 1; - drawbridgeState[Blocks.redstoneLampIdle] = 1; - drawbridgeState[Blocks.redstoneLampActive] = 1; - drawbridgeState[Blocks.cocoaPlant] = 2; - drawbridgeState[Blocks.stairsSandStone] = 3; - drawbridgeState[Blocks.oreEmerald] = 1; - drawbridgeState[Blocks.enderChest] = 5; - drawbridgeState[Blocks.tripWireSource] = 1; - drawbridgeState[Blocks.tripWire] = 1; - drawbridgeState[Blocks.blockEmerald] = 1; - drawbridgeState[Blocks.stairsWoodSpruce] = 3; - drawbridgeState[Blocks.stairsWoodBirch] = 3; - drawbridgeState[Blocks.stairsWoodJungle] = 3; - drawbridgeState[Blocks.commandBlock] = 1; - drawbridgeState[Blocks.beacon] = 1; - drawbridgeState[Blocks.cobblestoneWall] = 1; - drawbridgeState[Blocks.flowerPot] = 1; - drawbridgeState[Blocks.carrot] = 2; - drawbridgeState[Blocks.potato] = 1; - drawbridgeState[Blocks.woodenButton] = 3; - drawbridgeState[Blocks.skull] = 2; - drawbridgeState[Blocks.chestTrapped] = 5; - drawbridgeState[Blocks.pressurePlateGold] = 1; - drawbridgeState[Blocks.pressurePlateIron] = 1; - drawbridgeState[Blocks.redstoneComparatorIdle] = 1; - drawbridgeState[Blocks.redstoneComparatorActive] = 1; - interchangableBlockMapping[Blocks.redstoneComparatorIdle] = Blocks.redstoneComparatorActive; - interchangableBlockMapping[Blocks.redstoneComparatorActive] = Blocks.redstoneComparatorIdle; - blockToItemMapping[Blocks.redstoneComparatorIdle] = Items.comparator.itemID; - blockToItemMapping[Blocks.redstoneComparatorActive] = Items.comparator.itemID; - blockToItemMapping[Items.comparator] = Blocks.redstoneComparatorIdle; - drawbridgeState[Blocks.daylightSensor] = 1; - drawbridgeState[Blocks.blockRedstone] = 1; - drawbridgeState[Blocks.oreNetherQuartz] = 1; - drawbridgeState[Blocks.hopperBlock] = 3; - drawbridgeState[Blocks.blockNetherQuartz] = 1; - drawbridgeState[Blocks.stairsNetherQuartz] = 3; - drawbridgeState[Blocks.railActivator] = 4; - drawbridgeState[Blocks.dropper] = 3; - interchangableBlockMapping[Blocks.dirt] = Blocks.grass; - interchangableBlockMapping[Blocks.grass] = Blocks.dirt; - */ + // TODO fix this mess and move to TMech + /* + * drawbridgeState[Blocks.stone] = 1; drawbridgeState[Blocks.grass] = 1; + * drawbridgeState[Blocks.dirt] = 1; drawbridgeState[Blocks.cobblestone] + * = 1; drawbridgeState[Blocks.bedrock] = 2; + * drawbridgeState[Blocks.water] = 1; drawbridgeState[Blocks.lava] = 1; + * drawbridgeState[Blocks.sand] = 1; drawbridgeState[Blocks.gravel] = 1; + * drawbridgeState[Blocks.gold_ore] = 1; + * drawbridgeState[Blocks.iron_ore] = 1; + * drawbridgeState[Blocks.coal_ore] = 1; drawbridgeState[Blocks.sponge] + * = 1; drawbridgeState[Blocks.lapis_ore] = 1; + * drawbridgeState[Blocks.lapis_block] = 1; + * drawbridgeState[Blocks.dispenser] = 3; drawbridgeState[Blocks.music] + * = 1; drawbridgeState[Blocks.bed] = 2; + * drawbridgeState[Blocks.railPowered] = 4; + * drawbridgeState[Blocks.railDetector] = 4; + * drawbridgeState[Blocks.sticky_piston] = 3; + * drawbridgeState[Blocks.web] = 1; drawbridgeState[Blocks.piston] = 3; + * drawbridgeState[Blocks.piston_extension] = 2; + * drawbridgeState[Blocks.plantYellow] = 1; + * drawbridgeState[Blocks.plantRed] = 1; + * drawbridgeState[Blocks.mushroomBrown] = 1; + * drawbridgeState[Blocks.mushroomRed] = 1; + * drawbridgeState[Blocks.gold_block] = 1; + * drawbridgeState[Blocks.iron_block] = 1; + * drawbridgeState[Blocks.brick_block] = 1; drawbridgeState[Blocks.tnt] + * = 1; drawbridgeState[Blocks.bookshelf] = 1; + * drawbridgeState[Blocks.mossy_cobblestone] = 1; + * drawbridgeState[Blocks.obsidian] = 1; + * drawbridgeState[Blocks.torchWood] = 1; drawbridgeState[Blocks.fire] = + * 1; drawbridgeState[Blocks.mobSpawner] = 2; + * drawbridgeState[Blocks.stairsWoodOak] = 3; + * drawbridgeState[Blocks.chest] = 5; + * drawbridgeState[Blocks.redstoneWire] = 1; + * blockToItemMapping[Blocks.redstoneWire] = Items.redstone; + * blockToItemMapping[Items.redstone] = Blocks.redstoneWire; + * drawbridgeState[Blocks.diamond_ore] = 1; + * drawbridgeState[Blocks.diamond_block] = 1; + * drawbridgeState[Blocks.crafting_table] = 1; + * drawbridgeState[Blocks.crops] = 2; + * drawbridgeState[Blocks.tilledField] = 1; + * drawbridgeState[Blocks.furnaceIdle] = 3; + * drawbridgeState[Blocks.furnaceBurning] = 3; + * interchangableBlockMapping[Blocks.furnaceIdle] = + * Blocks.furnaceBurning; + * interchangableBlockMapping[Blocks.furnaceBurning] = + * Blocks.furnaceIdle; drawbridgeState[Blocks.tilledField] = 1; + * drawbridgeState[Blocks.signPost] = 3; + * drawbridgeState[Blocks.doorWood] = 2; drawbridgeState[Blocks.ladder] + * = 1; drawbridgeState[Blocks.rail] = 4; + * drawbridgeState[Blocks.stairsCobblestone] = 3; + * drawbridgeState[Blocks.signWall] = 3; drawbridgeState[Blocks.lever] = + * 3; drawbridgeState[Blocks.pressurePlateStone] = 1; + * drawbridgeState[Blocks.doorIron] = 2; + * drawbridgeState[Blocks.pressurePlatePlanks] = 1; + * drawbridgeState[Blocks.oreRedstone] = 1; + * drawbridgeState[Blocks.oreRedstoneGlowing] = 1; + * drawbridgeState[Blocks.torchRedstoneIdle] = 1; + * drawbridgeState[Blocks.torchRedstoneActive] = 1; + * drawbridgeState[Blocks.stoneButton] = 3; drawbridgeState[Blocks.snow] + * = 1; drawbridgeState[Blocks.ice] = 1; + * drawbridgeState[Blocks.blockSnow] = 1; drawbridgeState[Blocks.cactus] + * = 2; drawbridgeState[Blocks.blockClay] = 1; + * drawbridgeState[Blocks.reed] = 1; drawbridgeState[Blocks.jukebox] = + * 1; drawbridgeState[Blocks.fence] = 1; drawbridgeState[Blocks.pumpkin] + * = 1; drawbridgeState[Blocks.netherrack] = 1; + * drawbridgeState[Blocks.slowSand] = 1; + * drawbridgeState[Blocks.glowStone] = 1; drawbridgeState[Blocks.portal] + * = 2; drawbridgeState[Blocks.pumpkinLantern] = 1; + * drawbridgeState[Blocks.cake] = 2; + * drawbridgeState[Blocks.redstoneRepeaterIdle] = 3; + * drawbridgeState[Blocks.redstoneRepeaterActive] = 3; + * interchangableBlockMapping[Blocks.redstoneRepeaterIdle] = + * Blocks.redstoneRepeaterActive; + * interchangableBlockMapping[Blocks.redstoneRepeaterActive] = + * Blocks.redstoneRepeaterIdle; + * blockToItemMapping[Blocks.redstoneRepeaterIdle] = + * Items.redstoneRepeater.itemID; + * blockToItemMapping[Blocks.redstoneRepeaterActive] = + * Items.redstoneRepeater.itemID; + * blockToItemMapping[Items.redstoneRepeater] = + * Blocks.redstoneRepeaterIdle; drawbridgeState[Blocks.lockedChest] = 5; + * drawbridgeState[Blocks.trapdoor] = 3; + * drawbridgeState[Blocks.mushroomCapBrown] = 1; + * drawbridgeState[Blocks.mushroomCapRed] = 1; + * drawbridgeState[Blocks.fenceIron] = 1; + * drawbridgeState[Blocks.thinGlass] = 1; drawbridgeState[Blocks.melon] + * = 1; drawbridgeState[Blocks.pumpkinStem] = 2; + * drawbridgeState[Blocks.melonStem] = 2; drawbridgeState[Blocks.vine] = + * 3; drawbridgeState[Blocks.fenceGate] = 3; + * drawbridgeState[Blocks.stairsBrick] = 3; + * drawbridgeState[Blocks.stairsStoneBrick] = 3; + * drawbridgeState[Blocks.mycelium] = 1; + * drawbridgeState[Blocks.waterlily] = 1; + * drawbridgeState[Blocks.netherBrick] = 1; + * drawbridgeState[Blocks.netherFence] = 1; + * drawbridgeState[Blocks.netherFence] = 3; + * drawbridgeState[Blocks.netherStalk] = 2; + * drawbridgeState[Blocks.enchantmentTable] = 1; + * drawbridgeState[Blocks.brewingStand] = 1; + * drawbridgeState[Blocks.cauldron] = 1; + * drawbridgeState[Blocks.endPortal] = 2; + * drawbridgeState[Blocks.dragonEgg] = 1; + * drawbridgeState[Blocks.redstoneLampIdle] = 1; + * drawbridgeState[Blocks.redstoneLampActive] = 1; + * drawbridgeState[Blocks.cocoaPlant] = 2; + * drawbridgeState[Blocks.stairsSandStone] = 3; + * drawbridgeState[Blocks.oreEmerald] = 1; + * drawbridgeState[Blocks.enderChest] = 5; + * drawbridgeState[Blocks.tripWireSource] = 1; + * drawbridgeState[Blocks.tripWire] = 1; + * drawbridgeState[Blocks.blockEmerald] = 1; + * drawbridgeState[Blocks.stairsWoodSpruce] = 3; + * drawbridgeState[Blocks.stairsWoodBirch] = 3; + * drawbridgeState[Blocks.stairsWoodJungle] = 3; + * drawbridgeState[Blocks.commandBlock] = 1; + * drawbridgeState[Blocks.beacon] = 1; + * drawbridgeState[Blocks.cobblestoneWall] = 1; + * drawbridgeState[Blocks.flowerPot] = 1; drawbridgeState[Blocks.carrot] + * = 2; drawbridgeState[Blocks.potato] = 1; + * drawbridgeState[Blocks.woodenButton] = 3; + * drawbridgeState[Blocks.skull] = 2; + * drawbridgeState[Blocks.chestTrapped] = 5; + * drawbridgeState[Blocks.pressurePlateGold] = 1; + * drawbridgeState[Blocks.pressurePlateIron] = 1; + * drawbridgeState[Blocks.redstoneComparatorIdle] = 1; + * drawbridgeState[Blocks.redstoneComparatorActive] = 1; + * interchangableBlockMapping[Blocks.redstoneComparatorIdle] = + * Blocks.redstoneComparatorActive; + * interchangableBlockMapping[Blocks.redstoneComparatorActive] = + * Blocks.redstoneComparatorIdle; + * blockToItemMapping[Blocks.redstoneComparatorIdle] = + * Items.comparator.itemID; + * blockToItemMapping[Blocks.redstoneComparatorActive] = + * Items.comparator.itemID; blockToItemMapping[Items.comparator] = + * Blocks.redstoneComparatorIdle; drawbridgeState[Blocks.daylightSensor] + * = 1; drawbridgeState[Blocks.blockRedstone] = 1; + * drawbridgeState[Blocks.oreNetherQuartz] = 1; + * drawbridgeState[Blocks.hopperBlock] = 3; + * drawbridgeState[Blocks.blockNetherQuartz] = 1; + * drawbridgeState[Blocks.stairsNetherQuartz] = 3; + * drawbridgeState[Blocks.railActivator] = 4; + * drawbridgeState[Blocks.dropper] = 3; + * interchangableBlockMapping[Blocks.dirt] = Blocks.grass; + * interchangableBlockMapping[Blocks.grass] = Blocks.dirt; + */ } static @@ -682,24 +721,10 @@ public class TConstructRegistry initializeDrawbridgeState(); } - /** Default Material Index - * 0: Wood - * 1: Stone - * 2: Iron - * 3: Flint - * 4: Cactus - * 5: Bone - * 6: Obsidian - * 7: Netherrack - * 8: Green Slime - * 9: Paper - * 10: Cobalt - * 11: Ardite - * 12: Manyullyn - * 13: Copper - * 14: Bronze - * 15: Alumite - * 16: Steel - * 17: Blue Slime + /** + * Default Material Index 0: Wood 1: Stone 2: Iron 3: Flint 4: Cactus 5: + * Bone 6: Obsidian 7: Netherrack 8: Green Slime 9: Paper 10: Cobalt 11: + * Ardite 12: Manyullyn 13: Copper 14: Bronze 15: Alumite 16: Steel 17: Blue + * Slime */ } diff --git a/src/main/java/tconstruct/library/armor/ArmorCore.java b/src/main/java/tconstruct/library/armor/ArmorCore.java index 4363bfe4..5c2888e4 100644 --- a/src/main/java/tconstruct/library/armor/ArmorCore.java +++ b/src/main/java/tconstruct/library/armor/ArmorCore.java @@ -15,8 +15,7 @@ import net.minecraftforge.common.ISpecialArmor; import cofh.api.energy.IEnergyContainerItem; /** - * NBTTags - * Main tag - InfiArmor + * NBTTags Main tag - InfiArmor */ public abstract class ArmorCore extends ItemArmor implements IEnergyContainerItem, ISpecialArmor { @@ -26,7 +25,7 @@ public abstract class ArmorCore extends ItemArmor implements IEnergyContainerIte private static final IBehaviorDispenseItem dispenserBehavior = new BehaviorDispenseArmorCopy(); public final int baseProtection; - //TE power constants -- TODO grab these from the items added + // TE power constants -- TODO grab these from the items added protected int capacity = 400000; protected int maxReceive = 75; protected int maxExtract = 75; @@ -54,14 +53,24 @@ public abstract class ArmorCore extends ItemArmor implements IEnergyContainerIte if (itemstack1 == null) { - par3EntityPlayer.setCurrentItemOrArmor(i + 1, par1ItemStack.copy()); //Forge: Vanilla bug fix associated with fixed setCurrentItemOrArmor indexs for players. + par3EntityPlayer.setCurrentItemOrArmor(i + 1, par1ItemStack.copy()); // Forge: + // Vanilla + // bug + // fix + // associated + // with + // fixed + // setCurrentItemOrArmor + // indexs + // for + // players. par1ItemStack.stackSize = 0; } return par1ItemStack; } - //ISpecialArmor overrides + // ISpecialArmor overrides @Override public ArmorProperties getProperties (EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { @@ -146,7 +155,7 @@ public abstract class ArmorCore extends ItemArmor implements IEnergyContainerIte } } - //TE support section -- from COFH core API reference section + // TE support section -- from COFH core API reference section public void setMaxTransfer (int maxTransfer) { setMaxReceive(maxTransfer); @@ -222,7 +231,7 @@ public abstract class ArmorCore extends ItemArmor implements IEnergyContainerIte return capacity; } - //end of TE support section + // end of TE support section // Vanilla overrides public boolean isItemTool (ItemStack par1ItemStack) diff --git a/src/main/java/tconstruct/library/armor/ArmorMod.java b/src/main/java/tconstruct/library/armor/ArmorMod.java index d0e74063..360ae83a 100644 --- a/src/main/java/tconstruct/library/armor/ArmorMod.java +++ b/src/main/java/tconstruct/library/armor/ArmorMod.java @@ -46,7 +46,8 @@ public abstract class ArmorMod extends ToolMod tag.setString("AttributeName", attributeType); tag.setString("Name", modifierName); tag.setDouble("Amount", amount); - tag.setInteger("Operation", flat ? 0 : 1);//0 = flat increase, 1 = % increase + tag.setInteger("Operation", flat ? 0 : 1);// 0 = flat increase, 1 = % + // increase tag.setLong("UUIDMost", uuid.getMostSignificantBits()); tag.setLong("UUIDLeast", uuid.getLeastSignificantBits()); return tag; diff --git a/src/main/java/tconstruct/library/armor/ArmorModTypeFilter.java b/src/main/java/tconstruct/library/armor/ArmorModTypeFilter.java index 6cf1474b..5cd0fd5b 100644 --- a/src/main/java/tconstruct/library/armor/ArmorModTypeFilter.java +++ b/src/main/java/tconstruct/library/armor/ArmorModTypeFilter.java @@ -21,11 +21,14 @@ public abstract class ArmorModTypeFilter extends ArmorMod } } - /** Checks to see if the inputs match the stored items - * Note: Filters types, doesn't care about amount + /** + * Checks to see if the inputs match the stored items Note: Filters types, + * doesn't care about amount * - * @param input The ItemStacks to compare against - * @param tool Item to modify, used for restrictions + * @param input + * The ItemStacks to compare against + * @param tool + * Item to modify, used for restrictions * @return Whether the recipe matches the input */ @Override @@ -102,10 +105,13 @@ public abstract class ArmorModTypeFilter extends ArmorMod return amount; } - /** Adds a new itemstack to the list for increases + /** + * Adds a new itemstack to the list for increases * - * @param stack ItemStack to compare against - * @param amount Amount to increase + * @param stack + * ItemStack to compare against + * @param amount + * Amount to increase */ public void addStackToMatchList (ItemStack stack, int amount) { diff --git a/src/main/java/tconstruct/library/armor/BehaviorDispenseArmorCopy.java b/src/main/java/tconstruct/library/armor/BehaviorDispenseArmorCopy.java index 419e55b4..abdcb5cf 100644 --- a/src/main/java/tconstruct/library/armor/BehaviorDispenseArmorCopy.java +++ b/src/main/java/tconstruct/library/armor/BehaviorDispenseArmorCopy.java @@ -16,7 +16,8 @@ import net.minecraft.util.EnumFacing; final class BehaviorDispenseArmorCopy extends BehaviorDefaultDispenseItem { /** - * Dispense the specified stack, play the dispense sound and spawn particles. + * Dispense the specified stack, play the dispense sound and spawn + * particles. */ protected ItemStack dispenseStack (IBlockSource par1IBlockSource, ItemStack par2ItemStack) { @@ -34,7 +35,17 @@ final class BehaviorDispenseArmorCopy extends BehaviorDefaultDispenseItem int i1 = EntityLiving.getArmorPosition(par2ItemStack); ItemStack itemstack1 = par2ItemStack.copy(); itemstack1.stackSize = 1; - entitylivingbase.setCurrentItemOrArmor(i1, itemstack1); //BUGFIX Forge: Vanilla bug fix associated with fixed setCurrentItemOrArmor indexs for players. + entitylivingbase.setCurrentItemOrArmor(i1, itemstack1); // BUGFIX + // Forge: + // Vanilla + // bug fix + // associated + // with + // fixed + // setCurrentItemOrArmor + // indexs + // for + // players. if (entitylivingbase instanceof EntityLiving) { diff --git a/src/main/java/tconstruct/library/client/FluidRenderProperties.java b/src/main/java/tconstruct/library/client/FluidRenderProperties.java index 5794e70e..f410f2a1 100644 --- a/src/main/java/tconstruct/library/client/FluidRenderProperties.java +++ b/src/main/java/tconstruct/library/client/FluidRenderProperties.java @@ -3,7 +3,7 @@ package tconstruct.library.client; public class FluidRenderProperties { - //Constant defaults + // Constant defaults public static final FluidRenderProperties DEFAULT_TABLE = new FluidRenderProperties(Applications.TABLE); public static final FluidRenderProperties DEFAULT_BASIN = new FluidRenderProperties(Applications.BASIN); diff --git a/src/main/java/tconstruct/library/client/TConstructClientRegistry.java b/src/main/java/tconstruct/library/client/TConstructClientRegistry.java index fbc47409..c25dbd88 100644 --- a/src/main/java/tconstruct/library/client/TConstructClientRegistry.java +++ b/src/main/java/tconstruct/library/client/TConstructClientRegistry.java @@ -102,7 +102,7 @@ public class TConstructClientRegistry recipeIcons.put(name, recipe); } - //Gui + // Gui public static void addToolButton (ToolGuiElement element) { toolButtons.add(element); diff --git a/src/main/java/tconstruct/library/component/TankLayerScan.java b/src/main/java/tconstruct/library/component/TankLayerScan.java index 8dc546b9..8c1dbe13 100644 --- a/src/main/java/tconstruct/library/component/TankLayerScan.java +++ b/src/main/java/tconstruct/library/component/TankLayerScan.java @@ -11,7 +11,6 @@ import mantle.blocks.iface.IServantLogic; import mantle.world.CoordTuple; import mantle.world.CoordTupleSort; import net.minecraft.block.Block; -import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagIntArray; import net.minecraft.nbt.NBTTagList; @@ -39,7 +38,14 @@ public class TankLayerScan extends LogicComponent protected CoordTuple returnStone; private static boolean debug = System.getenv("DBG_MANTLE_TankLayerScan") != null; - private static int MAX_LAYER_RECURSION_DEPTH = System.getProperty("os.arch").equals("amd64") ? 4000 : 2000; // Recursion causes overflows on 32-bit, so reduce if not 64-bit + private static int MAX_LAYER_RECURSION_DEPTH = System.getProperty("os.arch").equals("amd64") ? 4000 : 2000; // Recursion + // causes + // overflows + // on + // 32-bit, + // so reduce + // if not + // 64-bit public TankLayerScan(TileEntity te, Block... ids) { @@ -66,7 +72,7 @@ public class TankLayerScan extends LogicComponent blockCoords.clear(); airCoords.clear(); boolean validAir = false; - //Check for air space in front of and behind the structure + // Check for air space in front of and behind the structure byte dir = getDirection(); switch (getDirection()) { @@ -82,7 +88,7 @@ public class TankLayerScan extends LogicComponent break; } - //Recurse the structure + // Recurse the structure boolean validBlocks = false; int xPos = 0, zPos = 0; @@ -120,7 +126,7 @@ public class TankLayerScan extends LogicComponent blockCoords.clear(); bricks = 0; - //Does the actual adding of blocks in the ring + // Does the actual adding of blocks in the ring boolean sealed = floodTest(master.xCoord + xPos, master.yCoord, master.zCoord + zPos); if (!world.isRemote && debug) { @@ -130,7 +136,7 @@ public class TankLayerScan extends LogicComponent if (sealed) { - blockCoords.add(new CoordTuple(master.xCoord, master.yCoord, master.zCoord)); //Don't forget me! + blockCoords.add(new CoordTuple(master.xCoord, master.yCoord, master.zCoord)); // Don't forget me! layerAirCoords = new HashSet(airCoords); layerBlockCoords = new HashSet(blockCoords); @@ -151,7 +157,7 @@ public class TankLayerScan extends LogicComponent } } - //@SuppressWarnings({ "unchecked" }) + // @SuppressWarnings({ "unchecked" }) protected void finalizeStructure () { Collections.sort(blockCoords, new CoordTupleSort()); @@ -198,7 +204,8 @@ public class TankLayerScan extends LogicComponent protected boolean checkAir (int x, int y, int z) { Block block = world.getBlock(x, y, z); - if (block == null || block == Blocks.air)// || block == TContent.tankAir) + if (block == null || world.isAirBlock(x, y, z))// || block == + // TContent.tankAir) return true; return false; @@ -207,7 +214,7 @@ public class TankLayerScan extends LogicComponent protected boolean checkServant (int x, int y, int z) { Block block = world.getBlock(x, y, z); - if (block == null || block == Blocks.air || !isValidBlock(x, y, z)) + if (block == null || world.isAirBlock(x, y, z) || !isValidBlock(x, y, z)) return false; if (!block.hasTileEntity(world.getBlockMetadata(x, y, z))) @@ -297,9 +304,9 @@ public class TankLayerScan extends LogicComponent if (checkAir(coord.x, y, coord.z)) { boolean valid = true; - addAirBlock(coord.x, y, coord.z); //Don't skip first one + addAirBlock(coord.x, y, coord.z); // Don't skip first one - //Air blocks + // Air blocks while (i.hasNext()) { coord = (CoordTuple) i.next(); @@ -314,7 +321,7 @@ public class TankLayerScan extends LogicComponent } } - //Bricks + // Bricks i = layerBlockCoords.iterator(); while (i.hasNext()) { @@ -334,7 +341,7 @@ public class TankLayerScan extends LogicComponent } else if (checkServant(coord.x, y, coord.z)) { - //Bottom floor. All blocks, please vacate the elevator + // Bottom floor. All blocks, please vacate the elevator boolean valid = true; while (i.hasNext()) { @@ -367,7 +374,7 @@ public class TankLayerScan extends LogicComponent { boolean valid = true; - //Bricks + // Bricks while (i.hasNext()) { coord = (CoordTuple) i.next(); @@ -381,7 +388,7 @@ public class TankLayerScan extends LogicComponent } } - //Air blocks + // Air blocks if (valid) { i = layerAirCoords.iterator(); @@ -446,7 +453,7 @@ public class TankLayerScan extends LogicComponent } else { - if (structureTop == 0) //Workaround for missing data + if (structureTop == 0) // Workaround for missing data { for (CoordTuple coord : blockCoords) structureTop = coord.y; @@ -481,7 +488,10 @@ public class TankLayerScan extends LogicComponent } } - /** Do any necessary cleanup here. Remove air blocks, invalidate servants, etc */ + /** + * Do any necessary cleanup here. Remove air blocks, invalidate servants, + * etc + */ public void cleanup () { Iterator i = blockCoords.iterator(); @@ -575,4 +585,4 @@ public class TankLayerScan extends LogicComponent { tags.setBoolean("Complete", completeStructure); } -} +} \ No newline at end of file diff --git a/src/main/java/tconstruct/library/crafting/AlloyMix.java b/src/main/java/tconstruct/library/crafting/AlloyMix.java index c9bdb65b..f99db48a 100644 --- a/src/main/java/tconstruct/library/crafting/AlloyMix.java +++ b/src/main/java/tconstruct/library/crafting/AlloyMix.java @@ -17,11 +17,10 @@ public class AlloyMix mixers = inputs; } - /*public boolean matches(List liquids) - { - ArrayList list = new ArrayList(mixers); - return false; - }*/ + /* + * public boolean matches(List liquids) { ArrayList list = new + * ArrayList(mixers); return false; } + */ public FluidStack mix (ArrayList liquids) { @@ -35,23 +34,24 @@ public class AlloyMix while (iter.hasNext()) { FluidStack mixer = (FluidStack) iter.next(); - //if (mixer.itemID == liquid.itemID && mixer.itemMeta == liquid.itemMeta) + // if (mixer.itemID == liquid.itemID && mixer.itemMeta == + // liquid.itemMeta) if (mixer.isFluidEqual(liquid)) { int eAmt = liquid.amount / mixer.amount; effectiveAmount.add(eAmt); copyMix.remove(mixer); - //inputs.add(liquid); + // inputs.add(liquid); break; } } } - //} + // } if (copyMix.size() > 0) return null; - //Remove old liquids + // Remove old liquids int low = getLowestAmount(effectiveAmount); ArrayList copyMix2 = new ArrayList(mixers); @@ -62,7 +62,8 @@ public class AlloyMix while (iter.hasNext()) { FluidStack mixer = (FluidStack) iter.next(); - //if (mixer.itemID == liquid.itemID && mixer.itemMeta == liquid.itemMeta) + // if (mixer.itemID == liquid.itemID && mixer.itemMeta == + // liquid.itemMeta) if (mixer.isFluidEqual(liquid)) { int eAmt = low * mixer.amount; @@ -85,7 +86,7 @@ public class AlloyMix int getLowestAmount (ArrayList list) { - int frist = (Integer) list.get(0); //FRIST!!! + int frist = (Integer) list.get(0); // FRIST!!! for (int i = 1; i < list.size(); i++) { int compare = (Integer) list.get(i); diff --git a/src/main/java/tconstruct/library/crafting/FluidType.java b/src/main/java/tconstruct/library/crafting/FluidType.java index f3f90672..f097a649 100644 --- a/src/main/java/tconstruct/library/crafting/FluidType.java +++ b/src/main/java/tconstruct/library/crafting/FluidType.java @@ -12,11 +12,11 @@ public enum FluidType Water(Blocks.snow, 0, 20, FluidRegistry.getFluid("water"), false), /** Iron Smelting **/ Iron(Blocks.iron_block, 0, 600, TRepo.moltenIronFluid, true), - /** Gold Smelting **/ + /** Gold Smelting **/ Gold(Blocks.gold_block, 0, 400, TRepo.moltenGoldFluid, false), - /** Tin Smelting **/ + /** Tin Smelting **/ Tin(TRepo.metalBlock, 5, 400, TRepo.moltenTinFluid, false), - /** Copper Smelting **/ + /** Copper Smelting **/ Copper(TRepo.metalBlock, 3, 550, TRepo.moltenCopperFluid, true), /** Aluminum Smelting **/ Aluminum(TRepo.metalBlock, 6, 350, TRepo.moltenAluminumFluid, false), diff --git a/src/main/java/tconstruct/library/crafting/LiquidCasting.java b/src/main/java/tconstruct/library/crafting/LiquidCasting.java index 61530340..18ed5dd2 100644 --- a/src/main/java/tconstruct/library/crafting/LiquidCasting.java +++ b/src/main/java/tconstruct/library/crafting/LiquidCasting.java @@ -9,7 +9,7 @@ import tconstruct.library.client.FluidRenderProperties; /* Melting becomes hardened */ public class LiquidCasting { - //public static LiquidCasting instance = new LiquidCasting(); + // public static LiquidCasting instance = new LiquidCasting(); private final ArrayList casts = new ArrayList(); private boolean contains (CastingRecipe recipe) @@ -22,14 +22,22 @@ public class LiquidCasting return false; } - /** Adds a casting recipe + /** + * Adds a casting recipe * - * @param output Result of the cast - * @param metal Liquid to be used in casting. This also decides how much metal is consumed - * @param cast The empty item to cast with. ex Ingot Cast - * @param consume Whether the item should be consumed while casting - * @param delay Time to cast in ticks - * @param props The rendering properties for the casting fluid (may be null) + * @param output + * Result of the cast + * @param metal + * Liquid to be used in casting. This also decides how much metal + * is consumed + * @param cast + * The empty item to cast with. ex Ingot Cast + * @param consume + * Whether the item should be consumed while casting + * @param delay + * Time to cast in ticks + * @param props + * The rendering properties for the casting fluid (may be null) */ public void addCastingRecipe (ItemStack output, FluidStack metal, ItemStack cast, boolean consume, int delay, FluidRenderProperties props) { @@ -38,61 +46,94 @@ public class LiquidCasting casts.add(cr); } - /** Adds a casting recipe + /** + * Adds a casting recipe * - * @param output Result of the cast - * @param metal Liquid to be used in casting. This also decides how much metal is consumed - * @param cast The empty item to cast with. ex Ingot Cast - * @param consume Whether the item should be consumed while casting - * @param delay Time to cast in ticks + * @param output + * Result of the cast + * @param metal + * Liquid to be used in casting. This also decides how much metal + * is consumed + * @param cast + * The empty item to cast with. ex Ingot Cast + * @param consume + * Whether the item should be consumed while casting + * @param delay + * Time to cast in ticks */ public void addCastingRecipe (ItemStack output, FluidStack metal, ItemStack cast, boolean consume, int delay) { addCastingRecipe(output, metal, cast, consume, delay, null); } - /** Adds a casting recipe. Does not consume the cast + /** + * Adds a casting recipe. Does not consume the cast * - * @param output Result of the cast - * @param metal Liquid to be used in casting. This also decides how much metal is consumed - * @param cast The empty item to cast with. ex Ingot Cast - * @param delay Time to cast in ticks - * @param props The rendering properties for the casting fluid (may be null) + * @param output + * Result of the cast + * @param metal + * Liquid to be used in casting. This also decides how much metal + * is consumed + * @param cast + * The empty item to cast with. ex Ingot Cast + * @param delay + * Time to cast in ticks + * @param props + * The rendering properties for the casting fluid (may be null) */ public void addCastingRecipe (ItemStack output, FluidStack metal, ItemStack cast, int delay, FluidRenderProperties props) { addCastingRecipe(output, metal, cast, false, delay, props); } - /** Adds a casting recipe. Does not consume the cast + /** + * Adds a casting recipe. Does not consume the cast * - * @param output Result of the cast - * @param metal Liquid to be used in casting. This also decides how much metal is consumed - * @param cast The empty item to cast with. ex Ingot Cast - * @param delay Time to cast in ticks + * @param output + * Result of the cast + * @param metal + * Liquid to be used in casting. This also decides how much metal + * is consumed + * @param cast + * The empty item to cast with. ex Ingot Cast + * @param delay + * Time to cast in ticks */ public void addCastingRecipe (ItemStack output, FluidStack metal, ItemStack cast, int delay) { addCastingRecipe(output, metal, cast, false, delay, null); } - /** Adds a casting recipe. Does not consume the cast or have an item to cast against + /** + * Adds a casting recipe. Does not consume the cast or have an item to cast + * against * - * @param output Result of the cast - * @param metal Liquid to be used in casting. This also decides how much metal is consumed - * @param delay Time to cast in ticks - * @param props The rendering properties for the casting fluid (may be null) + * @param output + * Result of the cast + * @param metal + * Liquid to be used in casting. This also decides how much metal + * is consumed + * @param delay + * Time to cast in ticks + * @param props + * The rendering properties for the casting fluid (may be null) */ public void addCastingRecipe (ItemStack output, FluidStack metal, int delay, FluidRenderProperties props) { addCastingRecipe(output, metal, null, false, delay, props); } - /** Adds a casting recipe. Does not consume the cast or have an item to cast against + /** + * Adds a casting recipe. Does not consume the cast or have an item to cast + * against * - * @param output Result of the cast - * @param metal Liquid to be used in casting. This also decides how much metal is consumed - * @param delay Time to cast in ticks + * @param output + * Result of the cast + * @param metal + * Liquid to be used in casting. This also decides how much metal + * is consumed + * @param delay + * Time to cast in ticks */ public void addCastingRecipe (ItemStack output, FluidStack metal, int delay) { @@ -130,7 +171,7 @@ public class LiquidCasting return null; } - //Getter for public viewing + // Getter for public viewing public ArrayList getCastingRecipes () { return casts; diff --git a/src/main/java/tconstruct/library/crafting/PatternBuilder.java b/src/main/java/tconstruct/library/crafting/PatternBuilder.java index 3c99a790..60f2dca4 100644 --- a/src/main/java/tconstruct/library/crafting/PatternBuilder.java +++ b/src/main/java/tconstruct/library/crafting/PatternBuilder.java @@ -18,11 +18,11 @@ import cpw.mods.fml.common.eventhandler.Event.Result; public class PatternBuilder { public static PatternBuilder instance = new PatternBuilder(); - //Map items to their parts with a hashmap + // Map items to their parts with a hashmap public List materials = new ArrayList(); public HashMap materialSets = new HashMap(); - //We could use IRecipe if it wasn't tied to InventoryCrafting + // We could use IRecipe if it wasn't tied to InventoryCrafting public List toolPatterns = new ArrayList(); /* Register methods */ @@ -80,36 +80,36 @@ public class PatternBuilder if (totalMaterial < patternValue) // Not enough material return null; - else if (patternValue == key.value) //Material only + else if (patternValue == key.value) // Material only return new ItemStack[] { toolPart, null }; else { if (patternValue % 2 == 1) { - return new ItemStack[] { toolPart, mat.shard.copy() }; //Material + shard + return new ItemStack[] { toolPart, mat.shard.copy() }; // Material + // + + // shard } else return new ItemStack[] { toolPart, null }; } - /*if ( patternValue < totalMaterial ) - { - if (otherPattern != null) - { - int otherValue = ((IPattern)otherPattern.getItem()).getPatternCost(otherPattern.getItemDamage()); - if (patternValue + otherValue <= key.value) - { - ItemStack otherPart = getMatchingPattern(otherPattern, mat); - return new ItemStack[] { toolPart, otherPart }; //Material + Material - } - } - } - - else if ( patternValue == key.value ) - return new ItemStack[] { new ItemStack(toolPart, 1, mat.materialID), null }; //Material only - - else - return null; //Not a valid match*/ + /* + * if ( patternValue < totalMaterial ) { if (otherPattern != + * null) { int otherValue = + * ((IPattern)otherPattern.getItem() + * ).getPatternCost(otherPattern.getItemDamage()); if + * (patternValue + otherValue <= key.value) { ItemStack + * otherPart = getMatchingPattern(otherPattern, mat); return + * new ItemStack[] { toolPart, otherPart }; //Material + + * Material } } } + * + * else if ( patternValue == key.value ) return new + * ItemStack[] { new ItemStack(toolPart, 1, mat.materialID), + * null }; //Material only + * + * else return null; //Not a valid match + */ } } } @@ -186,7 +186,8 @@ public class PatternBuilder return null; } - //Small data classes. I would prefer the struct from C#, but we do what we can. + // Small data classes. I would prefer the struct from C#, but we do what we + // can. public class ItemKey { public final Item item; @@ -217,7 +218,7 @@ public class PatternBuilder } } - //Helper Methods + // Helper Methods public void registerMaterial (Block material, int value, String key) { registerMaterial(new ItemStack(material, 1, Short.MAX_VALUE), value, key); @@ -238,13 +239,17 @@ public class PatternBuilder registerFullMaterial(new ItemStack(material, 1, Short.MAX_VALUE), value, key, shard, rod, materialID); } - /*public void registerFullMaterial (Block material, int value, String key, int materialID) - { - registerFullMaterial(new ItemStack(material, 1, Short.MAX_VALUE), value, key, new ItemStack(TContent.toolShard, 1, materialID), new ItemStack(TContent.toolRod, 1, materialID), materialID); - } - - public void registerFullMaterial (Item material, int value, String key, int materialID) - { - registerFullMaterial(new ItemStack(material, 1, Short.MAX_VALUE), value, key, new ItemStack(TContent.toolShard, 1, materialID), new ItemStack(TContent.toolRod, 1, materialID), materialID); - }*/ + /* + * public void registerFullMaterial (Block material, int value, String key, + * int materialID) { registerFullMaterial(new ItemStack(material, 1, + * Short.MAX_VALUE), value, key, new ItemStack(TContent.toolShard, 1, + * materialID), new ItemStack(TContent.toolRod, 1, materialID), materialID); + * } + * + * public void registerFullMaterial (Item material, int value, String key, + * int materialID) { registerFullMaterial(new ItemStack(material, 1, + * Short.MAX_VALUE), value, key, new ItemStack(TContent.toolShard, 1, + * materialID), new ItemStack(TContent.toolRod, 1, materialID), materialID); + * } + */ } \ No newline at end of file diff --git a/src/main/java/tconstruct/library/crafting/ShapelessToolRecipe.java b/src/main/java/tconstruct/library/crafting/ShapelessToolRecipe.java index 30e8b160..bc724a03 100644 --- a/src/main/java/tconstruct/library/crafting/ShapelessToolRecipe.java +++ b/src/main/java/tconstruct/library/crafting/ShapelessToolRecipe.java @@ -39,7 +39,7 @@ public class ShapelessToolRecipe extends ShapelessRecipes { ItemStack itemstack1 = (ItemStack) iterator.next(); - //TConstruct.logger.info("Rawr! "+itemstack1.getItemDamage()); + // TConstruct.logger.info("Rawr! "+itemstack1.getItemDamage()); if (itemstack == itemstack1 && (itemstack1.getItemDamage() == Short.MAX_VALUE || itemstack.getItemDamage() == itemstack1.getItemDamage())) { if (itemstack.getItem() instanceof ToolCore) diff --git a/src/main/java/tconstruct/library/crafting/Smeltery.java b/src/main/java/tconstruct/library/crafting/Smeltery.java index c8dfc0e6..c7a0df07 100644 --- a/src/main/java/tconstruct/library/crafting/Smeltery.java +++ b/src/main/java/tconstruct/library/crafting/Smeltery.java @@ -6,7 +6,6 @@ import java.util.HashMap; import java.util.List; import net.minecraft.block.Block; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; @@ -16,72 +15,84 @@ public class Smeltery { public static Smeltery instance = new Smeltery(); - private final HashMap, FluidStack> smeltingList = new HashMap, FluidStack>(); - private final HashMap, Integer> temperatureList = new HashMap, Integer>(); - private final HashMap, ItemStack> renderIndex = new HashMap, ItemStack>(); + private final HashMap, FluidStack> smeltingList = new HashMap, FluidStack>(); + private final HashMap, Integer> temperatureList = new HashMap, Integer>(); + private final HashMap, ItemStack> renderIndex = new HashMap, ItemStack>(); private final ArrayList alloys = new ArrayList(); - /** Adds mappings between an itemstack and an output liquid - * Example: Smeltery.addMelting(Block.oreIron, 0, 600, new FluidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 0)); + /** + * Adds mappings between an itemstack and an output liquid Example: + * Smeltery.addMelting(Block.oreIron, 0, 600, new + * FluidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 0)); * - * @param stack The itemstack to liquify - * @param temperature How hot the block should be before liquifying. Max temp in the Smeltery is 800, other structures may vary - * @param output The result of the process in liquid form + * @param stack + * The itemstack to liquify + * @param temperature + * How hot the block should be before liquifying. Max temp in the + * Smeltery is 800, other structures may vary + * @param output + * The result of the process in liquid form */ - public static void addMelting (ItemStack stack, int temperature, FluidStack output) + public static void addMelting0 (ItemStack stack, int temperature, FluidStack output) { - addMelting(stack, stack.getItem(), stack.getItemDamage(), temperature, output); + // addMelting(stack, stack, stack.getItemDamage(), temperature, output); } - /** Adds mappings between a block and its liquid - * Example: Smeltery.addMelting(Block.oreIron, 0, 600, new FluidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 0)); + /** + * Adds mappings between a block and its liquid Example: + * Smeltery.addMelting(Block.oreIron, 0, 600, new + * FluidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 0)); * - * @param blockID The ID of the block to liquify and render - * @param metadata The metadata of the block to liquify and render - * @param temperature How hot the block should be before liquifying. Max temp in the Smeltery is 800, other structures may vary - * @param output The result of the process in liquid form - */ - public static void addMelting (Item item, int metadata, int temperature, FluidStack output) - { - addMelting(new ItemStack(item, 1, metadata), item, metadata, temperature, output); - } - - /** Adds mappings between a block and its liquid - * Example: Smeltery.addMelting(Block.oreIron, 0, 600, new FluidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 0)); - * - * @param blockID The ID of the block to liquify and render - * @param metadata The metadata of the block to liquify and render - * @param temperature How hot the block should be before liquifying. Max temp in the Smeltery is 800, other structures may vary - * @param output The result of the process in liquid form + * @param blockID + * The ID of the block to liquify and render + * @param metadata + * The metadata of the block to liquify and render + * @param temperature + * How hot the block should be before liquifying. Max temp in the + * Smeltery is 800, other structures may vary + * @param output + * The result of the process in liquid form */ public static void addMelting (Block block, int metadata, int temperature, FluidStack output) { - addMelting(new ItemStack(block, 1, metadata), new ItemStack(block).getItem(), metadata, temperature, output); + addMelting(new ItemStack(block, 1, metadata), block, metadata, temperature, output); } - /** Adds mappings between an input and its liquid. - * Renders with the given input's block ID and metadata - * Example: Smeltery.addMelting(Block.oreIron, 0, 600, new FluidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 0)); + /** + * Adds mappings between an input and its liquid. Renders with the given + * input's block ID and metadata Example: Smeltery.addMelting(Block.oreIron, + * 0, 600, new FluidStack(liquidMetalStill.blockID, + * TConstruct.ingotLiquidValue * 2, 0)); * - * @param input The item to liquify - * @param block The block to render - * @param metadata The metadata of the block to render - * @param temperature How hot the block should be before liquifying - * @param liquid The result of the process + * @param input + * The item to liquify + * @param blockID + * The ID of the block to render + * @param metadata + * The metadata of the block to render + * @param temperature + * How hot the block should be before liquifying + * @param liquid + * The result of the process */ - public static void addMelting (ItemStack input, Item item, int metadata, int temperature, FluidStack liquid) + public static void addMelting (ItemStack input, Block blockID, int metadata, int temperature, FluidStack liquid) { - instance.smeltingList.put(Arrays.asList(new ItemStack(input.getItem(), input.getItemDamage())), liquid); - instance.temperatureList.put(Arrays.asList(new ItemStack(input.getItem(), input.getItemDamage())), temperature); - instance.renderIndex.put(Arrays.asList(new ItemStack(input.getItem(), input.getItemDamage())), new ItemStack(item, input.stackSize, metadata)); + instance.smeltingList.put(Arrays.asList(input.getItem().hashCode(), input.getItemDamage()), liquid); + instance.temperatureList.put(Arrays.asList(input.getItem().hashCode(), input.getItemDamage()), temperature); + instance.renderIndex.put(Arrays.asList(input.getItem().hashCode(), input.getItemDamage()), new ItemStack(blockID, input.stackSize, metadata)); } - /** Adds an alloy mixing recipe. - * Example: Smeltery.addAlloyMixing(new FluidStack(bronzeID, 2, 0), new FluidStack(copperID, 3, 0), new FluidStack(tinID, 1, 0)); - * The example mixes 3 copper with 1 tin to make 2 bronze + /** + * Adds an alloy mixing recipe. Example: Smeltery.addAlloyMixing(new + * FluidStack(bronzeID, 2, 0), new FluidStack(copperID, 3, 0), new + * FluidStack(tinID, 1, 0)); The example mixes 3 copper with 1 tin to make 2 + * bronze * - * @param result The output of the combination of mixers. The quantity is used for amount of a successful mix - * @param mixers the liquids to be mixed. Quantities are used as ratios + * @param result + * The output of the combination of mixers. The quantity is used + * for amount of a successful mix + * @param mixers + * the liquids to be mixed. Quantities are used as ratios */ public static void addAlloyMixing (FluidStack result, FluidStack... mixers) { @@ -94,7 +105,9 @@ public class Smeltery /** * Used to get the resulting temperature from a source ItemStack - * @param item The Source ItemStack + * + * @param item + * The Source ItemStack * @return The result temperature */ public static Integer getLiquifyTemperature (ItemStack item) @@ -102,7 +115,7 @@ public class Smeltery if (item == null) return 20; - Integer temp = instance.temperatureList.get(Arrays.asList(item.getItem(), item.getItemDamage())); + Integer temp = instance.temperatureList.get(Arrays.asList(item.getItem().hashCode(), item.getItemDamage())); if (temp == null) return 20; else @@ -111,7 +124,9 @@ public class Smeltery /** * Used to get the resulting temperature from a source Block - * @param item The Source ItemStack + * + * @param item + * The Source ItemStack * @return The result ItemStack */ public static Integer getLiquifyTemperature (int blockID, int metadata) @@ -121,7 +136,9 @@ public class Smeltery /** * Used to get the resulting ItemStack from a source ItemStack - * @param item The Source ItemStack + * + * @param item + * The Source ItemStack * @return The result ItemStack */ public static FluidStack getSmelteryResult (ItemStack item) @@ -129,7 +146,7 @@ public class Smeltery if (item == null) return null; - FluidStack stack = instance.smeltingList.get(Arrays.asList(item.getItem(), item.getItemDamage())); + FluidStack stack = instance.smeltingList.get(Arrays.asList(item.getItem().hashCode(), item.getItemDamage())); if (stack == null) return null; return stack.copy(); @@ -137,7 +154,9 @@ public class Smeltery /** * Used to get the resulting ItemStack from a source Block - * @param item The Source ItemStack + * + * @param item + * The Source ItemStack * @return The result ItemStack */ public static FluidStack getSmelteryResult (int blockID, int metadata) @@ -150,7 +169,7 @@ public class Smeltery public static ItemStack getRenderIndex (ItemStack input) { - return instance.renderIndex.get(Arrays.asList(input.getItem(), input.getItemDamage())); + return instance.renderIndex.get(Arrays.asList(input.getItem().hashCode(), input.getItemDamage())); } public static ArrayList mixMetals (ArrayList moltenMetal) @@ -165,17 +184,17 @@ public class Smeltery return liquids; } - public static HashMap, FluidStack> getSmeltingList () + public static HashMap, FluidStack> getSmeltingList () { return instance.smeltingList; } - public static HashMap, Integer> getTemperatureList () + public static HashMap, Integer> getTemperatureList () { return instance.temperatureList; } - public static HashMap, ItemStack> getRenderIndex () + public static HashMap, ItemStack> getRenderIndex () { return instance.renderIndex; } @@ -190,10 +209,14 @@ public class Smeltery * * @author samtrion * - * @param type Type of Fluid - * @param input The item to liquify - * @param temperatureDifference Difference between FluidType BaseTemperature - * @param fluidAmount Amount of Fluid + * @param type + * Type of Fluid + * @param input + * The item to liquify + * @param temperatureDifference + * Difference between FluidType BaseTemperature + * @param fluidAmount + * Amount of Fluid */ public static void addMelting (FluidType type, ItemStack input, int temperatureDifference, int fluidAmount) { @@ -201,7 +224,7 @@ public class Smeltery if (temp <= 20) temp = type.baseTemperature; - addMelting(input, new ItemStack(type.renderBlock).getItem(), type.renderMeta, type.baseTemperature + temperatureDifference, new FluidStack(type.fluid, fluidAmount)); + addMelting(input, type.renderBlock, type.renderMeta, type.baseTemperature + temperatureDifference, new FluidStack(type.fluid, fluidAmount)); } /** @@ -209,14 +232,18 @@ public class Smeltery * * @author samtrion * - * @param oreName oreDictionary name e.g. oreIron - * @param type Type of Fluid - * @param temperatureDifference Difference between FluidType BaseTemperature - * @param fluidAmount Amount of Fluid + * @param oreName + * oreDictionary name e.g. oreIron + * @param type + * Type of Fluid + * @param temperatureDifference + * Difference between FluidType BaseTemperature + * @param fluidAmount + * Amount of Fluid */ public static void addDictionaryMelting (String oreName, FluidType type, int temperatureDifference, int fluidAmount) { for (ItemStack is : OreDictionary.getOres(oreName)) addMelting(type, is, temperatureDifference, fluidAmount); } -} +} \ No newline at end of file diff --git a/src/main/java/tconstruct/library/crafting/ToolBuilder.java b/src/main/java/tconstruct/library/crafting/ToolBuilder.java index e4ad5421..3194c70b 100644 --- a/src/main/java/tconstruct/library/crafting/ToolBuilder.java +++ b/src/main/java/tconstruct/library/crafting/ToolBuilder.java @@ -50,7 +50,7 @@ public class ToolBuilder public static void addNormalToolRecipe (ToolCore output, Item head, Item handle, Item accessory) { - //instance.combos.add(new ToolRecipe(head, accessory, output)); + // instance.combos.add(new ToolRecipe(head, accessory, output)); ToolRecipe recipe = instance.recipeList.get(output.getToolName()); if (recipe != null) { @@ -109,7 +109,7 @@ public class ToolBuilder return null; } - //Builds a tool from the parts given + // Builds a tool from the parts given public ItemStack buildTool (ItemStack headStack, ItemStack handleStack, ItemStack accessoryStack, String name) { return buildTool(headStack, handleStack, accessoryStack, null, name); @@ -140,7 +140,10 @@ public class ToolBuilder return modifyArmor(headStack, new ItemStack[] { handleStack, accessoryStack, extraStack }, name); } - if (headStack == null || handleStack == null) //Nothing to build without these. All tools need at least two parts! + if (headStack == null || handleStack == null) // Nothing to build + // without these. All + // tools need at least + // two parts! return null; ToolCore item; @@ -163,10 +166,12 @@ public class ToolBuilder } else { - /*if (accessoryStack.getItem() instanceof IToolPart) - accessory = ((IToolPart) accessoryStack.getItem()).getMaterialID(accessoryStack); - else - return null;*/ + /* + * if (accessoryStack.getItem() instanceof IToolPart) accessory = + * ((IToolPart) + * accessoryStack.getItem()).getMaterialID(accessoryStack); else + * return null; + */ accessory = getMaterialID(accessoryStack); if (accessory == -1) @@ -174,10 +179,11 @@ public class ToolBuilder if (extraStack != null) { - /*if (extraStack.getItem() instanceof IToolPart) - extra = ((IToolPart) extraStack.getItem()).getMaterialID(extraStack); - else - return null;*/ + /* + * if (extraStack.getItem() instanceof IToolPart) extra = + * ((IToolPart) extraStack.getItem()).getMaterialID(extraStack); + * else return null; + */ extra = getMaterialID(extraStack); if (extra == -1) @@ -191,7 +197,7 @@ public class ToolBuilder } } - //TConstruct.logger.info("Valid: "+item); + // TConstruct.logger.info("Valid: "+item); if (item == null) return null; @@ -286,11 +292,16 @@ public class ToolBuilder compound.getCompoundTag("InfiTool").setInteger("RenderExtra", extra); } - compound.getCompoundTag("InfiTool").setInteger("Damage", 0); //Damage is damage to the tool + compound.getCompoundTag("InfiTool").setInteger("Damage", 0); // Damage + // is + // damage + // to + // the + // tool compound.getCompoundTag("InfiTool").setInteger("TotalDurability", durability); compound.getCompoundTag("InfiTool").setInteger("BaseDurability", durability); - compound.getCompoundTag("InfiTool").setInteger("BonusDurability", 0); //Modifier - compound.getCompoundTag("InfiTool").setFloat("ModDurability", 0f); //Modifier + compound.getCompoundTag("InfiTool").setInteger("BonusDurability", 0); // Modifier + compound.getCompoundTag("InfiTool").setFloat("ModDurability", 0f); // Modifier compound.getCompoundTag("InfiTool").setBoolean("Broken", false); compound.getCompoundTag("InfiTool").setInteger("Attack", attack); @@ -451,7 +462,7 @@ public class ToolBuilder return null; } - public void addArmorTag (ItemStack armor) //Not sure if temporary or not + public void addArmorTag (ItemStack armor) // Not sure if temporary or not { NBTTagCompound baseTag = new NBTTagCompound(); NBTTagList list = new NBTTagList(); diff --git a/src/main/java/tconstruct/library/crafting/ToolRecipe.java b/src/main/java/tconstruct/library/crafting/ToolRecipe.java index fd25c3ae..fca7033f 100644 --- a/src/main/java/tconstruct/library/crafting/ToolRecipe.java +++ b/src/main/java/tconstruct/library/crafting/ToolRecipe.java @@ -20,10 +20,10 @@ public class ToolRecipe protected ToolCore result; protected Item toolRod = TConstructRegistry.getItem("toolRod"); - /*public ToolRecipe(Item head, ToolCore tool) - { - this(head, TContent.toolRod, null, null, tool); - }*/ + /* + * public ToolRecipe(Item head, ToolCore tool) { this(head, + * TContent.toolRod, null, null, tool); } + */ public ToolRecipe(Item head, Item handle, ToolCore tool) { diff --git a/src/main/java/tconstruct/library/event/PartBuilderEvent.java b/src/main/java/tconstruct/library/event/PartBuilderEvent.java index 8b273a9e..8f79c236 100644 --- a/src/main/java/tconstruct/library/event/PartBuilderEvent.java +++ b/src/main/java/tconstruct/library/event/PartBuilderEvent.java @@ -29,12 +29,11 @@ public class PartBuilderEvent extends Event super(material, pattern, otherPattern); } - /** Fires before other processing is done + /** + * Fires before other processing is done * - * Result is significant: - * DEFAULT: Allows part to be crafted normally - * ALLOW: Uses resultStack instead - * DENY: Stops part crafting altogether + * Result is significant: DEFAULT: Allows part to be crafted normally + * ALLOW: Uses resultStack instead DENY: Stops part crafting altogether */ public void overrideResult (ItemStack[] result) diff --git a/src/main/java/tconstruct/library/event/ToolCraftEvent.java b/src/main/java/tconstruct/library/event/ToolCraftEvent.java index 1d5c27c9..55dfa53a 100644 --- a/src/main/java/tconstruct/library/event/ToolCraftEvent.java +++ b/src/main/java/tconstruct/library/event/ToolCraftEvent.java @@ -32,12 +32,11 @@ public class ToolCraftEvent extends Event super(tool, toolTag, materials); } - /** Fires just before the tool is put together + /** + * Fires just before the tool is put together * - * Result is significant: - * DEFAULT: Allows tool to be crafted normally - * ALLOW: Uses resultStack instead - * DENY: Stops tool crafting altogether + * Result is significant: DEFAULT: Allows tool to be crafted normally + * ALLOW: Uses resultStack instead DENY: Stops tool crafting altogether */ public void overrideResult (ItemStack result) diff --git a/src/main/java/tconstruct/library/tools/AbilityHelper.java b/src/main/java/tconstruct/library/tools/AbilityHelper.java index a63d6b50..0374f1eb 100644 --- a/src/main/java/tconstruct/library/tools/AbilityHelper.java +++ b/src/main/java/tconstruct/library/tools/AbilityHelper.java @@ -200,7 +200,7 @@ public class AbilityHelper { damageTool(stack, 1, tags, player, false); } - //damageTool(stack, 1, player, false); + // damageTool(stack, 1, player, false); tool.onEntityDamaged(player.worldObj, player, entity); if (!necroticUHS || (entity instanceof IMob && entity instanceof EntityLivingBase && ((EntityLivingBase) entity).getHealth() <= 0)) { @@ -240,7 +240,9 @@ public class AbilityHelper if (entity instanceof EntityLivingBase) { - DamageSource.causeThornsDamage(entity);//(((EntityLivingBase)player, (EntityLivingBase) entity); + DamageSource.causeThornsDamage(entity);// (((EntityLivingBase)player, + // (EntityLivingBase) + // entity); } } @@ -469,7 +471,7 @@ public class AbilityHelper public static void knockbackEntity (EntityLivingBase living, double boost) { living.motionX *= boost; - //living.motionY *= boost/2; + // living.motionY *= boost/2; living.motionZ *= boost; } @@ -527,19 +529,16 @@ public class AbilityHelper player.worldObj.spawnEntityInWorld(entityitem); if (!(player instanceof FakePlayer)) entityitem.onCollideWithPlayer(player); - /*if (!player.inventory.addItemStackToInventory(stack)) - { - if (!player.worldObj.isRemote) - { - EntityItem entityitem = new EntityItem(player.worldObj, player.posX + 0.5D, player.posY + 0.5D, player.posZ + 0.5D, stack); - player.worldObj.spawnEntityInWorld(entityitem); - entityitem.onCollideWithPlayer(player); - } - } - else - { - player.worldObj.playSoundAtEntity(player, "random.pop", 0.2F, ((random.nextFloat() - random.nextFloat()) * 0.7F + 1.0F) * 2.0F); - }*/ + /* + * if (!player.inventory.addItemStackToInventory(stack)) { if + * (!player.worldObj.isRemote) { EntityItem entityitem = new + * EntityItem(player.worldObj, player.posX + 0.5D, player.posY + 0.5D, + * player.posZ + 0.5D, stack); + * player.worldObj.spawnEntityInWorld(entityitem); + * entityitem.onCollideWithPlayer(player); } } else { + * player.worldObj.playSoundAtEntity(player, "random.pop", 0.2F, + * ((random.nextFloat() - random.nextFloat()) * 0.7F + 1.0F) * 2.0F); } + */ } /* Ranged weapons */ diff --git a/src/main/java/tconstruct/library/tools/CustomMaterial.java b/src/main/java/tconstruct/library/tools/CustomMaterial.java index 51147255..dfd243b0 100644 --- a/src/main/java/tconstruct/library/tools/CustomMaterial.java +++ b/src/main/java/tconstruct/library/tools/CustomMaterial.java @@ -17,10 +17,10 @@ public abstract class CustomMaterial this.craftingItem = craftingItem; } - /*public boolean matches(ItemStack input, ItemStack pattern) - { - if (ItemStack.areItemStacksEqual(this.input, input) && ItemStack.areItemStacksEqual(this.craftingPattern, pattern)) - return true; - return false; - }*/ + /* + * public boolean matches(ItemStack input, ItemStack pattern) { if + * (ItemStack.areItemStacksEqual(this.input, input) && + * ItemStack.areItemStacksEqual(this.craftingPattern, pattern)) return true; + * return false; } + */ } diff --git a/src/main/java/tconstruct/library/tools/HarvestTool.java b/src/main/java/tconstruct/library/tools/HarvestTool.java index e0ed95dc..fbd40941 100644 --- a/src/main/java/tconstruct/library/tools/HarvestTool.java +++ b/src/main/java/tconstruct/library/tools/HarvestTool.java @@ -30,7 +30,7 @@ public abstract class HarvestTool extends ToolCore World world = player.worldObj; Block block = player.worldObj.getBlock(x, y, z); int meta = world.getBlockMetadata(x, y, z); - //Block block = Block.blocksList[bID]; + // Block block = Block.blocksList[bID]; if (block == null || block == Blocks.air) return false; int hlvl = -1; @@ -130,7 +130,9 @@ public abstract class HarvestTool extends ToolCore } if (block.getHarvestLevel(meta) > 0) { - return calculateStrength(tags, block, meta); //No issue if the harvest level is too low + return calculateStrength(tags, block, meta); // No issue if the + // harvest level is + // too low } return super.getDigSpeed(stack, block, meta); } diff --git a/src/main/java/tconstruct/library/tools/TToolMaterial.java b/src/main/java/tconstruct/library/tools/TToolMaterial.java index 40660980..c9cc967c 100644 --- a/src/main/java/tconstruct/library/tools/TToolMaterial.java +++ b/src/main/java/tconstruct/library/tools/TToolMaterial.java @@ -5,7 +5,8 @@ package tconstruct.library.tools; */ public class TToolMaterial { - //mining level, durability, mining speed, baseDamage, handle modifier, Reinforced level, shoddy/spiny level, color/style on name + // mining level, durability, mining speed, baseDamage, handle modifier, + // Reinforced level, shoddy/spiny level, color/style on name public final String materialName; public final String displayName; diff --git a/src/main/java/tconstruct/library/tools/ToolCore.java b/src/main/java/tconstruct/library/tools/ToolCore.java index 1623ff57..99039772 100644 --- a/src/main/java/tconstruct/library/tools/ToolCore.java +++ b/src/main/java/tconstruct/library/tools/ToolCore.java @@ -30,35 +30,33 @@ import cofh.api.energy.IEnergyContainerItem; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -/** NBTTags - * Main tag - InfiTool +/** + * NBTTags Main tag - InfiTool + * * @see ToolBuilder * - * Required: - * Head: Base and render tag, above the handle - * Handle: Base and render tag, bottom layer + * Required: Head: Base and render tag, above the handle Handle: Base and + * render tag, bottom layer * - * Damage: Replacement for metadata - * MaxDamage: ItemStacks only read setMaxDamage() - * Broken: Represents whether the tool is broken (boolean) - * Attack: How much damage a mob will take - * MiningSpeed: The speed at which a tool mines + * Damage: Replacement for metadata MaxDamage: ItemStacks only read + * setMaxDamage() Broken: Represents whether the tool is broken (boolean) + * Attack: How much damage a mob will take MiningSpeed: The speed at which + * a tool mines * - * Others: - * Accessory: Base and tag, above head. Sword guards, binding, etc - * Effects: Render tag, top layer. Fancy effects like moss or diamond edge. - * Render order: Handle > Head > Accessory > Effect1 > Effect2 > Effect3 > etc - * Unbreaking: Reinforced in-game, 10% chance to not use durability per level - * Stonebound: Mines faster as the tool takes damage, but has less attack - * Spiny: Opposite of stonebound + * Others: Accessory: Base and tag, above head. Sword guards, binding, etc + * Effects: Render tag, top layer. Fancy effects like moss or diamond edge. + * Render order: Handle > Head > Accessory > Effect1 > Effect2 > Effect3 > + * etc Unbreaking: Reinforced in-game, 10% chance to not use durability per + * level Stonebound: Mines faster as the tool takes damage, but has less + * attack Spiny: Opposite of stonebound * - * Modifiers have their own tags. + * Modifiers have their own tags. * @see ToolMod */ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBattlegearWeapon { - //TE power constants -- TODO grab these from the items added + // TE power constants -- TODO grab these from the items added protected int capacity = 400000; protected int maxReceive = 75; protected int maxExtract = 75; @@ -81,10 +79,10 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa canRepair = false; } - /** Determines crafting behavior with regards to durability - * 0: None - * 1: Adds handle modifier - * 2: Averages part with the rest of the tool (head) + /** + * Determines crafting behavior with regards to durability 0: None 1: Adds + * handle modifier 2: Averages part with the rest of the tool (head) + * * @return type */ @@ -122,7 +120,7 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa public HashMap effectIcons = new HashMap(); public HashMap extraIcons = new HashMap(); - //Not liking this + // Not liking this public HashMap headStrings = new HashMap(); public HashMap brokenPartStrings = new HashMap(); public HashMap handleStrings = new HashMap(); @@ -150,7 +148,7 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa return false; } - //Override me please! + // Override me please! public int getPartAmount () { return 3; @@ -513,7 +511,7 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa return ret; } - //Used for sounds and the like + // Used for sounds and the like public void onEntityDamaged (World world, EntityLivingBase player, Entity entity) { @@ -546,7 +544,11 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa boolean supress = false; try { - clazz = Class.forName("tconstruct.common.TRepo"); //TODO: Make sure this is still working in 1.7. + clazz = Class.forName("tconstruct.common.TRepo"); // TODO: Make + // sure this + // is still + // working + // in 1.7. fld = clazz.getField("supressMissingToolLogs"); supress = fld.getBoolean(fld); } @@ -579,7 +581,7 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa public Item getHandleItem () { - return TConstructRegistry.getItem("toolRod");//TContent.toolRod; + return TConstructRegistry.getItem("toolRod");// TContent.toolRod; } /* Updating */ @@ -595,10 +597,10 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa /* Tool uses */ - //Types + // Types public abstract String[] toolCategories (); - //Mining + // Mining @Override public boolean onBlockStartBreak (ItemStack stack, int x, int y, int z, EntityPlayer player) { @@ -660,7 +662,7 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa return this.damageVsEntity; } - //Changes how much durability the base tool has + // Changes how much durability the base tool has public float getDurabilityModifier () { return 1f; @@ -676,11 +678,12 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa return 1.0f; } - //Right-click + // Right-click public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float clickX, float clickY, float clickZ) { - /*if (world.isRemote) - return true;*/ + /* + * if (world.isRemote) return true; + */ boolean used = false; int hotbarSlot = player.inventory.currentItem; @@ -745,11 +748,13 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa } } - /*if (used) //Update client - { - Packet103SetSlot packet = new Packet103SetSlot(player.openContainer.windowId, itemSlot, nearbyStack); - ((EntityPlayerMP)player).playerNetServerHandler.sendPacketToPlayer(packet); - }*/ + /* + * if (used) //Update client { Packet103SetSlot packet = new + * Packet103SetSlot(player.openContainer.windowId, itemSlot, + * nearbyStack); + * ((EntityPlayerMP)player).playerNetServerHandler.sendPacketToPlayer + * (packet); } + */ return used; } @@ -895,7 +900,7 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa { } - //TE support section -- from COFH core API reference section + // TE support section -- from COFH core API reference section public void setMaxTransfer (int maxTransfer) { setMaxReceive(maxTransfer); @@ -970,5 +975,5 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa return 0; return capacity; } - //end of TE support section + // end of TE support section } diff --git a/src/main/java/tconstruct/library/tools/ToolMod.java b/src/main/java/tconstruct/library/tools/ToolMod.java index abf63fcf..85683f50 100644 --- a/src/main/java/tconstruct/library/tools/ToolMod.java +++ b/src/main/java/tconstruct/library/tools/ToolMod.java @@ -17,7 +17,7 @@ public abstract class ToolMod public ToolMod(ItemStack[] items, int effect, String dataKey) { - //recipeItems = items; + // recipeItems = items; List itemstacks = new ArrayList(); for (int iter = 0; iter < items.length; iter++) itemstacks.add(items[iter]); @@ -26,11 +26,14 @@ public abstract class ToolMod key = dataKey; } - /** Checks to see if the inputs match the stored items - * Note: Works like ShapelessRecipes + /** + * Checks to see if the inputs match the stored items Note: Works like + * ShapelessRecipes * - * @param input The ItemStacks to compare against - * @param tool Item to modify, used for restrictions + * @param input + * The ItemStacks to compare against + * @param tool + * Item to modify, used for restrictions * @return Whether the recipe matches the input */ public boolean matches (ItemStack[] input, ItemStack tool) @@ -78,7 +81,8 @@ public abstract class ToolMod /** * - * @param tool Tool to compare against + * @param tool + * Tool to compare against * @return Whether the tool can be modified */ @@ -88,10 +92,14 @@ public abstract class ToolMod return tags.getInteger("Modifiers") > 0; } - /** Modifies the tool. Adds nbttags, changes existing ones, ticks down modification counter, etc + /** + * Modifies the tool. Adds nbttags, changes existing ones, ticks down + * modification counter, etc * - * @param input ItemStacks to pull info from - * @param tool The tool to modify + * @param input + * ItemStacks to pull info from + * @param tool + * The tool to modify */ public abstract void modify (ItemStack[] input, ItemStack tool); diff --git a/src/main/java/tconstruct/library/tools/Weapon.java b/src/main/java/tconstruct/library/tools/Weapon.java index ce1942ca..37423105 100644 --- a/src/main/java/tconstruct/library/tools/Weapon.java +++ b/src/main/java/tconstruct/library/tools/Weapon.java @@ -46,7 +46,8 @@ public abstract class Weapon extends ToolCore } /** - * returns the action that specifies what animation to play when the items is being used + * returns the action that specifies what animation to play when the items + * is being used */ public EnumAction getItemUseAction (ItemStack par1ItemStack) { @@ -62,7 +63,8 @@ public abstract class Weapon extends ToolCore } /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer + * Called whenever this item is equipped and the right mouse button is + * pressed. Args: itemStack, world, entityPlayer */ public ItemStack onItemRightClick (ItemStack stack, World world, EntityPlayer player) { @@ -110,12 +112,11 @@ public abstract class Weapon extends ToolCore } } - /*@Override - public boolean onLeftClickEntity (ItemStack stack, EntityPlayer player, Entity entity) - { - TContent.modL.midStreamModify(stack); - return super.onLeftClickEntity(stack, player, entity); - }*/ + /* + * @Override public boolean onLeftClickEntity (ItemStack stack, EntityPlayer + * player, Entity entity) { TContent.modL.midStreamModify(stack); return + * super.onLeftClickEntity(stack, player, entity); } + */ @Override public String[] toolCategories () diff --git a/src/main/java/tconstruct/library/util/IToolPart.java b/src/main/java/tconstruct/library/util/IToolPart.java index eff96d40..5df9d75f 100644 --- a/src/main/java/tconstruct/library/util/IToolPart.java +++ b/src/main/java/tconstruct/library/util/IToolPart.java @@ -4,9 +4,11 @@ import net.minecraft.item.ItemStack; public interface IToolPart { - /** Parts to build tools from. ex: Pickaxe Head + /** + * Parts to build tools from. ex: Pickaxe Head * - * @param stack This item + * @param stack + * This item * @return Proper material ID. -1 for invalid */ public int getMaterialID (ItemStack stack); diff --git a/src/main/java/tconstruct/modifiers/tools/ModAutoSmelt.java b/src/main/java/tconstruct/modifiers/tools/ModAutoSmelt.java index c640c768..b5805078 100644 --- a/src/main/java/tconstruct/modifiers/tools/ModAutoSmelt.java +++ b/src/main/java/tconstruct/modifiers/tools/ModAutoSmelt.java @@ -17,7 +17,18 @@ public class ModAutoSmelt extends ModBoolean NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); if (tags.getBoolean("Silk Touch")) return false; - return tags.getInteger("Modifiers") > 0 && !tags.getBoolean(key); //Will fail if the modifier is false or the tag doesn't exist + return tags.getInteger("Modifiers") > 0 && !tags.getBoolean(key); // Will + // fail + // if + // the + // modifier + // is + // false + // or + // the + // tag + // doesn't + // exist } } diff --git a/src/main/java/tconstruct/modifiers/tools/ModBoolean.java b/src/main/java/tconstruct/modifiers/tools/ModBoolean.java index 28ebddfc..0ce5a8b7 100644 --- a/src/main/java/tconstruct/modifiers/tools/ModBoolean.java +++ b/src/main/java/tconstruct/modifiers/tools/ModBoolean.java @@ -22,7 +22,18 @@ public class ModBoolean extends ToolMod protected boolean canModify (ItemStack tool, ItemStack[] input) { NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); - return tags.getInteger("Modifiers") > 0 && !tags.getBoolean(key); //Will fail if the modifier is false or the tag doesn't exist + return tags.getInteger("Modifiers") > 0 && !tags.getBoolean(key); // Will + // fail + // if + // the + // modifier + // is + // false + // or + // the + // tag + // doesn't + // exist } @Override @@ -31,7 +42,7 @@ public class ModBoolean extends ToolMod NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool"); tags.setBoolean(key, true); - //TConstruct.logger.info("Key: "+key+" "+tags.getBoolean(key)); + // TConstruct.logger.info("Key: "+key+" "+tags.getBoolean(key)); int modifiers = tags.getInteger("Modifiers"); modifiers -= 1; diff --git a/src/main/java/tconstruct/modifiers/tools/ModRedstone.java b/src/main/java/tconstruct/modifiers/tools/ModRedstone.java index 1dd1b63f..d3211c81 100644 --- a/src/main/java/tconstruct/modifiers/tools/ModRedstone.java +++ b/src/main/java/tconstruct/modifiers/tools/ModRedstone.java @@ -95,7 +95,7 @@ public class ModRedstone extends ToolModTypeFilter if (tags.hasKey("DrawSpeed")) { - //int drawSpeed = tags.getInteger("DrawSpeed"); + // int drawSpeed = tags.getInteger("DrawSpeed"); int baseDrawSpeed = tags.getInteger("BaseDrawSpeed"); int drawSpeed = (int) (baseDrawSpeed - (0.1f * baseDrawSpeed * (keyPair[0] / 50f))); tags.setInteger("DrawSpeed", drawSpeed); diff --git a/src/main/java/tconstruct/modifiers/tools/ModReinforced.java b/src/main/java/tconstruct/modifiers/tools/ModReinforced.java index 757c57d2..f537d24b 100644 --- a/src/main/java/tconstruct/modifiers/tools/ModReinforced.java +++ b/src/main/java/tconstruct/modifiers/tools/ModReinforced.java @@ -47,7 +47,7 @@ public class ModReinforced extends ModInteger String tip = "Tooltip" + tipNum; if (!tags.hasKey(tip)) { - //tags.setString(tip, tooltip); + // tags.setString(tip, tooltip); String modTip = "ModifierTip" + tipNum; String tag = tags.getString(modTip); tags.setString(modTip, getProperName(modifierTip, tag)); @@ -59,7 +59,7 @@ public class ModReinforced extends ModInteger String tag = tags.getString(modTip); if (tag.contains(modifierTip)) { - //tags.setString(tip, getProperName(tooltip, tag)); + // tags.setString(tip, getProperName(tooltip, tag)); tag = tags.getString(modTip); tags.setString(modTip, getProperName(modifierTip, tag)); return tipNum; diff --git a/src/main/java/tconstruct/modifiers/tools/TActiveOmniMod.java b/src/main/java/tconstruct/modifiers/tools/TActiveOmniMod.java index 3835c58c..fabcbe89 100644 --- a/src/main/java/tconstruct/modifiers/tools/TActiveOmniMod.java +++ b/src/main/java/tconstruct/modifiers/tools/TActiveOmniMod.java @@ -59,7 +59,7 @@ public class TActiveOmniMod extends ActiveToolMod World world = entity.worldObj; Block block = entity.worldObj.getBlock(x, y, z); int meta = world.getBlockMetadata(x, y, z); - //TODO do we need the next to lines???????? + // TODO do we need the next to lines???????? if (block == null) return false; diff --git a/src/main/java/tconstruct/modifiers/tools/ToolModTypeFilter.java b/src/main/java/tconstruct/modifiers/tools/ToolModTypeFilter.java index 05c7ea73..26546821 100644 --- a/src/main/java/tconstruct/modifiers/tools/ToolModTypeFilter.java +++ b/src/main/java/tconstruct/modifiers/tools/ToolModTypeFilter.java @@ -21,11 +21,14 @@ public abstract class ToolModTypeFilter extends ToolMod } } - /** Checks to see if the inputs match the stored items - * Note: Filters types, doesn't care about amount + /** + * Checks to see if the inputs match the stored items Note: Filters types, + * doesn't care about amount * - * @param input The ItemStacks to compare against - * @param tool Item to modify, used for restrictions + * @param input + * The ItemStacks to compare against + * @param tool + * Item to modify, used for restrictions * @return Whether the recipe matches the input */ @Override @@ -91,10 +94,13 @@ public abstract class ToolModTypeFilter extends ToolMod return amount; } - /** Adds a new itemstack to the list for increases + /** + * Adds a new itemstack to the list for increases * - * @param stack ItemStack to compare against - * @param amount Amount to increase + * @param stack + * ItemStack to compare against + * @param amount + * Amount to increase */ public void addStackToMatchList (ItemStack stack, int amount) { diff --git a/src/main/java/tconstruct/plugins/ICompatPlugin.java b/src/main/java/tconstruct/plugins/ICompatPlugin.java index f4519bf6..804454d1 100644 --- a/src/main/java/tconstruct/plugins/ICompatPlugin.java +++ b/src/main/java/tconstruct/plugins/ICompatPlugin.java @@ -2,9 +2,10 @@ package tconstruct.plugins; /** * Interface for TiC compat plugins. - * - * Do not include mod API usage directly in this file except for IMC! This must be constructable even - * when the target mod isn't available due to Java not allowing static abstracts. + * + * Do not include mod API usage directly in this file except for IMC! This must + * be constructable even when the target mod isn't available due to Java not + * allowing static abstracts. */ public interface ICompatPlugin { diff --git a/src/main/java/tconstruct/plugins/PluginController.java b/src/main/java/tconstruct/plugins/PluginController.java index cc3bc5ae..3021cdae 100644 --- a/src/main/java/tconstruct/plugins/PluginController.java +++ b/src/main/java/tconstruct/plugins/PluginController.java @@ -42,11 +42,14 @@ public class PluginController /** * Register a plugin with the controller. - * - * Warning: Make sure your plugin class imports no APIs directly! Any API interaction should be done by handlers called in pre/init/post so - * merely creating an instance to check the mod ID isn't a hazard to the controller. - * - * @param plugin Plugin to register + * + * Warning: Make sure your plugin class imports no APIs directly! Any API + * interaction should be done by handlers called in pre/init/post so merely + * creating an instance to check the mod ID isn't a hazard to the + * controller. + * + * @param plugin + * Plugin to register */ public void registerPlugin (ICompatPlugin plugin) { @@ -58,7 +61,8 @@ public class PluginController loadPlugin(plugin); } - // This does the actual plugin loading if mod is present; needed to allow force-enabling. + // This does the actual plugin loading if mod is present; needed to allow + // force-enabling. private void loadPlugin (ICompatPlugin plugin) { if (!Loader.isModLoaded(plugin.getModId())) @@ -117,10 +121,10 @@ public class PluginController registerPlugin(new AppEng()); registerPlugin(new BuildcraftTransport()); - //registerPlugin(new ForgeMultiPart()); + // registerPlugin(new ForgeMultiPart()); registerPlugin(new IC2()); // registerPlugin(new MineFactoryReloaded()); - //registerPlugin(new NotEnoughItems()); + // registerPlugin(new NotEnoughItems()); registerPlugin(new Thaumcraft()); // registerPlugin(new Waila()); } diff --git a/src/main/java/tconstruct/plugins/ic2/IC2.java b/src/main/java/tconstruct/plugins/ic2/IC2.java index 1d3df442..a0cd44b5 100644 --- a/src/main/java/tconstruct/plugins/ic2/IC2.java +++ b/src/main/java/tconstruct/plugins/ic2/IC2.java @@ -38,35 +38,45 @@ public class IC2 implements ICompatPlugin return; // Useful stuff - //ItemStack ingotCast = new ItemStack(TRepo.metalPattern, 1, 0); - //ItemStack gemCast = new ItemStack(TRepo.metalPattern, 1, 26); - //FluidStack fluidStack = new FluidStack(fluidUUM, 1); + // ItemStack ingotCast = new ItemStack(TRepo.metalPattern, 1, 0); + // ItemStack gemCast = new ItemStack(TRepo.metalPattern, 1, 26); + // FluidStack fluidStack = new FluidStack(fluidUUM, 1); FluidStack fluidStackBlock = new FluidStack(fluidUUM, 4500); - //LiquidCasting tableCasting = TConstructRegistry.getTableCasting(); + // LiquidCasting tableCasting = TConstructRegistry.getTableCasting(); LiquidCasting basinCasting = TConstructRegistry.getBasinCasting(); // Table casting - //tableCasting.addCastingRecipe(new ItemStack(Item.ingotIron), fluidStack, ingotCast, 20); - //tableCasting.addCastingRecipe(new ItemStack(Item.emerald), fluidStack, gemCast, 20); + // tableCasting.addCastingRecipe(new ItemStack(Item.ingotIron), + // fluidStack, ingotCast, 20); + // tableCasting.addCastingRecipe(new ItemStack(Item.emerald), + // fluidStack, gemCast, 20); // Block casting - //basinCasting.addCastingRecipe(new ItemStack(Block.blockIron), fluidStackBlock, null, true, 50); // Iron convenience + // basinCasting.addCastingRecipe(new ItemStack(Block.blockIron), + // fluidStackBlock, null, true, 50); // Iron convenience // Dirt <-> Diamonds - //basinCasting.addCastingRecipe(new ItemStack(Block.dirt), new FluidStack(fluidUUM, 500), new ItemStack(Block.blockDiamond), true, 50); + // basinCasting.addCastingRecipe(new ItemStack(Block.dirt), new + // FluidStack(fluidUUM, 500), new ItemStack(Block.blockDiamond), true, + // 50); basinCasting.addCastingRecipe(new ItemStack(Blocks.diamond_block), fluidStackBlock, new ItemStack(Blocks.dirt), true, 50); // RS cycle - //basinCasting.addCastingRecipe(new ItemStack(Block.blockRedstone), fluidStack, new ItemStack(Item.redstone), true, 50); - //basinCasting.addCastingRecipe(new ItemStack(Block.hardenedClay, 14, 1), fluidStack, new ItemStack(Block.blockRedstone), true, 50); - //basinCasting.addCastingRecipe(new ItemStack(Item.dyePowder, 1, 1), fluidStack, new ItemStack(Block.hardenedClay, 14, 1), true, 50); - //basinCasting.addCastingRecipe(new ItemStack(Block.blockRedstone), fluidStack, new ItemStack(Item.dyePowder, 1, 1), true, 50); + // basinCasting.addCastingRecipe(new ItemStack(Block.blockRedstone), + // fluidStack, new ItemStack(Item.redstone), true, 50); + // basinCasting.addCastingRecipe(new ItemStack(Block.hardenedClay, 14, + // 1), fluidStack, new ItemStack(Block.blockRedstone), true, 50); + // basinCasting.addCastingRecipe(new ItemStack(Item.dyePowder, 1, 1), + // fluidStack, new ItemStack(Block.hardenedClay, 14, 1), true, 50); + // basinCasting.addCastingRecipe(new ItemStack(Block.blockRedstone), + // fluidStack, new ItemStack(Item.dyePowder, 1, 1), true, 50); // Alloy Mixing // 1mB Anything + 1mB UU = 2mB UU - /* Maybe a bit *too* trolly - for (Map.Entry ent : FluidRegistry.getRegisteredFluids().entrySet()) { - if (ent.getValue() != fluidUUM) - Smeltery.addAlloyMixing(new FluidStack(fluidUUM, 2), new FluidStack(fluidUUM, 1), new FluidStack(ent.getValue(), 1)); - }*/ + /* + * Maybe a bit *too* trolly for (Map.Entry ent : + * FluidRegistry.getRegisteredFluids().entrySet()) { if (ent.getValue() + * != fluidUUM) Smeltery.addAlloyMixing(new FluidStack(fluidUUM, 2), new + * FluidStack(fluidUUM, 1), new FluidStack(ent.getValue(), 1)); } + */ } @Override diff --git a/src/main/java/tconstruct/preloader/ASMInterfaceRepair.java b/src/main/java/tconstruct/preloader/ASMInterfaceRepair.java index b2a1f0a1..b5fb7722 100644 --- a/src/main/java/tconstruct/preloader/ASMInterfaceRepair.java +++ b/src/main/java/tconstruct/preloader/ASMInterfaceRepair.java @@ -74,13 +74,15 @@ public class ASMInterfaceRepair implements IClassTransformer try { obj = Class.forName(inf.replace("/", ".")); - //obj = ReflectionHelper.getClass( getClass().getClassLoader(), inf.replace( "/", "." ) ); + // obj = ReflectionHelper.getClass( getClass().getClassLoader(), + // inf.replace( "/", "." ) ); } catch (Throwable _) { } - // java.io.InputStream is = this.getClass().getResourceAsStream( "/" + inf + ".class" ); + // java.io.InputStream is = this.getClass().getResourceAsStream( "/" + + // inf + ".class" ); APIInterfaces.put(inf, isAvailable = (obj != null)); return isAvailable; } diff --git a/src/main/java/tconstruct/preloader/helpers/PropertyManager.java b/src/main/java/tconstruct/preloader/helpers/PropertyManager.java index 708f6692..7ef71541 100644 --- a/src/main/java/tconstruct/preloader/helpers/PropertyManager.java +++ b/src/main/java/tconstruct/preloader/helpers/PropertyManager.java @@ -10,9 +10,10 @@ import tconstruct.preloader.TConstructLoaderContainer; /** * TCon Preloader properties file helper. - * - * We need this as at an early stage as we don't have access to Forge's Configuration object. - * + * + * We need this as at an early stage as we don't have access to Forge's + * Configuration object. + * * @author Sunstrike */ public class PropertyManager @@ -30,8 +31,10 @@ public class PropertyManager /** * Gets or creates the TCorestruct properties file. - * - * @throws PropAccessException Thrown if a properties file wasn't found and could not be created. Should be treated as a SEVERE log message. + * + * @throws PropAccessException + * Thrown if a properties file wasn't found and could not be + * created. Should be treated as a SEVERE log message. * @return True if loaded from disk, false if file created instead. */ public static boolean getOrCreateProps () throws PropAccessException diff --git a/src/main/java/tconstruct/util/DamageSourceLandmine.java b/src/main/java/tconstruct/util/DamageSourceLandmine.java index 4a7b6477..ef878c9f 100644 --- a/src/main/java/tconstruct/util/DamageSourceLandmine.java +++ b/src/main/java/tconstruct/util/DamageSourceLandmine.java @@ -15,7 +15,7 @@ public class DamageSourceLandmine extends DamageSource public IChatComponent func_151519_b (EntityLivingBase par1EntityLivingBase) { - //TODO getDeathMessage???? + // TODO getDeathMessage???? return super.func_151519_b(par1EntityLivingBase); } diff --git a/src/main/java/tconstruct/util/EnvironmentChecks.java b/src/main/java/tconstruct/util/EnvironmentChecks.java index 23d9fbd6..c950f98f 100644 --- a/src/main/java/tconstruct/util/EnvironmentChecks.java +++ b/src/main/java/tconstruct/util/EnvironmentChecks.java @@ -20,8 +20,9 @@ public class EnvironmentChecks } // Singleton /** - * Checks for conflicting stuff in environment; adds callable to any crash logs if so. - * Note: This code adds additional data to crashlogs. It does not trigger any crashes. + * Checks for conflicting stuff in environment; adds callable to any crash + * logs if so. Note: This code adds additional data to crashlogs. It does + * not trigger any crashes. */ private static List incompatibilities = new ArrayList(); private static EnvironmentChecks instance = new EnvironmentChecks(); @@ -38,7 +39,8 @@ public class EnvironmentChecks incompatibilities.add("GregTech"); } - // Bukkit/Magic Launcher/Optifine are caught by Mantle, so we no longer check for those. + // Bukkit/Magic Launcher/Optifine are caught by Mantle, so we no longer + // check for those. if (modIds.size() == 0) { diff --git a/src/main/java/tconstruct/util/TCraftingHandler.java b/src/main/java/tconstruct/util/TCraftingHandler.java index 937ff653..74a36174 100644 --- a/src/main/java/tconstruct/util/TCraftingHandler.java +++ b/src/main/java/tconstruct/util/TCraftingHandler.java @@ -12,11 +12,13 @@ import tconstruct.util.player.TPlayerStats; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.PlayerEvent.ItemCraftedEvent; -public class TCraftingHandler //implements ICraftingHandler +public class TCraftingHandler // implements ICraftingHandler { @SubscribeEvent - public void onCrafting (ItemCraftedEvent event)//EntityPlayer player, ItemStack itemstack, IInventory craftMatrix) + public void onCrafting (ItemCraftedEvent event)// EntityPlayer player, + // ItemStack itemstack, + // IInventory craftMatrix) { Item item = event.crafting.getItem(); if (!event.player.worldObj.isRemote) diff --git a/src/main/java/tconstruct/util/TDispenserBehaviorArrow.java b/src/main/java/tconstruct/util/TDispenserBehaviorArrow.java index 9b6c0dc5..8a362f2e 100644 --- a/src/main/java/tconstruct/util/TDispenserBehaviorArrow.java +++ b/src/main/java/tconstruct/util/TDispenserBehaviorArrow.java @@ -15,9 +15,9 @@ public class TDispenserBehaviorArrow extends BehaviorDefaultDispenseItem public ItemStack dispenseStack (IBlockSource dispenser, ItemStack stack) { World world = dispenser.getWorld(); - //TODO getIPositionFromBlockSource + // TODO getIPositionFromBlockSource IPosition iposition = BlockDispenser.func_149939_a(dispenser); - //TODO getFacing + // TODO getFacing EnumFacing enumfacing = BlockDispenser.func_149937_b(dispenser.getBlockMetadata()); ItemStack arrowItem = stack.splitStack(1); diff --git a/src/main/java/tconstruct/util/TDispenserBehaviorSpawnEgg.java b/src/main/java/tconstruct/util/TDispenserBehaviorSpawnEgg.java index a1dabb86..ccdc863f 100644 --- a/src/main/java/tconstruct/util/TDispenserBehaviorSpawnEgg.java +++ b/src/main/java/tconstruct/util/TDispenserBehaviorSpawnEgg.java @@ -11,7 +11,8 @@ import tconstruct.items.TitleIcon; public class TDispenserBehaviorSpawnEgg extends BehaviorDefaultDispenseItem { /** - * Dispense the specified stack, play the dispense sound and spawn particles. + * Dispense the specified stack, play the dispense sound and spawn + * particles. */ public ItemStack dispenseStack (IBlockSource par1IBlockSource, ItemStack par2ItemStack) { diff --git a/src/main/java/tconstruct/util/TEventHandler.java b/src/main/java/tconstruct/util/TEventHandler.java index 66965eaa..c52c1d35 100644 --- a/src/main/java/tconstruct/util/TEventHandler.java +++ b/src/main/java/tconstruct/util/TEventHandler.java @@ -33,7 +33,6 @@ import net.minecraft.world.GameRules; import net.minecraft.world.World; import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.entity.living.LivingDropsEvent; -import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent; import net.minecraftforge.event.entity.player.BonemealEvent; @@ -57,7 +56,6 @@ import tconstruct.library.tools.FletchingMaterial; import tconstruct.library.tools.ToolCore; import tconstruct.library.tools.Weapon; import tconstruct.util.config.PHConstruct; -import tconstruct.util.player.ArmorExtended; import tconstruct.util.player.TPlayerStats; import cpw.mods.fml.common.eventhandler.Event; import cpw.mods.fml.common.eventhandler.Event.Result; @@ -236,7 +234,7 @@ public class TEventHandler if (event.entityLiving instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entityLiving; - //Cutlass + // Cutlass ItemStack stack = player.getCurrentEquippedItem(); if (stack != null && stack.getItem() == TRepo.cutlass && player.isUsingItem()) { @@ -290,19 +288,20 @@ public class TEventHandler event.drops.add(entityitem); } - //if (event.entityLiving.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot")) - //{ + // if + // (event.entityLiving.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot")) + // { if (!event.entityLiving.isChild()) { - /*if (event.entityLiving.getClass() == EntityCow.class) - { - int amount = random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + 1; - - for (int iter = 0; iter < amount; ++iter) - { - addDrops(event, new ItemStack(Item.leather, 1)); - } - }*/ + /* + * if (event.entityLiving.getClass() == EntityCow.class) { int + * amount = random.nextInt(3) + random.nextInt(1 + + * event.lootingLevel) + random.nextInt(3) + random.nextInt(1 + + * event.lootingLevel) + 1; + * + * for (int iter = 0; iter < amount; ++iter) { addDrops(event, new + * ItemStack(Item.leather, 1)); } } + */ if (event.entityLiving.getClass() == EntityChicken.class) { @@ -361,10 +360,12 @@ public class TEventHandler addDrops(event, new ItemStack(Items.skull, 1, 2)); } } - /*if (stack.getItem() == TRepo.breakerBlade && random.nextInt(100) < 10) //Swap out for real beheading - { - addDrops(event, new ItemStack(Item.skull.itemID, 1, 2)); - }*/ + /* + * if (stack.getItem() == TRepo.breakerBlade && + * random.nextInt(100) < 10) //Swap out for real beheading { + * addDrops(event, new ItemStack(Item.skull.itemID, 1, 2)); + * } + */ } } @@ -407,7 +408,7 @@ public class TEventHandler addDrops(event, new ItemStack(Items.ghast_tear, 1)); } } - //} + // } if (event.entityLiving instanceof EntityPlayer) { @@ -442,7 +443,9 @@ public class TEventHandler } } - GameRules rules = player.worldObj.getGameRules(); //Player is null if this crashes + GameRules rules = player.worldObj.getGameRules(); // Player is null + // if this + // crashes if (rules == null || !rules.getGameRuleBooleanValue("keepInventory")) { TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.getDisplayName()); @@ -477,14 +480,11 @@ public class TEventHandler event.drops.add(entityitem); } - /*@ForgeSubscribe - public void onLivingSpawn (EntityJoinWorldEvent event) - { - if (event.entity instanceof EntityXPOrb) - { - TConstruct.logger.info("Entity: " + event.entity); - } - }*/ + /* + * @ForgeSubscribe public void onLivingSpawn (EntityJoinWorldEvent event) { + * if (event.entity instanceof EntityXPOrb) { + * TConstruct.logger.info("Entity: " + event.entity); } } + */ @SubscribeEvent public void onLivingSpawn (LivingSpawnEvent.SpecialSpawn event) @@ -573,41 +573,26 @@ public class TEventHandler if (TRepo.fluidBlocks[id] instanceof LiquidMetalFinite) { WorldHelper.setBlockToAir(evt.world, hitX, hitY, hitZ); - /*int quanta = 0; - for (int posX = -1; posX <= 1; posX++) - { - for (int posZ = -1; posZ <= 1; posZ++) - { - int localID = evt.world.getBlockId(hitX + posX, hitY, hitZ + posZ); - if (localID == bID) - { - quanta += evt.world.getBlockMetadata(hitX + posX, hitY, hitZ + posZ) + 1; - } - } - } - - if (quanta >= 8) - { - while (quanta > 0) - { - for (int posX = -1; posX <= 1; posX++) - { - for (int posZ = -1; posZ <= 1; posZ++) - { - int localID = evt.world.getBlockId(hitX + posX, hitY, hitZ + posZ); - if (localID == bID) - { - quanta -= 1; - int meta = evt.world.getBlockMetadata(hitX + posX, hitY, hitZ + posZ); - if (meta > 0) - evt.world.setBlockMetadataWithNotify(hitX + posX, hitY, hitZ + posZ, meta - 1, 3); - else - evt.world.setBlockToAir(hitX + posX, hitY, hitZ + posZ); - } - } - } - } - }*/ + /* + * int quanta = 0; for (int posX = -1; posX <= 1; + * posX++) { for (int posZ = -1; posZ <= 1; posZ++) + * { int localID = evt.world.getBlockId(hitX + posX, + * hitY, hitZ + posZ); if (localID == bID) { quanta + * += evt.world.getBlockMetadata(hitX + posX, hitY, + * hitZ + posZ) + 1; } } } + * + * if (quanta >= 8) { while (quanta > 0) { for (int + * posX = -1; posX <= 1; posX++) { for (int posZ = + * -1; posZ <= 1; posZ++) { int localID = + * evt.world.getBlockId(hitX + posX, hitY, hitZ + + * posZ); if (localID == bID) { quanta -= 1; int + * meta = evt.world.getBlockMetadata(hitX + posX, + * hitY, hitZ + posZ); if (meta > 0) + * evt.world.setBlockMetadataWithNotify(hitX + posX, + * hitY, hitZ + posZ, meta - 1, 3); else + * evt.world.setBlockToAir(hitX + posX, hitY, hitZ + + * posZ); } } } } } + */ } else { @@ -621,31 +606,23 @@ public class TEventHandler } } } - //TODO 1.7 Fix this -- for ticking stuffs in extra armor slots - /*@SubscribeEvent - public void livingUpdate (LivingUpdateEvent event) - { - if (event.entityLiving instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) event.entityLiving; - TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.getDisplayName()); - if (stats != null) - { - ArmorExtended armor = stats.armor; - for (int i = 0; i < armor.getSizeInventory(); i++) - { - if (armor.getStackInSlot(i) != null) - { - armor.getStackInSlot(i).getItem().onUpdate(armor.getStackInSlot(i), player.worldObj, player, i, false); - armor.getStackInSlot(i).getItem().onArmorTick(player.worldObj, player, armor.getStackInSlot(i)); - } - } - } - } - }*/ + // TODO 1.7 Fix this -- for ticking stuffs in extra armor slots + /* + * @SubscribeEvent public void livingUpdate (LivingUpdateEvent event) { if + * (event.entityLiving instanceof EntityPlayer) { EntityPlayer player = + * (EntityPlayer) event.entityLiving; TPlayerStats stats = + * TConstruct.playerTracker.getPlayerStats(player.getDisplayName()); + * + * if (stats != null) { ArmorExtended armor = stats.armor; for (int i = 0; i + * < armor.getSizeInventory(); i++) { if (armor.getStackInSlot(i) != null) { + * armor.getStackInSlot(i).getItem().onUpdate(armor.getStackInSlot(i), + * player.worldObj, player, i, false); + * armor.getStackInSlot(i).getItem().onArmorTick(player.worldObj, player, + * armor.getStackInSlot(i)); } } } } } + */ - //Player interact event - prevent breaking of tank air blocks in creative + // Player interact event - prevent breaking of tank air blocks in creative @SubscribeEvent public void playerInteract (PlayerInteractEvent event) { diff --git a/src/main/java/tconstruct/util/config/PHConstruct.java b/src/main/java/tconstruct/util/config/PHConstruct.java index 2d8c44e2..6ac6bcf0 100644 --- a/src/main/java/tconstruct/util/config/PHConstruct.java +++ b/src/main/java/tconstruct/util/config/PHConstruct.java @@ -141,31 +141,31 @@ public class PHConstruct freePatterns = config.get("Ultra Hardcore Changes", "Add Patterns to Pattern Chests", false, "Gives all tier 1 patterns when pattern chest is placed").getBoolean(false); AbilityHelper.necroticUHS = config.get("Ultra Hardcore Changes", "Necrotic modifier only heals on hostile mob kills", false).getBoolean(false); - //Slime pools + // Slime pools islandRarity = config.get("Worldgen", "Slime Island Rarity", 1450).getInt(1450); - //Looks + // Looks Property conTexMode = config.get("Looks", "Connected Textures Enabled", true); conTexMode.comment = "0 = disabled, 1 = enabled, 2 = enabled + ignore stained glass meta"; connectedTexturesMode = conTexMode.getInt(2); - //dimension blacklist + // dimension blacklist cfgDimBlackList = config.get("DimBlackList", "SlimeIslandDimBlacklist", new int[] {}, "Add dimension ID's to prevent slime islands from generating in them").getIntList(); slimeIslGenDim0Only = config.get("DimBlackList", "GenerateSlimeIslandInDim0Only", false, "True: slime islands wont generate in any ages other than overworld(if enabled); False: will generate in all non-blackisted ages").getBoolean(false); slimeIslGenDim0 = config.get("DimBlackList", "slimeIslGenDim0", true, "True: slime islands generate in overworld; False they do not generate").getBoolean(true); genIslandsFlat = config.get("DimBlacklist", "genIslandsFlat", false, "Generate slime islands in flat worlds").getBoolean(false); - //Experimental functionality + // Experimental functionality throwableSmeltery = config.get("Experimental", "Items can be thrown into smelteries", true).getBoolean(true); newSmeltery = config.get("Experimental", "Use new adaptive Smeltery code", false, "Warning: Very buggy").getBoolean(false); meltableHorses = config.get("Experimental", "Allow horses to be melted down for glue", true).getBoolean(true); - //Addon stuff + // Addon stuff isCleaverTwoHanded = config.get("Battlegear", "Can Cleavers have shields", true).getBoolean(true); isHatchetWeapon = config.get("Battlegear", "Are Hatches also weapons", true).getBoolean(true); - //Achievement Properties + // Achievement Properties achievementsEnabled = config.get("Achievement Properties", "AchievementsEnabled", true).getBoolean(true); /* Save the configuration file */ @@ -182,7 +182,7 @@ public class PHConstruct } } - //Ore values + // Ore values public static boolean generateCopper; public static boolean generateTin; public static boolean generateAluminum; @@ -246,9 +246,9 @@ public class PHConstruct public static int seaLevel; - //Mobs + // Mobs - //Difficulty modifiers + // Difficulty modifiers public static boolean keepHunger; public static boolean keepLevels; public static boolean alphaRegen; @@ -277,7 +277,7 @@ public class PHConstruct public static boolean miningLevelIncrease; public static boolean denyMattock; - //Smeltery Output Modification + // Smeltery Output Modification public static double ingotsPerOre; public static double ingotsBronzeAlloy; public static double ingotsAluminumBrassAlloy; @@ -286,7 +286,7 @@ public class PHConstruct public static double ingotsPigironAlloy; public static boolean craftEndstone; - //Ultra Hardcore modifiers + // Ultra Hardcore modifiers public static boolean enableHealthRegen; public static boolean goldAppleRecipe; public static boolean dropPlayerHeads; @@ -296,7 +296,7 @@ public class PHConstruct public static boolean freePatterns; public static int goldHead; - //Superfun + // Superfun public static boolean superfunWorld; public static boolean beginnerBook; @@ -305,25 +305,25 @@ public class PHConstruct public static int islandRarity; - //Looks + // Looks public static int connectedTexturesMode; public static File cfglocation; - //dimensionblacklist + // dimensionblacklist public static boolean slimeIslGenDim0Only; public static int[] cfgDimBlackList; public static boolean slimeIslGenDim0; public static boolean genIslandsFlat; - //Experimental functionality + // Experimental functionality public static boolean throwableSmeltery; public static boolean newSmeltery; public static boolean meltableHorses; - //Addon stuff + // Addon stuff public static boolean isCleaverTwoHanded; public static boolean isHatchetWeapon; - //Achievement options + // Achievement options public static boolean achievementsEnabled; } diff --git a/src/main/java/tconstruct/util/landmine/Helper.java b/src/main/java/tconstruct/util/landmine/Helper.java index 47b5eb1f..84da91f6 100644 --- a/src/main/java/tconstruct/util/landmine/Helper.java +++ b/src/main/java/tconstruct/util/landmine/Helper.java @@ -8,7 +8,7 @@ import net.minecraftforge.common.util.ForgeDirection; /** * * @author fuj1n - * + * */ public class Helper { diff --git a/src/main/java/tconstruct/util/landmine/LandmineStack.java b/src/main/java/tconstruct/util/landmine/LandmineStack.java index fb5c3b85..c729dc8a 100644 --- a/src/main/java/tconstruct/util/landmine/LandmineStack.java +++ b/src/main/java/tconstruct/util/landmine/LandmineStack.java @@ -1,60 +1,81 @@ package tconstruct.util.landmine; import net.minecraft.block.Block; -import net.minecraft.item.*; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; -public class LandmineStack { +public class LandmineStack +{ + + public final boolean isBlock; + public final Block block; + public final Item item; + public final int meta; + + public LandmineStack(Block block) + { + this(block, -314159265); + } + + public LandmineStack(Item item) + { + this(item, -314159265); + } + + public LandmineStack(Block block, int meta) + { + isBlock = true; + this.block = block; + this.item = null; + this.meta = meta; + } + + public LandmineStack(Item item, int meta) + { + isBlock = false; + this.block = null; + this.item = item; + this.meta = meta; + } + + @Override + public boolean equals (Object o) + { + // Comparing landmine stacks + if (o instanceof LandmineStack) + { + LandmineStack stack = (LandmineStack) o; + if (isBlock) + { + return block == stack.block && (meta == stack.meta || meta == -314159265); + } + else + { + return item == stack.item && (meta == stack.meta || meta == -314159265); + } + // Comparing landmine stacks with item stacks + } + else if (o instanceof ItemStack) + { + ItemStack stack = (ItemStack) o; + if (isBlock && stack.getItem() instanceof ItemBlock) + { + return block == ((ItemBlock) stack.getItem()).field_150939_a && (meta == stack.getItemDamage() || meta == -314159265); + } + else if (!isBlock) + { + return item == stack.getItem() && (meta == stack.getItemDamage() || meta == -314159265); + } + else + { + return false; + } + } + else + { + return false; + } + } - public final boolean isBlock; - public final Block block; - public final Item item; - public final int meta; - - public LandmineStack(Block block){ - this(block, -314159265); - } - - public LandmineStack(Item item){ - this(item, -314159265); - } - - public LandmineStack(Block block, int meta){ - isBlock = true; - this.block = block; - this.item = null; - this.meta = meta; - } - - public LandmineStack(Item item, int meta){ - isBlock = false; - this.block = null; - this.item = item; - this.meta = meta; - } - - @Override - public boolean equals(Object o){ - //Comparing landmine stacks - if(o instanceof LandmineStack){ - LandmineStack stack = (LandmineStack)o; - if(isBlock){ - return block == stack.block && (meta == stack.meta || meta == -314159265); - }else{ - return item == stack.item && (meta == stack.meta || meta == -314159265); - } - //Comparing landmine stacks with item stacks - }else if(o instanceof ItemStack){ - ItemStack stack = (ItemStack) o; - if(isBlock && stack.getItem() instanceof ItemBlock){ - return block == ((ItemBlock)stack.getItem()).field_150939_a && (meta == stack.getItemDamage() || meta == -314159265); - }else if(!isBlock){ - return item == stack.getItem() && (meta == stack.getItemDamage() || meta == -314159265); - }else{ - return false; - } - }else{ - return false; - } - } - } diff --git a/src/main/java/tconstruct/util/landmine/behavior/Behavior.java b/src/main/java/tconstruct/util/landmine/behavior/Behavior.java index ff525115..e91bef94 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/Behavior.java +++ b/src/main/java/tconstruct/util/landmine/behavior/Behavior.java @@ -1,21 +1,27 @@ package tconstruct.util.landmine.behavior; -import tconstruct.util.landmine.LandmineStack; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; -import java.util.*; -import net.minecraft.block.*; +import net.minecraft.block.Block; +import net.minecraft.block.ITileEntityProvider; import net.minecraft.entity.Entity; -import net.minecraft.init.*; -import net.minecraft.item.*; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import tconstruct.util.landmine.*; +import tconstruct.util.landmine.Helper; +import tconstruct.util.landmine.LandmineStack; /** * * @author fuj1n - * + * */ public abstract class Behavior { @@ -37,7 +43,7 @@ public abstract class Behavior public static void registerBuiltInBehaviors () { - System.out.println("Test"); + System.out.println("Test"); defaultBehavior = new BehaviorDefault(); addBehavior(new LandmineStack(Items.stick), dummy); @@ -54,7 +60,8 @@ public abstract class Behavior addBehavior(new LandmineStack(Items.ender_pearl), shoot); addBehavior(new LandmineStack(Items.shears), shear); - //Make sure the part below this comment is executed last(to avoid conflicts) + // Make sure the part below this comment is executed last(to avoid + // conflicts) Iterator i1 = Block.blockRegistry.iterator(); while (i1.hasNext()) { @@ -81,11 +88,13 @@ public abstract class Behavior { if (!behaviorsListBlocks.isEmpty()) { - for(int i = 0; i < behaviorsListBlocks.size(); i++){ - LandmineStack st = (LandmineStack) behaviorsListBlocks.keySet().toArray()[i]; - if(st.equals(par1ItemStack)){ - return (Behavior) behaviorsListBlocks.values().toArray()[i]; - } + for (int i = 0; i < behaviorsListBlocks.size(); i++) + { + LandmineStack st = (LandmineStack) behaviorsListBlocks.keySet().toArray()[i]; + if (st.equals(par1ItemStack)) + { + return (Behavior) behaviorsListBlocks.values().toArray()[i]; + } } return null; } @@ -98,11 +107,13 @@ public abstract class Behavior { if (!behaviorsListItems.isEmpty()) { - for(int i = 0; i < behaviorsListItems.size(); i++){ - LandmineStack st = (LandmineStack) behaviorsListItems.keySet().toArray()[i]; - if(st.equals(par1ItemStack)){ - return (Behavior) behaviorsListItems.values().toArray()[i]; - } + for (int i = 0; i < behaviorsListItems.size(); i++) + { + LandmineStack st = (LandmineStack) behaviorsListItems.keySet().toArray()[i]; + if (st.equals(par1ItemStack)) + { + return (Behavior) behaviorsListItems.values().toArray()[i]; + } } return null; } @@ -147,7 +158,7 @@ public abstract class Behavior { } - //Will return false if the effect does not stack among the slots + // Will return false if the effect does not stack among the slots public boolean effectStacks () { return true; diff --git a/src/main/java/tconstruct/util/landmine/behavior/BehaviorBlockThrow.java b/src/main/java/tconstruct/util/landmine/behavior/BehaviorBlockThrow.java index 1b7b4161..462e4ac3 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/BehaviorBlockThrow.java +++ b/src/main/java/tconstruct/util/landmine/behavior/BehaviorBlockThrow.java @@ -9,7 +9,7 @@ import net.minecraft.world.World; /** * * @author fuj1n - * + * */ public class BehaviorBlockThrow extends Behavior { @@ -28,19 +28,19 @@ public class BehaviorBlockThrow extends Behavior { case 0: vec0 = speed + par1World.rand.nextDouble() * randomnessFactor; - //vec2 = par1World.rand.nextDouble() * randomnessFactor; + // vec2 = par1World.rand.nextDouble() * randomnessFactor; break; case 1: vec0 = -speed + par1World.rand.nextDouble() * randomnessFactor; - //vec2 = par1World.rand.nextDouble() * randomnessFactor; + // vec2 = par1World.rand.nextDouble() * randomnessFactor; break; case 2: vec2 = speed + par1World.rand.nextDouble() * randomnessFactor; - //vec0 = par1World.rand.nextDouble() * randomnessFactor; + // vec0 = par1World.rand.nextDouble() * randomnessFactor; break; case 3: vec2 = -speed + par1World.rand.nextDouble() * randomnessFactor; - //vec0 = par1World.rand.nextDouble() * randomnessFactor; + // vec0 = par1World.rand.nextDouble() * randomnessFactor; break; case 4: vec0 = speed + par1World.rand.nextDouble() * randomnessFactor; diff --git a/src/main/java/tconstruct/util/landmine/behavior/BehaviorDummy.java b/src/main/java/tconstruct/util/landmine/behavior/BehaviorDummy.java index fcfd7096..8ddf9ca6 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/BehaviorDummy.java +++ b/src/main/java/tconstruct/util/landmine/behavior/BehaviorDummy.java @@ -7,7 +7,7 @@ import net.minecraft.world.World; /** * * @author fuj1n - * + * */ public class BehaviorDummy extends Behavior { diff --git a/src/main/java/tconstruct/util/landmine/behavior/BehaviorExplosive.java b/src/main/java/tconstruct/util/landmine/behavior/BehaviorExplosive.java index 7163bb9b..7db1560a 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/BehaviorExplosive.java +++ b/src/main/java/tconstruct/util/landmine/behavior/BehaviorExplosive.java @@ -14,7 +14,7 @@ import net.minecraft.world.World; /** * * @author fuj1n - * + * */ public class BehaviorExplosive extends Behavior { @@ -48,7 +48,8 @@ public class BehaviorExplosive extends Behavior str = "small"; } - //par2List.add("This item explodes with " + str + " power when the landmine is triggered."); + // par2List.add("This item explodes with " + str + + // " power when the landmine is triggered."); } @Override @@ -58,7 +59,9 @@ public class BehaviorExplosive extends Behavior } @Override - //Change this to false to greatly decrease the maximum potential of explosions but at the same time, make them launch the player much higher(I mean the explosions with 2 or more TNT + // Change this to false to greatly decrease the maximum potential of + // explosions but at the same time, make them launch the player much + // higher(I mean the explosions with 2 or more TNT public boolean effectStacks () { return true; diff --git a/src/main/java/tconstruct/util/landmine/behavior/BehaviorFirecharge.java b/src/main/java/tconstruct/util/landmine/behavior/BehaviorFirecharge.java index 5ac1cad9..e03070cc 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/BehaviorFirecharge.java +++ b/src/main/java/tconstruct/util/landmine/behavior/BehaviorFirecharge.java @@ -14,7 +14,7 @@ import tconstruct.items.blocks.ItemBlockLandmine; /** * * @author fuj1n - * + * */ public class BehaviorFirecharge extends Behavior { diff --git a/src/main/java/tconstruct/util/landmine/behavior/BehaviorFirework.java b/src/main/java/tconstruct/util/landmine/behavior/BehaviorFirework.java index bfeb3058..f0859c98 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/BehaviorFirework.java +++ b/src/main/java/tconstruct/util/landmine/behavior/BehaviorFirework.java @@ -10,7 +10,7 @@ import tconstruct.entity.item.EntityLandmineFirework; /** * * @author fuj1n - * + * */ public class BehaviorFirework extends Behavior { @@ -22,7 +22,7 @@ public class BehaviorFirework extends Behavior for (int i = 0; i < par5ItemStack.stackSize; i++) { - //TODO entity registration and stuffs + // TODO entity registration and stuffs EntityLandmineFirework entityfireworkrocket = new EntityLandmineFirework(par1World, (double) par2, (double) par3, (double) par4, par5ItemStack, facing.ordinal()) .setRider(i == 0 ? triggerer : null); par1World.spawnEntityInWorld(entityfireworkrocket); diff --git a/src/main/java/tconstruct/util/landmine/behavior/BehaviorPotion.java b/src/main/java/tconstruct/util/landmine/behavior/BehaviorPotion.java index 4b8e78ac..15349bf8 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/BehaviorPotion.java +++ b/src/main/java/tconstruct/util/landmine/behavior/BehaviorPotion.java @@ -17,7 +17,7 @@ import tconstruct.items.blocks.ItemBlockLandmine; /** * * @author fuj1n - * + * */ public class BehaviorPotion extends Behavior { diff --git a/src/main/java/tconstruct/util/landmine/behavior/BehaviorProjectile.java b/src/main/java/tconstruct/util/landmine/behavior/BehaviorProjectile.java index e96fac83..c6babc5b 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/BehaviorProjectile.java +++ b/src/main/java/tconstruct/util/landmine/behavior/BehaviorProjectile.java @@ -14,7 +14,7 @@ import net.minecraft.world.World; /** * * @author fuj1n - * + * */ public class BehaviorProjectile extends Behavior { @@ -58,7 +58,7 @@ public class BehaviorProjectile extends Behavior par1World.playAuxSFX(1002, par2, par3, par4, 0); } - //Projectiles: snowballs, arrows + // Projectiles: snowballs, arrows @Override public boolean isOffensive (ItemStack par1ItemStack) diff --git a/src/main/java/tconstruct/util/landmine/behavior/BehaviorShears.java b/src/main/java/tconstruct/util/landmine/behavior/BehaviorShears.java index 8a86d2ba..7163d499 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/BehaviorShears.java +++ b/src/main/java/tconstruct/util/landmine/behavior/BehaviorShears.java @@ -21,7 +21,7 @@ import tconstruct.items.blocks.ItemBlockLandmine; /** * * @author fuj1n - * + * */ public class BehaviorShears extends Behavior { @@ -87,7 +87,7 @@ public class BehaviorShears extends Behavior } } - //Shear some sheep around a small area + // Shear some sheep around a small area @Override public boolean shouldItemBeRemoved (ItemStack par1ItemStack, boolean willBlockBeRemoved) diff --git a/src/main/java/tconstruct/util/landmine/behavior/BehaviorSpawnEgg.java b/src/main/java/tconstruct/util/landmine/behavior/BehaviorSpawnEgg.java index 74fe7267..32b97baf 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/BehaviorSpawnEgg.java +++ b/src/main/java/tconstruct/util/landmine/behavior/BehaviorSpawnEgg.java @@ -11,7 +11,7 @@ import net.minecraft.world.World; /** * * @author fuj1n - * + * */ public class BehaviorSpawnEgg extends Behavior { diff --git a/src/main/java/tconstruct/util/landmine/behavior/stackCombo/SpecialStackHandler.java b/src/main/java/tconstruct/util/landmine/behavior/stackCombo/SpecialStackHandler.java index a7c8ed08..b6c3db02 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/stackCombo/SpecialStackHandler.java +++ b/src/main/java/tconstruct/util/landmine/behavior/stackCombo/SpecialStackHandler.java @@ -14,7 +14,7 @@ import tconstruct.util.landmine.behavior.Behavior; /** * * @author fuj1n - * + * */ public abstract class SpecialStackHandler { diff --git a/src/main/java/tconstruct/util/network/packet/AbstractPacket.java b/src/main/java/tconstruct/util/network/packet/AbstractPacket.java index 37f6ea87..6e8dfff2 100644 --- a/src/main/java/tconstruct/util/network/packet/AbstractPacket.java +++ b/src/main/java/tconstruct/util/network/packet/AbstractPacket.java @@ -5,39 +5,53 @@ import io.netty.channel.ChannelHandlerContext; import net.minecraft.entity.player.EntityPlayer; /** - * AbstractPacket class. Should be the parent of all packets wishing to use the PacketPipeline. + * AbstractPacket class. Should be the parent of all packets wishing to use the + * PacketPipeline. + * * @author sirgingalot */ public abstract class AbstractPacket { /** - * Encode the packet data into the ByteBuf stream. Complex data sets may need specific data handlers (See @link{cpw.mods.fml.common.network.ByteBuffUtils}) - * - * @param ctx channel context - * @param buffer the buffer to encode into + * Encode the packet data into the ByteBuf stream. Complex data sets may + * need specific data handlers (See + * @link{cpw.mods.fml.common.network.ByteBuffUtils}) + * + * @param ctx + * channel context + * @param buffer + * the buffer to encode into */ public abstract void encodeInto (ChannelHandlerContext ctx, ByteBuf buffer); /** - * Decode the packet data from the ByteBuf stream. Complex data sets may need specific data handlers (See @link{cpw.mods.fml.common.network.ByteBuffUtils}) - * - * @param ctx channel context - * @param buffer the buffer to decode from + * Decode the packet data from the ByteBuf stream. Complex data sets may + * need specific data handlers (See + * @link{cpw.mods.fml.common.network.ByteBuffUtils}) + * + * @param ctx + * channel context + * @param buffer + * the buffer to decode from */ public abstract void decodeInto (ChannelHandlerContext ctx, ByteBuf buffer); /** - * Handle a packet on the client side. Note this occurs after decoding has completed. - * - * @param player the player reference + * Handle a packet on the client side. Note this occurs after decoding has + * completed. + * + * @param player + * the player reference */ public abstract void handleClientSide (EntityPlayer player); /** - * Handle a packet on the server side. Note this occurs after decoding has completed. - * - * @param player the player reference + * Handle a packet on the server side. Note this occurs after decoding has + * completed. + * + * @param player + * the player reference */ public abstract void handleServerSide (EntityPlayer player); } diff --git a/src/main/java/tconstruct/util/network/packet/PacketDoubleJump.java b/src/main/java/tconstruct/util/network/packet/PacketDoubleJump.java index 6b187b04..6d9635df 100644 --- a/src/main/java/tconstruct/util/network/packet/PacketDoubleJump.java +++ b/src/main/java/tconstruct/util/network/packet/PacketDoubleJump.java @@ -28,8 +28,8 @@ public class PacketDoubleJump extends AbstractPacket @Override public void handleServerSide (EntityPlayer player) { - //String user = inputStream.readUTF(); - //EntityPlayer player = TConstruct.playerTracker.getEntityPlayer(user); + // String user = inputStream.readUTF(); + // EntityPlayer player = TConstruct.playerTracker.getEntityPlayer(user); player.fallDistance = 0; } diff --git a/src/main/java/tconstruct/util/network/packet/PacketExtendedInventory.java b/src/main/java/tconstruct/util/network/packet/PacketExtendedInventory.java index 6f1ecf10..63ea656a 100644 --- a/src/main/java/tconstruct/util/network/packet/PacketExtendedInventory.java +++ b/src/main/java/tconstruct/util/network/packet/PacketExtendedInventory.java @@ -2,34 +2,41 @@ package tconstruct.util.network.packet; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; + +import java.io.ByteArrayInputStream; +import java.io.DataInputStream; +import java.io.IOException; + import net.minecraft.entity.player.EntityPlayer; import tconstruct.TConstruct; public class PacketExtendedInventory extends AbstractPacket { - byte type; + byte[] type; public PacketExtendedInventory() { } - public PacketExtendedInventory(byte type) + public PacketExtendedInventory(byte[] bs) { - this.type = type; + this.type = bs; + TConstruct.logger.error(type); } @Override public void encodeInto (ChannelHandlerContext ctx, ByteBuf buffer) { - buffer.writeByte(type); + // buffer.writeBytes(type); } @Override public void decodeInto (ChannelHandlerContext ctx, ByteBuf buffer) { - type = buffer.readByte(); + + // type = buffer.(buffer); } @Override @@ -41,19 +48,28 @@ public class PacketExtendedInventory extends AbstractPacket @Override public void handleServerSide (EntityPlayer player) { - //String user = inputStream.readUTF(); - //EntityPlayer player = TConstruct.playerTracker.getEntityPlayer(user); - switch (type) + // String user = inputStream.readUTF(); + // EntityPlayer player = TConstruct.playerTracker.getEntityPlayer(user); + DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(type)); + try { - case 0: - player.openGui(TConstruct.instance, TConstruct.proxy.inventoryGui, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); - break; - case 1: - player.openGui(TConstruct.instance, TConstruct.proxy.armorGuiID, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); - break; - case 2: - player.openGui(TConstruct.instance, TConstruct.proxy.knapsackGuiID, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); - break; + switch (inputStream.readByte()) + { + case 0: + player.openGui(TConstruct.instance, TConstruct.proxy.inventoryGui, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); + break; + case 1: + player.openGui(TConstruct.instance, TConstruct.proxy.armorGuiID, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); + break; + case 2: + player.openGui(TConstruct.instance, TConstruct.proxy.knapsackGuiID, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); + break; + } + } + catch (IOException e) + { + TConstruct.logger.error("Failed at reading server packet for TConstruct."); + e.printStackTrace(); } } diff --git a/src/main/java/tconstruct/util/network/packet/PacketPipeline.java b/src/main/java/tconstruct/util/network/packet/PacketPipeline.java index 711f9c83..695e04a4 100644 --- a/src/main/java/tconstruct/util/network/packet/PacketPipeline.java +++ b/src/main/java/tconstruct/util/network/packet/PacketPipeline.java @@ -26,9 +26,10 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; /** - * Packet pipeline class. Directs all registered packet data to be handled by the packets themselves. - * @author sirgingalot - * some code from: cpw + * Packet pipeline class. Directs all registered packet data to be handled by + * the packets themselves. + * + * @author sirgingalot some code from: cpw */ @ChannelHandler.Sharable public class PacketPipeline extends MessageToMessageCodec @@ -39,11 +40,15 @@ public class PacketPipeline extends MessageToMessageCodec clazz) { @@ -139,7 +144,8 @@ public class PacketPipeline extends MessageToMessageCodec - * Adapted from CPW's code in cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper - * - * @param message The message to send + * Adapted from CPW's code in + * cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper + * + * @param message + * The message to send */ public void sendToAll (AbstractPacket message) { @@ -187,10 +195,13 @@ public class PacketPipeline extends MessageToMessageCodec - * Adapted from CPW's code in cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper - * - * @param message The message to send - * @param player The player to send it to + * Adapted from CPW's code in + * cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper + * + * @param message + * The message to send + * @param player + * The player to send it to */ public void sendTo (AbstractPacket message, EntityPlayerMP player) { @@ -202,10 +213,15 @@ public class PacketPipeline extends MessageToMessageCodec - * Adapted from CPW's code in cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper - * - * @param message The message to send - * @param point The {@link cpw.mods.fml.common.network.NetworkRegistry.TargetPoint} around which to send + * Adapted from CPW's code in + * cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper + * + * @param message + * The message to send + * @param point + * The + * {@link cpw.mods.fml.common.network.NetworkRegistry.TargetPoint} + * around which to send */ public void sendToAllAround (AbstractPacket message, NetworkRegistry.TargetPoint point) { @@ -217,10 +233,13 @@ public class PacketPipeline extends MessageToMessageCodec - * Adapted from CPW's code in cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper - * - * @param message The message to send - * @param dimensionId The dimension id to target + * Adapted from CPW's code in + * cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper + * + * @param message + * The message to send + * @param dimensionId + * The dimension id to target */ public void sendToDimension (AbstractPacket message, int dimensionId) { @@ -232,9 +251,11 @@ public class PacketPipeline extends MessageToMessageCodec - * Adapted from CPW's code in cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper - * - * @param message The message to send + * Adapted from CPW's code in + * cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper + * + * @param message + * The message to send */ public void sendToServer (AbstractPacket message) { diff --git a/src/main/java/tconstruct/util/network/packet/PacketSmeltery.java b/src/main/java/tconstruct/util/network/packet/PacketSmeltery.java index aeb6266f..51d6edd6 100644 --- a/src/main/java/tconstruct/util/network/packet/PacketSmeltery.java +++ b/src/main/java/tconstruct/util/network/packet/PacketSmeltery.java @@ -70,7 +70,10 @@ public class PacketSmeltery extends AbstractPacket FluidStack temp = null; for (FluidStack liquid : ((SmelteryLogic) te).moltenMetal) - {//TODO update fluid stuffs + {// TODO + // update + // fluid + // stuffs if (liquid.fluidID == fluidID) { temp = liquid; @@ -85,8 +88,10 @@ public class PacketSmeltery extends AbstractPacket else ((SmelteryLogic) te).moltenMetal.add(0, temp); } - //TODO check if this works like it should - //Old code: PacketDispatcher.sendPacketToAllInDimension(te.getDescriptionPacket(), dimension); + // TODO check if this works like it should + // Old code: + // PacketDispatcher.sendPacketToAllInDimension(te.getDescriptionPacket(), + // dimension); FMLCommonHandler.instance().getClientToServerNetworkManager().scheduleOutboundPacket(te.getDescriptionPacket()); } } diff --git a/src/main/java/tconstruct/util/player/ArmorExtended.java b/src/main/java/tconstruct/util/player/ArmorExtended.java index 5171b585..ec6b8da3 100644 --- a/src/main/java/tconstruct/util/player/ArmorExtended.java +++ b/src/main/java/tconstruct/util/player/ArmorExtended.java @@ -49,7 +49,7 @@ public class ArmorExtended implements IInventory { if (inventory[slot] != null) { - //TConstruct.logger.info("Took something from slot " + slot); + // TConstruct.logger.info("Took something from slot " + slot); if (inventory[slot].stackSize <= quantity) { ItemStack stack = inventory[slot]; @@ -82,7 +82,8 @@ public class ArmorExtended implements IInventory public void setInventorySlotContents (int slot, ItemStack itemstack) { inventory[slot] = itemstack; - //TConstruct.logger.info("Changed slot " + slot + " on side " + FMLCommonHandler.instance().getEffectiveSide()); + // TConstruct.logger.info("Changed slot " + slot + " on side " + + // FMLCommonHandler.instance().getEffectiveSide()); if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) { itemstack.stackSize = getInventoryStackLimit(); @@ -116,39 +117,23 @@ public class ArmorExtended implements IInventory { EntityPlayer player = parent.get(); TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.getDisplayName()); - //recalculateSkills(player, stats); + // recalculateSkills(player, stats); recalculateHealth(player, stats); - /*if (inventory[2] == null && stats.knapsack != null) - { - stats.knapsack.unequipItems(); - }*/ + /* + * if (inventory[2] == null && stats.knapsack != null) { + * stats.knapsack.unequipItems(); } + */ } - /*public void recalculateSkills(EntityPlayer player, TPlayerStats stats) - { - if (inventory[1] != null && inventory[1].getItem() == TRepo.glove) - { - if (stats.skillList.size() < 1) - { - try - { - stats.skillList.add(SkillRegistry.skills.get("Wall Building").copy()); - } - catch (Exception e) - { - e.printStackTrace(); - } - } - } - else - { - if (stats.skillList.size() > 0) - { - stats.skillList.remove(0); - } - } - }*/ + /* + * public void recalculateSkills(EntityPlayer player, TPlayerStats stats) { + * if (inventory[1] != null && inventory[1].getItem() == TRepo.glove) { if + * (stats.skillList.size() < 1) { try { + * stats.skillList.add(SkillRegistry.skills.get("Wall Building").copy()); } + * catch (Exception e) { e.printStackTrace(); } } } else { if + * (stats.skillList.size() > 0) { stats.skillList.remove(0); } } } + */ public void recalculateHealth (EntityPlayer player, TPlayerStats stats) { @@ -158,7 +143,8 @@ public class ArmorExtended implements IInventory { ItemStack stack = inventory[6]; int meta = stack.getItemDamage(); - //TConstruct.logger.info("Calculating HP on side " + FMLCommonHandler.instance().getEffectiveSide()); + // TConstruct.logger.info("Calculating HP on side " + + // FMLCommonHandler.instance().getEffectiveSide()); if (meta == 2) { int prevHealth = stats.bonusHealth; @@ -172,7 +158,7 @@ public class ArmorExtended implements IInventory stats.bonusHealth = bonusHP; int healthChange = bonusHP - prevHealth; - //TConstruct.logger.info("healthChange: "+healthChange+" on side "+FMLCommonHandler.instance().getEffectiveSide()); + // TConstruct.logger.info("healthChange: "+healthChange+" on side "+FMLCommonHandler.instance().getEffectiveSide()); if (healthChange != 0) { IAttributeInstance attributeinstance = player.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.maxHealth); diff --git a/src/main/java/tconstruct/util/player/ArmorExtendedClient.java b/src/main/java/tconstruct/util/player/ArmorExtendedClient.java index be64876b..adaa76c1 100644 --- a/src/main/java/tconstruct/util/player/ArmorExtendedClient.java +++ b/src/main/java/tconstruct/util/player/ArmorExtendedClient.java @@ -2,29 +2,14 @@ package tconstruct.util.player; public class ArmorExtendedClient extends ArmorExtended { - /*public void recalculateSkills(EntityPlayer player, TPlayerStats stats) - { - TConstruct.logger.info("Client skills"); - if (inventory[1] != null && inventory[1].getItem() == TContent.glove) - { - if (TProxyClient.skillList.size() < 1) - { - try - { - TProxyClient.skillList.add(SkillRegistry.skills.get("Wall Building").copy()); - } - catch (Exception e) - { - e.printStackTrace(); - } - } - } - else - { - if (TProxyClient.skillList.size() > 0) - { - TProxyClient.skillList.remove(0); - } - } - }*/ + /* + * public void recalculateSkills(EntityPlayer player, TPlayerStats stats) { + * TConstruct.logger.info("Client skills"); if (inventory[1] != null && + * inventory[1].getItem() == TContent.glove) { if + * (TProxyClient.skillList.size() < 1) { try { + * TProxyClient.skillList.add(SkillRegistry + * .skills.get("Wall Building").copy()); } catch (Exception e) { + * e.printStackTrace(); } } } else { if (TProxyClient.skillList.size() > 0) + * { TProxyClient.skillList.remove(0); } } } + */ } diff --git a/src/main/java/tconstruct/util/player/TPlayerHandler.java b/src/main/java/tconstruct/util/player/TPlayerHandler.java index e3b128a9..791f4490 100644 --- a/src/main/java/tconstruct/util/player/TPlayerHandler.java +++ b/src/main/java/tconstruct/util/player/TPlayerHandler.java @@ -34,7 +34,7 @@ import cpw.mods.fml.relauncher.Side; public class TPlayerHandler { /* Player */ - //public int hunger; + // public int hunger; public ConcurrentHashMap playerStats = new ConcurrentHashMap(); @@ -64,8 +64,8 @@ public class TPlayerHandler public void onPlayerLogin (EntityPlayer entityplayer) { - //TConstruct.logger.info("Player: "+entityplayer); - //Lookup player + // TConstruct.logger.info("Player: "+entityplayer); + // Lookup player NBTTagCompound tags = entityplayer.getEntityData(); if (!tags.hasKey("TConstruct")) { @@ -86,7 +86,7 @@ public class TPlayerHandler stats.beginnerManual = tags.getCompoundTag("TConstruct").getBoolean("beginnerManual"); stats.materialManual = tags.getCompoundTag("TConstruct").getBoolean("materialManual"); stats.smelteryManual = tags.getCompoundTag("TConstruct").getBoolean("smelteryManual"); - //gamerule naturalRegeneration false + // gamerule naturalRegeneration false if (!PHConstruct.enableHealthRegen) entityplayer.worldObj.getGameRules().setOrCreateGameRule("naturalRegeneration", "false"); if (!stats.beginnerManual) @@ -157,14 +157,15 @@ public class TPlayerHandler void updateClientPlayer (ByteArrayOutputStream bos, EntityPlayer player) { - /*Packet250CustomPayload packet = new Packet250CustomPayload(); - packet.channel = "TConstruct"; - packet.data = bos.toByteArray(); - packet.length = bos.size(); - - PacketDispatcher.sendPacketToPlayer(packet, (Player) player); - */ - //TODO find out what packet needs to be used here (and make sure that player actually is a playerMP and this gets called) + /* + * Packet250CustomPayload packet = new Packet250CustomPayload(); + * packet.channel = "TConstruct"; packet.data = bos.toByteArray(); + * packet.length = bos.size(); + * + * PacketDispatcher.sendPacketToPlayer(packet, (Player) player); + */ + // TODO find out what packet needs to be used here (and make sure that + // player actually is a playerMP and this gets called) if (player instanceof EntityPlayerMP) { TConstruct.packetPipeline.sendTo(new PacketDoubleJump(), (EntityPlayerMP) player); @@ -184,7 +185,7 @@ public class TPlayerHandler playerStats.remove(player.getDisplayName()); } else - //Revalidate all players + // Revalidate all players { } @@ -193,13 +194,14 @@ public class TPlayerHandler public void onPlayerRespawn (EntityPlayer entityplayer) { - //Boom! + // Boom! TPlayerStats stats = getPlayerStats(entityplayer.getDisplayName()); stats.player = new WeakReference(entityplayer); stats.armor.recalculateHealth(entityplayer, stats); - /*TFoodStats food = new TFoodStats(); - entityplayer.foodStats = food;*/ + /* + * TFoodStats food = new TFoodStats(); entityplayer.foodStats = food; + */ if (PHConstruct.keepLevels) entityplayer.experienceLevel = stats.level; @@ -215,14 +217,14 @@ public class TPlayerHandler Side side = FMLCommonHandler.instance().getEffectiveSide(); if (side == Side.CLIENT) { - //TProxyClient.controlInstance.resetControls(); + // TProxyClient.controlInstance.resetControls(); if (PHConstruct.keepHunger) entityplayer.getFoodStats().setFoodLevel(stats.hunger); } } @SubscribeEvent - public void livingFall (LivingFallEvent evt) //Only for negating fall damage + public void livingFall (LivingFallEvent evt) // Only for negating fall damage { if (evt.entityLiving instanceof EntityPlayer) { @@ -230,34 +232,25 @@ public class TPlayerHandler } } - /*@SubscribeEvent - public void livingUpdate (LivingUpdateEvent evt) - { - Side side = FMLCommonHandler.instance().getEffectiveSide(); - if (side == Side.CLIENT && evt.entityLiving instanceof EntityPlayer) - { - EntityPlayer player = (EntityPlayer) evt.entityLiving; - TPlayerStats stats = playerStats.get(player.getDisplayName()); - if (player.onGround != stats.prevOnGround) - { - if (player.onGround)// && -stats.prevMotionY > 0.1) - //player.motionY = 0.5; - player.motionY = -stats.prevMotionY * 0.8; - //player.motionY *= -1.2; - stats.prevOnGround = player.onGround; - //if () - - //TConstruct.logger.info("Fall: "+player.fallDistance); - } - } - }*/ + /* + * @SubscribeEvent public void livingUpdate (LivingUpdateEvent evt) { Side + * side = FMLCommonHandler.instance().getEffectiveSide(); if (side == + * Side.CLIENT && evt.entityLiving instanceof EntityPlayer) { EntityPlayer + * player = (EntityPlayer) evt.entityLiving; TPlayerStats stats = + * playerStats.get(player.getDisplayName()); if (player.onGround != + * stats.prevOnGround) { if (player.onGround)// && -stats.prevMotionY > 0.1) + * //player.motionY = 0.5; player.motionY = -stats.prevMotionY * 0.8; + * //player.motionY *= -1.2; stats.prevOnGround = player.onGround; //if () + * + * //TConstruct.logger.info("Fall: "+player.fallDistance); } } } + */ @SubscribeEvent public void playerDrops (PlayerDropsEvent evt) { TPlayerStats stats = getPlayerStats(evt.entityPlayer.getDisplayName()); stats.level = evt.entityPlayer.experienceLevel / 2; - //stats.health = 20; + // stats.health = 20; int hunger = evt.entityPlayer.getFoodStats().getFoodLevel(); if (hunger < 6) stats.hunger = 6; @@ -269,7 +262,7 @@ public class TPlayerHandler public TPlayerStats getPlayerStats (String username) { TPlayerStats stats = playerStats.get(username); - //TConstruct.logger.info("Stats: "+stats); + // TConstruct.logger.info("Stats: "+stats); if (stats == null) { stats = new TPlayerStats(); @@ -294,14 +287,15 @@ public class TPlayerHandler /* Modify Player */ public void updateSize (String user, float offset) { - /*EntityPlayer player = getEntityPlayer(user); - setEntitySize(0.6F, offset, player); - player.yOffset = offset - 0.18f;*/ + /* + * EntityPlayer player = getEntityPlayer(user); setEntitySize(0.6F, + * offset, player); player.yOffset = offset - 0.18f; + */ } public static void setEntitySize (float width, float height, Entity entity) { - //TConstruct.logger.info("Size: " + height); + // TConstruct.logger.info("Size: " + height); if (width != entity.width || height != entity.height) { entity.width = width; @@ -337,7 +331,7 @@ public class TPlayerHandler { entity.myEntitySize = EnumEntitySize.SIZE_6; } - //entity.yOffset = height; + // entity.yOffset = height; } Random rand = new Random(); diff --git a/src/main/java/tconstruct/worldgen/OreberryBushGen.java b/src/main/java/tconstruct/worldgen/OreberryBushGen.java index 1c0bdfdf..280e0f87 100644 --- a/src/main/java/tconstruct/worldgen/OreberryBushGen.java +++ b/src/main/java/tconstruct/worldgen/OreberryBushGen.java @@ -88,10 +88,10 @@ public class OreberryBushGen extends WorldGenerator void generateBerryBlock (World world, int x, int y, int z, Random random) { - /*if (!Block.opaqueCubeLookup[world.getBlockId(x, y, z)]) - { - setBlockAndMetadata(world, x, y, z, blockID, metadata); - }*/ + /* + * if (!Block.opaqueCubeLookup[world.getBlockId(x, y, z)]) { + * setBlockAndMetadata(world, x, y, z, blockID, metadata); } + */ Block block = world.getBlock(x, y, z); if (block == null || (block != Blocks.end_portal_frame && !world.getBlock(x, y, z).func_149730_j())) diff --git a/src/main/java/tconstruct/worldgen/OverworldProvider.java b/src/main/java/tconstruct/worldgen/OverworldProvider.java index 1c21d698..4a11c636 100644 --- a/src/main/java/tconstruct/worldgen/OverworldProvider.java +++ b/src/main/java/tconstruct/worldgen/OverworldProvider.java @@ -37,29 +37,18 @@ public class OverworldProvider extends WorldProvider return f1; } - /*public float calculateCelestialAngle(long worldtime, float par3) - { - int timeOfDay = (int)(worldtime % 43200L); - float f1 = ((float)timeOfDay + par3) / 43200.0F - 0.25F; - - if (f1 < 0.0F) - { - ++f1; - } - - if (f1 > 1.0F) - { - --f1; - } - - float f2 = f1; - f1 = 1.0F - (float)((Math.cos((double)f1 * Math.PI) + 1.0D) / 2.0D); - f1 = f2 + (f1 - f2) / 3.0F; - return f1; - } - - public int getMoonPhase(long par1) - { - return (int)(par1 / 43200L) % 8; - }*/ + /* + * public float calculateCelestialAngle(long worldtime, float par3) { int + * timeOfDay = (int)(worldtime % 43200L); float f1 = ((float)timeOfDay + + * par3) / 43200.0F - 0.25F; + * + * if (f1 < 0.0F) { ++f1; } + * + * if (f1 > 1.0F) { --f1; } + * + * float f2 = f1; f1 = 1.0F - (float)((Math.cos((double)f1 * Math.PI) + + * 1.0D) / 2.0D); f1 = f2 + (f1 - f2) / 3.0F; return f1; } + * + * public int getMoonPhase(long par1) { return (int)(par1 / 43200L) % 8; } + */ } diff --git a/src/main/java/tconstruct/worldgen/SlimeIslandGen.java b/src/main/java/tconstruct/worldgen/SlimeIslandGen.java index c1529d4d..8cf48934 100644 --- a/src/main/java/tconstruct/worldgen/SlimeIslandGen.java +++ b/src/main/java/tconstruct/worldgen/SlimeIslandGen.java @@ -23,7 +23,7 @@ public class SlimeIslandGen extends WorldGenerator implements IWorldGenerator private int gelMeta; int randomness = 2; Random random = new Random(); - Block base = TRepo.craftedSoil;//Block.dirt.blockID; + Block base = TRepo.craftedSoil;// Block.dirt.blockID; Block top = TRepo.slimeGrass; SlimeTreeGen trees = new SlimeTreeGen(false, 5, 4, 1, 0); @@ -34,9 +34,10 @@ public class SlimeIslandGen extends WorldGenerator implements IWorldGenerator } @Override - public void generate (Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) //IWorldGenerator version + public void generate (Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) // IWorldGenerator + // version { - //dim 0 only? + // dim 0 only? if ((chunkGenerator instanceof ChunkProviderFlat || world.provider.terrainType == WorldType.FLAT) && PHConstruct.genIslandsFlat) { return; @@ -49,7 +50,7 @@ public class SlimeIslandGen extends WorldGenerator implements IWorldGenerator } } - //Island is biased towards one direction. Quadrants would be more useful + // Island is biased towards one direction. Quadrants would be more useful public void generateIsland (World world, Random rand, int xChunk, int zChunk) { int xRange = random.nextInt(13) + 20; @@ -59,7 +60,7 @@ public class SlimeIslandGen extends WorldGenerator implements IWorldGenerator int initialHeight = height; Ellipse2D.Double ellipse = new Ellipse2D.Double(0, 0, xRange, zRange); - //Basic shape + // Basic shape for (int x = 0; x <= xRange; x++) { for (int z = 0; z <= zRange; z++) @@ -72,7 +73,7 @@ public class SlimeIslandGen extends WorldGenerator implements IWorldGenerator } } - //Erode bottom + // Erode bottom height = 8; for (int x = 0; x <= xRange; x++) { @@ -97,7 +98,7 @@ public class SlimeIslandGen extends WorldGenerator implements IWorldGenerator } } - //Erode top + // Erode top height = 3; for (int x = 0; x <= xRange; x++) { @@ -121,7 +122,7 @@ public class SlimeIslandGen extends WorldGenerator implements IWorldGenerator } } - //Replace blocks + // Replace blocks for (int x = 0; x <= xRange; x++) { for (int z = 0; z <= zRange; z++) @@ -141,7 +142,7 @@ public class SlimeIslandGen extends WorldGenerator implements IWorldGenerator } } - //Decorate + // Decorate if (!DimensionBlacklist.isDimNoPool(world.provider.dimensionId)) { generateSlimePool(world, rand, xChunk + xRange / 2, yCenter + initialHeight, zChunk + zRange / 2); @@ -160,21 +161,16 @@ public class SlimeIslandGen extends WorldGenerator implements IWorldGenerator } - public boolean generate (World world, Random rand, int x, int y, int z) //WorldGenerator version + public boolean generate (World world, Random rand, int x, int y, int z) // WorldGenerator + // version { x -= 8; z -= 8; - /*for (z -= 8; y > 5 && world.isAirBlock(x, y, z); --y) - { - ; - } - - if (y <= 4) - { - return false; - } - else - {*/ + /* + * for (z -= 8; y > 5 && world.isAirBlock(x, y, z); --y) { ; } + * + * if (y <= 4) { return false; } else { + */ y -= 4; boolean[] validLocations = new boolean[2048]; int var7 = rand.nextInt(4) + 4; @@ -271,7 +267,7 @@ public class SlimeIslandGen extends WorldGenerator implements IWorldGenerator } } - //Generate blocks around + // Generate blocks around if (this.liquidBlock.getMaterial() == Material.water) { for (xPos = 0; xPos < 16; ++xPos) @@ -296,6 +292,6 @@ public class SlimeIslandGen extends WorldGenerator implements IWorldGenerator } return true; - //} + // } } } diff --git a/src/main/java/tconstruct/worldgen/SlimeTreeGen.java b/src/main/java/tconstruct/worldgen/SlimeTreeGen.java index fca31ad8..c3c01ef6 100644 --- a/src/main/java/tconstruct/worldgen/SlimeTreeGen.java +++ b/src/main/java/tconstruct/worldgen/SlimeTreeGen.java @@ -116,7 +116,7 @@ public class SlimeTreeGen extends WorldGenerator this.setBlockAndMetadata(world, xPos - 1, yPos + height - 3, zPos + 1, Blocks.air, 0); this.setBlockAndMetadata(world, xPos - 1, yPos + height - 3, zPos - 1, Blocks.air, 0); - //Drippers + // Drippers this.setBlockAndMetadata(world, xPos + 3, yPos + height - 4, zPos, TRepo.slimeLeaves, this.metaLeaves); this.setBlockAndMetadata(world, xPos - 3, yPos + height - 4, zPos, TRepo.slimeLeaves, this.metaLeaves); this.setBlockAndMetadata(world, xPos, yPos + height - 4, zPos - 3, TRepo.slimeLeaves, this.metaLeaves); diff --git a/src/main/java/tconstruct/worldgen/TBaseWorldGenerator.java b/src/main/java/tconstruct/worldgen/TBaseWorldGenerator.java index ec00616f..51e5b100 100644 --- a/src/main/java/tconstruct/worldgen/TBaseWorldGenerator.java +++ b/src/main/java/tconstruct/worldgen/TBaseWorldGenerator.java @@ -117,8 +117,10 @@ public class TBaseWorldGenerator implements IWorldGenerator yPos = findAdequateLocation(world, xPos, yPos, zPos, PHConstruct.seaLevel, 0); if (yPos != -1) { - /*CoordTuple coord = new CoordTuple(xPos, yPos, zPos); - TConstruct.logger.info("Iron: "+coord.toString());*/ + /* + * CoordTuple coord = new CoordTuple(xPos, yPos, zPos); + * TConstruct.logger.info("Iron: "+coord.toString()); + */ ironBush.generate(world, random, xPos, yPos, zPos); } } @@ -133,13 +135,18 @@ public class TBaseWorldGenerator implements IWorldGenerator yPos = findAdequateLocation(world, xPos, yPos, zPos, 32, 0); if (yPos != -1) { - /*CoordTuple coord = new CoordTuple(xPos, yPos, zPos); - TConstruct.logger.info("Gold: "+coord.toString());*/ + /* + * CoordTuple coord = new CoordTuple(xPos, yPos, zPos); + * TConstruct.logger.info("Gold: "+coord.toString()); + */ goldBush.generate(world, random, xPos, yPos, zPos); } } } - if (PHConstruct.generateCopperBush && random.nextInt(PHConstruct.copperBushRarity + 1) == 0)// && random.nextInt(PHConstruct.copperbRarity) == 0) + if (PHConstruct.generateCopperBush && random.nextInt(PHConstruct.copperBushRarity + 1) == 0)// && + // random.nextInt(PHConstruct.copperbRarity) + // == + // 0) { for (int i = 0; i < PHConstruct.copperBushDensity; i++) { @@ -149,13 +156,17 @@ public class TBaseWorldGenerator implements IWorldGenerator yPos = findAdequateLocation(world, xPos, yPos, zPos, PHConstruct.copperBushMaxY, PHConstruct.copperBushMinY); if (yPos != -1) { - /*CoordTuple coord = new CoordTuple(xPos, yPos, zPos); - TConstruct.logger.info("Copper: "+coord.toString());*/ + /* + * CoordTuple coord = new CoordTuple(xPos, yPos, zPos); + * TConstruct.logger.info("Copper: "+coord.toString()); + */ copperBush.generate(world, random, xPos, yPos, zPos); } } } - if (PHConstruct.generateTinBush && random.nextInt(PHConstruct.tinBushRarity + 1) == 0)// && random.nextInt(PHConstruct.tinbRarity) == 0) + if (PHConstruct.generateTinBush && random.nextInt(PHConstruct.tinBushRarity + 1) == 0)// && + // random.nextInt(PHConstruct.tinbRarity) + // == 0) { for (int i = 0; i < PHConstruct.tinBushDensity; i++) { @@ -165,13 +176,18 @@ public class TBaseWorldGenerator implements IWorldGenerator yPos = findAdequateLocation(world, xPos, yPos, zPos, PHConstruct.tinBushMaxY, PHConstruct.tinBushMinY); if (yPos != -1) { - /*CoordTuple coord = new CoordTuple(xPos, yPos, zPos); - TConstruct.logger.info("Tin: "+coord.toString());*/ + /* + * CoordTuple coord = new CoordTuple(xPos, yPos, zPos); + * TConstruct.logger.info("Tin: "+coord.toString()); + */ tinBush.generate(world, random, xPos, yPos, zPos); } } } - if (PHConstruct.generateAluminumBush && random.nextInt(PHConstruct.aluminumBushRarity + 1) == 0)// && random.nextInt(PHConstruct.aluminumbRarity) == 0) + if (PHConstruct.generateAluminumBush && random.nextInt(PHConstruct.aluminumBushRarity + 1) == 0)// && + // random.nextInt(PHConstruct.aluminumbRarity) + // == + // 0) { for (int i = 0; i < PHConstruct.aluminumBushDensity; i++) { @@ -181,8 +197,10 @@ public class TBaseWorldGenerator implements IWorldGenerator yPos = findAdequateLocation(world, xPos, yPos, zPos, PHConstruct.aluminumBushMaxY, PHConstruct.aluminumBushMinY); if (yPos != -1) { - /*CoordTuple coord = new CoordTuple(xPos, yPos, zPos); - TConstruct.logger.info("Aluminum: "+coord.toString());*/ + /* + * CoordTuple coord = new CoordTuple(xPos, yPos, zPos); + * TConstruct.logger.info("Aluminum: "+coord.toString()); + */ aluminumBush.generate(world, random, xPos, yPos, zPos); } } @@ -197,8 +215,10 @@ public class TBaseWorldGenerator implements IWorldGenerator yPos = findAdequateLocation(world, xPos, yPos, zPos, 32, 0); if (yPos != -1) { - /*CoordTuple coord = new CoordTuple(xPos, yPos, zPos); - TConstruct.logger.info("Silver: "+coord.toString());*/ + /* + * CoordTuple coord = new CoordTuple(xPos, yPos, zPos); + * TConstruct.logger.info("Silver: "+coord.toString()); + */ silverBush.generate(world, random, xPos, yPos, zPos); } } @@ -261,9 +281,10 @@ public class TBaseWorldGenerator implements IWorldGenerator void superfunGenerate (Random random, int chunkX, int chunkZ, World world) { - /*for (int x = 0; x < 16; x++) - for (int z = 0; z < 16; z++) - world.setBlock(x+chunkX, 192, z+chunkZ, Block.glowStone);*/ + /* + * for (int x = 0; x < 16; x++) for (int z = 0; z < 16; z++) + * world.setBlock(x+chunkX, 192, z+chunkZ, Block.glowStone); + */ for (int x = 0; x < 16; x++) { diff --git a/src/main/java/tconstruct/worldgen/TerrainGenEventHandler.java b/src/main/java/tconstruct/worldgen/TerrainGenEventHandler.java index 2c01f80f..4930dbea 100644 --- a/src/main/java/tconstruct/worldgen/TerrainGenEventHandler.java +++ b/src/main/java/tconstruct/worldgen/TerrainGenEventHandler.java @@ -31,7 +31,8 @@ public class TerrainGenEventHandler @SubscribeEvent public void onDecorateEvent (Decorate e) { - // Trigger just before sand pass one--which comes just after vanilla ore generation. + // Trigger just before sand pass one--which comes just after vanilla ore + // generation. if (e.type != SAND) return; diff --git a/src/main/java/tconstruct/worldgen/village/ComponentSmeltery.java b/src/main/java/tconstruct/worldgen/village/ComponentSmeltery.java index 9d6088c0..1ecbc4fc 100644 --- a/src/main/java/tconstruct/worldgen/village/ComponentSmeltery.java +++ b/src/main/java/tconstruct/worldgen/village/ComponentSmeltery.java @@ -5,16 +5,14 @@ import java.util.Random; import net.minecraft.block.Block; import net.minecraft.init.Blocks; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraft.world.gen.structure.StructureBoundingBox; import net.minecraft.world.gen.structure.StructureComponent; import net.minecraft.world.gen.structure.StructureVillagePieces; -import net.minecraft.world.gen.structure.StructureVillagePieces.Start; import tconstruct.TConstruct; import tconstruct.common.TRepo; -public class ComponentSmeltery extends StructureVillagePieces.House1 +public class ComponentSmeltery extends StructureVillagePieces.Village { private int averageGroundLevel = -1; @@ -22,14 +20,14 @@ public class ComponentSmeltery extends StructureVillagePieces.House1 { } - public ComponentSmeltery(Start villagePiece, int par2, Random par3Random, StructureBoundingBox par4StructureBoundingBox, int par5) + public ComponentSmeltery(StructureVillagePieces.Start par1ComponentVillageStartPiece, int par2, Random par3Random, StructureBoundingBox par4StructureBoundingBox, int par5) { - super(); + super(par1ComponentVillageStartPiece, par2); this.coordBaseMode = par5; this.boundingBox = par4StructureBoundingBox; } - public static ComponentSmeltery buildComponent (Start villagePiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5) + public static ComponentSmeltery func_74898_a (StructureVillagePieces.Start villagePiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5) { StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, 9, 3, 7, p4); return canVillageGoDeeper(structureboundingbox) && StructureComponent.findIntersecting(pieces, structureboundingbox) == null ? new ComponentSmeltery(villagePiece, p5, random, @@ -37,8 +35,8 @@ public class ComponentSmeltery extends StructureVillagePieces.House1 } /** - * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at - * the end, it adds Fences... + * second Part of Structure generating, this for example places Spiderwebs, + * Mob Spawners, it closes Mineshafts at the end, it adds Fences... */ public boolean addComponentParts (World world, Random random, StructureBoundingBox sbb) { @@ -55,16 +53,17 @@ public class ComponentSmeltery extends StructureVillagePieces.House1 } /** - * arguments: (World worldObj, StructureBoundingBox structBB, int minX, int minY, int minZ, int maxX, int maxY, int - * maxZ, int placeBlockId, int replaceBlockId, boolean alwaysreplace) + * arguments: (World worldObj, StructureBoundingBox structBB, int minX, + * int minY, int minZ, int maxX, int maxY, int maxZ, int placeBlockId, + * int replaceBlockId, boolean alwaysreplace) */ - this.fillWithBlocks(world, sbb, 1, 0, 0, 7, 0, 6, Blocks.stonebrick, Blocks.stonebrick, false); //Base + this.fillWithBlocks(world, sbb, 1, 0, 0, 7, 0, 6, Blocks.stonebrick, Blocks.stonebrick, false); // Base this.fillWithBlocks(world, sbb, 0, 0, 1, 0, 0, 5, Blocks.stonebrick, Blocks.stonebrick, false); this.fillWithBlocks(world, sbb, 8, 0, 1, 8, 0, 5, Blocks.stonebrick, Blocks.stonebrick, false); this.fillWithBlocks(world, sbb, 0, 1, 0, 9, 3, 7, Blocks.air, Blocks.air, false); - this.fillWithMetaBlocks(world, sbb, 2, 0, 1, 6, 2, 5, TRepo.smeltery, 2, TRepo.smeltery, 2, false); //Basin + this.fillWithMetaBlocks(world, sbb, 2, 0, 1, 6, 2, 5, TRepo.smeltery, 2, TRepo.smeltery, 2, false); // Basin this.fillWithBlocks(world, sbb, 3, 1, 2, 5, 2, 4, Blocks.air, Blocks.air, false); this.placeBlockAtCurrentPosition(world, TRepo.searedBlock, 0, 1, 1, 2, sbb); @@ -77,7 +76,6 @@ public class ComponentSmeltery extends StructureVillagePieces.House1 for (int i1 = 0; i1 < 9; ++i1) { this.clearCurrentPositionBlocksUpwards(world, i1, 9, l, sbb); - //TODO fillCurrentPositionBlocksDownwards this.func_151554_b(world, Blocks.stonebrick, 0, i1, -1, l, sbb); } } @@ -120,18 +118,4 @@ public class ComponentSmeltery extends StructureVillagePieces.House1 int l2 = this.func_151557_c(replaceBlockID, replaceBlockMeta); super.fillWithMetadataBlocks(par1World, par2StructureBoundingBox, minX, minY, minZ, maxX, maxY, maxZ, i2, j2, k2, l2, alwaysReplace); } - - @Override - protected void func_143012_a (NBTTagCompound var1) - { - // TODO Auto-generated method stub - - } - - @Override - protected void func_143011_b (NBTTagCompound var1) - { - // TODO Auto-generated method stub - - } } diff --git a/src/main/java/tconstruct/worldgen/village/ComponentToolWorkshop.java b/src/main/java/tconstruct/worldgen/village/ComponentToolWorkshop.java index bdfbb577..24772fd1 100644 --- a/src/main/java/tconstruct/worldgen/village/ComponentToolWorkshop.java +++ b/src/main/java/tconstruct/worldgen/village/ComponentToolWorkshop.java @@ -37,8 +37,8 @@ public class ComponentToolWorkshop extends StructureVillagePieces.House1 } /** - * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at - * the end, it adds Fences... + * second Part of Structure generating, this for example places Spiderwebs, + * Mob Spawners, it closes Mineshafts at the end, it adds Fences... */ public boolean addComponentParts (World world, Random random, StructureBoundingBox sbb) { @@ -55,23 +55,25 @@ public class ComponentToolWorkshop extends StructureVillagePieces.House1 } /** - * arguments: (World worldObj, StructureBoundingBox structBB, int minX, int minY, int minZ, int maxX, int maxY, int - * maxZ, int placeBlockId, int replaceBlockId, boolean alwaysreplace) + * arguments: (World worldObj, StructureBoundingBox structBB, int minX, + * int minY, int minZ, int maxX, int maxY, int maxZ, int placeBlockId, + * int replaceBlockId, boolean alwaysreplace) */ - this.fillWithBlocks(world, sbb, 0, 0, 0, 6, 0, 6, Blocks.cobblestone, Blocks.cobblestone, false); //Base + this.fillWithBlocks(world, sbb, 0, 0, 0, 6, 0, 6, Blocks.cobblestone, Blocks.cobblestone, false); // Base this.fillWithBlocks(world, sbb, 0, 5, 0, 6, 5, 6, Blocks.fence, Blocks.fence, false); this.fillWithBlocks(world, sbb, 1, 0, 1, 5, 0, 5, Blocks.planks, Blocks.planks, false); this.fillWithBlocks(world, sbb, 2, 0, 2, 4, 0, 4, Blocks.wool, Blocks.wool, false); - //this.fillWithBlocks(world, sbb, 0, 5, 0, 6, 5, 6, Blocks.log, Blocks.log, false); + // this.fillWithBlocks(world, sbb, 0, 5, 0, 6, 5, 6, Blocks.log, + // Blocks.log, false); - this.fillWithBlocks(world, sbb, 0, 1, 0, 0, 4, 0, Blocks.log, Blocks.log, false); //Edges + this.fillWithBlocks(world, sbb, 0, 1, 0, 0, 4, 0, Blocks.log, Blocks.log, false); // Edges this.fillWithBlocks(world, sbb, 0, 1, 6, 0, 4, 6, Blocks.log, Blocks.log, false); this.fillWithBlocks(world, sbb, 6, 1, 0, 6, 4, 0, Blocks.log, Blocks.log, false); this.fillWithBlocks(world, sbb, 6, 1, 6, 6, 4, 6, Blocks.log, Blocks.log, false); - this.fillWithBlocks(world, sbb, 0, 1, 1, 0, 1, 5, Blocks.planks, Blocks.planks, false); //Walls + this.fillWithBlocks(world, sbb, 0, 1, 1, 0, 1, 5, Blocks.planks, Blocks.planks, false); // Walls this.fillWithBlocks(world, sbb, 1, 1, 0, 5, 1, 0, Blocks.planks, Blocks.planks, false); this.fillWithBlocks(world, sbb, 6, 1, 1, 6, 1, 5, Blocks.planks, Blocks.planks, false); this.fillWithBlocks(world, sbb, 1, 1, 6, 5, 1, 6, Blocks.planks, Blocks.planks, false); @@ -89,8 +91,8 @@ public class ComponentToolWorkshop extends StructureVillagePieces.House1 this.fillWithBlocks(world, sbb, 1, 1, 1, 5, 5, 5, Blocks.air, Blocks.air, false); this.fillWithBlocks(world, sbb, 1, 4, 1, 5, 4, 5, Blocks.planks, Blocks.planks, false); - //world, blockID, metadata, x, y, z, bounds - this.placeBlockAtCurrentPosition(world, Blocks.glass_pane, 0, 1, 2, 0, sbb);//Glass and door + // world, blockID, metadata, x, y, z, bounds + this.placeBlockAtCurrentPosition(world, Blocks.glass_pane, 0, 1, 2, 0, sbb);// Glass and door this.placeBlockAtCurrentPosition(world, Blocks.planks, 0, 2, 2, 0, sbb); this.placeDoorAtCurrentPosition(world, sbb, random, 3, 1, 0, this.getMetadataWithOffset(Blocks.wooden_door, 1)); this.placeBlockAtCurrentPosition(world, Blocks.planks, 0, 4, 2, 0, sbb); @@ -114,24 +116,27 @@ public class ComponentToolWorkshop extends StructureVillagePieces.House1 this.placeBlockAtCurrentPosition(world, Blocks.glass_pane, 0, 6, 2, 4, sbb); this.placeBlockAtCurrentPosition(world, Blocks.glass_pane, 0, 6, 2, 5, sbb); - int i = this.getMetadataWithOffset(Blocks.ladder, 3); //Ladders + int i = this.getMetadataWithOffset(Blocks.ladder, 3); // Ladders this.placeBlockAtCurrentPosition(world, Blocks.ladder, i, 3, 1, 5, sbb); this.placeBlockAtCurrentPosition(world, Blocks.ladder, i, 3, 2, 5, sbb); this.placeBlockAtCurrentPosition(world, Blocks.ladder, i, 3, 3, 5, sbb); this.placeBlockAtCurrentPosition(world, Blocks.ladder, i, 3, 4, 5, sbb); - this.placeBlockAtCurrentPosition(world, TRepo.toolStationWood, 0, 1, 1, 1, sbb); //Inside + this.placeBlockAtCurrentPosition(world, TRepo.toolStationWood, 0, 1, 1, 1, sbb); // Inside this.generateStructurePatternChestContents(world, sbb, random, 1, 1, 2, TRepo.tinkerHousePatterns.getItems(random), TRepo.tinkerHousePatterns.getCount(random)); - //this.placeBlockAtCurrentPosition(world, TRepo.toolStationWood, 5, 1, 1, 2, sbb); + // this.placeBlockAtCurrentPosition(world, TRepo.toolStationWood, 5, 1, + // 1, 2, sbb); this.placeBlockAtCurrentPosition(world, TRepo.toolStationWood, 1, 1, 1, 3, sbb); this.generateStructureCraftingStationContents(world, sbb, random, 1, 1, 4, TRepo.tinkerHouseChest.getItems(random), TRepo.tinkerHouseChest.getCount(random)); - // this.placeBlockAtCurrentPosition(world, TRepo.craftingStationWood, 0, 1, 1, 4, sbb); + // this.placeBlockAtCurrentPosition(world, TRepo.craftingStationWood, 0, + // 1, 1, 4, sbb); this.placeBlockAtCurrentPosition(world, TRepo.toolStationWood, 10, 1, 1, 5, sbb); - //ChestGenHooks info = ChestGenHooks.getInfo("TinkerHouse"); + // ChestGenHooks info = ChestGenHooks.getInfo("TinkerHouse"); this.generateStructureChestContents(world, sbb, random, 4, 1, 5, TRepo.tinkerHouseChest.getItems(random), TRepo.tinkerHouseChest.getCount(random)); - //this.placeBlockAtCurrentPosition(world, Block.chest, i, 4, 1, 5, sbb); + // this.placeBlockAtCurrentPosition(world, Block.chest, i, 4, 1, 5, + // sbb); i = this.getMetadataWithOffset(Blocks.piston, 3); this.placeBlockAtCurrentPosition(world, Blocks.piston, i, 5, 1, 5, sbb); @@ -199,7 +204,8 @@ public class ComponentToolWorkshop extends StructureVillagePieces.House1 } /** - * Returns the villager type to spawn in this component, based on the number of villagers already spawned. + * Returns the villager type to spawn in this component, based on the number + * of villagers already spawned. */ protected int getVillagerType (int par1) { diff --git a/src/main/java/tconstruct/worldgen/village/VillageSmelteryHandler.java b/src/main/java/tconstruct/worldgen/village/VillageSmelteryHandler.java index d22f74ca..688604a0 100644 --- a/src/main/java/tconstruct/worldgen/village/VillageSmelteryHandler.java +++ b/src/main/java/tconstruct/worldgen/village/VillageSmelteryHandler.java @@ -24,7 +24,7 @@ public class VillageSmelteryHandler implements IVillageCreationHandler @Override public Object buildComponent (PieceWeight villagePiece, Start startPiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5) { - return ComponentSmeltery.buildComponent(startPiece, pieces, random, p1, p2, p3, p4, p5); + return ComponentSmeltery.func_74898_a(startPiece, pieces, random, p1, p2, p3, p4, p5); } }