mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-26 15:03:14 +00:00
Liquid references renaming to Fluid. Should wrap up 1.6 port.
This commit is contained in:
1 parent
f9ceeba358
commit
a560085ac9
6 files changed
+29
-30
No files matched your search
@@ -5,7 +5,6 @@
|
||||
<property name="jar.dir" value="${build.dir}/jar" />
|
||||
|
||||
<property name="src.dir" value="Sources/MagicBees" />
|
||||
<property name="lang.dir" value="Sources/MagicBees/magicbees_res/lang" />
|
||||
|
||||
<property name="forge.dir" value="${build.dir}/forge" />
|
||||
<property name="mcp.dir" value="${forge.dir}/mcp" />
|
||||
@@ -14,8 +13,8 @@
|
||||
|
||||
<property name="clientsrc.dir" value="${mcp.dir}/src/minecraft" />
|
||||
|
||||
<property name="mc.version" value="1.5.2"/>
|
||||
<property name="forge.version" value="7.8.0.700"/>
|
||||
<property name="mc.version" value="1.6.2"/>
|
||||
<property name="forge.version" value="9.10.0.828"/>
|
||||
<property name="magicbees.version" value="2.1.2"/>
|
||||
|
||||
<!-- for local deployment only, not used by main -->
|
||||
|
||||
@@ -9,7 +9,7 @@ import forestry.api.core.Tabs;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import magicbees.block.types.PlankType;
|
||||
import magicbees.item.types.CapsuleType;
|
||||
import magicbees.item.types.LiquidType;
|
||||
import magicbees.item.types.FluidType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.MagicBees;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
@@ -52,10 +52,10 @@ public class ItemCapsule extends Item
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack itemStack)
|
||||
{
|
||||
return String.format(this.capsuleType.getLocalizedName(), LiquidType.values()[itemStack.getItemDamage()].getDisplayName());
|
||||
return String.format(this.capsuleType.getLocalizedName(), FluidType.values()[itemStack.getItemDamage()].getDisplayName());
|
||||
}
|
||||
|
||||
public ItemStack getCapsuleForLiquid(LiquidType l)
|
||||
public ItemStack getCapsuleForLiquid(FluidType l)
|
||||
{
|
||||
return new ItemStack(this, 1, l.ordinal());
|
||||
}
|
||||
@@ -64,7 +64,7 @@ public class ItemCapsule extends Item
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(int par1, CreativeTabs tab, List itemList)
|
||||
{
|
||||
for (LiquidType l : LiquidType.values())
|
||||
for (FluidType l : FluidType.values())
|
||||
{
|
||||
if (l.available)
|
||||
{
|
||||
@@ -85,9 +85,9 @@ public class ItemCapsule extends Item
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(VersionInfo.ModName.toLowerCase() + ":capsule" + this.capsuleType.getName().substring(0, 1).toUpperCase()
|
||||
+ this.capsuleType.getName().substring(1));
|
||||
for (LiquidType t : LiquidType.values())
|
||||
for (FluidType t : FluidType.values())
|
||||
{
|
||||
if (t != LiquidType.EMPTY && t.liquidIcon == null)
|
||||
if (t != FluidType.EMPTY && t.liquidIcon == null)
|
||||
{
|
||||
t.liquidIcon = par1IconRegister.registerIcon(VersionInfo.ModName.toLowerCase() + ":liquids/" + t.liquidID);
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public class ItemCapsule extends Item
|
||||
Icon i = this.itemIcon;
|
||||
if (metadata != 0 && pass == 0)
|
||||
{
|
||||
i = LiquidType.values()[Math.max(0, Math.min(metadata, LiquidType.values().length - 1))].liquidIcon;
|
||||
i = FluidType.values()[Math.max(0, Math.min(metadata, FluidType.values().length - 1))].liquidIcon;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ import magicbees.main.utils.LocalizationManager;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraftforge.liquids.LiquidDictionary;
|
||||
|
||||
public enum LiquidType
|
||||
public enum FluidType
|
||||
{
|
||||
// Incidentally, Item meta is the liquid ID.
|
||||
|
||||
@@ -46,7 +46,7 @@ public enum LiquidType
|
||||
public boolean available = false;
|
||||
public Icon liquidIcon;
|
||||
|
||||
private LiquidType(String l)
|
||||
private FluidType(String l)
|
||||
{
|
||||
this.liquidID = l;
|
||||
}
|
||||
@@ -27,7 +27,7 @@ import magicbees.item.ItemComb;
|
||||
import magicbees.item.ItemMiscResources;
|
||||
import magicbees.item.types.CombType;
|
||||
import magicbees.item.types.DropType;
|
||||
import magicbees.item.types.LiquidType;
|
||||
import magicbees.item.types.FluidType;
|
||||
import magicbees.item.types.PollenType;
|
||||
import magicbees.item.types.PropolisType;
|
||||
import magicbees.item.types.ResourceType;
|
||||
|
||||
@@ -4,7 +4,7 @@ import magicbees.block.types.PlankType;
|
||||
import magicbees.item.ItemCapsule;
|
||||
import magicbees.item.types.CombType;
|
||||
import magicbees.item.types.DropType;
|
||||
import magicbees.item.types.LiquidType;
|
||||
import magicbees.item.types.FluidType;
|
||||
import magicbees.item.types.NuggetType;
|
||||
import magicbees.item.types.PollenType;
|
||||
import magicbees.item.types.ResourceType;
|
||||
@@ -16,6 +16,7 @@ import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
@@ -532,9 +533,9 @@ public class CraftingManager
|
||||
ItemStack filled;
|
||||
FluidStack liquid = null;
|
||||
|
||||
for (LiquidType liquidType : LiquidType.values())
|
||||
for (FluidType fluidType : FluidType.values())
|
||||
{
|
||||
switch (liquidType)
|
||||
switch (fluidType)
|
||||
{
|
||||
case EMPTY:
|
||||
liquid = null;
|
||||
@@ -546,25 +547,24 @@ public class CraftingManager
|
||||
liquid = new FluidStack(FluidRegistry.LAVA, baseCapsule.getType().capacity);
|
||||
break;
|
||||
default:
|
||||
liquid = FluidRegistry.getFluidStack(liquidType.liquidID, baseCapsule.getType().capacity);
|
||||
liquid = FluidRegistry.getFluidStack(fluidType.liquidID, baseCapsule.getType().capacity);
|
||||
break;
|
||||
}
|
||||
|
||||
if (liquid != null)
|
||||
{
|
||||
filled = new ItemStack(baseCapsule, 1, liquidType.ordinal());
|
||||
// WTF is this v ?
|
||||
//LiquidContainerRegistry.registerLiquid(new LiquidContainerData(liquid, filled, empty));
|
||||
filled = new ItemStack(baseCapsule, 1, fluidType.ordinal());
|
||||
FluidContainerRegistry.registerFluidContainer(liquid, filled);
|
||||
|
||||
// Register with Squeezer/Bottler
|
||||
RecipeManagers.bottlerManager.addRecipe(5, liquid, empty, filled);
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[] {filled} , liquid,
|
||||
Config.wax.getStackForType(WaxType.MAGIC), 20);
|
||||
liquidType.available = true;
|
||||
fluidType.available = true;
|
||||
}
|
||||
}
|
||||
// Empty will be set to unavailable. Obviously, it always is.
|
||||
LiquidType.EMPTY.available = true;
|
||||
FluidType.EMPTY.available = true;
|
||||
}
|
||||
|
||||
private static void setupThaumcraftAlternativeCrafting()
|
||||
@@ -579,7 +579,7 @@ public class CraftingManager
|
||||
'f', input
|
||||
});
|
||||
|
||||
output = Config.voidCapsule.getCapsuleForLiquid(LiquidType.EMPTY);
|
||||
output = Config.voidCapsule.getCapsuleForLiquid(FluidType.EMPTY);
|
||||
output.stackSize = 4;
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
"wDw", "GPG", "TwT",
|
||||
|
||||
@@ -9,7 +9,7 @@ import magicbees.item.ItemThaumiumScoop;
|
||||
import magicbees.item.types.CombType;
|
||||
import magicbees.item.types.DropType;
|
||||
import magicbees.item.types.HiveFrameType;
|
||||
import magicbees.item.types.LiquidType;
|
||||
import magicbees.item.types.FluidType;
|
||||
import magicbees.item.types.PollenType;
|
||||
import magicbees.item.types.PropolisType;
|
||||
import magicbees.item.types.ResourceType;
|
||||
@@ -282,14 +282,14 @@ public class ThaumcraftHelper
|
||||
|
||||
// Tagging capsules.
|
||||
tags = new ObjectTags().add(EnumTag.VOID, 2).add(EnumTag.MAGIC, 2);
|
||||
ThaumcraftApi.registerComplexObjectTag(Config.magicCapsule.itemID, LiquidType.EMPTY.ordinal(), tags);
|
||||
ThaumcraftApi.registerComplexObjectTag(Config.magicCapsule.itemID, FluidType.EMPTY.ordinal(), tags);
|
||||
|
||||
tags = new ObjectTags(Config.magicCapsule.itemID, LiquidType.EMPTY.ordinal())
|
||||
tags = new ObjectTags(Config.magicCapsule.itemID, FluidType.EMPTY.ordinal())
|
||||
.add(EnumTag.WATER, 8);
|
||||
ThaumcraftApi.registerObjectTag(Config.magicCapsule.itemID, LiquidType.WATER.ordinal(), tags);
|
||||
tags = new ObjectTags(Config.magicCapsule.itemID, LiquidType.EMPTY.ordinal())
|
||||
ThaumcraftApi.registerObjectTag(Config.magicCapsule.itemID, FluidType.WATER.ordinal(), tags);
|
||||
tags = new ObjectTags(Config.magicCapsule.itemID, FluidType.EMPTY.ordinal())
|
||||
.add(EnumTag.FIRE, 12).add(EnumTag.ROCK, 4);
|
||||
ThaumcraftApi.registerObjectTag(Config.magicCapsule.itemID, LiquidType.LAVA.ordinal(), tags);
|
||||
ThaumcraftApi.registerObjectTag(Config.magicCapsule.itemID, FluidType.LAVA.ordinal(), tags);
|
||||
|
||||
for (EnumTag tag : EnumTag.values())
|
||||
{
|
||||
@@ -699,7 +699,7 @@ public class ThaumcraftHelper
|
||||
'F', input
|
||||
});
|
||||
|
||||
output = Config.voidCapsule.getCapsuleForLiquid(LiquidType.EMPTY);
|
||||
output = Config.voidCapsule.getCapsuleForLiquid(FluidType.EMPTY);
|
||||
output.stackSize = 4;
|
||||
tags = new ObjectTags().add(EnumTag.VOID, 16).add(EnumTag.ELDRITCH, 2).add(EnumTag.EXCHANGE, 8);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe("VOIDCAPSULE", "VOIDCAPSULE", 10, tags, output, new Object[] {
|
||||
|
||||
Reference in new issue
Block a user