mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-21 12:32:19 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
1cbe6e860c
commit
202b7ce27a
790 files changed
+11316
-9692
No files matched your search
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,5 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.block.ArmourForge;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockAlchemicCalcinator;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockAltar;
|
||||
@@ -49,15 +51,12 @@ import WayofTime.alchemicalWizardry.common.items.ItemSpellModifierBlock;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemSpellParadigmBlock;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemStabilityGlyphBlock;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* User: Pokefenn
|
||||
* Date: 17/01/14
|
||||
* Time: 19:48
|
||||
* Created with IntelliJ IDEA. User: Pokefenn Date: 17/01/14 Time: 19:48
|
||||
*/
|
||||
public class ModBlocks {
|
||||
|
||||
public static Block bloodStoneBrick;
|
||||
public static Block largeBloodStoneBrick;
|
||||
public static BlockAltar blockAltar;
|
||||
@@ -197,7 +196,9 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(ModBlocks.blockCrystal, ItemCrystalBlock.class, "blockCrystal");
|
||||
GameRegistry.registerBlock(ModBlocks.blockMimic, "blockMimic");
|
||||
GameRegistry.registerBlock(
|
||||
ModBlocks.blockEnchantmentGlyph, ItemEnchantmentGlyphBlock.class, "blockEnchantmentGlyph");
|
||||
ModBlocks.blockEnchantmentGlyph,
|
||||
ItemEnchantmentGlyphBlock.class,
|
||||
"blockEnchantmentGlyph");
|
||||
GameRegistry.registerBlock(ModBlocks.blockStabilityGlyph, ItemStabilityGlyphBlock.class, "blockStabilityGlyph");
|
||||
|
||||
GameRegistry.registerBlock(ModBlocks.blockCrucible, "blockCrucible");
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package WayofTime.alchemicalWizardry;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool;
|
||||
import WayofTime.alchemicalWizardry.common.items.*;
|
||||
@@ -49,17 +53,12 @@ import WayofTime.alchemicalWizardry.common.items.sigil.SigilVoid;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilWater;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* User: Pokefenn
|
||||
* Date: 17/01/14
|
||||
* Time: 19:48
|
||||
* Created with IntelliJ IDEA. User: Pokefenn Date: 17/01/14 Time: 19:48
|
||||
*/
|
||||
public class ModItems {
|
||||
|
||||
public static Item weakBloodOrb;
|
||||
public static Item apprenticeBloodOrb;
|
||||
public static Item magicianBloodOrb;
|
||||
@@ -268,8 +267,8 @@ public class ModItems {
|
||||
sigilOfWind = new SigilOfWind().setUnlocalizedName("sigilOfWind");
|
||||
telepositionFocus = new TelepositionFocus(1).setUnlocalizedName("telepositionFocus");
|
||||
enhancedTelepositionFocus = new EnhancedTelepositionFocus().setUnlocalizedName("enhancedTelepositionFocus");
|
||||
reinforcedTelepositionFocus =
|
||||
new ReinforcedTelepositionFocus().setUnlocalizedName("reinforcedTelepositionFocus");
|
||||
reinforcedTelepositionFocus = new ReinforcedTelepositionFocus()
|
||||
.setUnlocalizedName("reinforcedTelepositionFocus");
|
||||
demonicTelepositionFocus = new DemonicTelepositionFocus().setUnlocalizedName("demonicTelepositionFocus");
|
||||
imbuedSlate = new AWBaseItems().setUnlocalizedName("imbuedSlate");
|
||||
demonicSlate = new AWBaseItems().setUnlocalizedName("demonicSlate");
|
||||
@@ -291,10 +290,8 @@ public class ModItems {
|
||||
energyBazookaThirdTier = new EnergyBazooka(3).setUnlocalizedName("energyBazookaThirdTier");
|
||||
itemBloodLightSigil = new SigilBloodLight().setUnlocalizedName("bloodLightSigil");
|
||||
itemComplexSpellCrystal = new ItemComplexSpellCrystal().setUnlocalizedName("itemComplexSpellCrystal");
|
||||
bucketLife = new LifeBucket(ModBlocks.blockLifeEssence)
|
||||
.setUnlocalizedName("bucketLife")
|
||||
.setContainerItem(Items.bucket)
|
||||
.setCreativeTab(CreativeTabs.tabMisc);
|
||||
bucketLife = new LifeBucket(ModBlocks.blockLifeEssence).setUnlocalizedName("bucketLife")
|
||||
.setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc);
|
||||
itemSigilOfEnderSeverance = (new SigilOfEnderSeverance()).setUnlocalizedName("itemSigilOfEnderSeverance");
|
||||
baseItems = new ItemComponents().setUnlocalizedName("baseItems");
|
||||
baseAlchemyItems = new ItemAlchemyBase().setUnlocalizedName("baseAlchemyItems");
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package WayofTime.alchemicalWizardry.api;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
|
||||
/**
|
||||
* A Block with a set metadata. Similar to an ItemStack.
|
||||
*/
|
||||
|
||||
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class ColourAndCoords {
|
||||
|
||||
public int colourRed;
|
||||
public int colourGreen;
|
||||
public int colourBlue;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package WayofTime.alchemicalWizardry.api;
|
||||
|
||||
public interface ILimitingLogic {
|
||||
|
||||
public int getRoutingLimit();
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class Int3 {
|
||||
|
||||
public int xCoord;
|
||||
public int yCoord;
|
||||
public int zCoord;
|
||||
@@ -28,8 +29,7 @@ public class Int3 {
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof Int3
|
||||
? ((Int3) o).xCoord == this.xCoord
|
||||
&& ((Int3) o).yCoord == this.yCoord
|
||||
? ((Int3) o).xCoord == this.xCoord && ((Int3) o).yCoord == this.yCoord
|
||||
&& ((Int3) o).zCoord == this.zCoord
|
||||
: false;
|
||||
}
|
||||
|
||||
@@ -3,13 +3,11 @@ package WayofTime.alchemicalWizardry.api;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class RoutingFocusLogic {
|
||||
|
||||
public boolean getDefaultMatch(ItemStack keyStack, ItemStack checkedStack) {
|
||||
return (keyStack != null
|
||||
? checkedStack != null
|
||||
&& keyStack.getItem() == checkedStack.getItem()
|
||||
&& (keyStack.getItem().getHasSubtypes()
|
||||
? keyStack.getItemDamage() == checkedStack.getItemDamage()
|
||||
: true)
|
||||
return (keyStack != null ? checkedStack != null && keyStack.getItem() == checkedStack.getItem()
|
||||
&& (keyStack.getItem().getHasSubtypes() ? keyStack.getItemDamage() == checkedStack.getItemDamage()
|
||||
: true)
|
||||
: false);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,11 @@ package WayofTime.alchemicalWizardry.api;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class RoutingFocusParadigm {
|
||||
|
||||
public List<RoutingFocusLogic> logicList = new LinkedList();
|
||||
|
||||
public List<RoutingFocusPosAndFacing> locationList = new LinkedList();
|
||||
|
||||
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RoutingFocusPosAndFacing {
|
||||
|
||||
public Int3 location;
|
||||
public ForgeDirection facing;
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package WayofTime.alchemicalWizardry.api;
|
||||
|
||||
/*
|
||||
* Created in Scala by Alex-Hawks
|
||||
* Translated and implemented by Arcaratus
|
||||
* Created in Scala by Alex-Hawks Translated and implemented by Arcaratus
|
||||
*/
|
||||
public class Vector3 {
|
||||
|
||||
public int x, y, z;
|
||||
|
||||
public Vector3(int x, int y, int z) {
|
||||
@@ -28,12 +28,10 @@ public class Vector3 {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return object == this
|
||||
|| object instanceof Vector3
|
||||
&& canEqual(this)
|
||||
&& this.x == ((Vector3) object).x
|
||||
&& this.y == ((Vector3) object).y
|
||||
&& this.z == ((Vector3) object).z;
|
||||
return object == this || object instanceof Vector3 && canEqual(this)
|
||||
&& this.x == ((Vector3) object).x
|
||||
&& this.y == ((Vector3) object).y
|
||||
&& this.z == ((Vector3) object).z;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
@@ -1,9 +1,11 @@
|
||||
package WayofTime.alchemicalWizardry.api.alchemy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class AlchemicalPotionCreationHandler {
|
||||
|
||||
public static ArrayList<AlchemyPotionHandlerComponent> registeredPotionEffects = new ArrayList();
|
||||
|
||||
public static void addPotion(ItemStack itemStack, int potionID, int tickDuration) {
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class AlchemyPotionHandlerComponent {
|
||||
|
||||
private ItemStack itemStack;
|
||||
private int potionID;
|
||||
private int tickDuration;
|
||||
|
||||
@@ -5,6 +5,7 @@ import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
||||
public class AlchemyPotionHelper {
|
||||
|
||||
private int potionID;
|
||||
private int tickDuration;
|
||||
private int concentration;
|
||||
|
||||
@@ -5,6 +5,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class AlchemyRecipe {
|
||||
|
||||
private ItemStack output;
|
||||
private ItemStack[] recipe;
|
||||
private int bloodOrbLevel;
|
||||
@@ -85,7 +86,7 @@ public class AlchemyRecipe {
|
||||
}
|
||||
|
||||
if ((checkedItemStack.getItemDamage() == recipeItemStack.getItemDamage()
|
||||
|| OreDictionary.WILDCARD_VALUE == recipeItemStack.getItemDamage())
|
||||
|| OreDictionary.WILDCARD_VALUE == recipeItemStack.getItemDamage())
|
||||
&& checkedItemStack.getItem() == recipeItemStack.getItem()) {
|
||||
test = true;
|
||||
checkList[j] = true;
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package WayofTime.alchemicalWizardry.api.alchemy;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
|
||||
public class AlchemyRecipeRegistry {
|
||||
|
||||
public static List<AlchemyRecipe> recipes = new ArrayList();
|
||||
|
||||
public static void registerRecipe(ItemStack output, int amountNeeded, ItemStack[] recipe, int bloodOrbLevel) {
|
||||
|
||||
@@ -5,5 +5,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IAlchemyGoggles {
|
||||
|
||||
boolean showIngameHUD(World world, ItemStack stack, EntityPlayer player);
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
|
||||
public interface IReagentContainer {
|
||||
|
||||
ReagentStack getReagent();
|
||||
|
||||
int getReagentStackAmount();
|
||||
|
||||
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public interface IReagentHandler {
|
||||
|
||||
int fill(ForgeDirection from, ReagentStack resource, boolean doFill);
|
||||
|
||||
ReagentStack drain(ForgeDirection from, ReagentStack resource, boolean doDrain);
|
||||
|
||||
+1
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ISegmentedReagentHandler extends IReagentHandler {
|
||||
|
||||
int getNumberOfTanks();
|
||||
|
||||
int getTanksTunedToReagent(Reagent reagent);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
|
||||
public class Reagent {
|
||||
|
||||
public final String name;
|
||||
|
||||
public static final int REAGENT_SIZE = 1000;
|
||||
|
||||
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class ReagentContainer implements IReagentContainer {
|
||||
|
||||
protected ReagentStack reagentStack;
|
||||
protected int capacity;
|
||||
|
||||
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
|
||||
public final class ReagentContainerInfo {
|
||||
|
||||
public final ReagentStack reagent;
|
||||
public final int capacity;
|
||||
|
||||
|
||||
@@ -4,9 +4,11 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ReagentRegistry {
|
||||
|
||||
public static Map<String, Reagent> reagentList = new HashMap();
|
||||
public static Map<ItemStack, ReagentStack> itemToReagentMap = new HashMap();
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class ReagentStack {
|
||||
|
||||
public Reagent reagent;
|
||||
public int amount;
|
||||
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileReagentHandler extends TileEntity implements IReagentHandler {
|
||||
|
||||
protected ReagentContainer tank = new ReagentContainer(4000);
|
||||
|
||||
@Override
|
||||
@@ -50,6 +51,6 @@ public class TileReagentHandler extends TileEntity implements IReagentHandler {
|
||||
|
||||
@Override
|
||||
public ReagentContainerInfo[] getContainerInfo(ForgeDirection from) {
|
||||
return new ReagentContainerInfo[] {tank.getInfo()};
|
||||
return new ReagentContainerInfo[] { tank.getInfo() };
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -10,6 +11,7 @@ import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileSegmentedReagentHandler extends TileEntity implements ISegmentedReagentHandler {
|
||||
|
||||
protected ReagentContainer[] tanks;
|
||||
protected Map<Reagent, Integer> attunedTankMap;
|
||||
|
||||
@@ -99,8 +101,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
|
||||
ReagentStack remainingStack = resource.copy();
|
||||
remainingStack.amount = maxFill - totalFill;
|
||||
|
||||
boolean doesReagentMatch = tanks[i].getReagent() == null
|
||||
? false
|
||||
boolean doesReagentMatch = tanks[i].getReagent() == null ? false
|
||||
: tanks[i].getReagent().isReagentEqual(remainingStack);
|
||||
|
||||
if (doesReagentMatch) {
|
||||
|
||||
+7
-19
@@ -2,11 +2,13 @@ package WayofTime.alchemicalWizardry.api.altarRecipeRegistry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class AltarRecipe {
|
||||
|
||||
public int minTier;
|
||||
public int liquidRequired;
|
||||
public boolean canBeFilled; // Tells the system that the item is an orb
|
||||
@@ -17,26 +19,13 @@ public class AltarRecipe {
|
||||
public boolean useTag;
|
||||
public ArrayList<Object> input = new ArrayList<Object>();
|
||||
|
||||
public AltarRecipe(
|
||||
ItemStack result,
|
||||
ItemStack requiredItem,
|
||||
int minTier,
|
||||
int liquidRequired,
|
||||
int consumptionRate,
|
||||
int drainRate,
|
||||
boolean canBeFilled) {
|
||||
public AltarRecipe(ItemStack result, ItemStack requiredItem, int minTier, int liquidRequired, int consumptionRate,
|
||||
int drainRate, boolean canBeFilled) {
|
||||
this(result, requiredItem, minTier, liquidRequired, consumptionRate, drainRate, canBeFilled, false);
|
||||
}
|
||||
|
||||
public AltarRecipe(
|
||||
ItemStack result,
|
||||
ItemStack requiredItem,
|
||||
int minTier,
|
||||
int liquidRequired,
|
||||
int consumptionRate,
|
||||
int drainRate,
|
||||
boolean canBeFilled,
|
||||
boolean useTag) {
|
||||
public AltarRecipe(ItemStack result, ItemStack requiredItem, int minTier, int liquidRequired, int consumptionRate,
|
||||
int drainRate, boolean canBeFilled, boolean useTag) {
|
||||
this.result = result;
|
||||
this.requiredItem = requiredItem;
|
||||
this.minTier = minTier;
|
||||
@@ -60,8 +49,7 @@ public class AltarRecipe {
|
||||
return false;
|
||||
}
|
||||
|
||||
return tierCheck >= minTier
|
||||
&& this.requiredItem.isItemEqual(comparedStack)
|
||||
return tierCheck >= minTier && this.requiredItem.isItemEqual(comparedStack)
|
||||
&& (this.useTag ? this.areRequiredTagsEqual(comparedStack) : true);
|
||||
}
|
||||
|
||||
|
||||
+25
-20
@@ -4,34 +4,39 @@ import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class AltarRecipeRegistry {
|
||||
|
||||
public static List<AltarRecipe> altarRecipes = new LinkedList<>();
|
||||
public static Map<Integer, ItemStack> orbMap = new HashMap<>();
|
||||
|
||||
public static void registerAltarRecipe(
|
||||
ItemStack result,
|
||||
ItemStack requiredItem,
|
||||
int minTier,
|
||||
int liquidRequired,
|
||||
int consumptionRate,
|
||||
int drainRate,
|
||||
boolean canBeFilled) {
|
||||
altarRecipes.add(new AltarRecipe(
|
||||
result, requiredItem, minTier, liquidRequired, consumptionRate, drainRate, canBeFilled));
|
||||
public static void registerAltarRecipe(ItemStack result, ItemStack requiredItem, int minTier, int liquidRequired,
|
||||
int consumptionRate, int drainRate, boolean canBeFilled) {
|
||||
altarRecipes.add(
|
||||
new AltarRecipe(
|
||||
result,
|
||||
requiredItem,
|
||||
minTier,
|
||||
liquidRequired,
|
||||
consumptionRate,
|
||||
drainRate,
|
||||
canBeFilled));
|
||||
}
|
||||
|
||||
public static void registerNBTAltarRecipe(
|
||||
ItemStack result,
|
||||
ItemStack requiredItem,
|
||||
int minTier,
|
||||
int liquidRequired,
|
||||
int consumptionRate,
|
||||
int drainRate,
|
||||
boolean canBeFilled) {
|
||||
altarRecipes.add(new AltarRecipe(
|
||||
result, requiredItem, minTier, liquidRequired, consumptionRate, drainRate, canBeFilled, true));
|
||||
public static void registerNBTAltarRecipe(ItemStack result, ItemStack requiredItem, int minTier, int liquidRequired,
|
||||
int consumptionRate, int drainRate, boolean canBeFilled) {
|
||||
altarRecipes.add(
|
||||
new AltarRecipe(
|
||||
result,
|
||||
requiredItem,
|
||||
minTier,
|
||||
liquidRequired,
|
||||
consumptionRate,
|
||||
drainRate,
|
||||
canBeFilled,
|
||||
true));
|
||||
}
|
||||
|
||||
public static void registerAltarOrbRecipe(ItemStack orbStack, int minTier, int consumptionRate) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package WayofTime.alchemicalWizardry.api.altarRecipeRegistry;
|
||||
|
||||
public interface IFadedRune {
|
||||
|
||||
int getAltarTierLimit(int meta);
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.bindingRegistry;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BindingRecipe {
|
||||
|
||||
public ItemStack requiredItem;
|
||||
public ItemStack outputItem;
|
||||
|
||||
|
||||
@@ -2,9 +2,11 @@ package WayofTime.alchemicalWizardry.api.bindingRegistry;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BindingRegistry {
|
||||
|
||||
public static List<BindingRecipe> bindingRecipes = new LinkedList();
|
||||
|
||||
public static void registerRecipe(ItemStack output, ItemStack input) {
|
||||
|
||||
@@ -2,9 +2,11 @@ package WayofTime.alchemicalWizardry.api.bindingRegistry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class UnbindingRecipe {
|
||||
|
||||
public ItemStack requiredItem;
|
||||
public List<ItemStack> outputItem;
|
||||
|
||||
|
||||
@@ -3,11 +3,13 @@ package WayofTime.alchemicalWizardry.api.bindingRegistry;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class UnbindingRegistry {
|
||||
|
||||
public static List<UnbindingRecipe> unbindingRecipes = new LinkedList<UnbindingRecipe>();
|
||||
|
||||
public static void addAllUnbindingRecipesFromBinding() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.api.command;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraft.command.ICommand;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.command.PlayerNotFoundException;
|
||||
@@ -40,21 +41,19 @@ public abstract class SubCommandBase implements ISubCommand {
|
||||
@Override
|
||||
public void processSubCommand(ICommandSender commandSender, String[] args) {
|
||||
|
||||
if (args.length == 0 && !getSubCommandName().equals("help"))
|
||||
displayErrorString(
|
||||
commandSender,
|
||||
String.format(
|
||||
StatCollector.translateToLocal("commands.format.error"),
|
||||
capitalizeFirstLetter(getSubCommandName()),
|
||||
getArgUsage(commandSender)));
|
||||
if (args.length == 0 && !getSubCommandName().equals("help")) displayErrorString(
|
||||
commandSender,
|
||||
String.format(
|
||||
StatCollector.translateToLocal("commands.format.error"),
|
||||
capitalizeFirstLetter(getSubCommandName()),
|
||||
getArgUsage(commandSender)));
|
||||
|
||||
if (isBounded(0, 2, args.length) && args[0].equals("help"))
|
||||
displayHelpString(
|
||||
commandSender,
|
||||
String.format(
|
||||
StatCollector.translateToLocal("commands.format.help"),
|
||||
capitalizeFirstLetter(getSubCommandName()),
|
||||
getHelpText()));
|
||||
if (isBounded(0, 2, args.length) && args[0].equals("help")) displayHelpString(
|
||||
commandSender,
|
||||
String.format(
|
||||
StatCollector.translateToLocal("commands.format.help"),
|
||||
capitalizeFirstLetter(getSubCommandName()),
|
||||
getHelpText()));
|
||||
}
|
||||
|
||||
protected EntityPlayerMP getCommandSenderAsPlayer(ICommandSender commandSender) {
|
||||
@@ -67,8 +66,7 @@ public abstract class SubCommandBase implements ISubCommand {
|
||||
|
||||
if (entityplayermp != null) return entityplayermp;
|
||||
else {
|
||||
entityplayermp =
|
||||
MinecraftServer.getServer().getConfigurationManager().func_152612_a(playerName);
|
||||
entityplayermp = MinecraftServer.getServer().getConfigurationManager().func_152612_a(playerName);
|
||||
|
||||
if (entityplayermp == null) throw new PlayerNotFoundException();
|
||||
else return entityplayermp;
|
||||
@@ -84,17 +82,20 @@ public abstract class SubCommandBase implements ISubCommand {
|
||||
}
|
||||
|
||||
protected void displayHelpString(ICommandSender commandSender, String display, Object... info) {
|
||||
commandSender.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted(display, info))
|
||||
.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GREEN)));
|
||||
commandSender.addChatMessage(
|
||||
new ChatComponentText(StatCollector.translateToLocalFormatted(display, info))
|
||||
.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GREEN)));
|
||||
}
|
||||
|
||||
protected void displayErrorString(ICommandSender commandSender, String display, Object... info) {
|
||||
commandSender.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted(display, info))
|
||||
.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
|
||||
commandSender.addChatMessage(
|
||||
new ChatComponentText(StatCollector.translateToLocalFormatted(display, info))
|
||||
.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
|
||||
}
|
||||
|
||||
protected void displaySuccessString(ICommandSender commandSender, String display, Object... info) {
|
||||
commandSender.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted(display, info))
|
||||
.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.BLUE)));
|
||||
commandSender.addChatMessage(
|
||||
new ChatComponentText(StatCollector.translateToLocalFormatted(display, info))
|
||||
.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.BLUE)));
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,13 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class CompressionHandler {
|
||||
|
||||
/**
|
||||
* Called to look at the inventory and syphons the required stack. Returns resultant stack if successful, and null if not.
|
||||
* @param inv The inventory iterated through
|
||||
* @return The result of the compression
|
||||
* Called to look at the inventory and syphons the required stack. Returns resultant stack if successful, and null
|
||||
* if not.
|
||||
*
|
||||
* @param inv The inventory iterated through
|
||||
* @return The result of the compression
|
||||
*/
|
||||
public abstract ItemStack compressInventory(ItemStack[] inv, World world);
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -13,6 +14,7 @@ import net.minecraft.world.World;
|
||||
*
|
||||
*/
|
||||
public class CompressionRegistry {
|
||||
|
||||
public static List<CompressionHandler> compressionRegistry = new ArrayList();
|
||||
public static Map<ItemStack, Integer> thresholdMap = new HashMap();
|
||||
|
||||
@@ -22,6 +24,7 @@ public class CompressionRegistry {
|
||||
|
||||
/**
|
||||
* Registers an item so that it only compresses while above this threshold
|
||||
*
|
||||
* @param stack
|
||||
* @param threshold
|
||||
*/
|
||||
@@ -52,8 +55,7 @@ public class CompressionRegistry {
|
||||
|
||||
public static boolean areItemStacksEqual(ItemStack stack, ItemStack compressedStack) {
|
||||
return stack.isItemEqual(compressedStack)
|
||||
&& (stack.getTagCompound() == null
|
||||
? compressedStack.getTagCompound() == null
|
||||
&& (stack.getTagCompound() == null ? compressedStack.getTagCompound() == null
|
||||
: stack.getTagCompound().equals(compressedStack.getTagCompound()));
|
||||
}
|
||||
}
|
||||
@@ -5,17 +5,18 @@ import cpw.mods.fml.common.eventhandler.Event;
|
||||
|
||||
@Cancelable
|
||||
public class AddToNetworkEvent extends Event {
|
||||
|
||||
public String ownerNetwork;
|
||||
public int addedAmount;
|
||||
public int maximum;
|
||||
|
||||
/**
|
||||
* This event is called whenever the network is added to. If cancelled, no LP will be drained from the source. If result is set to Result.DENY,
|
||||
* the LP will still be drained but the soul network will not be added to.
|
||||
* This event is called whenever the network is added to. If cancelled, no LP will be drained from the source. If
|
||||
* result is set to Result.DENY, the LP will still be drained but the soul network will not be added to.
|
||||
*
|
||||
* @param ownerNetwork Key used for the soul network
|
||||
* @param addedAmount Amount added
|
||||
* @param maximum Ceiling that the network can add to
|
||||
* @param ownerNetwork Key used for the soul network
|
||||
* @param addedAmount Amount added
|
||||
* @param maximum Ceiling that the network can add to
|
||||
*/
|
||||
public AddToNetworkEvent(String ownerNetwork, int addedAmount, int maximum) {
|
||||
super();
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
package WayofTime.alchemicalWizardry.api.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
|
||||
@Cancelable
|
||||
public class ItemBindEvent extends Event {
|
||||
|
||||
public final EntityPlayer player;
|
||||
public String key;
|
||||
public ItemStack itemStack;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package WayofTime.alchemicalWizardry.api.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
|
||||
@Cancelable
|
||||
public class ItemDrainInContainerEvent extends SoulNetworkEvent {
|
||||
|
||||
public ItemStack stack;
|
||||
|
||||
public ItemDrainInContainerEvent(ItemStack stack, String ownerNetwork, int drainAmount) {
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package WayofTime.alchemicalWizardry.api.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
|
||||
@Cancelable
|
||||
public class ItemDrainNetworkEvent extends PlayerDrainNetworkEvent {
|
||||
|
||||
public final ItemStack itemStack;
|
||||
public boolean shouldDamage; // If true, will damage regardless of if the network had enough inside it
|
||||
public float damageAmount; // Amount of damage that would incur if the network could not drain properly
|
||||
@@ -13,10 +15,10 @@ public class ItemDrainNetworkEvent extends PlayerDrainNetworkEvent {
|
||||
/**
|
||||
* Set result to deny the action i.e. damage/drain anyways. Cancelling event prevents action without penalties
|
||||
*
|
||||
* @param player Player using the item
|
||||
* @param ownerNetwork Network that the item is tied to
|
||||
* @param itemStack Item used
|
||||
* @param drainAmount Original drain amount - change to alter cost
|
||||
* @param player Player using the item
|
||||
* @param ownerNetwork Network that the item is tied to
|
||||
* @param itemStack Item used
|
||||
* @param drainAmount Original drain amount - change to alter cost
|
||||
*/
|
||||
public ItemDrainNetworkEvent(EntityPlayer player, String ownerNetwork, ItemStack itemStack, int drainAmount) {
|
||||
super(player, ownerNetwork, drainAmount);
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
package WayofTime.alchemicalWizardry.api.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
|
||||
@Cancelable
|
||||
public class PlayerAddToNetworkEvent extends AddToNetworkEvent {
|
||||
|
||||
public final EntityPlayer player;
|
||||
public ItemStack itemStack;
|
||||
|
||||
public PlayerAddToNetworkEvent(
|
||||
EntityPlayer player, ItemStack itemStack, String ownerNetwork, int addedAmount, int maximum) {
|
||||
public PlayerAddToNetworkEvent(EntityPlayer player, ItemStack itemStack, String ownerNetwork, int addedAmount,
|
||||
int maximum) {
|
||||
super(ownerNetwork, addedAmount, maximum);
|
||||
this.player = player;
|
||||
this.itemStack = itemStack;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package WayofTime.alchemicalWizardry.api.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
|
||||
@Cancelable
|
||||
public class PlayerDrainNetworkEvent extends SoulNetworkEvent {
|
||||
|
||||
public final EntityPlayer player; // Player that activated the event
|
||||
|
||||
public PlayerDrainNetworkEvent(EntityPlayer player, String ownerNetwork, int drainAmount) {
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
package WayofTime.alchemicalWizardry.api.event;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
|
||||
@Cancelable
|
||||
public class RitualActivatedEvent extends RitualEvent {
|
||||
|
||||
public final EntityPlayer player;
|
||||
public final ItemStack crystalStack;
|
||||
public int crystalTier;
|
||||
|
||||
public RitualActivatedEvent(
|
||||
IMasterRitualStone mrs,
|
||||
String ownerKey,
|
||||
String ritualKey,
|
||||
EntityPlayer player,
|
||||
ItemStack activationCrystal,
|
||||
int crystalTier) {
|
||||
public RitualActivatedEvent(IMasterRitualStone mrs, String ownerKey, String ritualKey, EntityPlayer player,
|
||||
ItemStack activationCrystal, int crystalTier) {
|
||||
super(mrs, ownerKey, ritualKey);
|
||||
|
||||
this.player = player;
|
||||
|
||||
@@ -4,6 +4,7 @@ import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
|
||||
public class RitualEvent extends Event {
|
||||
|
||||
public final IMasterRitualStone mrs;
|
||||
public String ownerKey;
|
||||
public final String ritualKey;
|
||||
|
||||
@@ -4,6 +4,7 @@ import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualBreakMethod;
|
||||
|
||||
public class RitualStopEvent extends RitualEvent {
|
||||
|
||||
public final RitualBreakMethod method;
|
||||
|
||||
public RitualStopEvent(IMasterRitualStone mrs, String ownerKey, String ritualKey, RitualBreakMethod method) {
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package WayofTime.alchemicalWizardry.api.event;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
@Cancelable
|
||||
public class SacrificeKnifeUsedEvent extends Event {
|
||||
|
||||
public final EntityPlayer player;
|
||||
public boolean shouldDrainHealth;
|
||||
public boolean shouldFillAltar;
|
||||
|
||||
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.event;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
|
||||
public class SoulNetworkEvent extends Event {
|
||||
|
||||
public String ownerNetwork;
|
||||
public int drainAmount;
|
||||
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
package WayofTime.alchemicalWizardry.api.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/** Fired when a teleposer attempts to transpose two blocks. Use this to perform special cleanup or compensation,
|
||||
* or cancel it entirely to prevent the transposition. */
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
|
||||
/**
|
||||
* Fired when a teleposer attempts to transpose two blocks. Use this to perform special cleanup or compensation, or
|
||||
* cancel it entirely to prevent the transposition.
|
||||
*/
|
||||
@Cancelable
|
||||
public class TeleposeEvent extends Event {
|
||||
|
||||
@@ -27,8 +30,8 @@ public class TeleposeEvent extends Event {
|
||||
public final Block finalBlock;
|
||||
public final int finalMetadata;
|
||||
|
||||
public TeleposeEvent(
|
||||
World wi, int xi, int yi, int zi, Block bi, int mi, World wf, int xf, int yf, int zf, Block bf, int mf) {
|
||||
public TeleposeEvent(World wi, int xi, int yi, int zi, Block bi, int mi, World wf, int xf, int yf, int zf, Block bf,
|
||||
int mf) {
|
||||
initialWorld = wi;
|
||||
initialX = xi;
|
||||
initialY = yi;
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
package WayofTime.alchemicalWizardry.api.guide;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
|
||||
@@ -11,16 +21,9 @@ import amerifrance.guideapi.api.base.Book;
|
||||
import amerifrance.guideapi.api.util.GuiHelper;
|
||||
import amerifrance.guideapi.gui.GuiBase;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class OrbRecipeRenderer implements IRecipeRenderer {
|
||||
|
||||
public IRecipe recipe;
|
||||
|
||||
public OrbRecipeRenderer(IRecipe recipe) {
|
||||
@@ -28,18 +31,9 @@ public class OrbRecipeRenderer implements IRecipeRenderer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(
|
||||
Book book,
|
||||
CategoryAbstract category,
|
||||
EntryAbstract entry,
|
||||
int guiLeft,
|
||||
int guiTop,
|
||||
int mouseX,
|
||||
int mouseY,
|
||||
GuiBase guiBase,
|
||||
FontRenderer fontRenderer) {
|
||||
Minecraft.getMinecraft()
|
||||
.getTextureManager()
|
||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX,
|
||||
int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
|
||||
Minecraft.getMinecraft().getTextureManager()
|
||||
.bindTexture(new ResourceLocation(ModInformation.GUITEXLOC + "recipe_elements.png"));
|
||||
guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 0, 105, 65);
|
||||
|
||||
@@ -75,7 +69,9 @@ public class OrbRecipeRenderer implements IRecipeRenderer {
|
||||
GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY);
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
|
||||
guiBase.renderToolTip(
|
||||
APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY);
|
||||
APISpellHelper.getOrbForLevel((Integer) component),
|
||||
stackX,
|
||||
stackY);
|
||||
}
|
||||
} else {
|
||||
if (((ArrayList<ItemStack>) component).isEmpty()) return;
|
||||
@@ -112,7 +108,9 @@ public class OrbRecipeRenderer implements IRecipeRenderer {
|
||||
GuiHelper.drawItemStack(APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY);
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, stackX, stackY, 15, 15)) {
|
||||
guiBase.renderToolTip(
|
||||
APISpellHelper.getOrbForLevel((Integer) component), stackX, stackY);
|
||||
APISpellHelper.getOrbForLevel((Integer) component),
|
||||
stackX,
|
||||
stackY);
|
||||
}
|
||||
} else {
|
||||
if (((ArrayList<ItemStack>) component).isEmpty()) return;
|
||||
@@ -134,16 +132,8 @@ public class OrbRecipeRenderer implements IRecipeRenderer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawExtras(
|
||||
Book book,
|
||||
CategoryAbstract category,
|
||||
EntryAbstract entry,
|
||||
int guiLeft,
|
||||
int guiTop,
|
||||
int mouseX,
|
||||
int mouseY,
|
||||
GuiBase guiBase,
|
||||
FontRenderer fontRenderer) {
|
||||
public void drawExtras(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop,
|
||||
int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
package WayofTime.alchemicalWizardry.api.guide;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe;
|
||||
import amerifrance.guideapi.api.abstraction.CategoryAbstract;
|
||||
import amerifrance.guideapi.api.abstraction.EntryAbstract;
|
||||
@@ -9,13 +17,6 @@ import amerifrance.guideapi.api.util.GuiHelper;
|
||||
import amerifrance.guideapi.gui.GuiBase;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class PageAltarRecipe extends PageBase {
|
||||
|
||||
@@ -33,19 +34,10 @@ public class PageAltarRecipe extends PageBase {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void draw(
|
||||
Book book,
|
||||
CategoryAbstract category,
|
||||
EntryAbstract entry,
|
||||
int guiLeft,
|
||||
int guiTop,
|
||||
int mouseX,
|
||||
int mouseY,
|
||||
GuiBase guiBase,
|
||||
FontRenderer fontRenderer) {
|
||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX,
|
||||
int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
|
||||
|
||||
Minecraft.getMinecraft()
|
||||
.getTextureManager()
|
||||
Minecraft.getMinecraft().getTextureManager()
|
||||
.bindTexture(new ResourceLocation("alchemicalwizardry" + ":textures/gui/guide/altar.png"));
|
||||
guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 87, 146, 104);
|
||||
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
package WayofTime.alchemicalWizardry.api.guide;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import amerifrance.guideapi.api.abstraction.CategoryAbstract;
|
||||
import amerifrance.guideapi.api.abstraction.EntryAbstract;
|
||||
import amerifrance.guideapi.api.base.Book;
|
||||
@@ -7,15 +16,9 @@ import amerifrance.guideapi.api.base.PageBase;
|
||||
import amerifrance.guideapi.gui.GuiBase;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
public class PageMultiBlock extends PageBase {
|
||||
|
||||
ItemStack[][][] structure;
|
||||
boolean canTick = false;
|
||||
int tick = 0;
|
||||
@@ -52,25 +55,17 @@ public class PageMultiBlock extends PageBase {
|
||||
blockCount += perLvl;
|
||||
}
|
||||
tick = (showLayer == -1 ? blockCount : countPerLevel[showLayer]) * 40;
|
||||
// int yOff = (structureHeight-1)*12+structureWidth*5+structureLength*5+16;
|
||||
// pageButtons.add(new GuiButtonManualNavigation(gui, 100, x+4,y+yOff/2-5, 10,10, 4));
|
||||
// pageButtons.add(new GuiButtonManualNavigation(gui, 101, x+4,y+yOff/2-8-16, 10,16, 3));
|
||||
// pageButtons.add(new GuiButtonManualNavigation(gui, 102, x+4,y+yOff/2+8, 10,16, 2));
|
||||
// int yOff = (structureHeight-1)*12+structureWidth*5+structureLength*5+16;
|
||||
// pageButtons.add(new GuiButtonManualNavigation(gui, 100, x+4,y+yOff/2-5, 10,10, 4));
|
||||
// pageButtons.add(new GuiButtonManualNavigation(gui, 101, x+4,y+yOff/2-8-16, 10,16, 3));
|
||||
// pageButtons.add(new GuiButtonManualNavigation(gui, 102, x+4,y+yOff/2+8, 10,16, 2));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void draw(
|
||||
Book book,
|
||||
CategoryAbstract category,
|
||||
EntryAbstract entry,
|
||||
int guiLeft,
|
||||
int guiTop,
|
||||
int mouseX,
|
||||
int mouseY,
|
||||
GuiBase guiBase,
|
||||
FontRenderer fontRenderer) {
|
||||
// if(multiblock.getStructureManual()!=null)
|
||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX,
|
||||
int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
|
||||
// if(multiblock.getStructureManual()!=null)
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
int x = guiLeft + 32;
|
||||
@@ -84,7 +79,7 @@ public class PageMultiBlock extends PageBase {
|
||||
|
||||
int xHalf = (structureWidth * 5 - structureLength * 5);
|
||||
int yOffPartial = (structureHeight - 1) * 12 + structureWidth * 5 + structureLength * 5;
|
||||
// int yOffTotal = yOffPartial+16;
|
||||
// int yOffTotal = yOffPartial+16;
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
|
||||
@@ -96,27 +91,24 @@ public class PageMultiBlock extends PageBase {
|
||||
RenderItem.getInstance().renderWithColor = true;
|
||||
int i = 0;
|
||||
ItemStack highlighted = null;
|
||||
for (int h = 0; h < structure.length; h++)
|
||||
if (showLayer == -1 || h <= showLayer) {
|
||||
ItemStack[][] level = structure[h];
|
||||
for (int l = level.length - 1; l >= 0; l--) {
|
||||
ItemStack[] row = level[l];
|
||||
for (int w = row.length - 1; w >= 0; w--) {
|
||||
int xx = 60 + xHalf - 10 * w + 10 * l - 7;
|
||||
int yy = yOffPartial - 5 * w - 5 * l - 12 * h;
|
||||
GL11.glTranslated(0, 0, 1);
|
||||
if (row[w] != null && i <= limiter) {
|
||||
i++;
|
||||
RenderItem.getInstance()
|
||||
.renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, row[w], x + xx, y + yy);
|
||||
if (mouseX >= x + xx
|
||||
&& mouseX < x + xx + 16
|
||||
&& mouseY >= y + yy
|
||||
&& mouseY < y + yy + 16) highlighted = row[w];
|
||||
}
|
||||
for (int h = 0; h < structure.length; h++) if (showLayer == -1 || h <= showLayer) {
|
||||
ItemStack[][] level = structure[h];
|
||||
for (int l = level.length - 1; l >= 0; l--) {
|
||||
ItemStack[] row = level[l];
|
||||
for (int w = row.length - 1; w >= 0; w--) {
|
||||
int xx = 60 + xHalf - 10 * w + 10 * l - 7;
|
||||
int yy = yOffPartial - 5 * w - 5 * l - 12 * h;
|
||||
GL11.glTranslated(0, 0, 1);
|
||||
if (row[w] != null && i <= limiter) {
|
||||
i++;
|
||||
RenderItem.getInstance()
|
||||
.renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, row[w], x + xx, y + yy);
|
||||
if (mouseX >= x + xx && mouseX < x + xx + 16 && mouseY >= y + yy && mouseY < y + yy + 16)
|
||||
highlighted = row[w];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
GL11.glTranslated(0, 0, -i);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
@@ -129,9 +121,9 @@ public class PageMultiBlock extends PageBase {
|
||||
if (highlighted != null && renderMouseOver) guiBase.renderToolTip(highlighted, mouseX, mouseY);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
// mc.fontRenderer.setUnicodeFlag(true);
|
||||
// if(localizedText!=null&&!localizedText.isEmpty())
|
||||
// manual.fontRenderer.drawSplitString(localizedText, x,y+yOffTotal, 120, manual.getTextColour());
|
||||
// mc.fontRenderer.setUnicodeFlag(true);
|
||||
// if(localizedText!=null&&!localizedText.isEmpty())
|
||||
// manual.fontRenderer.drawSplitString(localizedText, x,y+yOffTotal, 120, manual.getTextColour());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,14 @@
|
||||
package WayofTime.alchemicalWizardry.api.guide;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
import java.util.List;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class PageRitualMultiBlock extends PageMultiBlock {
|
||||
|
||||
private static ItemStack blankStone;
|
||||
private static ItemStack waterStone;
|
||||
private static ItemStack fireStone;
|
||||
@@ -15,13 +18,13 @@ public class PageRitualMultiBlock extends PageMultiBlock {
|
||||
private static ItemStack dawnStone;
|
||||
|
||||
static {
|
||||
// blankStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.BLANK);
|
||||
// waterStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.WATER);
|
||||
// fireStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.FIRE);
|
||||
// earthStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.EARTH);
|
||||
// airStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.AIR);
|
||||
// duskStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DUSK);
|
||||
// dawnStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DAWN);
|
||||
// blankStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.BLANK);
|
||||
// waterStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.WATER);
|
||||
// fireStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.FIRE);
|
||||
// earthStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.EARTH);
|
||||
// airStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.AIR);
|
||||
// duskStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DUSK);
|
||||
// dawnStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DAWN);
|
||||
}
|
||||
|
||||
private PageRitualMultiBlock(ItemStack[][][] structure) {
|
||||
@@ -54,15 +57,21 @@ public class PageRitualMultiBlock extends PageMultiBlock {
|
||||
System.out.println(
|
||||
"Min: (" + minX + ", " + minY + ", " + minZ + "), Max: (" + maxX + ", " + maxY + ", " + maxZ + ")");
|
||||
|
||||
ItemStack[][][] tempStructure = new ItemStack[maxY - minY + 1][maxX - minX + 1]
|
||||
[maxZ - minZ + 1]; // First value is vertical, second is down to the left, third is down to the right
|
||||
ItemStack[][][] tempStructure = new ItemStack[maxY - minY + 1][maxX - minX + 1][maxZ - minZ + 1]; // First value
|
||||
// is
|
||||
// vertical,
|
||||
// second is
|
||||
// down to the
|
||||
// left, third
|
||||
// is down to
|
||||
// the right
|
||||
|
||||
for (RitualComponent comp : ritualComponents) {
|
||||
tempStructure[comp.getY() - minY][comp.getX() - minX][comp.getZ() - minZ] =
|
||||
getStackForRitualStone(comp.getStoneType());
|
||||
tempStructure[comp.getY() - minY][comp.getX() - minX][comp.getZ() - minZ] = getStackForRitualStone(
|
||||
comp.getStoneType());
|
||||
}
|
||||
|
||||
// tempStructure[-minY][-minX][-minZ] = new ItemStack(ModBlocks.blockMasterStone);
|
||||
// tempStructure[-minY][-minX][-minZ] = new ItemStack(ModBlocks.blockMasterStone);
|
||||
|
||||
return new PageRitualMultiBlock(tempStructure);
|
||||
}
|
||||
|
||||
@@ -2,10 +2,12 @@ package WayofTime.alchemicalWizardry.api.harvest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class HarvestRegistry {
|
||||
|
||||
public static List<IHarvestHandler> handlerList = new ArrayList();
|
||||
|
||||
public static void registerHarvestHandler(IHarvestHandler handler) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IHarvestHandler {
|
||||
|
||||
/**
|
||||
* A handler that is used to harvest and replant the block at the specified location
|
||||
*
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
package WayofTime.alchemicalWizardry.api.items;
|
||||
|
||||
public interface IAltarManipulator {}
|
||||
public interface IAltarManipulator {
|
||||
}
|
||||
@@ -1,14 +1,11 @@
|
||||
package WayofTime.alchemicalWizardry.api.items;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellEffect;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -28,7 +25,13 @@ import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellEffect;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool;
|
||||
|
||||
public class ItemSpellMultiTool extends Item {
|
||||
|
||||
private static final String harvestLevelSuffix = "harvestLvl";
|
||||
private static final String digLevelSuffix = "digLvl";
|
||||
private static final String tagName = "BloodMagicTool";
|
||||
@@ -47,12 +50,11 @@ public class ItemSpellMultiTool extends Item {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hitEntity(
|
||||
ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) {
|
||||
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase,
|
||||
EntityLivingBase par3EntityLivingBase) {
|
||||
float damage = this.getCustomItemAttack(par1ItemStack);
|
||||
|
||||
float f = (float) par3EntityLivingBase
|
||||
.getEntityAttribute(SharedMonsterAttributes.attackDamage)
|
||||
float f = (float) par3EntityLivingBase.getEntityAttribute(SharedMonsterAttributes.attackDamage)
|
||||
.getAttributeValue();
|
||||
|
||||
SpellParadigmTool parad = this.loadParadigmFromStack(par1ItemStack);
|
||||
@@ -70,8 +72,8 @@ public class ItemSpellMultiTool extends Item {
|
||||
damage *= f;
|
||||
|
||||
if (par3EntityLivingBase instanceof EntityPlayer) {
|
||||
par2EntityLivingBase.attackEntityFrom(
|
||||
DamageSource.causePlayerDamage((EntityPlayer) par3EntityLivingBase), damage);
|
||||
par2EntityLivingBase
|
||||
.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) par3EntityLivingBase), damage);
|
||||
} else {
|
||||
par2EntityLivingBase.attackEntityFrom(DamageSource.causeMobDamage(par3EntityLivingBase), damage);
|
||||
}
|
||||
@@ -163,7 +165,14 @@ public class ItemSpellMultiTool extends Item {
|
||||
int cost = 0;
|
||||
|
||||
cost += parad.digSurroundingArea(
|
||||
stack, world, player, mop, localToolClass, localHardness, toolLevel, this);
|
||||
stack,
|
||||
world,
|
||||
player,
|
||||
mop,
|
||||
localToolClass,
|
||||
localHardness,
|
||||
toolLevel,
|
||||
this);
|
||||
|
||||
cost += parad.onBreakBlock(
|
||||
stack,
|
||||
@@ -192,28 +201,20 @@ public class ItemSpellMultiTool extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
// if (!world.isRemote)
|
||||
// world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
|
||||
// if (!world.isRemote)
|
||||
// world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
|
||||
return true;
|
||||
}
|
||||
|
||||
public Material[] getMaterialsForToolclass(String toolClass) {
|
||||
if ("pickaxe".equals(toolClass)) {
|
||||
return new Material[] {
|
||||
Material.rock,
|
||||
Material.iron,
|
||||
Material.ice,
|
||||
Material.glass,
|
||||
Material.piston,
|
||||
Material.anvil,
|
||||
Material.circuits
|
||||
};
|
||||
return new Material[] { Material.rock, Material.iron, Material.ice, Material.glass, Material.piston,
|
||||
Material.anvil, Material.circuits };
|
||||
} else if ("shovel".equals(toolClass)) {
|
||||
return new Material[] {
|
||||
Material.grass, Material.ground, Material.sand, Material.snow, Material.craftedSnow, Material.clay
|
||||
};
|
||||
return new Material[] { Material.grass, Material.ground, Material.sand, Material.snow, Material.craftedSnow,
|
||||
Material.clay };
|
||||
} else if ("axe".equals(toolClass)) {
|
||||
return new Material[] {Material.wood, Material.vine, Material.circuits, Material.cactus};
|
||||
return new Material[] { Material.wood, Material.vine, Material.circuits, Material.cactus };
|
||||
}
|
||||
return new Material[0];
|
||||
}
|
||||
@@ -483,8 +484,7 @@ public class ItemSpellMultiTool extends Item {
|
||||
|
||||
public ItemStack getContainedCrystal(ItemStack container) {
|
||||
if (container.hasTagCompound()) {
|
||||
NBTTagCompound tag =
|
||||
container.getTagCompound().getCompoundTag(tagName).getCompoundTag("heldItem");
|
||||
NBTTagCompound tag = container.getTagCompound().getCompoundTag(tagName).getCompoundTag("heldItem");
|
||||
|
||||
return ItemStack.loadItemStackFromNBT(tag);
|
||||
} else {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package WayofTime.alchemicalWizardry.api.items;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -15,10 +15,13 @@ import net.minecraft.item.crafting.ShapedRecipes;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
|
||||
/**
|
||||
* Shaped Blood Orb Recipe Handler by joshie *
|
||||
*/
|
||||
public class ShapedBloodOrbRecipe implements IRecipe {
|
||||
|
||||
private static final int MAX_CRAFT_GRID_WIDTH = 3;
|
||||
private static final int MAX_CRAFT_GRID_HEIGHT = 3;
|
||||
|
||||
@@ -85,10 +88,11 @@ public class ShapedBloodOrbRecipe implements IRecipe {
|
||||
Object in = recipe[idx + 1];
|
||||
|
||||
if (in instanceof IBloodOrb
|
||||
|| (in instanceof ItemStack
|
||||
&& ((ItemStack) in).getItem()
|
||||
instanceof
|
||||
IBloodOrb)) { // If the item is an instanceof IBloodOrb then save the level of the
|
||||
|| (in instanceof ItemStack && ((ItemStack) in).getItem() instanceof IBloodOrb)) { // If the item is
|
||||
// an instanceof
|
||||
// IBloodOrb then
|
||||
// save the level
|
||||
// of the
|
||||
// orb
|
||||
if (in instanceof ItemStack) itemMap.put(chr, ((IBloodOrb) ((ItemStack) in).getItem()).getOrbLevel());
|
||||
else itemMap.put(chr, ((IBloodOrb) in).getOrbLevel());
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package WayofTime.alchemicalWizardry.api.items;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -15,10 +15,13 @@ import net.minecraft.item.crafting.ShapelessRecipes;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
|
||||
/**
|
||||
* Shapeless Blood Orb Recipe Handler by joshie *
|
||||
*/
|
||||
public class ShapelessBloodOrbRecipe implements IRecipe {
|
||||
|
||||
private ItemStack output = null;
|
||||
private ArrayList<Object> input = new ArrayList<Object>();
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface ArmourUpgrade {
|
||||
|
||||
// Called when the armour ticks
|
||||
void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack);
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
package WayofTime.alchemicalWizardry.api.items.interfaces;
|
||||
|
||||
public interface IBindable {}
|
||||
public interface IBindable {
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.api.items.interfaces;
|
||||
|
||||
public interface IBloodOrb {
|
||||
|
||||
int getMaxEssence();
|
||||
|
||||
int getOrbLevel();
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
package WayofTime.alchemicalWizardry.api.items.interfaces;
|
||||
|
||||
public interface IHolding {}
|
||||
public interface IHolding {
|
||||
}
|
||||
@@ -3,5 +3,6 @@ package WayofTime.alchemicalWizardry.api.items.interfaces;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface ILPGauge {
|
||||
|
||||
boolean canSeeLPBar(ItemStack itemStack);
|
||||
}
|
||||
+2
-1
@@ -3,4 +3,5 @@ package WayofTime.alchemicalWizardry.api.items.interfaces;
|
||||
/**
|
||||
* Implement this interface to have reagent blocks return false on activating them, to allow manipulation of said block
|
||||
*/
|
||||
public interface IReagentManipulator {}
|
||||
public interface IReagentManipulator {
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.items.interfaces;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IRitualDiviner {
|
||||
|
||||
int cycleDirection(ItemStack stack);
|
||||
|
||||
String getCurrentRitual(ItemStack stack);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
package WayofTime.alchemicalWizardry.api.items.interfaces;
|
||||
|
||||
public interface ISigil {}
|
||||
public interface ISigil {
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
package WayofTime.alchemicalWizardry.api.renderer;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
|
||||
public abstract class MRSRenderer {
|
||||
|
||||
public abstract void renderAt(IMasterRitualStone tile, double x, double y, double z);
|
||||
|
||||
protected void bindTexture(ResourceLocation p_147499_1_) {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package WayofTime.alchemicalWizardry.api.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler;
|
||||
|
||||
public interface IMasterRitualStone extends ISegmentedReagentHandler {
|
||||
|
||||
void performRitual(World world, int x, int y, int z, String ritualID);
|
||||
|
||||
String getOwner();
|
||||
|
||||
@@ -3,8 +3,10 @@ package WayofTime.alchemicalWizardry.api.rituals;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IRitualStone {
|
||||
|
||||
/**
|
||||
* x, y, and z give the position of the Ritual Stone
|
||||
*
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package WayofTime.alchemicalWizardry.api.rituals;
|
||||
|
||||
public interface ITileRitualStone {
|
||||
|
||||
boolean isRuneType(int runeType);
|
||||
}
|
||||
@@ -1,14 +1,16 @@
|
||||
package WayofTime.alchemicalWizardry.api.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.Int3;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.Int3;
|
||||
|
||||
/**
|
||||
* This class is used to pass ritual-specific data into the RitualEffect from the containing Master Ritual Stone. This is basically used as auxillarary storage,
|
||||
* for when simply storing to NBT becomes... difficult.
|
||||
* This class is used to pass ritual-specific data into the RitualEffect from the containing Master Ritual Stone. This
|
||||
* is basically used as auxillarary storage, for when simply storing to NBT becomes... difficult.
|
||||
*
|
||||
*/
|
||||
public class LocalRitualStorage {
|
||||
|
||||
public int xCoord;
|
||||
public int yCoord;
|
||||
public int zCoord;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.api.rituals;
|
||||
|
||||
public class RitualComponent {
|
||||
|
||||
private int x;
|
||||
private int y;
|
||||
private int z;
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
package WayofTime.alchemicalWizardry.api.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
|
||||
public abstract class RitualEffect {
|
||||
|
||||
public abstract void performEffect(IMasterRitualStone ritualStone);
|
||||
|
||||
public boolean startRitual(IMasterRitualStone ritualStone, EntityPlayer player) {
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
package WayofTime.alchemicalWizardry.api.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.event.RitualRunEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.RitualStopEvent;
|
||||
import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -15,7 +12,13 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.event.RitualRunEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.RitualStopEvent;
|
||||
import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
|
||||
public class Rituals {
|
||||
|
||||
public final int crystalLevel;
|
||||
public final int actCost;
|
||||
public final RitualEffect effect;
|
||||
@@ -51,8 +54,8 @@ public class Rituals {
|
||||
* @param name The name of the ritual
|
||||
* @return Returns true if properly registered, or false if the key is already used
|
||||
*/
|
||||
public static boolean registerRitual(
|
||||
String key, int crystalLevel, int actCost, RitualEffect effect, String name, MRSRenderer renderer) {
|
||||
public static boolean registerRitual(String key, int crystalLevel, int actCost, RitualEffect effect, String name,
|
||||
MRSRenderer renderer) {
|
||||
if (ritualMap.containsKey(key)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -115,13 +118,10 @@ public class Rituals {
|
||||
}
|
||||
|
||||
/**
|
||||
* 1 - NORTH
|
||||
* 2 - EAST
|
||||
* 3 - SOUTH
|
||||
* 4 - WEST
|
||||
* 1 - NORTH 2 - EAST 3 - SOUTH 4 - WEST
|
||||
*/
|
||||
public static boolean checkDirectionOfRitualValid(
|
||||
World world, int x, int y, int z, String ritualID, int direction) {
|
||||
public static boolean checkDirectionOfRitualValid(World world, int x, int y, int z, String ritualID,
|
||||
int direction) {
|
||||
List<RitualComponent> ritual = Rituals.getRitualList(ritualID);
|
||||
|
||||
if (ritual == null) {
|
||||
@@ -135,16 +135,13 @@ public class Rituals {
|
||||
test = world.getBlock(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction));
|
||||
te = world.getTileEntity(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction));
|
||||
|
||||
if (!(test instanceof IRitualStone
|
||||
&& ((IRitualStone) test)
|
||||
.isRuneType(
|
||||
world,
|
||||
x + rc.getX(direction),
|
||||
y,
|
||||
z + rc.getZ(direction),
|
||||
world.getBlockMetadata(
|
||||
x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)),
|
||||
rc.getStoneType()))
|
||||
if (!(test instanceof IRitualStone && ((IRitualStone) test).isRuneType(
|
||||
world,
|
||||
x + rc.getX(direction),
|
||||
y,
|
||||
z + rc.getZ(direction),
|
||||
world.getBlockMetadata(x + rc.getX(direction), y + rc.getY(), z + rc.getZ(direction)),
|
||||
rc.getStoneType()))
|
||||
&& !(te instanceof ITileRitualStone && ((ITileRitualStone) te).isRuneType(rc.getStoneType()))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.sacrifice;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IIncense {
|
||||
|
||||
int getMinLevel(ItemStack stack);
|
||||
|
||||
int getMaxLevel(ItemStack stack);
|
||||
|
||||
+10
-6
@@ -1,15 +1,17 @@
|
||||
package WayofTime.alchemicalWizardry.api.sacrifice;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
|
||||
import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
|
||||
import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
|
||||
|
||||
public class PlayerSacrificeHandler {
|
||||
|
||||
public static float scalingOfSacrifice = 0.001f;
|
||||
public static int soulFrayDuration = 400;
|
||||
public static Potion soulFrayId;
|
||||
@@ -31,7 +33,7 @@ public class PlayerSacrificeHandler {
|
||||
amount = amount + Math.min(increment, max - amount);
|
||||
setPlayerIncense(player, amount);
|
||||
|
||||
// System.out.println("Amount of incense: " + amount + ", Increment: " + increment);
|
||||
// System.out.println("Amount of incense: " + amount + ", Increment: " + increment);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -50,8 +52,10 @@ public class PlayerSacrificeHandler {
|
||||
if (health > maxHealth / 10.0) {
|
||||
float sacrificedHealth = health - maxHealth / 10.0f;
|
||||
|
||||
if (findAndFillAltar(player.getEntityWorld(), player, (int)
|
||||
(sacrificedHealth * AlchemicalWizardry.lpPerSacrificeIncense * getModifier(amount)))) {
|
||||
if (findAndFillAltar(
|
||||
player.getEntityWorld(),
|
||||
player,
|
||||
(int) (sacrificedHealth * AlchemicalWizardry.lpPerSacrificeIncense * getModifier(amount)))) {
|
||||
player.setHealth(maxHealth / 10.0f);
|
||||
setPlayerIncense(player, 0);
|
||||
player.addPotionEffect(new PotionEffect(soulFrayId.id, soulFrayDuration));
|
||||
|
||||
+17
-14
@@ -1,8 +1,5 @@
|
||||
package WayofTime.alchemicalWizardry.api.soulNetwork;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
@@ -13,13 +10,19 @@ import java.io.Writer;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
/**
|
||||
* Temporary class to hash-out how to create a network not completely tied to the player.
|
||||
*/
|
||||
public class ComplexNetworkHandler {
|
||||
|
||||
public static String fileName = "config/BloodMagic/soulnetworkKeys";
|
||||
static HashMap<UUID, String> keyMap = new HashMap();
|
||||
|
||||
@@ -42,19 +45,19 @@ public class ComplexNetworkHandler {
|
||||
}
|
||||
|
||||
public static UUID getUUIDForKey(String key) {
|
||||
// if (MinecraftServer.getServer() == null)
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// if (MinecraftServer.getServer() == null)
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// World world = MinecraftServer.getServer().worldServers[0];
|
||||
// UUIDKeyMap data = (UUIDKeyMap) world.loadItemData(UUIDKeyMap.class, key);
|
||||
// World world = MinecraftServer.getServer().worldServers[0];
|
||||
// UUIDKeyMap data = (UUIDKeyMap) world.loadItemData(UUIDKeyMap.class, key);
|
||||
//
|
||||
// if (data == null)
|
||||
// {
|
||||
// data = new UUIDKeyMap(key);
|
||||
// world.setItemData(key, data);
|
||||
// }
|
||||
// if (data == null)
|
||||
// {
|
||||
// data = new UUIDKeyMap(key);
|
||||
// world.setItemData(key, data);
|
||||
// }
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.soulNetwork;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class LifeEssenceNetwork extends net.minecraft.world.WorldSavedData {
|
||||
|
||||
public int currentEssence;
|
||||
public int maxOrb;
|
||||
|
||||
|
||||
+20
-25
@@ -1,11 +1,5 @@
|
||||
package WayofTime.alchemicalWizardry.api.soulNetwork;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.event.AddToNetworkEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemBindEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemDrainInContainerEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -16,11 +10,18 @@ import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.event.AddToNetworkEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemBindEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemDrainInContainerEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
|
||||
public class SoulNetworkHandler {
|
||||
|
||||
public static boolean syphonFromNetworkWhileInContainer(ItemStack ist, int damageToBeDone) {
|
||||
String ownerName = "";
|
||||
if (ist.getTagCompound() != null
|
||||
&& !(ist.getTagCompound().getString("ownerName").equals(""))) {
|
||||
if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) {
|
||||
ownerName = ist.getTagCompound().getString("ownerName");
|
||||
}
|
||||
|
||||
@@ -86,8 +87,7 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static int syphonFromNetwork(ItemStack ist, int damageToBeDone) {
|
||||
if (ist.getTagCompound() != null
|
||||
&& !(ist.getTagCompound().getString("ownerName").equals(""))) {
|
||||
if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) {
|
||||
String ownerName = ist.getTagCompound().getString("ownerName");
|
||||
|
||||
return syphonFromNetwork(ownerName, damageToBeDone);
|
||||
@@ -119,11 +119,11 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Master method used to syphon from the player's network, and will damage them accordingly if they do not have enough LP.
|
||||
* Does not drain on the client side.
|
||||
* Master method used to syphon from the player's network, and will damage them accordingly if they do not have
|
||||
* enough LP. Does not drain on the client side.
|
||||
*
|
||||
* @param ist Owned itemStack
|
||||
* @param player Player using the item
|
||||
* @param ist Owned itemStack
|
||||
* @param player Player using the item
|
||||
* @param drain
|
||||
* @return True if the action should be executed and false if it should not. Always returns false if client-sided.
|
||||
*/
|
||||
@@ -132,8 +132,7 @@ public class SoulNetworkHandler {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ist.getTagCompound() != null
|
||||
&& !(ist.getTagCompound().getString("ownerName").equals(""))) {
|
||||
if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) {
|
||||
String ownerName = ist.getTagCompound().getString("ownerName");
|
||||
|
||||
ItemDrainNetworkEvent event = new ItemDrainNetworkEvent(player, ownerName, ist, drain);
|
||||
@@ -147,9 +146,8 @@ public class SoulNetworkHandler {
|
||||
hurtPlayer(player, event.damageAmount);
|
||||
}
|
||||
|
||||
return (event.getResult()
|
||||
!= Event.Result
|
||||
.DENY); // The event has been told to prevent the action but allow all repercussions of
|
||||
return (event.getResult() != Event.Result.DENY); // The event has been told to prevent the action but allow
|
||||
// all repercussions of
|
||||
// using the item.
|
||||
}
|
||||
|
||||
@@ -184,8 +182,7 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static boolean canSyphonFromOnlyNetwork(ItemStack ist, int damageToBeDone) {
|
||||
if (ist.getTagCompound() != null
|
||||
&& !(ist.getTagCompound().getString("ownerName").equals(""))) {
|
||||
if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) {
|
||||
String ownerName = ist.getTagCompound().getString("ownerName");
|
||||
|
||||
return canSyphonFromOnlyNetwork(ownerName, damageToBeDone);
|
||||
@@ -322,8 +319,7 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static boolean checkAndSetItemPlayer(ItemStack item, EntityPlayer player) {
|
||||
if (item.hasTagCompound()
|
||||
&& !item.getTagCompound().getString("ownerName").equals("")) return true;
|
||||
if (item.hasTagCompound() && !item.getTagCompound().getString("ownerName").equals("")) return true;
|
||||
|
||||
ItemBindEvent event = new ItemBindEvent(player, SoulNetworkHandler.getUsername(player), item);
|
||||
|
||||
@@ -359,8 +355,7 @@ public class SoulNetworkHandler {
|
||||
}
|
||||
|
||||
public static void causeNauseaToPlayer(ItemStack stack) {
|
||||
if (stack.getTagCompound() != null
|
||||
&& !(stack.getTagCompound().getString("ownerName").equals(""))) {
|
||||
if (stack.getTagCompound() != null && !(stack.getTagCompound().getString("ownerName").equals(""))) {
|
||||
String ownerName = stack.getTagCompound().getString("ownerName");
|
||||
|
||||
SoulNetworkHandler.causeNauseaToPlayer(ownerName);
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package WayofTime.alchemicalWizardry.api.spell;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@@ -21,9 +18,16 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class APISpellHelper {
|
||||
|
||||
/**
|
||||
* Thanks Kihira! <3
|
||||
*
|
||||
* @param player
|
||||
* @return persistent data tag
|
||||
*/
|
||||
@@ -203,9 +207,9 @@ public class APISpellHelper {
|
||||
float f6 = MathHelper.sin(-f1 * 0.017453292F);
|
||||
float f7 = f4 * f5;
|
||||
float f8 = f3 * f5;
|
||||
// if (player instanceof EntityPlayerMP)
|
||||
// if (player instanceof EntityPlayerMP)
|
||||
{
|
||||
// d3 = ((EntityPlayerMP) player).theItemInWorldManager.getBlockReachDistance();
|
||||
// d3 = ((EntityPlayerMP) player).theItemInWorldManager.getBlockReachDistance();
|
||||
}
|
||||
Vec3 vec31 = vec3.addVector((double) f7 * range, (double) f6 * range, (double) f8 * range);
|
||||
return world.func_147447_a(vec3, vec31, par3, !par3, par3);
|
||||
@@ -215,8 +219,8 @@ public class APISpellHelper {
|
||||
return Vec3.createVectorHelper(x, y, z);
|
||||
}
|
||||
|
||||
public static List<ItemStack> getItemsFromBlock(
|
||||
World world, Block block, int x, int y, int z, int meta, boolean silkTouch, int fortune) {
|
||||
public static List<ItemStack> getItemsFromBlock(World world, Block block, int x, int y, int z, int meta,
|
||||
boolean silkTouch, int fortune) {
|
||||
boolean canSilk = block.canSilkHarvest(world, null, x, y, z, meta);
|
||||
|
||||
if (canSilk && silkTouch) {
|
||||
@@ -321,7 +325,7 @@ public class APISpellHelper {
|
||||
}
|
||||
|
||||
public static IRecipe getRecipeForItemStack(ItemStack reqStack) // Does not match NBT. Durrr! -smack-
|
||||
{
|
||||
{
|
||||
if (reqStack == null) {
|
||||
return null; // Why are you even doing this to yourself!? You know this can't be healthy!
|
||||
}
|
||||
@@ -330,10 +334,9 @@ public class APISpellHelper {
|
||||
if (posRecipe instanceof IRecipe) {
|
||||
ItemStack outputStack = ((IRecipe) posRecipe).getRecipeOutput();
|
||||
if (outputStack != null) {
|
||||
if (outputStack.getItem() == reqStack.getItem()
|
||||
&& (outputStack.getItem().getHasSubtypes()
|
||||
? outputStack.getItemDamage() == reqStack.getItemDamage()
|
||||
: true)) {
|
||||
if (outputStack.getItem() == reqStack.getItem() && (outputStack.getItem().getHasSubtypes()
|
||||
? outputStack.getItemDamage() == reqStack.getItemDamage()
|
||||
: true)) {
|
||||
return (IRecipe) posRecipe;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.api.spell;
|
||||
|
||||
public abstract class ComplexSpellEffect {
|
||||
|
||||
public final ComplexSpellType type;
|
||||
public final ComplexSpellModifier modifier;
|
||||
|
||||
@@ -35,52 +36,52 @@ public abstract class ComplexSpellEffect {
|
||||
|
||||
public abstract int getCostOfEffect();
|
||||
|
||||
// public NBTTagCompound getTag()
|
||||
// {
|
||||
// NBTTagCompound tag = new NBTTagCompound();
|
||||
// public NBTTagCompound getTag()
|
||||
// {
|
||||
// NBTTagCompound tag = new NBTTagCompound();
|
||||
//
|
||||
// tag.setString("Class", this.getClass().getName());
|
||||
// tag.setInteger("modifier", modifierState);
|
||||
// tag.setInteger("power", powerEnhancement);
|
||||
// tag.setInteger("cost", costEnhancement);
|
||||
// tag.setInteger("potency", potencyEnhancement);
|
||||
// tag.setString("Class", this.getClass().getName());
|
||||
// tag.setInteger("modifier", modifierState);
|
||||
// tag.setInteger("power", powerEnhancement);
|
||||
// tag.setInteger("cost", costEnhancement);
|
||||
// tag.setInteger("potency", potencyEnhancement);
|
||||
//
|
||||
// return tag;
|
||||
// }
|
||||
// return tag;
|
||||
// }
|
||||
//
|
||||
// public static SpellEffect getEffectFromTag(NBTTagCompound tag)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// Class clazz = Class.forName(tag.getString("Class"));
|
||||
// if (clazz != null)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// Object obj = clazz.newInstance();
|
||||
// if (obj instanceof SpellEffect)
|
||||
// {
|
||||
// SpellEffect eff = (SpellEffect) obj;
|
||||
// public static SpellEffect getEffectFromTag(NBTTagCompound tag)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// Class clazz = Class.forName(tag.getString("Class"));
|
||||
// if (clazz != null)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// Object obj = clazz.newInstance();
|
||||
// if (obj instanceof SpellEffect)
|
||||
// {
|
||||
// SpellEffect eff = (SpellEffect) obj;
|
||||
//
|
||||
// eff.modifierState = tag.getInteger("modifier");
|
||||
// eff.powerEnhancement = tag.getInteger("power");
|
||||
// eff.costEnhancement = tag.getInteger("cost");
|
||||
// eff.potencyEnhancement = tag.getInteger("potency");
|
||||
// eff.modifierState = tag.getInteger("modifier");
|
||||
// eff.powerEnhancement = tag.getInteger("power");
|
||||
// eff.costEnhancement = tag.getInteger("cost");
|
||||
// eff.potencyEnhancement = tag.getInteger("potency");
|
||||
//
|
||||
// return eff;
|
||||
// }
|
||||
// } catch (InstantiationException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// } catch (IllegalAccessException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// } catch (ClassNotFoundException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
// return eff;
|
||||
// }
|
||||
// } catch (InstantiationException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// } catch (IllegalAccessException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// } catch (ClassNotFoundException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.api.spell;
|
||||
|
||||
public class ComplexSpellModifier {
|
||||
|
||||
public static ComplexSpellModifier DEFAULT = new ComplexSpellModifier();
|
||||
public static ComplexSpellModifier OFFENSIVE = new ComplexSpellModifier();
|
||||
public static ComplexSpellModifier DEFENSIVE = new ComplexSpellModifier();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.api.spell;
|
||||
|
||||
public class ComplexSpellType {
|
||||
|
||||
public static ComplexSpellType FIRE = new ComplexSpellType();
|
||||
public static ComplexSpellType ICE = new ComplexSpellType();
|
||||
public static ComplexSpellType EARTH = new ComplexSpellType();
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package WayofTime.alchemicalWizardry.api.spell;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
@@ -20,7 +19,11 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EntitySpellProjectile extends Entity implements IProjectile {
|
||||
|
||||
private int xTile = -1;
|
||||
private int yTile = -1;
|
||||
private int zTile = -1;
|
||||
@@ -88,8 +91,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile {
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to setArrowHeading, it's point the throwable entity to a x, y, z
|
||||
* direction.
|
||||
* Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.
|
||||
*/
|
||||
@Override
|
||||
public void setThrowableHeading(double var1, double var3, double var5, float var7, float var8) {
|
||||
@@ -189,7 +191,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile {
|
||||
Block var18 = worldObj.getBlock(xTile, yTile, zTile);
|
||||
int var19 = worldObj.getBlockMetadata(xTile, yTile, zTile);
|
||||
|
||||
// if (var18.equals(Block.getBlockById(inTile)) && var19 == inData)
|
||||
// if (var18.equals(Block.getBlockById(inTile)) && var19 == inData)
|
||||
{
|
||||
// this.groundImpact();
|
||||
// this.setDead();
|
||||
@@ -217,7 +219,8 @@ public class EntitySpellProjectile extends Entity implements IProjectile {
|
||||
|
||||
Entity var5 = null;
|
||||
List var6 = worldObj.getEntitiesWithinAABBExcludingEntity(
|
||||
this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D));
|
||||
this,
|
||||
boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D));
|
||||
double var7 = 0.0D;
|
||||
Iterator var9 = var6.iterator();
|
||||
float var11;
|
||||
@@ -299,16 +302,16 @@ public class EntitySpellProjectile extends Entity implements IProjectile {
|
||||
effectList.appendTag(eff.getTag());
|
||||
}
|
||||
|
||||
// for (String str : this.effectList)
|
||||
// {
|
||||
// if (str != null)
|
||||
// {
|
||||
// NBTTagCompound tag = new NBTTagCompound();
|
||||
// for (String str : this.effectList)
|
||||
// {
|
||||
// if (str != null)
|
||||
// {
|
||||
// NBTTagCompound tag = new NBTTagCompound();
|
||||
//
|
||||
// tag.setString("Class", str);
|
||||
// effectList.appendTag(tag);
|
||||
// }
|
||||
// }
|
||||
// tag.setString("Class", str);
|
||||
// effectList.appendTag(tag);
|
||||
// }
|
||||
// }
|
||||
|
||||
par1NBTTagCompound.setTag("Effects", effectList);
|
||||
par1NBTTagCompound.setInteger("blocksBroken", blocksBroken);
|
||||
@@ -342,13 +345,13 @@ public class EntitySpellProjectile extends Entity implements IProjectile {
|
||||
}
|
||||
this.spellEffectList = spellEffectList;
|
||||
|
||||
// this.effectList = new LinkedList();
|
||||
// for (int i = 0; i < tagList.tagCount(); i++)
|
||||
// {
|
||||
// NBTTagCompound tag = (NBTTagCompound) tagList.tagAt(i);
|
||||
// this.effectList = new LinkedList();
|
||||
// for (int i = 0; i < tagList.tagCount(); i++)
|
||||
// {
|
||||
// NBTTagCompound tag = (NBTTagCompound) tagList.tagAt(i);
|
||||
//
|
||||
// this.effectList.add(tag.getString("Class"));
|
||||
// }
|
||||
// this.effectList.add(tag.getString("Class"));
|
||||
// }
|
||||
|
||||
// SpellParadigmProjectile parad = SpellParadigmProjectile.getParadigmForStringArray(effectList);
|
||||
SpellParadigmProjectile parad = SpellParadigmProjectile.getParadigmForEffectArray(spellEffectList);
|
||||
@@ -357,8 +360,8 @@ public class EntitySpellProjectile extends Entity implements IProjectile {
|
||||
}
|
||||
|
||||
/**
|
||||
* returns if this entity triggers Block.onEntityWalking on the blocks they
|
||||
* walk on. used for spiders and wolves to prevent them from trampling crops
|
||||
* returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
|
||||
* prevent them from trampling crops
|
||||
*/
|
||||
@Override
|
||||
protected boolean canTriggerWalking() {
|
||||
@@ -385,8 +388,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile {
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the arrow has a stream of critical hit particles flying behind
|
||||
* it.
|
||||
* Whether the arrow has a stream of critical hit particles flying behind it.
|
||||
*/
|
||||
public void setIsCritical(boolean par1) {
|
||||
byte var2 = dataWatcher.getWatchableObjectByte(16);
|
||||
@@ -398,8 +400,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile {
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the arrow has a stream of critical hit particles flying behind
|
||||
* it.
|
||||
* Whether the arrow has a stream of critical hit particles flying behind it.
|
||||
*/
|
||||
public boolean getIsCritical() {
|
||||
byte var1 = dataWatcher.getWatchableObjectByte(16);
|
||||
@@ -420,7 +421,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile {
|
||||
}
|
||||
|
||||
private void onImpact(Entity mop) // TODO
|
||||
{
|
||||
{
|
||||
if (mop == shootingEntity && ticksInAir > 3) {
|
||||
shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1);
|
||||
this.setDead();
|
||||
@@ -493,27 +494,63 @@ public class EntitySpellProjectile extends Entity implements IProjectile {
|
||||
switch (sideHit) {
|
||||
case 0:
|
||||
worldObj.spawnParticle(
|
||||
"smoke", posX, posY, posZ, gaussian(0.1D), -gaussian(0.1D), gaussian(0.1D));
|
||||
"smoke",
|
||||
posX,
|
||||
posY,
|
||||
posZ,
|
||||
gaussian(0.1D),
|
||||
-gaussian(0.1D),
|
||||
gaussian(0.1D));
|
||||
break;
|
||||
case 1:
|
||||
worldObj.spawnParticle(
|
||||
"smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D));
|
||||
"smoke",
|
||||
posX,
|
||||
posY,
|
||||
posZ,
|
||||
gaussian(0.1D),
|
||||
gaussian(0.1D),
|
||||
gaussian(0.1D));
|
||||
break;
|
||||
case 2:
|
||||
worldObj.spawnParticle(
|
||||
"smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), -gaussian(0.1D));
|
||||
"smoke",
|
||||
posX,
|
||||
posY,
|
||||
posZ,
|
||||
gaussian(0.1D),
|
||||
gaussian(0.1D),
|
||||
-gaussian(0.1D));
|
||||
break;
|
||||
case 3:
|
||||
worldObj.spawnParticle(
|
||||
"smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D));
|
||||
"smoke",
|
||||
posX,
|
||||
posY,
|
||||
posZ,
|
||||
gaussian(0.1D),
|
||||
gaussian(0.1D),
|
||||
gaussian(0.1D));
|
||||
break;
|
||||
case 4:
|
||||
worldObj.spawnParticle(
|
||||
"smoke", posX, posY, posZ, -gaussian(0.1D), gaussian(0.1D), gaussian(0.1D));
|
||||
"smoke",
|
||||
posX,
|
||||
posY,
|
||||
posZ,
|
||||
-gaussian(0.1D),
|
||||
gaussian(0.1D),
|
||||
gaussian(0.1D));
|
||||
break;
|
||||
case 5:
|
||||
worldObj.spawnParticle(
|
||||
"smoke", posX, posY, posZ, gaussian(0.1D), gaussian(0.1D), gaussian(0.1D));
|
||||
"smoke",
|
||||
posX,
|
||||
posY,
|
||||
posZ,
|
||||
gaussian(0.1D),
|
||||
gaussian(0.1D),
|
||||
gaussian(0.1D));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -1,6 +1,7 @@
|
||||
package WayofTime.alchemicalWizardry.api.spell;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@@ -8,6 +9,7 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class ExtrapolatedMeleeEntityEffect implements IMeleeSpellEntityEffect {
|
||||
|
||||
protected float range;
|
||||
protected float radius;
|
||||
protected int powerUpgrades;
|
||||
|
||||
@@ -1,19 +1,14 @@
|
||||
package WayofTime.alchemicalWizardry.api.spell;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool;
|
||||
|
||||
public interface IDigAreaEffect {
|
||||
int digSurroundingArea(
|
||||
ItemStack container,
|
||||
World world,
|
||||
EntityPlayer player,
|
||||
MovingObjectPosition blockPos,
|
||||
String usedToolClass,
|
||||
float blockHardness,
|
||||
int harvestLvl,
|
||||
ItemSpellMultiTool itemTool);
|
||||
|
||||
int digSurroundingArea(ItemStack container, World world, EntityPlayer player, MovingObjectPosition blockPos,
|
||||
String usedToolClass, float blockHardness, int harvestLvl, ItemSpellMultiTool itemTool);
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
package WayofTime.alchemicalWizardry.api.spell;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IItemManipulator {
|
||||
|
||||
public List<ItemStack> handleItemsOnBlockBroken(ItemStack toolStack, List<ItemStack> itemList);
|
||||
}
|
||||
@@ -4,5 +4,6 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface ILeftClickEffect {
|
||||
|
||||
int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder);
|
||||
}
|
||||
@@ -4,5 +4,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IMeleeSpellEntityEffect {
|
||||
|
||||
void onEntityImpact(World world, EntityPlayer entityPlayer);
|
||||
}
|
||||
@@ -4,5 +4,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IMeleeSpellWorldEffect {
|
||||
|
||||
void onWorldEffect(World world, EntityPlayer entityPlayer);
|
||||
}
|
||||
@@ -5,5 +5,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IOnBanishTool {
|
||||
|
||||
int onBanishTool(ItemStack toolStack, World world, Entity entity, int invSlot, boolean inHand);
|
||||
}
|
||||
@@ -7,14 +7,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public interface IOnBreakBlock {
|
||||
int onBlockBroken(
|
||||
ItemStack container,
|
||||
World world,
|
||||
EntityPlayer player,
|
||||
Block block,
|
||||
int meta,
|
||||
int x,
|
||||
int y,
|
||||
int z,
|
||||
|
||||
int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z,
|
||||
ForgeDirection sideBroken);
|
||||
}
|
||||
@@ -5,5 +5,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IOnSummonTool {
|
||||
|
||||
int onSummonTool(ItemStack toolStack, World world, Entity entity);
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IProjectileImpactEffect {
|
||||
|
||||
void onEntityImpact(Entity mop, Entity projectile);
|
||||
|
||||
void onTileImpact(World world, MovingObjectPosition mop);
|
||||
|
||||
@@ -3,5 +3,6 @@ package WayofTime.alchemicalWizardry.api.spell;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public interface IProjectileUpdateEffect {
|
||||
|
||||
void onUpdateEffect(Entity projectile);
|
||||
}
|
||||
@@ -4,5 +4,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface ISelfSpellEffect {
|
||||
|
||||
void onSelfUse(World world, EntityPlayer player);
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.api.spell;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public interface ISpecialDamageEffect {
|
||||
|
||||
float getDamageForEntity(Entity entity);
|
||||
|
||||
String getKey();
|
||||
|
||||
@@ -5,5 +5,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IToolUpdateEffect {
|
||||
|
||||
int onUpdate(ItemStack toolStack, World world, Entity par3Entity, int invSlot, boolean inHand);
|
||||
}
|
||||
Loaded 100 of 790 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user