diff --git a/resources/assets/tinker/lang/en_US.lang b/resources/assets/tinker/lang/en_US.lang index d7b95f1ac14..c15ef36113a 100644 --- a/resources/assets/tinker/lang/en_US.lang +++ b/resources/assets/tinker/lang/en_US.lang @@ -389,6 +389,7 @@ item.tconstruct.Fletching.blueslime.name=Slime Fletching item.tconstruct.manual.beginner.name=Materials and You item.tconstruct.manual.toolstation.name=Materials and You item.tconstruct.manual.smeltery.name=Mighty Smelting +item.tconstruct.manual.diary.name=Diary of a Tinker item.tconstruct.bucket.Iron.name=Molten Iron Bucket item.tconstruct.bucket.Gold.name=Molten Gold Bucket @@ -594,9 +595,9 @@ achievement.tconstruct.enemySlayer.desc=Slay a mob achievement.tconstruct.dualConvenience.desc=Kill a mob with a frying pan, and then cook their meat in it knapsack.tooltip=A Knapsack to hold your things. -strangefood1.tooltip=\u00a7b\u00a7oIt smells terrible, but if you= -strangefood2.tooltip=\u00a7b\u00a7ohave nothing else to eat...= -hambone1.tooltip=\u00A74Hambone! +strangefood1.tooltip=It smells terrible, but if you +strangefood2.tooltip=have nothing else to eat... +hambone1.tooltip=Hambone! hambone2.tooltip=Usable for Beacon bases metalblock.tooltip=Usable for Beacon bases craftedsoil1.tooltip=Heals Undead @@ -617,9 +618,9 @@ speedblock1.tooltip=You run pretty fast on it speedblock2.tooltip=You run a bit faster on it speedblock.slab1.tooltip=You run pretty fast on it speedblock.slab2.tooltip=You run a bit faster on it -manual1.tooltip=\u00a7oBy: Skyla -manual2.tooltip=\u00a7oBy: Skyla -manual3.tooltip=\u00a7oBy: Thruul M'gon +manual1.tooltip=By: Skyla +manual2.tooltip=By: Skyla +manual3.tooltip=By: Thruul M'gon searedtank1.tooltip=Contains searedtank2.tooltip=Keeps any fluids it has when harvested oreberries1.tooltip=Sweet Irony @@ -637,8 +638,8 @@ landmine1.tooltip=everything landmine2.tooltip=mobs, players and redstone landmine3.tooltip=players and redstone landmine4.tooltip=redstone only -goldenhead1.tooltip=\u00a75\u00a7oSome say consuming the head of a -goldenhead2.tooltip=\u00a75\u00a7ofallen foe strengthens the blood +goldenhead1.tooltip=Some say consuming the head of a +goldenhead2.tooltip=fallen foe strengthens the blood oreberrybush1.tooltip=Sweet Irony oreberrybush2.tooltip=Pure Luster oreberrybush3.tooltip=Tastes like metal @@ -649,3 +650,8 @@ barricade.tooltip=Stacks up to 4 times pattern1.tooltip=Material Cost: pattern2.tooltip=Material Cost: potionlauncher.tooltip=Test Item +smeltery.controller.tooltip=Brain of the Smeltery +smeltery.drain.tooltip1=Works both as input and output for +smeltery.drain.tooltip2=fluids in the Smeltery +smeltery.brick.tooltip1=Smeltery structure block +smeltery.brick.tooltip2=(Safe for decoration) diff --git a/resources/assets/tinker/manuals/firstday.xml b/resources/assets/tinker/manuals/firstday.xml index 5f069fa43a0..c7055513c94 100644 --- a/resources/assets/tinker/manuals/firstday.xml +++ b/resources/assets/tinker/manuals/firstday.xml @@ -37,19 +37,6 @@ You can then shape a material in a part builder with the pattern, then combine p Together these make the Tool Workshop. It is recommended you keep all of these nearby when using any of them. - -Oreberry Bushes - -Sometime in your travels you will happen upon the bush known as the Oreberry. They grow underground in dark areas, and require close to complete darkness to produce anything. - -The berries can be melted down into nuggets and ingots, making them an invaluable source of metals. - - - -Oreberries in their natural environment -tinker:manuals/oreberries.png - - Blank Pattern @@ -98,6 +85,49 @@ The berries can be melted down into nuggets and ingots, making them an invaluabl + +Drying Rack + + dryingrack + three + + + + +Oreberry Bushes + +Sometime in your travels you will happen upon the bush known as the Oreberry. They grow underground in dark areas, and require close to complete darkness to produce anything. + +The berries can be melted down into nuggets and ingots, making them an invaluable source of metals. + + + +Oreberries in their natural environment +tinker:manuals/oreberries.png + + + +Slime Channels + +Slime channels are useful for moving items or entities around. They are used as a sort of easily placeable water and can be paired with bounce pads for best effect. + + + +Slime Channel + + slimechannel + two + + + + +Bounce Pad + + bouncepad + two + + + A few traps or blockades may help with your early survival experience diff --git a/resources/assets/tinker/manuals/materials.xml b/resources/assets/tinker/manuals/materials.xml index 24f65b0021d..b2bf4097df6 100644 --- a/resources/assets/tinker/manuals/materials.xml +++ b/resources/assets/tinker/manuals/materials.xml @@ -673,13 +673,27 @@ Class: Ranged Projectile Launcher Steel steelsword -An Iron alloy. The method for obtaining this is unknown. Enemy chainmail seems to be made of it. +An Iron alloy. The method for obtaining this is unknown. - Requires the Smeltery
steelingot
+ +Pig Iron +pigironsword +PigIron +An Iron alloy. It seems to be made of blood, iron, and emeralds. +- Requires the Smeltery + +
pigironingot
+
+
+ + + + Diamond Adding a diamond to the edge of a tool seems to make it more resilient. diff --git a/resources/assets/tinker/manuals/smeltery.xml b/resources/assets/tinker/manuals/smeltery.xml index 17af75c5b8e..6137ea9ce20 100644 --- a/resources/assets/tinker/manuals/smeltery.xml +++ b/resources/assets/tinker/manuals/smeltery.xml @@ -48,6 +48,10 @@ The main structure for melting metals is called the Smeltery. It is larger than When working with the Smeltery, there are a few things to keep in mind: +* The Smeltery functions as a large liquid tank. It is capable of melting metals and mixing various things. + +* Drains function as input/output for the tank. If you need to get liquids back into the structure, simply pour them into a drain. + * Ores naturally have more material than processed versions, such as ingots. The Smeltery will preserve the full value of the ores - roughly twice as much as a regular furnace would provide. * Mixing two or more metals in the Smeltery may result in an alloy. The process happens automatically. @@ -127,6 +131,34 @@ Other liquid removal objects will work, but are frowned upon. An example picture Alumite, made from Aluminum(5), Iron(2), and Obsidian(2) alumiteingot + + Pig Iron, made from Iron(1), Blood(1), and Emeralds(1) + pigironingot + + + + +There exist a few liquids that are gained through strange means. Currently known liquids are: + + Blood, damaging entities in the Smeltery + bloodbucket + + + Liquified Emeralds, melting down emeralds or villagers + emeraldbucket + + + Glue, melting down horses in the Smeltery + gluebucket + + + Slime, found on slime islands. It functions as a spawner + slimebucket + + + Ender, either melting down ender pearls or endermen + enderbucket + @@ -253,4 +285,10 @@ Part casts must be created by pouring metal around existing parts, like a pickax endstone + +Glueball +glueball + + + diff --git a/resources/assets/tinker/textures/items/materials/cast_nugget.png b/resources/assets/tinker/textures/items/materials/cast_nugget.png new file mode 100644 index 00000000000..6a00ef4fe41 Binary files /dev/null and b/resources/assets/tinker/textures/items/materials/cast_nugget.png differ diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/FactoryRegistry.java b/src/api/java/powercrystals/minefactoryreloaded/api/FactoryRegistry.java index 95ce0f2f462..0384c4317e1 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/FactoryRegistry.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/FactoryRegistry.java @@ -5,6 +5,8 @@ import java.lang.reflect.Method; import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; /** * @author PowerCrystals @@ -18,480 +20,493 @@ */ public class FactoryRegistry { - /** - * Registers a plantable object with the Planter. - * - * @param plantable The thing to plant. - */ - public static void registerPlantable (IFactoryPlantable plantable) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerPlantable", IFactoryPlantable.class); - reg.invoke(registry, plantable); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a plantable object with the Planter. + * + * @param plantable The thing to plant. + */ + public static void registerPlantable(IFactoryPlantable plantable) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerPlantable", IFactoryPlantable.class); + reg.invoke(registry, plantable); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a harvestable block with the Harvester. - * - * @param harvestable The thing to harvest. - */ - public static void registerHarvestable (IFactoryHarvestable harvestable) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerHarvestable", IFactoryHarvestable.class); - reg.invoke(registry, harvestable); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a harvestable block with the Harvester. + * + * @param harvestable The thing to harvest. + */ + public static void registerHarvestable(IFactoryHarvestable harvestable) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerHarvestable", IFactoryHarvestable.class); + reg.invoke(registry, harvestable); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a fertilizable block with the Fertilizer. - * - * @param fertilizable The thing to fertilize. - */ - public static void registerFertilizable (IFactoryFertilizable fertilizable) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerFertilizable", IFactoryFertilizable.class); - reg.invoke(registry, fertilizable); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a fertilizable block with the Fertilizer. + * + * @param fertilizable The thing to fertilize. + */ + public static void registerFertilizable(IFactoryFertilizable fertilizable) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerFertilizable", IFactoryFertilizable.class); + reg.invoke(registry, fertilizable); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a fertilizer item Fertilizer. - * - * @param fertilizable The thing to fertilize with. - */ - public static void registerFertilizer (IFactoryFertilizer fertilizer) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerFertilizer", IFactoryFertilizer.class); - reg.invoke(registry, fertilizer); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a fertilizer item Fertilizer. + * + * @param fertilizable The thing to fertilize with. + */ + public static void registerFertilizer(IFactoryFertilizer fertilizer) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerFertilizer", IFactoryFertilizer.class); + reg.invoke(registry, fertilizer); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a ranchable entity with the Rancher. - * - * @param ranchable The entity to ranch. - */ - public static void registerRanchable (IFactoryRanchable ranchable) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerRanchable", IFactoryRanchable.class); - reg.invoke(registry, ranchable); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a ranchable entity with the Rancher. + * + * @param ranchable The entity to ranch. + */ + public static void registerRanchable(IFactoryRanchable ranchable) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerRanchable", IFactoryRanchable.class); + reg.invoke(registry, ranchable); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } + + /** + * Registers a grindable entity with the Grinder using the new grinder interface. This method will be renamed to the standard "registerGrindable" + * on MC 1.6. + * + * @param grindable The entity to grind. + */ + public static void registerGrindable(IFactoryGrindable grindable) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerGrindable", IFactoryGrindable.class); + reg.invoke(registry, grindable); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } + + /** + * Bans an entity class from being automatically ground by the Grinder + * + * @param blacklistedEntity Class to blacklist + */ + public static void registerGrinderBlacklist(Class ...ungrindables) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerGrinderBlacklist", Class[].class); + reg.invoke(registry, (Object[])ungrindables); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a grindable entity with the Grinder using the new grinder interface. This method will be renamed to the standard "registerGrindable" - * on MC 1.6. - * - * @param grindable The entity to grind. - */ - public static void registerGrindable (IFactoryGrindable grindable) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerGrindable", IFactoryGrindable.class); - reg.invoke(registry, grindable); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a possible output with the sludge boiler. + * + * @param weight Likelihood that this item will be produced. Lower means rarer. + * @param drop The thing being produced by the sludge boiler. + */ + public static void registerSludgeDrop(int weight, ItemStack drop) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerSludgeDrop", int.class, ItemStack.class); + reg.invoke(registry, weight, drop); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a grindable entity with the Grinder using the new grinder interface. This method will be renamed to the standard "registerGrindable" - * on MC 1.6. - * - * @param grindable The entity to grind. - */ - public static void registerGrinderBlacklist (Class... ungrindables) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerGrinderBlacklist", Class[].class); - reg.invoke(registry, (Object[]) ungrindables); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers specific food to use in the Breeder (instead of wheat) for a given mob. + * + * @param entityToBreed Entity this food will be used with. + * @param food The item to use when breeding this entity. + */ + public static void registerBreederFood(Class entityToBreed, ItemStack food) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerBreederFood", Class.class, ItemStack.class); + reg.invoke(registry, entityToBreed, food); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a possible output with the sludge boiler. - * - * @param weight Likelihood that this item will be produced. Lower means rarer. - * @param drop The thing being produced by the sludge boiler. - */ - public static void registerSludgeDrop (int weight, ItemStack drop) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerSludgeDrop", int.class, ItemStack.class); - reg.invoke(registry, weight, drop); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Bans an entity class from being collected by Safari Nets + * + * @param blacklistedEntity Class to blacklist + */ + public static void registerSafariNetBlacklist(Class blacklistedEntity) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerSafariNetBlacklist", Class.class); + reg.invoke(registry, blacklistedEntity); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers specific food to use in the Breeder (instead of wheat) for a given mob. - * - * @param entityToBreed Entity this food will be used with. - * @param food The item to use when breeding this entity. - */ - public static void registerBreederFood (Class entityToBreed, ItemStack food) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerBreederFood", Class.class, ItemStack.class); - reg.invoke(registry, entityToBreed, food); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a Safari Net handler to properly serialize a type of mob. + * + * @param handler The Safari Net handler. + */ + public static void registerSafariNetHandler(ISafariNetHandler handler) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerSafariNetHandler", ISafariNetHandler.class); + reg.invoke(registry, handler); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Bans an entity class from being collected by Safari Nets - * - * @param blacklistedEntity Class to blacklist - */ - public static void registerSafariNetBlacklist (Class blacklistedEntity) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerSafariNetBlacklist", Class.class); - reg.invoke(registry, blacklistedEntity); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } - /** - * Registers a Safari Net handler to properly serialize a type of mob. - * - * @param handler The Safari Net handler. - */ - public static void registerSafariNetHandler (ISafariNetHandler handler) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerSafariNetHandler", ISafariNetHandler.class); - reg.invoke(registry, handler); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a mob egg handler, which allows the Safari Net to properly change colors. + * + * @param handler The mob egg handler + */ + public static void registerMobEggHandler(IMobEggHandler handler) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerMobEggHandler", IMobEggHandler.class); + reg.invoke(registry, handler); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a mob egg handler, which allows the Safari Net to properly change colors. - * - * @param handler The mob egg handler - */ - public static void registerMobEggHandler (IMobEggHandler handler) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerMobEggHandler", IMobEggHandler.class); - reg.invoke(registry, handler); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Allows Rubber Trees to spawn in the specified biome. + * + * @param biome The biome name. + */ + public static void registerRubberTreeBiome(String biome) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerRubberTreeBiome", String.class); + reg.invoke(registry, biome); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Allows Rubber Trees to spawn in the specified biome. - * - * @param biome The biome name. - */ - public static void registerRubberTreeBiome (String biome) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerRubberTreeBiome", String.class); - reg.invoke(registry, biome); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers an entity as a possible output from villager random safari nets. Note that the "id" field must be initialized + * (i.e. with Entity.addEntityID()) for it to work correctly. + * + * @param savedMob A serialized mob that will be unloaded by the safari net + * @param weight The weight of this mob in the random selection + */ + public static void registerVillagerTradeMob(IRandomMobProvider mobProvider) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerVillagerTradeMob", IRandomMobProvider.class); + reg.invoke(registry, mobProvider); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers an entity as a possible output from villager random safari nets. Note that the "id" field must be initialized - * (i.e. with Entity.addEntityID()) for it to work correctly. - * - * @param savedMob A serialized mob that will be unloaded by the safari net - * @param weight The weight of this mob in the random selection - */ - public static void registerVillagerTradeMob (IRandomMobProvider mobProvider) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerVillagerTradeMob", IRandomMobProvider.class); - reg.invoke(registry, mobProvider); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a handler for drinking liquids with the straw. + * + * @param liquidId The liquid id the handler handles. + * @param liquidDrinkHandler The drink handler instance. + */ + @Deprecated + public static void registerLiquidDrinkHandler(int liquidId, ILiquidDrinkHandler liquidDrinkHandler) + { + Fluid fluid = FluidRegistry.getFluid(liquidId); + registerLiquidDrinkHandler(fluid.getName(), liquidDrinkHandler); + } - /** - * Registers a handler for drinking liquids with the straw. - * - * @param liquidId The block ID the handler handles. - * @param liquidDrinkHandler The drink handler instance. - */ - public static void registerLiquidDrinkHandler (int liquidId, ILiquidDrinkHandler liquidDrinkHandler) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerLiquidDrinkHandler", int.class, ILiquidDrinkHandler.class); - reg.invoke(registry, liquidId, liquidDrinkHandler); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a handler for drinking liquids with the straw. + * + * @param liquidId The liquid string name the handler handles. + * @param liquidDrinkHandler The drink handler instance. + */ + public static void registerLiquidDrinkHandler(String liquidId, ILiquidDrinkHandler liquidDrinkHandler) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerLiquidDrinkHandler", String.class, ILiquidDrinkHandler.class); + reg.invoke(registry, liquidId, liquidDrinkHandler); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a possible output with the laser drill. - * - * @param weight Likelihood that this item will be produced. Lower means rarer. - * @param drop The thing being produced by the laser drill. - */ - public static void registerLaserOre (int weight, ItemStack drop) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerLaserOre", int.class, ItemStack.class); - reg.invoke(registry, weight, drop); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a possible output with the laser drill. + * + * @param weight Likelihood that this item will be produced. Lower means rarer. + * @param drop The thing being produced by the laser drill. + */ + public static void registerLaserOre(int weight, ItemStack drop) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerLaserOre", int.class, ItemStack.class); + reg.invoke(registry, weight, drop); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } + + /** + * Registers a preferred ore with the laser drill. Focuses with the specified color will make the specified ore more likely. + * Used by MFR itself for vanilla: Black (Coal), Light Blue (Diamond), Lime (Emerald), Yellow (Gold), Brown (Iron), Blue (Lapis), + * Red (Redstone), and White (nether quartz). + * + * This will replace setLaserPreferredOre on MC 1.6. + * + * @param color The color that the preferred ore is being set for. White is 0. + * @param ore The ore that will be preferred by the drill when a focus with the specified color is present. + */ + public static void addLaserPreferredOre(int color, ItemStack ore) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("addLaserPreferredOre", int.class, ItemStack.class); + reg.invoke(registry, color, ore); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } + + /** + * Registers a block ID as a fruit tree log. When the Fruit Picker sees this block on the ground, it will + * begin a search in tree mode for any fruit nearby. + * + * @param fruitLogBlockId The block ID to mark as a fruit tree log. + */ + public static void registerFruitLogBlockId(Integer fruitLogBlockId) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerFruitLogBlockId", Integer.class); + reg.invoke(registry, fruitLogBlockId); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a preferred ore with the laser drill. Focuses with the specified color will make the specified ore more likely. - * Used by MFR itself for vanilla: Black (Coal), Light Blue (Diamond), Lime (Emerald), Yellow (Gold), Brown (Iron), Blue (Lapis), - * Red (Redstone), and White (nether quartz). - * - * This will replace setLaserPreferredOre on MC 1.6. - * - * @param color The color that the preferred ore is being set for. White is 0. - * @param ore The ore that will be preferred by the drill when a focus with the specified color is present. - */ - public static void addLaserPreferredOre (int color, ItemStack ore) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("addLaserPreferredOre", int.class, ItemStack.class); - reg.invoke(registry, color, ore); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a fruit for the Fruit Picker. + * + * @param fruit The fruit to be picked. + */ + public static void registerFruit(IFactoryFruit fruit) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerFruit", IFactoryFruit.class); + reg.invoke(registry, fruit); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a block ID as a fruit tree log. When the Fruit Picker sees this block on the ground, it will - * begin a search in tree mode for any fruit nearby. - * - * @param fruitLogBlockId The block ID to mark as a fruit tree log. - */ - public static void registerFruitLogBlockId (Integer fruitLogBlockId) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerFruitLogBlockId", Integer.class); - reg.invoke(registry, fruitLogBlockId); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers an entity string as an invalid entry for the autospawner. + * See also: {@link net.minecraft.entity.EntityList}'s classToStringMapping and stringToClassMapping. + * + * @param entityString The entity string to blacklist. + */ + public static void registerAutoSpawnerBlacklist(String entityString) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerAutoSpawnerBlacklist", String.class); + reg.invoke(registry, entityString); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a fruit for the Fruit Picker. - * - * @param fruit The fruit to be picked. - */ - public static void registerFruit (IFactoryFruit fruit) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerFruit", IFactoryFruit.class); - reg.invoke(registry, fruit); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } - - /** - * Registers an entity string as an invalid entry for the autospawner. - * See also: {@link net.minecraft.entity.EntityList}'s classToStringMapping and stringToClassMapping. - * - * @param entityString The entity string to blacklist. - */ - public static void registerAutoSpawnerBlacklist (String entityString) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerAutoSpawnerBlacklist", String.class); - reg.invoke(registry, entityString); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } - - /** - * Registers logic circuit to be usable in the Programmable RedNet Controller. - * - * @param circuit The circuit to be registered. - */ - public static void registerRedNetLogicCircuit (IRedNetLogicCircuit circuit) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if (registry != null) - { - Method reg = registry.getMethod("registerRedNetLogicCircuit", IRedNetLogicCircuit.class); - reg.invoke(registry, circuit); - } - } - catch (Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers logic circuit to be usable in the Programmable RedNet Controller. + * + * @param circuit The circuit to be registered. + */ + public static void registerRedNetLogicCircuit(IRedNetLogicCircuit circuit) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if(registry != null) + { + Method reg = registry.getMethod("registerRedNetLogicCircuit", IRedNetLogicCircuit.class); + reg.invoke(registry, circuit); + } + } + catch(Exception e) + { + e.printStackTrace(); + } + } } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/FarmingRegistry.java b/src/api/java/powercrystals/minefactoryreloaded/api/FarmingRegistry.java new file mode 100644 index 00000000000..b4f16603c62 --- /dev/null +++ b/src/api/java/powercrystals/minefactoryreloaded/api/FarmingRegistry.java @@ -0,0 +1,42 @@ +package powercrystals.minefactoryreloaded.api; + +import cpw.mods.fml.common.FMLLog; +import cpw.mods.fml.common.Loader; + +import net.minecraft.item.ItemStack; +import powercrystals.minefactoryreloaded.api.rednet.IRedNetLogicCircuit; + +/** + * NO-OP + * @deprecated for FactoryRegistry + */ +@Deprecated +public class FarmingRegistry +{ + private static void alert() + { + FMLLog.severe("%s is using a removed API and may crash the game.", + Loader.instance().activeModContainer().getName()); + new Throwable().printStackTrace(); + } + public static void registerPlantable(IFactoryPlantable plantable) { alert(); } + public static void registerHarvestable(IFactoryHarvestable harvestable) { alert(); } + public static void registerFertilizable(IFactoryFertilizable fertilizable) { alert(); } + public static void registerFertilizer(IFactoryFertilizer fertilizer) { alert(); } + public static void registerRanchable(IFactoryRanchable ranchable) { alert(); } + public static void registerGrindable(IFactoryGrindable grindable) { alert(); } + public static void registerSludgeDrop(int weight, ItemStack drop) { alert(); } + public static void registerBreederFood(Class entityToBreed, ItemStack food) { alert(); } + public static void registerSafariNetHandler(ISafariNetHandler handler) { alert(); } + public static void registerMobEggHandler(IMobEggHandler handler) { alert(); } + public static void registerRubberTreeBiome(String biome) { alert(); } + public static void registerSafariNetBlacklist(Class blacklistedEntity) { alert(); } + public static void registerVillagerTradeMob(IRandomMobProvider mobProvider) { alert(); } + public static void registerLiquidDrinkHandler(int liquidId, ILiquidDrinkHandler liquidDrinkHandler) { alert(); } + public static void registerLaserOre(int weight, ItemStack drop) { alert(); } + public static void setLaserPreferredOre(int color, ItemStack ore) { alert(); } + public static void registerFruitLogBlockId(Integer fruitLogBlockId) { alert(); } + public static void registerFruit(IFactoryFruit fruit) { alert(); } + public static void registerAutoSpawnerBlacklist(String entityString) { alert(); } + public static void registerRedNetLogicCircuit(IRedNetLogicCircuit circuit) { alert(); } +} diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/FertilizerType.java b/src/api/java/powercrystals/minefactoryreloaded/api/FertilizerType.java index 7d4f5be5d6f..15e8bfb362b 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/FertilizerType.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/FertilizerType.java @@ -8,16 +8,16 @@ */ public enum FertilizerType { - /** - * The fertilizer will fertilize grass. - */ - Grass, - /** - * The fertilizer will grow a plant. - */ - GrowPlant, - /** - * The fertilizer will grow magical crops. - */ - GrowMagicalCrop, + /** + * The fertilizer will fertilize grass. + */ + Grass, + /** + * The fertilizer will grow a plant. + */ + GrowPlant, + /** + * The fertilizer will grow magical crops. + */ + GrowMagicalCrop, } \ No newline at end of file diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/HarvestType.java b/src/api/java/powercrystals/minefactoryreloaded/api/HarvestType.java index 02f92eb32d5..1552eb57c93 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/HarvestType.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/HarvestType.java @@ -7,28 +7,28 @@ */ public enum HarvestType { - /** - * Just break the single block - no special action needed. Carrots, flowers, etc. - */ - Normal, - /** - * Search for identical blocks above. - */ - Column, - /** - * Search for identical blocks above but leave this bottom one for the future. Cactus and sugarcane. - */ - LeaveBottom, - /** - * This block is the base of a tree and the harvester should enter tree-cutting mode. - */ - Tree, - /** - * This block is the base of the tree and the harvester should enter tree-cutting mode, but the tree grows upside-down. - */ - TreeFlipped, - /** - * This block is part of a tree as above, but leaves are cut before tree logs so that leaves do not decay more than necessary. - */ - TreeLeaf + /** + * Just break the single block - no special action needed. Carrots, flowers, etc. + */ + Normal, + /** + * Search for identical blocks above. + */ + Column, + /** + * Search for identical blocks above but leave this bottom one for the future. Cactus and sugarcane. + */ + LeaveBottom, + /** + * This block is the base of a tree and the harvester should enter tree-cutting mode. + */ + Tree, + /** + * This block is the base of the tree and the harvester should enter tree-cutting mode, but the tree grows upside-down. + */ + TreeFlipped, + /** + * This block is part of a tree as above, but leaves are cut before tree logs so that leaves do not decay more than necessary. + */ + TreeLeaf } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/IDeepStorageUnit.java b/src/api/java/powercrystals/minefactoryreloaded/api/IDeepStorageUnit.java index d7039908026..02d36faec17 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/IDeepStorageUnit.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/IDeepStorageUnit.java @@ -4,23 +4,23 @@ public interface IDeepStorageUnit { - /** - * @return A populated ItemStack with stackSize for the full amount of materials in the DSU. May have a stackSize > getMaxStackSize(). - */ - ItemStack getStoredItemType (); - - /** - * Sets the total amount of the item currently being stored, or zero if it wants to remove all items. - */ - void setStoredItemCount (int amount); - - /** - * Sets the type of the stored item and initializes the number of stored items to amount. Will overwrite any existing stored items. - */ - void setStoredItemType (ItemStack type, int amount); - - /** - * @return The maximum number of items the DSU can hold. - */ - int getMaxStoredCount (); + /** + * @return A populated ItemStack with stackSize for the full amount of materials in the DSU. May have a stackSize > getMaxStackSize(). + */ + ItemStack getStoredItemType(); + + /** + * Sets the total amount of the item currently being stored, or zero if it wants to remove all items. + */ + void setStoredItemCount(int amount); + + /** + * Sets the type of the stored item and initializes the number of stored items to amount. Will overwrite any existing stored items. + */ + void setStoredItemType(ItemStack type, int amount); + + /** + * @return The maximum number of items the DSU can hold. + */ + int getMaxStoredCount(); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryFertilizable.java b/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryFertilizable.java index f5408bf7130..1374d597c32 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryFertilizable.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryFertilizable.java @@ -12,29 +12,29 @@ */ public interface IFactoryFertilizable { - /** - * @return The block ID this instance is managing. - */ - public int getFertilizableBlockId (); - - /** - * @param world The world this block belongs to. - * @param x The X coordinate of this block. - * @param y The Y coordinate of this block. - * @param z The Z coordinate of this block. - * @param fertilizerType The kind of fertilizer being used. - * @return True if the block at (x,y,z) can be fertilized with the given type of fertilizer. - */ - public boolean canFertilizeBlock (World world, int x, int y, int z, FertilizerType fertilizerType); - - /** - * @param world The world this block belongs to. - * @param rand A Random instance to use when fertilizing, if necessary. - * @param x The X coordinate of this block. - * @param y The Y coordinate of this block. - * @param z The Z coordinate of this block. - * @param fertilizerType The kind of fertilizer being used. - * @return True if fertilization was successful. If false, the Fertilizer will not consume a fertilizer item and will not drain power. - */ - public boolean fertilize (World world, Random rand, int x, int y, int z, FertilizerType fertilizerType); + /** + * @return The block ID this instance is managing. + */ + public int getFertilizableBlockId(); + + /** + * @param world The world this block belongs to. + * @param x The X coordinate of this block. + * @param y The Y coordinate of this block. + * @param z The Z coordinate of this block. + * @param fertilizerType The kind of fertilizer being used. + * @return True if the block at (x,y,z) can be fertilized with the given type of fertilizer. + */ + public boolean canFertilizeBlock(World world, int x, int y, int z, FertilizerType fertilizerType); + + /** + * @param world The world this block belongs to. + * @param rand A Random instance to use when fertilizing, if necessary. + * @param x The X coordinate of this block. + * @param y The Y coordinate of this block. + * @param z The Z coordinate of this block. + * @param fertilizerType The kind of fertilizer being used. + * @return True if fertilization was successful. If false, the Fertilizer will not consume a fertilizer item and will not drain power. + */ + public boolean fertilize(World world, Random rand, int x, int y, int z, FertilizerType fertilizerType); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryFertilizer.java b/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryFertilizer.java index 2f673b8028c..08589c121f7 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryFertilizer.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryFertilizer.java @@ -9,25 +9,25 @@ */ public interface IFactoryFertilizer { - /** - * @return The ID of this fertilizer item. - */ - int getFertilizerId (); - - /** - * @return The metadata of this fertilizer item. - */ - int getFertilizerMeta (); - - /** - * @return The type of fertilizer this is. - */ - FertilizerType getFertilizerType (); - - /** - * Called when a fertilization is successful. If you set the ItemStack size to 0, it will be deleted by the fertilizer. - * - * @param fertilizer The ItemStack used to fertilize. - */ - void consume (ItemStack fertilizer); + /** + * @return The ID of this fertilizer item. + */ + int getFertilizerId(); + + /** + * @return The metadata of this fertilizer item. + */ + int getFertilizerMeta(); + + /** + * @return The type of fertilizer this is. + */ + FertilizerType getFertilizerType(); + + /** + * Called when a fertilization is successful. If you set the ItemStack size to 0, it will be deleted by the fertilizer. + * + * @param fertilizer The ItemStack used to fertilize. + */ + void consume(ItemStack fertilizer); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryFruit.java b/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryFruit.java index 256c7733423..65ed9f96b57 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryFruit.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryFruit.java @@ -14,56 +14,56 @@ */ public interface IFactoryFruit { - /** - * @return The block ID this fruit has in the world. - */ - public int getSourceBlockId (); - - /** - * Used to determine if this fruit can be picked (is it ripe yet, etc) - * @param world The world where the fruit is being picked - * @param x The x-coordinate of the fruit - * @param y The y-coordinate of the fruit - * @param z The z-coordinate of the fruit - * @return True if the fruit can be picked - */ - public boolean canBePicked (World world, int x, int y, int z); - - /** - * Called by the Fruit Picker to determine what block to replace the picked block with. Only ID and meta/damage will be used. - * At the time this method is called, the fruit still exists. Do not pass an item ID as the return value. - * @param world The world where the fruit is being picked - * @param x The x-coordinate of the fruit - * @param y The y-coordinate of the fruit - * @param z The z-coordinate of the fruit - * @return The block to replace the fruit block with, or null for air. - */ - public ItemStack getReplacementBlock (World world, int x, int y, int z); - - /** - * Called by the Fruit Picker before the fruit is picked. - * @param world The world where the fruit is being picked - * @param x The x-coordinate of the fruit - * @param y The y-coordinate of the fruit - * @param z The z-coordinate of the fruit - */ - public void prePick (World world, int x, int y, int z); - - /** - * Called by the Fruit Picker to determine what drops to generate. At the time this method is called, the fruit still exists. - * @param world The world where the fruit is being picked - * @param x The x-coordinate of the fruit - * @param y The y-coordinate of the fruit - * @param z The z-coordinate of the fruit - */ - public List getDrops (World world, Random rand, int x, int y, int z); - - /** - * Called by the Fruit Picker after the fruit is picked. - * @param world The world where the fruit is being picked - * @param x The x-coordinate of the fruit - * @param y The y-coordinate of the fruit - * @param z The z-coordinate of the fruit - */ - public void postPick (World world, int x, int y, int z); + /** + * @return The block ID this fruit has in the world. + */ + public int getSourceBlockId(); + + /** + * Used to determine if this fruit can be picked (is it ripe yet, etc) + * @param world The world where the fruit is being picked + * @param x The x-coordinate of the fruit + * @param y The y-coordinate of the fruit + * @param z The z-coordinate of the fruit + * @return True if the fruit can be picked + */ + public boolean canBePicked(World world, int x, int y, int z); + + /** + * Called by the Fruit Picker to determine what block to replace the picked block with. Only ID and meta/damage will be used. + * At the time this method is called, the fruit still exists. Do not pass an item ID as the return value. + * @param world The world where the fruit is being picked + * @param x The x-coordinate of the fruit + * @param y The y-coordinate of the fruit + * @param z The z-coordinate of the fruit + * @return The block to replace the fruit block with, or null for air. + */ + public ItemStack getReplacementBlock(World world, int x, int y, int z); + + /** + * Called by the Fruit Picker before the fruit is picked. + * @param world The world where the fruit is being picked + * @param x The x-coordinate of the fruit + * @param y The y-coordinate of the fruit + * @param z The z-coordinate of the fruit + */ + public void prePick(World world, int x, int y, int z); + + /** + * Called by the Fruit Picker to determine what drops to generate. At the time this method is called, the fruit still exists. + * @param world The world where the fruit is being picked + * @param x The x-coordinate of the fruit + * @param y The y-coordinate of the fruit + * @param z The z-coordinate of the fruit + */ + public List getDrops(World world, Random rand, int x, int y, int z); + + /** + * Called by the Fruit Picker after the fruit is picked. + * @param world The world where the fruit is being picked + * @param x The x-coordinate of the fruit + * @param y The y-coordinate of the fruit + * @param z The z-coordinate of the fruit + */ + public void postPick(World world, int x, int y, int z); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryGrindable.java b/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryGrindable.java index cefe9604e29..88eef0615dc 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryGrindable.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryGrindable.java @@ -14,23 +14,23 @@ @SuppressWarnings("deprecation") public interface IFactoryGrindable { - /** - * @return The class that this grindable instance is handling. This must be a subtype of EntityLivingBase or the entity will never - * be noticed by the Grinder. - */ - public Class getGrindableEntity (); + /** + * @return The class that this grindable instance is handling. This must be a subtype of EntityLivingBase or the entity will never + * be noticed by the Grinder. + */ + public Class getGrindableEntity(); - /** - * @param world The world this entity is in. - * @param entity The entity instance being ground. - * @param random A Random instance. - * @return The drops generated when this entity is killed. - */ - public List grind (World world, EntityLivingBase entity, Random random); + /** + * @param world The world this entity is in. + * @param entity The entity instance being ground. + * @param random A Random instance. + * @return The drops generated when this entity is killed. + */ + public List grind(World world, EntityLivingBase entity, Random random); - /** - * @param entity The entity instance being ground. - * @return Whether this entity has been fully processed or not. - */ - public boolean processEntity (EntityLivingBase entity); + /** + * @param entity The entity instance being ground. + * @return Whether this entity has been fully processed or not. + */ + public boolean processEntity(EntityLivingBase entity); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryHarvestable.java b/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryHarvestable.java index 39b8a86dd4f..63707375a28 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryHarvestable.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryHarvestable.java @@ -14,57 +14,58 @@ */ public interface IFactoryHarvestable { - /** - * @return The block ID this harvestable instance is managing. - */ - public int getPlantId (); - - /** - * @return The type of harvest the Harvester should perform on this block. - */ - public HarvestType getHarvestType (); - - /** - * @return Whether or not the Harvester should break the block when harvesting. If false, no changes will be performed by the Harvester itself. - */ - public boolean breakBlock (); - - /** - * @param world The world this block is in. - * @param harvesterSettings The harvester's current settings. Do not modify these. - * @param x The X coordinate of the block being harvested. - * @param y The Y coordinate of the block being harvested. - * @param z The Z coordinate of the block being harvested. - * @return True if this block can be harvested. - */ - public boolean canBeHarvested (World world, Map harvesterSettings, int x, int y, int z); - - /** - * @param world The world this block is in. - * @param rand A Random instance to use when generating drops. - * @param harvesterSettings The harvester's current settings. Do not modify these. - * @param x The X coordinate of the block being harvested. - * @param y The Y coordinate of the block being harvested. - * @param z The Z coordinate of the block being harvested. - * @return The drops generated by breaking this block. For a default implementation, calling Block.getBlockDropped() is usually sufficient. - */ - public List getDrops (World world, Random rand, Map harvesterSettings, int x, int y, int z); - - /** - * Called before the block is going to be harvested. Usually empty. - * @param world The world this block is in. - * @param x The X coordinate of the block being harvested. - * @param y The Y coordinate of the block being harvested. - * @param z The Z coordinate of the block being harvested. - */ - public void preHarvest (World world, int x, int y, int z); - - /** - * Called after the block is going to be harvested. Used to re-till soil, for example. - * @param world The world this block is in. - * @param x The X coordinate of the block being harvested. - * @param y The Y coordinate of the block being harvested. - * @param z The Z coordinate of the block being harvested. - */ - public void postHarvest (World world, int x, int y, int z); + /** + * @return The block ID this harvestable instance is managing. + */ + public int getPlantId(); + + /** + * @return The type of harvest the Harvester should perform on this block. + */ + public HarvestType getHarvestType(); + + + /** + * @return Whether or not the Harvester should break the block when harvesting. If false, no changes will be performed by the Harvester itself. + */ + public boolean breakBlock(); + + /** + * @param world The world this block is in. + * @param harvesterSettings The harvester's current settings. Do not modify these. + * @param x The X coordinate of the block being harvested. + * @param y The Y coordinate of the block being harvested. + * @param z The Z coordinate of the block being harvested. + * @return True if this block can be harvested. + */ + public boolean canBeHarvested(World world, Map harvesterSettings, int x, int y, int z); + + /** + * @param world The world this block is in. + * @param rand A Random instance to use when generating drops. + * @param harvesterSettings The harvester's current settings. Do not modify these. + * @param x The X coordinate of the block being harvested. + * @param y The Y coordinate of the block being harvested. + * @param z The Z coordinate of the block being harvested. + * @return The drops generated by breaking this block. For a default implementation, calling Block.getBlockDropped() is usually sufficient. + */ + public List getDrops(World world, Random rand, Map harvesterSettings, int x, int y, int z); + + /** + * Called before the block is going to be harvested. Usually empty. + * @param world The world this block is in. + * @param x The X coordinate of the block being harvested. + * @param y The Y coordinate of the block being harvested. + * @param z The Z coordinate of the block being harvested. + */ + public void preHarvest(World world, int x, int y, int z); + + /** + * Called after the block is going to be harvested. Used to re-till soil, for example. + * @param world The world this block is in. + * @param x The X coordinate of the block being harvested. + * @param y The Y coordinate of the block being harvested. + * @param z The Z coordinate of the block being harvested. + */ + public void postHarvest(World world, int x, int y, int z); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryPlantable.java b/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryPlantable.java index 95453383efa..29bc7fbc6f5 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryPlantable.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryPlantable.java @@ -10,58 +10,58 @@ */ public interface IFactoryPlantable { - /** - * @return The block or item ID this plantable is managing. - */ - public int getSeedId (); - - /** - * @param world The world instance this block or item will be placed into. - * @param x The destination X coordinate. - * @param y The destination Y coordinate. - * @param z The destination Z coordinate. - * @param stack The stack being planted. - * @return The block ID that will be placed into the world. - */ - public int getPlantedBlockId (World world, int x, int y, int z, ItemStack stack); - - /** - * @param world The world instance this block or item will be placed into. - * @param x The destination X coordinate. - * @param y The destination Y coordinate. - * @param z The destination Z coordinate. - * @param stack The stack being planted. - * @return The block metadata that will be placed into the world. - */ - public int getPlantedBlockMetadata (World world, int x, int y, int z, ItemStack stack); - - /** - * @param world The world instance this block or item will be placed into. - * @param x The destination X coordinate. - * @param y The destination Y coordinate. - * @param z The destination Z coordinate. - * @param stack The stack being planted. - * @return True if this plantable can be placed at the provided coordinates. - */ - public boolean canBePlantedHere (World world, int x, int y, int z, ItemStack stack); - - /** - * Called before planting is performed. Used to till soil, for example. - * @param world The world instance this block or item will be placed into. - * @param x The destination X coordinate. - * @param y The destination Y coordinate. - * @param z The destination Z coordinate. - * @param stack The stack being planted. - */ - public void prePlant (World world, int x, int y, int z, ItemStack stack); - - /** - * Called after planting is performed. Usually empty. - * @param world The world instance this block or item will be placed into. - * @param x The destination X coordinate. - * @param y The destination Y coordinate. - * @param z The destination Z coordinate. - * @param stack The stack being planted. - */ - public void postPlant (World world, int x, int y, int z, ItemStack stack); + /** + * @return The block or item ID this plantable is managing. + */ + public int getSeedId(); + + /** + * @param world The world instance this block or item will be placed into. + * @param x The destination X coordinate. + * @param y The destination Y coordinate. + * @param z The destination Z coordinate. + * @param stack The stack being planted. + * @return The block ID that will be placed into the world. + */ + public int getPlantedBlockId(World world, int x, int y, int z, ItemStack stack); + + /** + * @param world The world instance this block or item will be placed into. + * @param x The destination X coordinate. + * @param y The destination Y coordinate. + * @param z The destination Z coordinate. + * @param stack The stack being planted. + * @return The block metadata that will be placed into the world. + */ + public int getPlantedBlockMetadata(World world, int x, int y, int z, ItemStack stack); + + /** + * @param world The world instance this block or item will be placed into. + * @param x The destination X coordinate. + * @param y The destination Y coordinate. + * @param z The destination Z coordinate. + * @param stack The stack being planted. + * @return True if this plantable can be placed at the provided coordinates. + */ + public boolean canBePlantedHere(World world, int x, int y, int z, ItemStack stack); + + /** + * Called before planting is performed. Used to till soil, for example. + * @param world The world instance this block or item will be placed into. + * @param x The destination X coordinate. + * @param y The destination Y coordinate. + * @param z The destination Z coordinate. + * @param stack The stack being planted. + */ + public void prePlant(World world, int x, int y, int z, ItemStack stack); + + /** + * Called after planting is performed. Usually empty. + * @param world The world instance this block or item will be placed into. + * @param x The destination X coordinate. + * @param y The destination Y coordinate. + * @param z The destination Z coordinate. + * @param stack The stack being planted. + */ + public void postPlant(World world, int x, int y, int z, ItemStack stack); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryRanchable.java b/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryRanchable.java index 00bc2be3342..36327c53761 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryRanchable.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/IFactoryRanchable.java @@ -13,16 +13,16 @@ */ public interface IFactoryRanchable { - /** - * @return The entity being ranched. Must be a subtype of EntityLivingBase. - */ - public Class getRanchableEntity (); - - /** - * @param world The world this entity is in. - * @param entity The entity instance being ranched. - * @param rancher The rancher instance doing the ranching. Used to access the Rancher's inventory when milking cows, for example. - * @return A list of drops. - */ - public List ranch (World world, EntityLivingBase entity, IInventory rancher); + /** + * @return The entity being ranched. Must be a subtype of EntityLivingBase. + */ + public Class getRanchableEntity(); + + /** + * @param world The world this entity is in. + * @param entity The entity instance being ranched. + * @param rancher The rancher instance doing the ranching. Used to access the Rancher's inventory when milking cows, for example. + * @return A list of drops. + */ + public List ranch(World world, EntityLivingBase entity, IInventory rancher); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/ILiquidDrinkHandler.java b/src/api/java/powercrystals/minefactoryreloaded/api/ILiquidDrinkHandler.java index 04ddf78cd48..2ab4a586796 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/ILiquidDrinkHandler.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/ILiquidDrinkHandler.java @@ -4,5 +4,5 @@ public interface ILiquidDrinkHandler { - public void onDrink (EntityPlayer player); + public void onDrink(EntityPlayer player); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/IMobEggHandler.java b/src/api/java/powercrystals/minefactoryreloaded/api/IMobEggHandler.java index 4d9d65ce1f0..a322f923f0b 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/IMobEggHandler.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/IMobEggHandler.java @@ -10,9 +10,9 @@ */ public interface IMobEggHandler { - /** - * @param safariNet The Safari Net that is looking for egg info. - * @return An EntityEggInfo, or null if this instance cannot handle this mob. - */ - public EntityEggInfo getEgg (ItemStack safariNet); + /** + * @param safariNet The Safari Net that is looking for egg info. + * @return An EntityEggInfo, or null if this instance cannot handle this mob. + */ + public EntityEggInfo getEgg(ItemStack safariNet); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/INeedleAmmo.java b/src/api/java/powercrystals/minefactoryreloaded/api/INeedleAmmo.java index 5a79b083d9d..db061304755 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/INeedleAmmo.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/INeedleAmmo.java @@ -6,9 +6,7 @@ public interface INeedleAmmo { - public boolean onHitEntity (EntityPlayer owner, Entity hit, double distance); - - public void onHitBlock (EntityPlayer owner, World world, int x, int y, int z, int side, double distance); - - public float getSpread (); + public boolean onHitEntity(EntityPlayer owner, Entity hit, double distance); + public void onHitBlock(EntityPlayer owner, World world, int x, int y, int z, int side, double distance); + public float getSpread(); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/IRandomMobProvider.java b/src/api/java/powercrystals/minefactoryreloaded/api/IRandomMobProvider.java index 7d49928571c..b03d6f08a3b 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/IRandomMobProvider.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/IRandomMobProvider.java @@ -4,7 +4,8 @@ import net.minecraft.world.World; + public interface IRandomMobProvider { - public List getRandomMobs (World world); + public List getRandomMobs(World world); } \ No newline at end of file diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/ISafariNetHandler.java b/src/api/java/powercrystals/minefactoryreloaded/api/ISafariNetHandler.java index cb9e5259d97..370017956a2 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/ISafariNetHandler.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/ISafariNetHandler.java @@ -12,17 +12,17 @@ */ public interface ISafariNetHandler { - /** - * @return The class of mob that this handler applies to. - */ - public Class validFor (); - - /** - * @param safariNetStack The Safari Net that is requesting information. - * @param player The player holding the Safari Net. - * @param infoList The current list of information strings. Add yours to this. - * @param advancedTooltips True if the advanced tooltips option is on. - */ - @SuppressWarnings("rawtypes") - public void addInformation (ItemStack safariNetStack, EntityPlayer player, List infoList, boolean advancedTooltips); + /** + * @return The class of mob that this handler applies to. + */ + public Class validFor(); + + /** + * @param safariNetStack The Safari Net that is requesting information. + * @param player The player holding the Safari Net. + * @param infoList The current list of information strings. Add yours to this. + * @param advancedTooltips True if the advanced tooltips option is on. + */ + @SuppressWarnings("rawtypes") + public void addInformation(ItemStack safariNetStack, EntityPlayer player, List infoList, boolean advancedTooltips); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/ISyringe.java b/src/api/java/powercrystals/minefactoryreloaded/api/ISyringe.java index 289eb3b99e0..75cff08db01 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/ISyringe.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/ISyringe.java @@ -11,21 +11,21 @@ */ public interface ISyringe { - /** - * Called when the vet is deciding if it should use this syringe. - * @param world The world instance. - * @param entity The entity being injected. - * @param syringe The syringe ItemStack. - * @return True if the entity can be injected by this syringe. - */ - public boolean canInject (World world, EntityLivingBase entity, ItemStack syringe); - - /** - * Called to perform an injection. - * @param world The world instance. - * @param entity The entity being injected. - * @param syringe The syringe ItemStack. - * @return True if injection was successful. - */ - public boolean inject (World world, EntityLivingBase entity, ItemStack syringe); + /** + * Called when the vet is deciding if it should use this syringe. + * @param world The world instance. + * @param entity The entity being injected. + * @param syringe The syringe ItemStack. + * @return True if the entity can be injected by this syringe. + */ + public boolean canInject(World world, EntityLivingBase entity, ItemStack syringe); + + /** + * Called to perform an injection. + * @param world The world instance. + * @param entity The entity being injected. + * @param syringe The syringe ItemStack. + * @return True if injection was successful. + */ + public boolean inject(World world, EntityLivingBase entity, ItemStack syringe); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/IToolHammerAdvanced.java b/src/api/java/powercrystals/minefactoryreloaded/api/IToolHammerAdvanced.java index 24a187e14d5..9c45234952e 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/IToolHammerAdvanced.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/IToolHammerAdvanced.java @@ -12,5 +12,5 @@ */ public interface IToolHammerAdvanced { - public boolean isActive (ItemStack stack); + public boolean isActive(ItemStack stack); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/MobDrop.java b/src/api/java/powercrystals/minefactoryreloaded/api/MobDrop.java index 4fecbc1a180..c6c6dcb360b 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/MobDrop.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/MobDrop.java @@ -5,18 +5,17 @@ public class MobDrop extends WeightedRandomItem { - private ItemStack _stack; - - public MobDrop(int weight, ItemStack stack) - { - super(weight); - _stack = stack; - } - - public ItemStack getStack () - { - if (_stack == null) - return null; - return _stack.copy(); - } + private ItemStack _stack; + + public MobDrop(int weight, ItemStack stack) + { + super(weight); + _stack = stack; + } + + public ItemStack getStack() + { + if(_stack == null) return null; + return _stack.copy(); + } } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/RanchedItem.java b/src/api/java/powercrystals/minefactoryreloaded/api/RanchedItem.java index 7d72b6b8a9d..86791cc5468 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/RanchedItem.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/RanchedItem.java @@ -10,60 +10,59 @@ * * Defines an ItemStack or a FluidStack that is the result of an entity being ranched */ -public final class RanchedItem -{ - private final ItemStack item; - private final FluidStack fluid; +public final class RanchedItem { + private final ItemStack item; + private final FluidStack fluid; + + public RanchedItem(Block item, int amount, int meta) + { + this(new ItemStack(item, amount, meta)); + } + + public RanchedItem(Block item, int amount) + { + this(new ItemStack(item, amount)); + } - public RanchedItem(Block item, int amount, int meta) - { - this(new ItemStack(item, amount, meta)); - } - - public RanchedItem(Block item, int amount) - { - this(new ItemStack(item, amount)); - } - - public RanchedItem(Block item) - { - this(new ItemStack(item)); - } - - public RanchedItem(Item item, int amount, int meta) - { - this(new ItemStack(item, amount, meta)); - } - - public RanchedItem(Item item, int amount) - { - this(new ItemStack(item, amount)); - } - - public RanchedItem(Item item) - { - this(new ItemStack(item)); - } - - public RanchedItem(ItemStack item) - { - this.item = item; - fluid = null; - } - - public RanchedItem(FluidStack fluid) - { - this.fluid = fluid; - item = null; - } - - public boolean hasFluid () - { - return item == null & fluid != null; - } - - public Object getResult () - { - return item == null ? fluid : item; - } + public RanchedItem(Block item) + { + this(new ItemStack(item)); + } + + public RanchedItem(Item item, int amount, int meta) + { + this(new ItemStack(item, amount, meta)); + } + + public RanchedItem(Item item, int amount) + { + this(new ItemStack(item, amount)); + } + + public RanchedItem(Item item) + { + this(new ItemStack(item)); + } + + public RanchedItem(ItemStack item) + { + this.item = item; + fluid = null; + } + + public RanchedItem(FluidStack fluid) + { + this.fluid = fluid; + item = null; + } + + public boolean hasFluid() + { + return item == null & fluid != null; + } + + public Object getResult() + { + return item == null ? fluid : item; + } } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/RandomMob.java b/src/api/java/powercrystals/minefactoryreloaded/api/RandomMob.java index 29aee5a8365..063699dd6eb 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/RandomMob.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/RandomMob.java @@ -5,18 +5,17 @@ public class RandomMob extends WeightedRandomItem { - private Entity _mob; - - public RandomMob(Entity savedMob, int weight) - { - super(weight); - _mob = savedMob; - } - - public Entity getMob () - { - if (_mob == null) - return null; - return _mob; - } + private Entity _mob; + + public RandomMob(Entity savedMob, int weight) + { + super(weight); + _mob = savedMob; + } + + public Entity getMob() + { + if(_mob == null) return null; + return _mob; + } } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IConnectableRedNet.java b/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IConnectableRedNet.java index 678fb4f0285..3c8529db96e 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IConnectableRedNet.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IConnectableRedNet.java @@ -21,66 +21,66 @@ */ public interface IConnectableRedNet { - /** - * Returns the connection type of this Block. "All" types will cause getOutputValues() and onInputsChanged() to be used, - * whereas "Single" types will onInputChanged() to be called for input changes and the normal redstone power output methods - * to be called for output. If this value must be changed while the block is alive, it must perform a block update on any - * adjacent RedNet wires. - * @param world The world this block is in. - * @param x This block's X coordinate. - * @param y This block's Y coordinate. - * @param z This block's Z coordinate. - * @param side The side that connection information is required for. - * @return The connection type. - */ - public RedNetConnectionType getConnectionType (World world, int x, int y, int z, ForgeDirection side); - - /** - * Returns the output values of this RedNet node. This array must be 16 elements long. Only called if your block is connected in "All" mode. - * @param world The world this block is in. - * @param x This block's X coordinate. - * @param y This block's Y coordinate. - * @param z This block's Z coordinate. - * @param side The side the output values are required for. - * @return The output values. - */ - public int[] getOutputValues (World world, int x, int y, int z, ForgeDirection side); - - /** - * Returns the output value of this RedNet node for a given subnet. Only called if your block is connected in "All" mode. - * @param world The world this block is in. - * @param x This block's X coordinate. - * @param y This block's Y coordinate. - * @param z This block's Z coordinate. - * @param side The side the output value is required for. - * @param subnet The subnet to get the output value for (0-15). - * @return The output value. - */ - public int getOutputValue (World world, int x, int y, int z, ForgeDirection side, int subnet); - - /** - * Called when the input values to this block change. Only called if your block is connected in "All" mode. - * Do not issue a network value update from inside this method call; it will be ignored. Issue your updates - * on the next tick. - * @param world The world this block is in. - * @param x This block's X coordinate. - * @param y This block's Y coordinate. - * @param z This block's Z coordinate. - * @param side The side the input values are being changed on. - * @param inputValues The new set of input values. This array will be 16 elements long. - */ - public void onInputsChanged (World world, int x, int y, int z, ForgeDirection side, int[] inputValues); - - /** - * Called when the input value to this block changes. Only called if your block is connected in "Single" mode. - * Do not issue a network value update from inside this method call; it will be ignored. Issue your updates - * on the next tick. - * @param world The world this block is in. - * @param x This block's X coordinate. - * @param y This block's Y coordinate. - * @param z This block's Z coordinate. - * @param side The side the input values are being changed on. - * @param inputValue The new input value - */ - public void onInputChanged (World world, int x, int y, int z, ForgeDirection side, int inputValue); + /** + * Returns the connection type of this Block. "All" types will cause getOutputValues() and onInputsChanged() to be used, + * whereas "Single" types will onInputChanged() to be called for input changes and the normal redstone power output methods + * to be called for output. If this value must be changed while the block is alive, it must perform a block update on any + * adjacent RedNet wires. + * @param world The world this block is in. + * @param x This block's X coordinate. + * @param y This block's Y coordinate. + * @param z This block's Z coordinate. + * @param side The side that connection information is required for. + * @return The connection type. + */ + public RedNetConnectionType getConnectionType(World world, int x, int y, int z, ForgeDirection side); + + /** + * Returns the output values of this RedNet node. This array must be 16 elements long. Only called if your block is connected in "All" mode. + * @param world The world this block is in. + * @param x This block's X coordinate. + * @param y This block's Y coordinate. + * @param z This block's Z coordinate. + * @param side The side the output values are required for. + * @return The output values. + */ + public int[] getOutputValues(World world, int x, int y, int z, ForgeDirection side); + + /** + * Returns the output value of this RedNet node for a given subnet. Only called if your block is connected in "All" mode. + * @param world The world this block is in. + * @param x This block's X coordinate. + * @param y This block's Y coordinate. + * @param z This block's Z coordinate. + * @param side The side the output value is required for. + * @param subnet The subnet to get the output value for (0-15). + * @return The output value. + */ + public int getOutputValue(World world, int x, int y, int z, ForgeDirection side, int subnet); + + /** + * Called when the input values to this block change. Only called if your block is connected in "All" mode. + * Do not issue a network value update from inside this method call; it will be ignored. Issue your updates + * on the next tick. + * @param world The world this block is in. + * @param x This block's X coordinate. + * @param y This block's Y coordinate. + * @param z This block's Z coordinate. + * @param side The side the input values are being changed on. + * @param inputValues The new set of input values. This array will be 16 elements long. + */ + public void onInputsChanged(World world, int x, int y, int z, ForgeDirection side, int[] inputValues); + + /** + * Called when the input value to this block changes. Only called if your block is connected in "Single" mode. + * Do not issue a network value update from inside this method call; it will be ignored. Issue your updates + * on the next tick. + * @param world The world this block is in. + * @param x This block's X coordinate. + * @param y This block's Y coordinate. + * @param z This block's Z coordinate. + * @param side The side the input values are being changed on. + * @param inputValue The new input value + */ + public void onInputChanged(World world, int x, int y, int z, ForgeDirection side, int inputValue); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetDecorative.java b/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetDecorative.java new file mode 100644 index 00000000000..b670f403bbe --- /dev/null +++ b/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetDecorative.java @@ -0,0 +1,6 @@ +package powercrystals.minefactoryreloaded.api.rednet; + +public interface IRedNetDecorative +{ + +} diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetLogicCircuit.java b/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetLogicCircuit.java index 98b464d7214..0bbbeeb9b14 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetLogicCircuit.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetLogicCircuit.java @@ -4,19 +4,16 @@ public interface IRedNetLogicCircuit { - public int getInputCount (); - - public int getOutputCount (); - - public int[] recalculateOutputValues (long worldTime, int[] inputValues); - - public String getUnlocalizedName (); - - public String getInputPinLabel (int pin); - - public String getOutputPinLabel (int pin); - - public void readFromNBT (NBTTagCompound tag); - - public void writeToNBT (NBTTagCompound tag); + public int getInputCount(); + + public int getOutputCount(); + + public int[] recalculateOutputValues(long worldTime, int[] inputValues); + + public String getUnlocalizedName(); + public String getInputPinLabel(int pin); + public String getOutputPinLabel(int pin); + + public void readFromNBT(NBTTagCompound tag); + public void writeToNBT(NBTTagCompound tag); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetNetworkContainer.java b/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetNetworkContainer.java index 6120b06558e..5e27b1fe9df 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetNetworkContainer.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetNetworkContainer.java @@ -10,22 +10,22 @@ */ public interface IRedNetNetworkContainer { - /** - * Tells the network to recalculate all subnets. - * @param world The world this cable is in. - * @param x The x-coordinate of this cable. - * @param x The y-coordinate of this cable. - * @param x The z-coordinate of this cable. - */ - public void updateNetwork (World world, int x, int y, int z); - - /** - * Tells the network to recalculate a specific subnet. - * @param world The world this cable is in. - * @param x The x-coordinate of this cable. - * @param x The y-coordinate of this cable. - * @param x The z-coordinate of this cable. - * @param subnet The subnet to recalculate. - */ - public void updateNetwork (World world, int x, int y, int z, int subnet); + /** + * Tells the network to recalculate all subnets. + * @param world The world this cable is in. + * @param x The x-coordinate of this cable. + * @param x The y-coordinate of this cable. + * @param x The z-coordinate of this cable. + */ + public void updateNetwork(World world, int x, int y, int z); + + /** + * Tells the network to recalculate a specific subnet. + * @param world The world this cable is in. + * @param x The x-coordinate of this cable. + * @param x The y-coordinate of this cable. + * @param x The z-coordinate of this cable. + * @param subnet The subnet to recalculate. + */ + public void updateNetwork(World world, int x, int y, int z, int subnet); } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetNoConnection.java b/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetNoConnection.java index 51b1e6f93a2..8ff95dd49e0 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetNoConnection.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/rednet/IRedNetNoConnection.java @@ -2,5 +2,5 @@ public interface IRedNetNoConnection { - + } diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/rednet/RedNetConnectionType.java b/src/api/java/powercrystals/minefactoryreloaded/api/rednet/RedNetConnectionType.java index f044c65f128..eb4eba5836c 100644 --- a/src/api/java/powercrystals/minefactoryreloaded/api/rednet/RedNetConnectionType.java +++ b/src/api/java/powercrystals/minefactoryreloaded/api/rednet/RedNetConnectionType.java @@ -15,6 +15,7 @@ * PlateAll: Connections permit access to all 16 bands * * Forced connection modes are best used for decoration blocks: RedNet will not connect normally, but will if the user forces it + * Typically, IRedNetDecorative is desired for this instead * * ForcedCableSingle: Connections permit access to a single band only when the cable is in forced connection mode * ForcedPlateSingle: Connections permit access to a single band only when the cable is in forced connection mode @@ -24,42 +25,41 @@ */ public enum RedNetConnectionType { - None, // 0 - CableSingle, // 11 - PlateSingle, // 13 - CableAll, // 19 - PlateAll, // 21 - ForcedCableSingle, // 43 - ForcedPlateSingle, // 45 - ForcedCableAll, // 51 - ForcedPlateAll; // 53 - - public final boolean isConnected = this.ordinal() != 0; - public final boolean isSingleSubnet = this.name().endsWith("Single"); - public final boolean isAllSubnets = this.name().endsWith("All"); - public final boolean isConnectionForced = this.name().startsWith("Forced"); - public final boolean isPlate = this.name().contains("Plate"); - public final boolean isCable = this.name().contains("Cable"); - public final short flags = toFlags(isConnected, isCable, isPlate, isSingleSubnet, isAllSubnets, isConnectionForced); - - public static final RedNetConnectionType fromFlags (short flags) - { - return connections.get(flags); - } - - private static final short toFlags (boolean... flags) - { - short ret = 0; - for (int i = flags.length; i-- > 0;) - ret |= (flags[i] ? 1 : 0) << i; - return ret; - } - - private static final Map connections = new HashMap(); - - static - { - for (RedNetConnectionType type : RedNetConnectionType.values()) - connections.put(type.flags, type); - } + None, // 0 + CableSingle, // 11 + PlateSingle, // 13 + CableAll, // 19 + PlateAll, // 21 + ForcedCableSingle, // 43 + ForcedPlateSingle, // 45 + ForcedCableAll, // 51 + ForcedPlateAll; // 53 + + public final boolean isConnected = this.ordinal() != 0; + public final boolean isSingleSubnet = this.name().endsWith("Single"); + public final boolean isAllSubnets = this.name().endsWith("All"); + public final boolean isConnectionForced = this.name().startsWith("Forced"); + public final boolean isPlate = this.name().contains("Plate"); + public final boolean isCable = this.name().contains("Cable"); + public final short flags = toFlags(isConnected, isCable, isPlate, isSingleSubnet, isAllSubnets, isConnectionForced); + + public static final RedNetConnectionType fromFlags(short flags) + { + return connections.get(flags); + } + + private static final short toFlags(boolean ...flags) + { + short ret = 0; + for (int i = flags.length; i --> 0;) + ret |= (flags[i] ? 1 : 0) << i; + return ret; + } + + private static final Map connections = new HashMap(); + + static { + for (RedNetConnectionType type : RedNetConnectionType.values()) + connections.put(type.flags, type); + } } diff --git a/src/main/java/tconstruct/client/TProxyClient.java b/src/main/java/tconstruct/client/TProxyClient.java index 1254f325f41..3b991d18215 100644 --- a/src/main/java/tconstruct/client/TProxyClient.java +++ b/src/main/java/tconstruct/client/TProxyClient.java @@ -337,6 +337,8 @@ public void initManualIcons () TConstructClientRegistry.registerManualIcon("arditeingot", new ItemStack(TContent.materials, 1, 4)); TConstructClientRegistry.registerManualIcon("copperingot", new ItemStack(TContent.materials, 1, 9)); TConstructClientRegistry.registerManualIcon("steelingot", new ItemStack(TContent.materials, 1, 16)); + TConstructClientRegistry.registerManualIcon("pigironingot", new ItemStack(TContent.materials, 1, 34)); + // Tool parts TConstructClientRegistry.registerManualIcon("pickhead", new ItemStack(TContent.pickaxeHead, 1, 2)); @@ -368,6 +370,12 @@ public void initManualIcons () TConstructClientRegistry.registerManualIcon("bowstring", new ItemStack(TContent.bowstring, 1, 0)); TConstructClientRegistry.registerManualIcon("arrowhead", new ItemStack(TContent.arrowhead, 1, 2)); TConstructClientRegistry.registerManualIcon("fletching", new ItemStack(TContent.fletching, 1, 0)); + + TConstructClientRegistry.registerManualIcon("bloodbucket", new ItemStack(TContent.buckets, 1, 16)); + TConstructClientRegistry.registerManualIcon("emeraldbucket", new ItemStack(TContent.buckets, 1, 15)); + TConstructClientRegistry.registerManualIcon("gluebucket", new ItemStack(TContent.buckets, 1, 25)); + TConstructClientRegistry.registerManualIcon("slimebucket", new ItemStack(TContent.buckets, 1, 24)); + TConstructClientRegistry.registerManualIcon("enderbucket", new ItemStack(TContent.buckets, 1, 23)); // ToolIcons TConstructClientRegistry.registerManualIcon("pickicon", @@ -412,6 +420,7 @@ public void initManualRecipes () ItemStack stick = new ItemStack(Item.stick, 1, 0); ItemStack plank = new ItemStack(Block.planks, 1, 0); + ItemStack plankSlab = new ItemStack(Block.woodSingleSlab, 1, 0); ItemStack workbench = new ItemStack(Block.workbench, 1, 0); ItemStack chest = new ItemStack(Block.chest, 1, 0); ItemStack log = new ItemStack(Block.wood, 1, 0); @@ -451,6 +460,8 @@ public void initManualRecipes () TConstructClientRegistry.registerManualSmallRecipe("partcrafter", new ItemStack(TContent.toolStationWood, 1, 1), null, pattern, null, log); TConstructClientRegistry.registerManualSmallRecipe("patternchest", new ItemStack(TContent.toolStationWood, 1, 5), null, pattern, null, chest); TConstructClientRegistry.registerManualSmallRecipe("stenciltable", new ItemStack(TContent.toolStationWood, 1, 10), null, pattern, null, plank); + TConstructClientRegistry.registerManualSmallRecipe("slimechannel", new ItemStack(TContent.slimeChannel, 1, 0), new ItemStack(TContent.slimeGel, 1, 0), new ItemStack(Item.redstone), null, null); + TConstructClientRegistry.registerManualSmallRecipe("bouncepad", new ItemStack(TContent.slimePad, 1, 0), new ItemStack(TContent.slimeChannel), new ItemStack(Item.slimeBall), null, null); TConstructClientRegistry.registerManualLargeRecipe("toolforge", new ItemStack(TContent.toolForge, 1, 0), searedbrickBlock, searedbrickBlock, searedbrickBlock, ironblock, new ItemStack( TContent.toolStationWood, 1, 0), ironblock, ironblock, null, ironblock); @@ -473,7 +484,10 @@ public void initManualRecipes () TConstructClientRegistry.registerManualSmallRecipe("searedbricks", new ItemStack(TContent.smeltery, 1, 2), searedbrick, searedbrick, searedbrick, searedbrick); TConstructClientRegistry.registerManualLargeRecipe("smelterycontroller", new ItemStack(TContent.smeltery, 1, 0), searedbrick, searedbrick, searedbrick, searedbrick, null, searedbrick, searedbrick, searedbrick, searedbrick); - TConstructClientRegistry.registerManualLargeRecipe("smelterydrain", new ItemStack(TContent.smeltery, 1, 1), searedbrick, null, searedbrick, searedbrick, null, searedbrick, searedbrick, null, + TConstructClientRegistry.registerManualLargeRecipe("dryingrack", new ItemStack(TContent.dryingRack, 1, 0), null, null, null, plankSlab, plankSlab, plankSlab, null, null, + null); + + TConstructClientRegistry.registerManualLargeRecipe("smelterydrain", new ItemStack(TContent.smeltery, 1, 1), searedbrick, null, searedbrick, searedbrick, null, searedbrick, searedbrick, null, searedbrick); TConstructClientRegistry.registerManualLargeRecipe("smelterytank1", new ItemStack(TContent.lavaTank, 1, 0), searedbrick, searedbrick, searedbrick, searedbrick, glass, searedbrick, @@ -535,6 +549,7 @@ public void initManualRecipes () TConstructClientRegistry.registerManualSmeltery("clearglass", new ItemStack(TContent.clearGlass), new ItemStack(TContent.moltenGlass, 1), null); TConstructClientRegistry.registerManualSmeltery("searedstone", new ItemStack(TContent.smeltery, 1, 4), new ItemStack(TContent.moltenStone, 1), null); TConstructClientRegistry.registerManualSmeltery("endstone", new ItemStack(Block.whiteStone), new ItemStack(TContent.moltenEnder, 1), new ItemStack(Block.obsidian)); + TConstructClientRegistry.registerManualSmeltery("glueball", new ItemStack(TContent.materials, 1, 36), new ItemStack(TContent.glueFluidBlock, 1), null); } diff --git a/src/main/java/tconstruct/common/TContent.java b/src/main/java/tconstruct/common/TContent.java index 49e015b8896..8ded83c02ca 100644 --- a/src/main/java/tconstruct/common/TContent.java +++ b/src/main/java/tconstruct/common/TContent.java @@ -1210,7 +1210,8 @@ private void addRecipesForCraftingTable () GameRegistry.addShapelessRecipe(new ItemStack(manualBook, 2, 1), new ItemStack(manualBook, 1, 1), Item.book); GameRegistry.addShapelessRecipe(new ItemStack(manualBook, 1, 2), new ItemStack(manualBook, 1, 1)); GameRegistry.addShapelessRecipe(new ItemStack(manualBook, 2, 2), new ItemStack(manualBook, 1, 2), Item.book); - // alternativ Vanilla Book Recipe + GameRegistry.addShapelessRecipe(new ItemStack(manualBook, 1, 3), new ItemStack(manualBook, 1, 2)); + // alternative Vanilla Book Recipe GameRegistry.addShapelessRecipe(new ItemStack(Item.book), Item.paper, Item.paper, Item.paper, Item.silk, blankPattern, blankPattern); // Paperstack Recipe GameRegistry.addRecipe(new ItemStack(materials, 1, 0), "pp", "pp", 'p', Item.paper); @@ -1233,9 +1234,7 @@ private void addRecipesForCraftingTable () GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(materials, 1, 25), patSurround, 'm', "nuggetGold", '#', new ItemStack(Item.silk))); // Silky Jewel Recipes GameRegistry.addRecipe(new ItemStack(materials, 1, 26), " c ", "cec", " c ", 'c', new ItemStack(materials, 1, 25), 'e', new ItemStack(Item.emerald)); - // Ender Stuff - GameRegistry.addRecipe(new ItemStack(Item.enderPearl, 4), "m", 'm', new ItemStack(metalBlock.blockID, 1, 10)); - // Wooden Armor Recipes + // Wooden Armor Recipes GameRegistry.addRecipe(new ShapedOreRecipe(helmetWood, new Object[] { "www", "w w", 'w', "logWood" })); GameRegistry.addRecipe(new ShapedOreRecipe(chestplateWood, new Object[] { "w w", "www", "www", 'w', "logWood" })); GameRegistry.addRecipe(new ShapedOreRecipe(leggingsWood, new Object[] { "www", "w w", "w w", 'w', "logWood" })); @@ -1425,7 +1424,7 @@ private void addRecipesForCraftingTable () GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(slimeExplosive, 1, 0), "slimeball", Block.tnt)); GameRegistry.addShapelessRecipe(new ItemStack(slimeChannel, 1, 0), new ItemStack(slimeGel, 1, Short.MAX_VALUE), new ItemStack(Item.redstone)); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(slimePad, 1, 0), slimeChannel, new ItemStack(slimeGel, 1, Short.MAX_VALUE), "slimeBall")); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(slimePad, 1, 0), slimeChannel, "slimeBall")); } private void addRecipesForFurnace () diff --git a/src/main/java/tconstruct/items/GoldenHead.java b/src/main/java/tconstruct/items/GoldenHead.java index 647ef6a3157..0e7b3ee2875 100644 --- a/src/main/java/tconstruct/items/GoldenHead.java +++ b/src/main/java/tconstruct/items/GoldenHead.java @@ -75,7 +75,7 @@ public void registerIcons (IconRegister iconRegister) @SideOnly(Side.CLIENT) public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4) { - list.add(StatCollector.translateToLocal("goldenhead1.tooltip")); - list.add(StatCollector.translateToLocal("goldenhead2.tooltip")); + list.add("\u00a75\u00a7o"+StatCollector.translateToLocal("goldenhead1.tooltip")); + list.add("\u00a75\u00a7o"+StatCollector.translateToLocal("goldenhead2.tooltip")); } } diff --git a/src/main/java/tconstruct/items/Manual.java b/src/main/java/tconstruct/items/Manual.java index 14a3d14ec45..b4a71253bf9 100644 --- a/src/main/java/tconstruct/items/Manual.java +++ b/src/main/java/tconstruct/items/Manual.java @@ -15,8 +15,8 @@ public class Manual extends CraftingItem { - static String[] name = new String[] { "beginner", "toolstation", "smeltery" }; - static String[] textureName = new String[] { "tinkerbook_diary", "tinkerbook_toolstation", "tinkerbook_smeltery" }; + static String[] name = new String[] { "beginner", "toolstation", "smeltery", "diary" }; + static String[] textureName = new String[] { "tinkerbook_diary", "tinkerbook_toolstation", "tinkerbook_smeltery", "tinkerbook_blue" }; public Manual(int id) { @@ -41,13 +41,13 @@ public void addInformation (ItemStack stack, EntityPlayer player, List list, boo switch (stack.getItemDamage()) { case 0: - list.add(StatCollector.translateToLocal("manual1.tooltip")); + list.add("\u00a7o"+StatCollector.translateToLocal("manual1.tooltip")); break; case 1: - list.add(StatCollector.translateToLocal("manual2.tooltip")); + list.add("\u00a7o"+StatCollector.translateToLocal("manual2.tooltip")); break; case 2: - list.add(StatCollector.translateToLocal("manual3.tooltip")); + list.add("\u00a7o"+StatCollector.translateToLocal("manual3.tooltip")); break; } } diff --git a/src/main/java/tconstruct/items/StrangeFood.java b/src/main/java/tconstruct/items/StrangeFood.java index a92e5eaab3e..7bead988c3f 100644 --- a/src/main/java/tconstruct/items/StrangeFood.java +++ b/src/main/java/tconstruct/items/StrangeFood.java @@ -19,7 +19,7 @@ public StrangeFood(int id) @SideOnly(Side.CLIENT) public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4) { - list.add(StatCollector.translateToLocal("strangefood1.tooltip")); - list.add(StatCollector.translateToLocal("strangefood2.tooltip")); + list.add("\u00a7b\u00a7o"+StatCollector.translateToLocal("strangefood1.tooltip")); + list.add("\u00a7b\u00a7o"+StatCollector.translateToLocal("strangefood2.tooltip")); } } diff --git a/src/main/java/tconstruct/items/blocks/HamboneItemBlock.java b/src/main/java/tconstruct/items/blocks/HamboneItemBlock.java index 843493de9e3..f74c00fae47 100644 --- a/src/main/java/tconstruct/items/blocks/HamboneItemBlock.java +++ b/src/main/java/tconstruct/items/blocks/HamboneItemBlock.java @@ -39,7 +39,7 @@ public HamboneItemBlock(int id) @SideOnly(Side.CLIENT) public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4) { - list.add(StatCollector.translateToLocal("hambone1.tooltip")); + list.add("\u00A74"+StatCollector.translateToLocal("hambone1.tooltip")); list.add(StatCollector.translateToLocal("hambone2.tooltip")); } diff --git a/src/main/java/tconstruct/items/blocks/SmelteryItemBlock.java b/src/main/java/tconstruct/items/blocks/SmelteryItemBlock.java index dfafdd057f2..ef8bda2bff2 100644 --- a/src/main/java/tconstruct/items/blocks/SmelteryItemBlock.java +++ b/src/main/java/tconstruct/items/blocks/SmelteryItemBlock.java @@ -1,8 +1,14 @@ package tconstruct.items.blocks; +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.MathHelper; +import net.minecraft.util.StatCollector; public class SmelteryItemBlock extends ItemBlock { @@ -25,4 +31,27 @@ public String getUnlocalizedName (ItemStack itemstack) int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1); return (new StringBuilder()).append("Smeltery.").append(blockType[pos]).toString(); } + + @Override + @SideOnly(Side.CLIENT) + public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4) + { + switch (stack.getItemDamage()) + { + case 0: + list.add(StatCollector.translateToLocal("smeltery.controller.tooltip")); + break; + case 1: + list.add(StatCollector.translateToLocal("smeltery.drain.tooltip1")); + list.add(StatCollector.translateToLocal("smeltery.drain.tooltip2")); + break; + case 3: + list.add(StatCollector.translateToLocal("smeltery.furnace.tooltip")); + break; + default: + list.add(StatCollector.translateToLocal("smeltery.brick.tooltip1")); + list.add(StatCollector.translateToLocal("smeltery.brick.tooltip2")); + break; + } + } } diff --git a/src/main/java/tconstruct/plugins/minefactoryreloaded/drinkable/Drinkables.java b/src/main/java/tconstruct/plugins/minefactoryreloaded/drinkable/Drinkables.java new file mode 100644 index 00000000000..556eb21f239 --- /dev/null +++ b/src/main/java/tconstruct/plugins/minefactoryreloaded/drinkable/Drinkables.java @@ -0,0 +1,27 @@ +package tconstruct.plugins.minefactoryreloaded.drinkable; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import powercrystals.minefactoryreloaded.api.ILiquidDrinkHandler; + +public class Drinkables implements ILiquidDrinkHandler +{ + + @Override + public void onDrink (EntityPlayer player) + { + //boost health when drink + if (player != null) + { + PotionEffect potion = player.getActivePotionEffect(Potion.field_76434_w); + int duration = 0; + if (potion != null) + duration = potion.duration; + player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, duration + 20 * 30, 0)); + } + + } + +} diff --git a/src/main/java/tconstruct/plugins/minefactoryreloaded/mfrRegistering.java b/src/main/java/tconstruct/plugins/minefactoryreloaded/mfrRegistering.java index b972f7c730f..2266e6d0332 100644 --- a/src/main/java/tconstruct/plugins/minefactoryreloaded/mfrRegistering.java +++ b/src/main/java/tconstruct/plugins/minefactoryreloaded/mfrRegistering.java @@ -2,6 +2,7 @@ import powercrystals.minefactoryreloaded.api.FactoryRegistry; import tconstruct.common.TContent; +import tconstruct.plugins.minefactoryreloaded.drinkable.Drinkables; import tconstruct.plugins.minefactoryreloaded.harvestables.GrindableHorse; import tconstruct.plugins.minefactoryreloaded.harvestables.HarvestableOreBerry; @@ -12,5 +13,6 @@ public static void registerWithMFR () FactoryRegistry.registerHarvestable(new HarvestableOreBerry(TContent.oreBerry.blockID, TContent.oreBerries.itemID, 0)); FactoryRegistry.registerHarvestable(new HarvestableOreBerry(TContent.oreBerrySecond.blockID, TContent.oreBerries.itemID, 4)); FactoryRegistry.registerGrindable(new GrindableHorse()); + FactoryRegistry.registerLiquidDrinkHandler(TContent.bloodFluid.getName(), new Drinkables()); } }