Merge pull request #369 from Arcaratus/master

Performance Commit
This commit is contained in:
WayofTime 2015-07-02 11:19:37 -04:00
commit b75c0f5852
217 changed files with 840 additions and 1244 deletions

View file

@ -12,7 +12,6 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import WayofTime.alchemicalWizardry.common.thread.CommandDownloadGAPI;
import WayofTime.alchemicalWizardry.common.thread.GAPIChecker;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@ -511,9 +510,7 @@ public class AlchemicalWizardry
{
logger.info("I have found a zip!");
ZipInputStream zipStream = new ZipInputStream(in);
ZipEntry entry = null;
int extractCount = 0;
ZipEntry entry;
while ((entry = zipStream.getNextEntry()) != null)
{
@ -531,8 +528,6 @@ public class AlchemicalWizardry
out.write(buffer, 0, len);
}
out.close();
extractCount++;
}
}
} catch (Exception e)
@ -548,7 +543,7 @@ public class AlchemicalWizardry
BloodMagicConfiguration.init(new File(event.getModConfigurationDirectory(), "AWWayofTime.cfg"));
//Custom config stuff goes here
Potion[] potionTypes = null;
Potion[] potionTypes;
for (Field f : Potion.class.getDeclaredFields())
{
@ -1423,16 +1418,16 @@ public class AlchemicalWizardry
AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.weakBloodShard), Potion.field_76444_x.id, 4 * 60 * 20); //Absorption
if(!AlchemicalWizardry.potionDisableBoost)
AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 1 * 60 * 20);
AlchemicalPotionCreationHandler.addPotion(new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 60 * 20);
if(!AlchemicalWizardry.potionDisableFlight)
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.feather), AlchemicalWizardry.customPotionFlight.id, 1 * 60 * 20);
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.feather), AlchemicalWizardry.customPotionFlight.id, 60 * 20); // 1 *
if(!AlchemicalWizardry.potionDisableReciprocation)
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.arrow), AlchemicalWizardry.customPotionReciprocation.id, 1 * 60 * 20);
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.arrow), AlchemicalWizardry.customPotionReciprocation.id, 60 * 20); // 1 *
if(!AlchemicalWizardry.potionDisablePlanarBinding)
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.ender_pearl), AlchemicalWizardry.customPotionPlanarBinding.id, 1 * 60 * 20);
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.ender_pearl), AlchemicalWizardry.customPotionPlanarBinding.id, 60 * 20); // 1 *
if(!AlchemicalWizardry.potionDisableSoulFray)
AlchemicalPotionCreationHandler.addPotion(new ItemStack(Blocks.soul_sand), AlchemicalWizardry.customPotionSoulFray.id, 60 * 20);

View file

@ -31,8 +31,6 @@ public class BloodMagicConfiguration
public static final List<ColourThreshold> colorList = new ArrayList<ColourThreshold>();
public static Configuration config;
public static final String CATEGORY_GAMEPLAY = "gameplay";
public static String[] teleposerBlacklist;
public static String[] blacklist = {};
@ -67,10 +65,10 @@ public class BloodMagicConfiguration
AlchemicalWizardry.standardBindingAgentDungeonChance = config.get("Dungeon Loot Chances", "standardBindingAgent", 30).getInt();
AlchemicalWizardry.mundanePowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "mundanePowerCatalyst", 20).getInt();
AlchemicalWizardry.averagePowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "averagePowerCatalyst", 10).getInt();
AlchemicalWizardry.greaterPowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "greaterPowerCatalyst", 05).getInt();
AlchemicalWizardry.greaterPowerCatalystDungeonChance = config.get("Dungeon Loot Chances", "greaterPowerCatalyst", 5).getInt();
AlchemicalWizardry.mundaneLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "mundaneLengtheningCatalyst", 20).getInt();
AlchemicalWizardry.averageLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "averageLengtheningCatalyst", 10).getInt();
AlchemicalWizardry.greaterLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "greaterLengtheningCatalyst", 05).getInt();
AlchemicalWizardry.greaterLengtheningCatalystDungeonChance = config.get("Dungeon Loot Chances", "greaterLengtheningCatalyst", 5).getInt();
AlchemicalWizardry.customPotionDrowningID = config.get("Potion ID", "Drowning", 100).getInt();
AlchemicalWizardry.customPotionBoostID = config.get("Potion ID", "Boost", 101).getInt();
AlchemicalWizardry.customPotionProjProtID = config.get("Potion ID", "ProjProt", 102).getInt();

View file

@ -59,8 +59,6 @@ import cpw.mods.fml.common.registry.GameRegistry;
*/
public class ModBlocks
{
public static Block testingBlock;
public static Block bloodStoneBrick;
public static Block largeBloodStoneBrick;
public static BlockAltar blockAltar;

View file

@ -6,7 +6,6 @@ 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.book.ItemBMBook;
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourEarth;
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourFire;

View file

@ -34,7 +34,7 @@ public class Vector3
@Override
public boolean equals(Object object)
{
return object == this ? true : (object instanceof Vector3 ? canEqual(this) && this.x == ((Vector3) object).x && this.y == ((Vector3) object).y && this.z == ((Vector3) object).z : false);
return object == this || object instanceof Vector3 && canEqual(this) && this.x == ((Vector3) object).x && this.y == ((Vector3) object).y && this.z == ((Vector3) object).z;
}
@Override

View file

@ -26,7 +26,7 @@ public class AlchemyRecipe
return false;
}
ItemStack[] recipe = new ItemStack[5];
ItemStack[] recipe;
if (items.length < 5)
{

View file

@ -6,5 +6,5 @@ import net.minecraft.world.World;
public interface IAlchemyGoggles
{
public boolean showIngameHUD(World world, ItemStack stack, EntityPlayer player);
boolean showIngameHUD(World world, ItemStack stack, EntityPlayer player);
}

View file

@ -2,15 +2,15 @@ package WayofTime.alchemicalWizardry.api.alchemy.energy;
public interface IReagentContainer
{
public ReagentStack getReagent();
ReagentStack getReagent();
public int getReagentStackAmount();
int getReagentStackAmount();
public int getCapacity();
int getCapacity();
public int fill(ReagentStack resource, boolean doFill);
int fill(ReagentStack resource, boolean doFill);
public ReagentStack drain(int maxDrain, boolean doDrain);
ReagentStack drain(int maxDrain, boolean doDrain);
public ReagentContainerInfo getInfo();
ReagentContainerInfo getInfo();
}

View file

@ -4,11 +4,11 @@ import java.util.Map;
public interface ISegmentedReagentHandler extends IReagentHandler
{
public int getNumberOfTanks();
int getNumberOfTanks();
public int getTanksTunedToReagent(Reagent reagent);
int getTanksTunedToReagent(Reagent reagent);
public void setTanksTunedToReagent(Reagent reagent, int total);
void setTanksTunedToReagent(Reagent reagent, int total);
public Map<Reagent, Integer> getAttunedTankMap();
Map<Reagent, Integer> getAttunedTankMap();
}

View file

@ -47,6 +47,6 @@ public class Reagent
@Override
public boolean equals(Object o)
{
return o instanceof Reagent ? this == o && name.equals(((Reagent) o).name) : false;
return o instanceof Reagent && this == o && name.equals(((Reagent) o).name);
}
}

View file

@ -259,7 +259,7 @@ public class TileSegmentedReagentHandler extends TileEntity implements ISegmente
return;
}
this.attunedTankMap.put(reagent, new Integer(total));
this.attunedTankMap.put(reagent, total);
}
@Override

View file

@ -89,7 +89,7 @@ public class AltarRecipe
NBTBase comparedBaseTag = comparedTag.getTag(str);
if(comparedBaseTag instanceof NBTTagCompound)
{
if(!this.areTagsEqual((NBTTagCompound) tag, comparedTag))
if(!this.areTagsEqual(tag, comparedTag))
{
return false;
}

View file

@ -2,5 +2,5 @@ package WayofTime.alchemicalWizardry.api.altarRecipeRegistry;
public interface IFadedRune
{
public int getAltarTierLimit(int meta);
int getAltarTierLimit(int meta);
}

View file

@ -15,12 +15,7 @@ public class BindingRecipe
public boolean doesRequiredItemMatch(ItemStack testStack)
{
if (testStack == null || this.requiredItem == null)
{
return false;
}
return this.requiredItem.isItemEqual(testStack);
return !(testStack == null || this.requiredItem == null) && this.requiredItem.isItemEqual(testStack);
}
public ItemStack getResult(ItemStack inputItem)

View file

@ -15,12 +15,7 @@ public class UnbindingRecipe
public boolean doesRequiredItemMatch(ItemStack testStack)
{
if (testStack == null || this.requiredItem == null)
{
return false;
}
return this.requiredItem.isItemEqual(testStack);
return !(testStack == null || this.requiredItem == null) && this.requiredItem.isItemEqual(testStack);
}
public ItemStack getResult(ItemStack inputItem)

View file

@ -30,7 +30,7 @@ public class CompressionRegistry
*/
public static void registerItemThreshold(ItemStack stack, int threshold)
{
thresholdMap.put(stack, new Integer(threshold));
thresholdMap.put(stack, threshold);
}
public static ItemStack compressInventory(ItemStack[] inv, World world)

View file

@ -42,7 +42,7 @@ public class PageAltarRecipe extends PageBase {
guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.altar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7);
int inputY = (1 * 20) + (guiTop + guiBase.ySize / 5);
int inputY = (20) + (guiTop + guiBase.ySize / 5); //1 * 20
GuiHelper.drawItemStack(input, inputX, inputY);
if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) {
guiBase.renderToolTip(input, mouseX, mouseY);
@ -52,7 +52,7 @@ public class PageAltarRecipe extends PageBase {
output = new ItemStack(Blocks.fire);
}
int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7);
int outputY = (1 * 20) + (guiTop + guiBase.xSize / 5);
int outputY = (20) + (guiTop + guiBase.xSize / 5); // 1 * 20
GuiHelper.drawItemStack(output, outputX, outputY);
if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) {
guiBase.renderToolTip(output, outputX, outputY);

View file

@ -63,7 +63,7 @@ public class PageMultiBlock extends PageBase
blockCount += perLvl;
}
tick= (showLayer==-1?blockCount:countPerLevel[showLayer])*40;
int yOff = (structureHeight-1)*12+structureWidth*5+structureLength*5+16;
// 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));
@ -90,7 +90,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);

View file

@ -16,5 +16,5 @@ public interface IHarvestHandler
* @param meta meta at this given location
* @return true if successfully harvested, false if not
*/
public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta);
boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta);
}

View file

@ -102,8 +102,8 @@ public class ShapedBloodOrbRecipe implements IRecipe
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 orb
if (in instanceof ItemStack)
itemMap.put(chr, (Integer) (((IBloodOrb) ((ItemStack) in).getItem()).getOrbLevel()));
else itemMap.put(chr, (Integer) (((IBloodOrb) in).getOrbLevel()));
itemMap.put(chr, ((IBloodOrb) ((ItemStack) in).getItem()).getOrbLevel());
else itemMap.put(chr, ((IBloodOrb) in).getOrbLevel());
} else if (in instanceof ItemStack)
{
itemMap.put(chr, ((ItemStack) in).copy());

View file

@ -7,9 +7,9 @@ import net.minecraft.world.World;
public interface ArmourUpgrade
{
//Called when the armour ticks
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack);
void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack);
public boolean isUpgrade();
boolean isUpgrade();
public int getEnergyForTenSeconds();
int getEnergyForTenSeconds();
}

View file

@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.api.items.interfaces;
public interface IBloodOrb
{
public int getMaxEssence();
int getMaxEssence();
public int getOrbLevel();
int getOrbLevel();
}

View file

@ -6,39 +6,39 @@ import net.minecraft.world.World;
public interface IMasterRitualStone extends ISegmentedReagentHandler
{
public void performRitual(World world, int x, int y, int z, String ritualID);
void performRitual(World world, int x, int y, int z, String ritualID);
public String getOwner();
String getOwner();
public void setCooldown(int newCooldown);
void setCooldown(int newCooldown);
public int getCooldown();
int getCooldown();
public void setVar1(int newVar1);
void setVar1(int newVar1);
public int getVar1();
int getVar1();
public void setActive(boolean active);
void setActive(boolean active);
public int getDirection();
int getDirection();
public World getWorld();
World getWorld();
public int getXCoord();
int getXCoord();
public int getYCoord();
int getYCoord();
public int getZCoord();
int getZCoord();
public NBTTagCompound getCustomRitualTag();
NBTTagCompound getCustomRitualTag();
public void setCustomRitualTag(NBTTagCompound tag);
void setCustomRitualTag(NBTTagCompound tag);
public boolean areTanksEmpty();
boolean areTanksEmpty();
public int getRunningTime();
int getRunningTime();
public LocalRitualStorage getLocalStorage();
LocalRitualStorage getLocalStorage();
public void setLocalStorage(LocalRitualStorage storage);
void setLocalStorage(LocalRitualStorage storage);
}

View file

@ -14,5 +14,5 @@ public interface IRitualStone
* @param runeType
* @return
*/
public boolean isRuneType(World world, int x, int y, int z, int meta, int runeType);
boolean isRuneType(World world, int x, int y, int z, int meta, int runeType);
}

View file

@ -2,5 +2,5 @@ package WayofTime.alchemicalWizardry.api.rituals;
public interface ITileRitualStone
{
public boolean isRuneType(int runeType);
boolean isRuneType(int runeType);
}

View file

@ -126,12 +126,7 @@ public class Rituals
{
int direction = Rituals.getDirectionOfRitual(world, x, y, z, ritualID);
if (direction != -1)
{
return true;
}
return false;
return direction != -1;
}
/**
@ -149,8 +144,8 @@ public class Rituals
return false;
}
Block test = null;
TileEntity te = null;
Block test;
TileEntity te;
for (RitualComponent rc : ritual)
{
@ -292,11 +287,6 @@ public class Rituals
}
}
public static int getNumberOfRituals()
{
return ritualMap.size();
}
public String getRitualName()
{
return this.name;

View file

@ -4,18 +4,18 @@ import net.minecraft.item.ItemStack;
public interface IIncense
{
public int getMinLevel(ItemStack stack);
int getMinLevel(ItemStack stack);
public int getMaxLevel(ItemStack stack);
int getMaxLevel(ItemStack stack);
public int getIncenseDuration(ItemStack stack);
int getIncenseDuration(ItemStack stack);
/**
* @param stack
* @return a float from 0 to 1
*/
public float getRedColour(ItemStack stack);
public float getGreenColour(ItemStack stack);
public float getBlueColour(ItemStack stack);
float getRedColour(ItemStack stack);
float getGreenColour(ItemStack stack);
float getBlueColour(ItemStack stack);
float getTickRate(ItemStack stack);
}

View file

@ -95,7 +95,7 @@ public class PlayerSacrificeHandler
public static IBloodAltar getAltar(World world, int x, int y, int z)
{
TileEntity tileEntity = null;
TileEntity tileEntity;
for (int i = -2; i <= 2; i++)
{

View file

@ -1,7 +1,5 @@
package WayofTime.alchemicalWizardry.api.soulNetwork;
import java.util.UUID;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -16,26 +14,11 @@ import WayofTime.alchemicalWizardry.api.event.ItemBindEvent;
import WayofTime.alchemicalWizardry.api.event.ItemDrainInContainerEvent;
import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent;
import com.mojang.authlib.GameProfile;
import cpw.mods.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.Event.Result;
public class SoulNetworkHandler
{
public static UUID getUUIDFromPlayer(EntityPlayer player)
{
return player.getPersistentID();
}
public static EntityPlayer getPlayerFromUUID(UUID uuid)
{
MinecraftServer server = MinecraftServer.getServer();
GameProfile gameProfile;
gameProfile = server.func_152358_ax().func_152652_a(uuid);
return null;
}
public static boolean syphonFromNetworkWhileInContainer(ItemStack ist, int damageToBeDone)
{
String ownerName = "";
@ -204,10 +187,6 @@ public class SoulNetworkHandler
World world = player.worldObj;
if (world != null)
{
double posX = player.posX;
double posY = player.posY;
double posZ = player.posZ;
world.playSoundEffect((double) ((float) player.posX + 0.5F), (double) ((float) player.posY + 0.5F), (double) ((float) player.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
}

View file

@ -238,12 +238,11 @@ public class APISpellHelper
float f6 = MathHelper.sin(-f1 * 0.017453292F);
float f7 = f4 * f5;
float f8 = f3 * f5;
double d3 = range;
if (player instanceof EntityPlayerMP)
// if (player instanceof EntityPlayerMP)
{
// d3 = ((EntityPlayerMP) player).theItemInWorldManager.getBlockReachDistance();
}
Vec3 vec31 = vec3.addVector((double) f7 * d3, (double) f6 * d3, (double) f8 * d3);
Vec3 vec31 = vec3.addVector((double) f7 * range, (double) f6 * range, (double) f8 * range);
return world.func_147447_a(vec3, vec31, par3, !par3, par3);
}

View file

@ -83,7 +83,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
@Override
protected void entityInit()
{
dataWatcher.addObject(16, Byte.valueOf((byte) 0));
dataWatcher.addObject(16, 0);
}
/**
@ -200,7 +200,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();
@ -353,7 +353,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
List<SpellEffect> spellEffectList = new LinkedList();
for (int i = 0; i < tagList.tagCount(); i++)
{
NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i);
NBTTagCompound tag = tagList.getCompoundTagAt(i);
SpellEffect eff = SpellEffect.getEffectFromTag(tag);
if (eff != null)
@ -420,10 +420,10 @@ public class EntitySpellProjectile extends Entity implements IProjectile
byte var2 = dataWatcher.getWatchableObjectByte(16);
if (par1)
{
dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 | 1)));
dataWatcher.updateObject(16, var2 | 1);
} else
{
dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 & -2)));
dataWatcher.updateObject(16, var2 & -2);
}
}

View file

@ -8,5 +8,5 @@ import net.minecraft.world.World;
public interface IDigAreaEffect
{
public abstract 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);
}

View file

@ -5,5 +5,5 @@ import net.minecraft.item.ItemStack;
public interface ILeftClickEffect
{
public abstract int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder);
int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder);
}

View file

@ -5,5 +5,5 @@ import net.minecraft.world.World;
public interface IMeleeSpellEntityEffect
{
public void onEntityImpact(World world, EntityPlayer entityPlayer);
void onEntityImpact(World world, EntityPlayer entityPlayer);
}

View file

@ -5,5 +5,5 @@ import net.minecraft.world.World;
public interface IMeleeSpellWorldEffect
{
public void onWorldEffect(World world, EntityPlayer entityPlayer);
void onWorldEffect(World world, EntityPlayer entityPlayer);
}

View file

@ -6,5 +6,5 @@ import net.minecraft.world.World;
public interface IOnBanishTool
{
public abstract int onBanishTool(ItemStack toolStack, World world, Entity entity, int invSlot, boolean inHand);
int onBanishTool(ItemStack toolStack, World world, Entity entity, int invSlot, boolean inHand);
}

View file

@ -8,5 +8,5 @@ import net.minecraftforge.common.util.ForgeDirection;
public interface IOnBreakBlock
{
public abstract int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken);
int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken);
}

View file

@ -6,5 +6,5 @@ import net.minecraft.world.World;
public interface IOnSummonTool
{
public abstract int onSummonTool(ItemStack toolStack, World world, Entity entity);
int onSummonTool(ItemStack toolStack, World world, Entity entity);
}

View file

@ -6,7 +6,7 @@ import net.minecraft.world.World;
public interface IProjectileImpactEffect
{
public void onEntityImpact(Entity mop, Entity projectile);
void onEntityImpact(Entity mop, Entity projectile);
public void onTileImpact(World world, MovingObjectPosition mop);
void onTileImpact(World world, MovingObjectPosition mop);
}

View file

@ -4,5 +4,5 @@ import net.minecraft.entity.Entity;
public interface IProjectileUpdateEffect
{
public void onUpdateEffect(Entity projectile);
void onUpdateEffect(Entity projectile);
}

View file

@ -9,7 +9,7 @@ public interface IRightClickEffect
{
//public abstract int onRightClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder);
public abstract int onRightClickBlock(ItemStack stack, EntityLivingBase weilder, World world, MovingObjectPosition mop);
int onRightClickBlock(ItemStack stack, EntityLivingBase weilder, World world, MovingObjectPosition mop);
public abstract int onRightClickAir(ItemStack stack, EntityLivingBase weilder);
int onRightClickAir(ItemStack stack, EntityLivingBase weilder);
}

View file

@ -5,5 +5,5 @@ import net.minecraft.world.World;
public interface ISelfSpellEffect
{
public void onSelfUse(World world, EntityPlayer player);
void onSelfUse(World world, EntityPlayer player);
}

View file

@ -4,7 +4,7 @@ import net.minecraft.entity.Entity;
public interface ISpecialDamageEffect
{
public float getDamageForEntity(Entity entity);
float getDamageForEntity(Entity entity);
public String getKey();
String getKey();
}

View file

@ -6,5 +6,5 @@ import net.minecraft.world.World;
public interface IToolUpdateEffect
{
public abstract int onUpdate(ItemStack toolStack, World world, Entity par3Entity, int invSlot, boolean inHand);
int onUpdate(ItemStack toolStack, World world, Entity par3Entity, int invSlot, boolean inHand);
}

View file

@ -6,7 +6,7 @@ public class SpellEnhancement
public static final int EFFICIENCY = 1;
public static final int POTENCY = 2;
private int state = this.POWER;
private int state = POWER;
protected SpellEnhancement(int state)
{

View file

@ -2,7 +2,6 @@ package WayofTime.alchemicalWizardry.api.spell;
public class SpellEnhancementCost extends SpellEnhancement
{
public SpellEnhancementCost()
{
super(SpellEnhancement.EFFICIENCY);

View file

@ -6,5 +6,4 @@ public class SpellEnhancementPotency extends SpellEnhancement
{
super(SpellEnhancement.POTENCY);
}
}

View file

@ -2,7 +2,6 @@ package WayofTime.alchemicalWizardry.api.spell;
public class SpellEnhancementPower extends SpellEnhancement
{
public SpellEnhancementPower()
{
super(SpellEnhancement.POWER);

View file

@ -30,7 +30,6 @@ public class SpellParadigmTool extends SpellParadigm
private List<IDigAreaEffect> digAreaEffectList;
private List<ISpecialDamageEffect> specialDamageEffectList;
private float maxDamage;
private HashMap<String, Integer> harvestLevel;
private HashMap<String, Float> digSpeed;
private HashMap<String, Float> maxDamageHash;
@ -62,8 +61,6 @@ public class SpellParadigmTool extends SpellParadigm
this.toolInfoString = new HashMap();
this.critChanceHash = new HashMap();
this.maxDamage = 5;
this.harvestLevel = new HashMap();
this.harvestLevel.put("pickaxe", -1);
this.harvestLevel.put("shovel", -1);

View file

@ -5,39 +5,38 @@ package WayofTime.alchemicalWizardry.api.tile;
*/
public interface IBloodAltar
{
int getCapacity();
public int getCapacity();
int getCurrentBlood();
public int getCurrentBlood();
int getTier();
public int getTier();
int getProgress();
public int getProgress();
float getSacrificeMultiplier();
public float getSacrificeMultiplier();
float getSelfSacrificeMultiplier();
public float getSelfSacrificeMultiplier();
float getOrbMultiplier();
public float getOrbMultiplier();
float getDislocationMultiplier();
public float getDislocationMultiplier();
int getBufferCapacity();
public int getBufferCapacity();
void sacrificialDaggerCall(int amount, boolean b);
public void sacrificialDaggerCall(int amount, boolean b);
public void startCycle();
void startCycle();
/**
* Will set the altar to initiate a cooldown cycle after it crafts before starting to craft again, giving the user time to interact with the altar.
* This can only be set while the altar is not active.
* @param amount
*/
public void requestPauseAfterCrafting(int amount);
void requestPauseAfterCrafting(int amount);
public void addToDemonBloodDuration(int dur);
void addToDemonBloodDuration(int dur);
public boolean hasDemonBlood();
boolean hasDemonBlood();
public void decrementDemonBlood();
void decrementDemonBlood();
}

View file

@ -6,5 +6,5 @@ import net.minecraft.world.World;
public interface ISpellParadigmTile extends ISpellTile
{
public void castSpell(World world, EntityPlayer entity, ItemStack spellCasterStack);
void castSpell(World world, EntityPlayer entity, ItemStack spellCasterStack);
}

View file

@ -5,7 +5,7 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigm;
public interface ISpellTile
{
public void modifySpellParadigm(SpellParadigm parad);
void modifySpellParadigm(SpellParadigm parad);
public boolean canInputRecieveOutput(ForgeDirection output);
boolean canInputRecieveOutput(ForgeDirection output);
}

View file

@ -7,7 +7,7 @@ public interface IEntryElement{
/**
* In here you need to draw the element
*/
public void drawElement();
void drawElement();
/**
* @param mX
@ -16,7 +16,7 @@ public interface IEntryElement{
* Mouse Y Position
* @return is the mouse in a element
*/
public boolean isMouseInElement(int mX, int mY);
boolean isMouseInElement(int mX, int mY);
/**
* This get's called when you enter the element
@ -26,7 +26,7 @@ public interface IEntryElement{
* Mouse Y Position
*/
public void onMouseEnter(int mX, int mY);
void onMouseEnter(int mX, int mY);
/**
* This get's called when you click within the element
@ -37,5 +37,5 @@ public interface IEntryElement{
* @param type
* Type of click (right, left, scroll)
*/
public void onMouseClick(int mX, int mY, int type);
void onMouseClick(int mX, int mY, int type);
}

View file

@ -3,5 +3,5 @@ package WayofTime.alchemicalWizardry.book.interfaces;
import net.minecraft.world.World;
public interface IReviving {
public void spawnEntity(World world, int x, int y, int z);
void spawnEntity(World world, int x, int y, int z);
}

View file

@ -66,7 +66,7 @@ public class ClientEventHandler
if (event.phase.equals(Phase.START))
return;
if (!RenderHelper.onTickInGame(mcClient))
// if (!RenderHelper.onTickInGame(mcClient))
{
}

View file

@ -106,7 +106,6 @@ import cpw.mods.fml.common.FMLCommonHandler;
public class ClientProxy extends CommonProxy
{
public static int renderPass;
public static int altarRenderType;
@Override
public void registerPostSideObjects()

View file

@ -4,7 +4,7 @@ import net.minecraft.client.settings.KeyBinding;
public class KeyBindings
{
public static KeyBinding omegaTest;
// public static KeyBinding omegaTest;
public static void init()
{

View file

@ -122,7 +122,6 @@ public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
public void loadCraftingRecipes(ItemStack result) {
for (AlchemyRecipe recipe : AlchemyRecipeRegistry.recipes) {
if (recipe == null) continue;
ItemStack output = recipe.getResult();
if (NEIServerUtils.areStacksSameTypeCrafting(result, recipe.getResult())) {
arecipes.add(new CachedAlchemyRecipe(recipe));
}

View file

@ -81,7 +81,7 @@ public class NEIAltarRecipeHandler extends TemplateRecipeHandler {
//Mouse Position helper
public Point getMouse(int width, int height) {
Point mousepos = this.getMousePosition();
Point mousepos = getMousePosition();
int guiLeft = (width - 176) / 2;
int guiTop = (height - 166) / 2;
Point relMouse = new Point(mousepos.x - guiLeft, mousepos.y - guiTop);

View file

@ -49,7 +49,7 @@ public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler {
ingredients.add(stack);
}else if(o instanceof List)
{
PositionedStack stack = new PositionedStack((List)o, 25 + x * 18, 6 + y * 18, false);
PositionedStack stack = new PositionedStack(o, 25 + x * 18, 6 + y * 18, false);
stack.setMaxSize(1);
ingredients.add(stack);
}

View file

@ -46,7 +46,7 @@ public class NEIBloodOrbShapelessHandler extends ShapelessRecipeHandler {
ingredients.add(stack);
}else if(o instanceof List)
{
PositionedStack stack = new PositionedStack((List)o, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18);
PositionedStack stack = new PositionedStack(o, 25 + stackorder[ingred][0] * 18, 6 + stackorder[ingred][1] * 18);
stack.setMaxSize(1);
ingredients.add(stack);
}

View file

@ -59,8 +59,8 @@ public class HUDElement
if (itemStack != null)
{
int damage = 1;
int maxDamage = 1;
int damage;
int maxDamage;
if (showValue)
{

View file

@ -1,17 +0,0 @@
package WayofTime.alchemicalWizardry.client.renderer;
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
public class Helper
{
public static RitualEffect getEffectFromString(String name)
{
Rituals ritual = Rituals.ritualMap.get(name);
if (ritual == null)
return null;
return ritual.effect;
}
}

View file

@ -17,12 +17,10 @@ public class RenderFakeBlocks
double maxY = minY + 1;
double maxZ = minZ + 1;
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setColorRGBA(255, 255, 255, 200);
float texMinU, texMaxU, texMinV, texMaxV;
texMinU = getMinU(block, meta, 0);

View file

@ -29,7 +29,6 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
public class RenderHelper
{
public static boolean showEquippedItem = true;
public static boolean enableItemName = false;
public static boolean enabled = true;
public static boolean showInChat = true;
@ -62,7 +61,6 @@ public class RenderHelper
{
EntityPlayer player = mc.thePlayer;
player.getEntityData();
World world = mc.theWorld;
if (SpellHelper.canPlayerSeeAlchemy(player))
{
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
@ -254,10 +252,10 @@ public class RenderHelper
float f1 = 0.00390625F;
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV((double)(p_73729_1_ + 0), (double)(p_73729_2_ + p_73729_6_), (double)zLevel, (double)((float)(p_73729_3_ + 0) * f), (double)((float)(p_73729_4_ + p_73729_6_) * f1));
tessellator.addVertexWithUV((double)(p_73729_1_ + p_73729_5_), (double)(p_73729_2_ + p_73729_6_), (double)zLevel, (double)((float)(p_73729_3_ + p_73729_5_) * f), (double)((float)(p_73729_4_ + p_73729_6_) * f1));
tessellator.addVertexWithUV((double)(p_73729_1_ + p_73729_5_), (double)(p_73729_2_ + 0), (double)zLevel, (double)((float)(p_73729_3_ + p_73729_5_) * f), (double)((float)(p_73729_4_ + 0) * f1));
tessellator.addVertexWithUV((double)(p_73729_1_ + 0), (double)(p_73729_2_ + 0), (double)zLevel, (double)((float)(p_73729_3_ + 0) * f), (double)((float)(p_73729_4_ + 0) * f1));
tessellator.addVertexWithUV((double)p_73729_1_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ * f), (p_73729_4_ + p_73729_6_) * f1);
tessellator.addVertexWithUV(p_73729_1_ + p_73729_5_, p_73729_2_ + p_73729_6_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, (p_73729_4_ + p_73729_6_) * f1);
tessellator.addVertexWithUV(p_73729_1_ + p_73729_5_, (double)p_73729_2_, (double)zLevel, (p_73729_3_ + p_73729_5_) * f, p_73729_4_ * f1);
tessellator.addVertexWithUV((double)p_73729_1_, (double)p_73729_2_, (double)zLevel, (double)(p_73729_3_ * f), p_73729_4_ * f1);
tessellator.draw();
}
@ -295,10 +293,10 @@ public class RenderHelper
{
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV((double)(p_94149_1_ + 0), (double)(p_94149_2_ + p_94149_5_), (double)zLevel, (double)p_94149_3_.getMinU(), (double)p_94149_3_.getMaxV());
tessellator.addVertexWithUV((double)p_94149_1_, (double)(p_94149_2_ + p_94149_5_), (double)zLevel, (double)p_94149_3_.getMinU(), (double)p_94149_3_.getMaxV());
tessellator.addVertexWithUV((double)(p_94149_1_ + p_94149_4_), (double)(p_94149_2_ + p_94149_5_), (double)zLevel, (double)p_94149_3_.getMaxU(), (double)p_94149_3_.getMaxV());
tessellator.addVertexWithUV((double)(p_94149_1_ + p_94149_4_), (double)(p_94149_2_ + 0), (double)zLevel, (double)p_94149_3_.getMaxU(), (double)p_94149_3_.getMinV());
tessellator.addVertexWithUV((double)(p_94149_1_ + 0), (double)(p_94149_2_ + 0), (double)zLevel, (double)p_94149_3_.getMinU(), (double)p_94149_3_.getMinV());
tessellator.addVertexWithUV((double)(p_94149_1_ + p_94149_4_), (double)p_94149_2_, (double)zLevel, (double)p_94149_3_.getMaxU(), (double)p_94149_3_.getMinV());
tessellator.addVertexWithUV((double)p_94149_1_, (double)p_94149_2_, (double)zLevel, (double)p_94149_3_.getMinU(), (double)p_94149_3_.getMinV());
tessellator.draw();
}
@ -331,7 +329,7 @@ public class RenderHelper
e.renderToHud(xBase + prevX + (alignMode.toLowerCase().contains("right") ? e.width() : 0), yBase);
prevX += (e.width());
}
} else if (listMode.equalsIgnoreCase("compound"))
} //else if (listMode.equalsIgnoreCase("compound"))
{
//TODO
}

View file

@ -63,7 +63,6 @@ import cpw.mods.fml.common.registry.GameRegistry;
public class AlchemicalWizardryEventHooks
{
public static Map<String, Boolean> playerFlightBuff = new HashMap();
public static Map<String, Boolean> playerBoostStepHeight = new HashMap();
public static List<String> playersWith1Step = new ArrayList();
public static Map<Integer, List<CoordAndRange>> respawnMap = new HashMap();
@ -118,8 +117,7 @@ public class AlchemicalWizardryEventHooks
if(prevHp > 0)
{
double originalDamage = event.ammount;
double initialReagentHp = prevHp;
float recalculatedAmount = ArmorProperties.ApplyArmor(player, player.inventory.armorInventory, event.source, event.ammount);
if (recalculatedAmount <= 0) return;
recalculatedAmount = SpellHelper.applyPotionDamageCalculations(player, event.source, recalculatedAmount); //Recalculated damage
@ -241,7 +239,7 @@ public class AlchemicalWizardryEventHooks
reagentAmount -= drain;
hasReagentChanged = true;
health += addedAmount;
hasHealthChanged = true;
@ -378,7 +376,6 @@ public class AlchemicalWizardryEventHooks
if (event.entityLiving instanceof EntityCreeper)
{
GameRegistry d;
return;
}
@ -471,7 +468,7 @@ public class AlchemicalWizardryEventHooks
{
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionReciprocation).getAmplifier();
float damageRecieve = event.ammount / 2 * (i + 1);
((EntityLivingBase) entityAttacking).attackEntityFrom(DamageSource.generic, damageRecieve);
entityAttacking.attackEntityFrom(DamageSource.generic, damageRecieve);
}
}
@ -527,7 +524,7 @@ public class AlchemicalWizardryEventHooks
NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getLPPacket(SoulNetworkHandler.getCurrentEssence(ownerName), SoulNetworkHandler.getMaximumForOrbTier(SoulNetworkHandler.getCurrentMaxOrb(ownerName))), (EntityPlayerMP)entityLiving);
}
}
ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, ((EntityPlayer) event.entityLiving).capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});
ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, ((EntityPlayer) event.entityLiving).capabilities, 0.1F, "walkSpeed", "g", "field_75097_g");
}
if (entityLiving instanceof EntityPlayer && entityLiving.worldObj.isRemote)
@ -557,7 +554,7 @@ public class AlchemicalWizardryEventHooks
{
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionDrowning).getAmplifier();
if (event.entityLiving.worldObj.getWorldTime() % ((int) (20 / (i + 1))) == 0)
if (event.entityLiving.worldObj.getWorldTime() % (20 / (i + 1)) == 0)
{
event.entityLiving.attackEntityFrom(DamageSource.drown, 2);
event.entityLiving.hurtResistantTime = Math.min(event.entityLiving.hurtResistantTime, 20 / (i + 1));
@ -569,7 +566,6 @@ public class AlchemicalWizardryEventHooks
if (event.entityLiving.isPotionActive(AlchemicalWizardry.customPotionBoost))
{
int i = event.entityLiving.getActivePotionEffect(AlchemicalWizardry.customPotionBoost).getAmplifier();
EntityLivingBase entity = event.entityLiving;
//if(!entity.isSneaking())
{
float percentIncrease = (i + 1) * 0.05f;
@ -600,7 +596,6 @@ public class AlchemicalWizardryEventHooks
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5).expand(d0, d0, d0);
List list = event.entityLiving.worldObj.getEntitiesWithinAABB(Entity.class, axisalignedbb);
Iterator iterator = list.iterator();
EntityLivingBase livingEntity;
while (iterator.hasNext())
{
@ -826,14 +821,9 @@ public class AlchemicalWizardryEventHooks
{
if(entity instanceof IManaBurst) {
ItemStack lens = ((IManaBurst)entity).getSourceLens();
if(lens.getItemDamage()!=8 && lens.getItemDamage()!=11)
return false;
else
return true;
return !(lens.getItemDamage()!=8 && lens.getItemDamage()!=11);
}
else
return false;
}
}

View file

@ -17,13 +17,12 @@ public class AlchemicalWizardryFuelHandler implements IFuelHandler
@Override
public int getBurnTime(ItemStack fuel)
{
ItemStack itemStack = fuel;
if (itemStack == null)
if (fuel == null)
{
return 0;
}
Item fuelItem = itemStack.getItem();
Item fuelItem = fuel.getItem();
if (fuelItem.equals(ModItems.lavaCrystal))
{
@ -34,7 +33,7 @@ public class AlchemicalWizardryFuelHandler implements IFuelHandler
return 200;
} else
{
NBTTagCompound tag = itemStack.getTagCompound();
NBTTagCompound tag = fuel.getTagCompound();
if (tag == null)
{

View file

@ -27,9 +27,6 @@ import cpw.mods.fml.common.registry.GameRegistry;
public class CommonProxy
{
public static String ITEMS_PNG = "/WayofTime/alchemicalWizardry/items.png";
public static String BLOCK_PNG = "/WayofTime/alchemicalWizardry/block.png";
// Client stuff
public void registerRenderers()
{

View file

@ -2,5 +2,5 @@ package WayofTime.alchemicalWizardry.common;
public interface IBindingAgent
{
public abstract float getSuccessRateForPotionNumber(int potionEffects);
float getSuccessRateForPotionNumber(int potionEffects);
}

View file

@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.common;
public interface ICatalyst
{
public abstract int getCatalystLevel();
int getCatalystLevel();
public abstract boolean isConcentration();
boolean isConcentration();
}

View file

@ -2,13 +2,13 @@ package WayofTime.alchemicalWizardry.common;
public interface IDemon
{
public abstract void setSummonedConditions();
void setSummonedConditions();
public boolean isAggro();
boolean isAggro();
public void setAggro(boolean aggro);
void setAggro(boolean aggro);
public boolean getDoesDropCrystal();
boolean getDoesDropCrystal();
public void setDropCrystal(boolean crystal);
void setDropCrystal(boolean crystal);
}

View file

@ -2,5 +2,5 @@ package WayofTime.alchemicalWizardry.common;
public interface IFillingAgent
{
public abstract int getFilledAmountForPotionNumber(int potionEffects);
int getFilledAmountForPotionNumber(int potionEffects);
}

View file

@ -114,8 +114,6 @@ public enum NewPacketHandler
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
if (te instanceof TEOrientable)
{
TEOrientable tile = (TEOrientable) te;
((TEOrientable) te).setInputDirection(ForgeDirection.getOrientation(msg.input));
((TEOrientable) te).setOutputDirection(ForgeDirection.getOrientation(msg.output));
}
@ -459,7 +457,7 @@ public enum NewPacketHandler
target.writeInt(msg.index);
switch(msg.index)
// switch(msg.index)
{
}
@ -472,7 +470,7 @@ public enum NewPacketHandler
System.out.println("Packet is recieved and being decoded");
switch(index)
// switch(index)
{
}

View file

@ -147,7 +147,7 @@ public class BlockAlchemicCalcinator extends BlockContainer
tileEntity.setInventorySlotContents(1, newItem);
}
} else if (playerItem == null)
} else
{
if (tileEntity.getStackInSlot(1) != null)
{

View file

@ -26,13 +26,11 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BlockAltar extends BlockContainer
{
@SideOnly(Side.CLIENT)
private static IIcon topIcon;
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon1;
private IIcon sideIcon2;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon2;
@SideOnly(Side.CLIENT)
private static IIcon bottomIcon;
private IIcon bottomIcon;
public BlockAltar()
{
@ -48,7 +46,6 @@ public class BlockAltar extends BlockContainer
public void registerBlockIcons(IIconRegister iconRegister)
{
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Top");
this.sideIcon1 = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_SideType1");
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_SideType2");
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Bottom");
}
@ -89,7 +86,7 @@ public class BlockAltar extends BlockContainer
int maxEssence = bloodOrb.getMaxEssence();
int currentEssence = bloodOrb.getCurrentEssence(stack);
int level = currentEssence * 15 / maxEssence;
return ((int) (Math.min(15, level))) % 16;
return Math.min(15, level) % 16;
}
}

View file

@ -51,7 +51,7 @@ public class BlockBloodLightSource extends Block
{
if (rand.nextInt(3) != 0)
{
float f = (float) 1.0F;
float f = 1.0F;
float f1 = f * 0.6F + 0.4F;
float f2 = f * f * 0.7F - 0.5F;
float f3 = f * f * 0.6F - 0.7F;

View file

@ -13,13 +13,11 @@ import net.minecraft.world.World;
public class BlockConduit extends BlockOrientable
{
@SideOnly(Side.CLIENT)
private static IIcon topIcon;
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon1;
private IIcon sideIcon2;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon2;
@SideOnly(Side.CLIENT)
private static IIcon bottomIcon;
private IIcon bottomIcon;
public BlockConduit()
{
@ -35,7 +33,6 @@ public class BlockConduit extends BlockOrientable
public void registerBlockIcons(IIconRegister iconRegister)
{
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Top");
this.sideIcon1 = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_SideType1");
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_SideType2");
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Bottom");
}

View file

@ -24,11 +24,11 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BlockCrucible extends BlockContainer
{
@SideOnly(Side.CLIENT)
private static IIcon topIcon;
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon;
private IIcon sideIcon;
@SideOnly(Side.CLIENT)
private static IIcon bottomIcon;
private IIcon bottomIcon;
public BlockCrucible()
{

View file

@ -17,7 +17,9 @@ import java.util.List;
public class BlockCrystal extends Block
{
//private Icon bloodRuneIcon;
@SideOnly(Side.CLIENT)
private IIcon fullIcon;
@SideOnly(Side.CLIENT)
private IIcon brickIcon;

View file

@ -17,8 +17,10 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BlockEnchantmentGlyph extends Block implements IEnchantmentGlyph
{
public IIcon enchantability;
public IIcon enchantmentLevel;
@SideOnly(Side.CLIENT)
private IIcon enchantability;
@SideOnly(Side.CLIENT)
private IIcon enchantmentLevel;
public BlockEnchantmentGlyph()
{

View file

@ -17,9 +17,12 @@ import net.minecraft.world.World;
public class BlockHomHeart extends BlockContainer
{
public IIcon bottomIcon;
public IIcon topIcon;
public IIcon sideIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon sideIcon;
public BlockHomHeart()
{

View file

@ -34,7 +34,6 @@ public class BlockOrientable extends BlockContainer
return false;
}
ForgeDirection sideClicked = ForgeDirection.getOrientation(side);
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof TEOrientable)

View file

@ -22,13 +22,11 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BlockPedestal extends BlockContainer
{
@SideOnly(Side.CLIENT)
private static IIcon topIcon;
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon1;
private IIcon sideIcon2;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon2;
@SideOnly(Side.CLIENT)
private static IIcon bottomIcon;
private IIcon bottomIcon;
public BlockPedestal()
{
@ -46,7 +44,6 @@ public class BlockPedestal extends BlockContainer
public void registerBlockIcons(IIconRegister iconRegister)
{
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePedestal");
this.sideIcon1 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
}

View file

@ -22,13 +22,11 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BlockPlinth extends BlockContainer
{
@SideOnly(Side.CLIENT)
private static IIcon topIcon;
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon1;
private IIcon sideIcon2;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon2;
@SideOnly(Side.CLIENT)
private static IIcon bottomIcon;
private IIcon bottomIcon;
public BlockPlinth()
{
@ -46,7 +44,6 @@ public class BlockPlinth extends BlockContainer
public void registerBlockIcons(IIconRegister iconRegister)
{
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:ArcanePlinth");
this.sideIcon1 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
}

View file

@ -15,7 +15,7 @@ public class BlockSchematicSaver extends BlockContainer
super(Material.rock);
setHardness(2.0F);
setResistance(5.0F);
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
// setCreativeTab(AlchemicalWizardry.tabBloodMagic);
this.setBlockName("schematicSaver");
}

View file

@ -23,13 +23,11 @@ import java.util.Random;
public class BlockSocket extends BlockContainer
{
@SideOnly(Side.CLIENT)
private static IIcon topIcon;
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon1;
private IIcon sideIcon2;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon2;
@SideOnly(Side.CLIENT)
private static IIcon bottomIcon;
private IIcon bottomIcon;
public BlockSocket()
{
@ -46,7 +44,6 @@ public class BlockSocket extends BlockContainer
public void registerBlockIcons(IIconRegister iconRegister)
{
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
this.sideIcon1 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodSocket");
}

View file

@ -12,7 +12,6 @@ import net.minecraft.world.World;
import java.util.List;
public class BlockSpellEnhancement extends BlockOrientable
{
public BlockSpellEnhancement()

View file

@ -12,7 +12,6 @@ import net.minecraft.world.World;
import java.util.List;
public class BlockSpellModifier extends BlockOrientable
{
public BlockSpellModifier()

View file

@ -17,9 +17,6 @@ import java.util.List;
public class BlockSpellParadigm extends BlockOrientable
{
public static final float minPos = (3f / 16f);
public static final float maxPos = (13f / 16f);
public BlockSpellParadigm()
{
super();

View file

@ -17,7 +17,8 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BlockStabilityGlyph extends Block implements IStabilityGlyph
{
public IIcon stability1;
@SideOnly(Side.CLIENT)
private IIcon stability1;
public BlockStabilityGlyph()
{

View file

@ -33,13 +33,11 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BlockTeleposer extends BlockContainer
{
@SideOnly(Side.CLIENT)
private static IIcon topIcon;
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon1;
private IIcon sideIcon2;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon2;
@SideOnly(Side.CLIENT)
private static IIcon bottomIcon;
private IIcon bottomIcon;
public BlockTeleposer()
{
@ -55,7 +53,6 @@ public class BlockTeleposer extends BlockContainer
public void registerBlockIcons(IIconRegister iconRegister)
{
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Top");
this.sideIcon1 = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side");
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side");
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:Teleposer_Side");
}
@ -219,17 +216,15 @@ public class BlockTeleposer extends BlockContainer
worldF.setTileEntity(xf, yf, zf, tileToSet);
}
Block initialBlock = blockI;
if (initialBlock != null)
if (blockI != null)
{
TileEntity tileToSet = initialBlock.createTileEntity(worldI, metaI);
TileEntity tileToSet = blockI.createTileEntity(worldI, metaI);
worldI.setTileEntity(xi, yi, zi, tileToSet);
}
//TILES CLEARED
worldF.setBlock(xf, yf, zf, initialBlock, metaI, flag);
worldF.setBlock(xf, yf, zf, blockI, metaI, flag);
if (tileEntityI != null)
{
@ -292,6 +287,6 @@ public class BlockTeleposer extends BlockContainer
@Optional.Method(modid = "ForgeMultipart")
public static void sendDescriptorOfTile(World world, TileEntity tile)
{
MultipartHelper.sendDescPacket(world, (TileMultipart)tile);
MultipartHelper.sendDescPacket(world, tile);
}
}

View file

@ -25,13 +25,11 @@ import java.util.Random;
public class BlockWritingTable extends BlockContainer
{
@SideOnly(Side.CLIENT)
private static IIcon topIcon;
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon1;
private IIcon sideIcon2;
@SideOnly(Side.CLIENT)
private static IIcon sideIcon2;
@SideOnly(Side.CLIENT)
private static IIcon bottomIcon;
private IIcon bottomIcon;
public BlockWritingTable()
{
@ -47,7 +45,6 @@ public class BlockWritingTable extends BlockContainer
public void registerBlockIcons(IIconRegister iconRegister)
{
this.topIcon = iconRegister.registerIcon("AlchemicalWizardry:AlchemicChemistrySet");
this.sideIcon1 = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_SideType1");
this.sideIcon2 = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_SideType2");
this.bottomIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodAltar_Bottom");
}

View file

@ -17,10 +17,15 @@ import java.util.List;
public class BloodRune extends Block
{
//private Icon bloodRuneIcon;
@SideOnly(Side.CLIENT)
private IIcon altarCapacityRuneIcon;
@SideOnly(Side.CLIENT)
private IIcon dislocationRuneIcon;
@SideOnly(Side.CLIENT)
private IIcon orbCapacityRuneIcon;
@SideOnly(Side.CLIENT)
private IIcon betterCapacityRuneIcon;
@SideOnly(Side.CLIENT)
private IIcon accelerationRuneIcon;
public BloodRune()

View file

@ -4,11 +4,11 @@ import net.minecraftforge.common.util.ForgeDirection;
public interface IOrientable
{
public ForgeDirection getInputDirection();
ForgeDirection getInputDirection();
public ForgeDirection getOutputDirection();
ForgeDirection getOutputDirection();
public void setInputDirection(ForgeDirection direction);
void setInputDirection(ForgeDirection direction);
public void setOutputDirection(ForgeDirection direction);
void setOutputDirection(ForgeDirection direction);
}

View file

@ -38,22 +38,12 @@ public class LifeEssenceBlock extends BlockFluidClassic
@Override
public boolean canDisplace(IBlockAccess world, int x, int y, int z)
{
if (world.getBlock(x, y, z).getMaterial().isLiquid())
{
return false;
}
return super.canDisplace(world, x, y, z);
return !world.getBlock(x, y, z).getMaterial().isLiquid() && super.canDisplace(world, x, y, z);
}
@Override
public boolean displaceIfPossible(World world, int x, int y, int z)
{
if (world.getBlock(x, y, z).getMaterial().isLiquid())
{
return false;
}
return super.displaceIfPossible(world, x, y, z);
return !world.getBlock(x, y, z).getMaterial().isLiquid() && super.displaceIfPossible(world, x, y, z);
}
}

View file

@ -45,7 +45,7 @@ public class MimicBlock extends BlockContainer
Block block = mimic.getBlock();
return block != null ? block.shouldSideBeRendered(world, x, y, z, side) : true;
return block == null || block.shouldSideBeRendered(world, x, y, z, side);
}
@SideOnly(Side.CLIENT)

View file

@ -17,19 +17,19 @@ import net.minecraft.world.World;
public class RitualStone extends Block implements IRitualStone
{
@SideOnly(Side.CLIENT)
private static IIcon blankIcon;
private IIcon blankIcon;
@SideOnly(Side.CLIENT)
private static IIcon waterStoneIcon;
private IIcon waterStoneIcon;
@SideOnly(Side.CLIENT)
private static IIcon fireStoneIcon;
private IIcon fireStoneIcon;
@SideOnly(Side.CLIENT)
private static IIcon earthStoneIcon;
private IIcon earthStoneIcon;
@SideOnly(Side.CLIENT)
private static IIcon airStoneIcon;
private IIcon airStoneIcon;
@SideOnly(Side.CLIENT)
private static IIcon duskStoneIcon;
private IIcon duskStoneIcon;
@SideOnly(Side.CLIENT)
private static IIcon dawnStoneIcon;
private IIcon dawnStoneIcon;
public RitualStone()
{

View file

@ -60,7 +60,7 @@ public class SpectralBlock extends BlockContainer
return false;
}
return block == this ? false : super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_);
return block != this && super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_);
}
@SideOnly(Side.CLIENT)

View file

@ -29,7 +29,7 @@ public class BookParser
@SideOnly(Side.CLIENT)
public static List<Entry> parseTextFile(String location)
{
File textFiles = new File("config/BloodMagic/bookDocs");
// File textFiles = new File("config/BloodMagic/bookDocs");
ArrayList<Entry> entryList = new ArrayList();
//if(textFiles.exists())
{
@ -138,7 +138,7 @@ public class BookParser
if(Minecraft.getMinecraft() != null && Minecraft.getMinecraft().fontRenderer != null)
{
List list = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strLine, 110);
if(list != null)
// if(list != null)
{
//System.out.println("Number of lines: " + list.size());
}
@ -150,7 +150,7 @@ public class BookParser
{
lastPageWasSpecial = true;
boolean changePage = false;
int length = word.length();
// int length = word.length();
word = word.replace('\t', ' ');
List list = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strings[currentPage] + " " + word, 110);

View file

@ -119,11 +119,10 @@ public class BlockSet
{
int div = meta / 4;
int mod = meta % 4;
int[] northSet = new int[]{1 + div*4, 0 + div*4, 3 + div*4, 2 + div*4};
int[] eastSet = new int[]{2 + div*4, 3 + div*4, 1 + div*4, 0 + div*4};
int[] southSet = new int[]{0 + div*4, 1 + div*4, 2 + div*4, 3 + div*4};
int[] westSet = new int[]{3 + div*4, 2 + div*4, 0 + div*4, 1 + div*4};
int[] northSet = new int[]{1 + div*4, div*4, 3 + div*4, 2 + div*4}; //Second one: 0 +
int[] eastSet = new int[]{2 + div*4, 3 + div*4, 1 + div*4, div*4}; //Last one: 0 +
int[] southSet = new int[]{div*4, 1 + div*4, 2 + div*4, 3 + div*4}; //First one: 0 +
int[] westSet = new int[]{3 + div*4, 2 + div*4, div*4, 1 + div*4}; //Third one: 0 +
switch (mod)
{
@ -190,11 +189,10 @@ public class BlockSet
{
int div = meta / 4;
int mod = meta % 4;
int[] northSet = new int[]{0 + div*4, 2 + div*4, 3 + div*4, 1 + div*4};
int[] eastSet = new int[]{1 + div*4, 3 + div*4, 0 + div*4, 2 + div*4};
int[] southSet = new int[]{2 + div*4, 0 + div*4, 1 + div*4, 3 + div*4};
int[] westSet = new int[]{3 + div*4, 1 + div*4, 2 + div*4, 0 + div*4};
int[] northSet = new int[]{div * 4, 2 + div * 4, 3 + div * 4, 1 + div * 4}; //First one: 0 +
int[] eastSet = new int[]{1 + div*4, 3 + div*4, div*4, 2 + div*4}; //Third one: 0 +
int[] southSet = new int[]{2 + div*4, div*4, 1 + div*4, 3 + div*4}; //Second one: 0 +
int[] westSet = new int[]{3 + div*4, 1 + div*4, 2 + div*4, div*4}; //Last one: 0 +
switch (mod)
{
@ -215,10 +213,11 @@ public class BlockSet
{
int div = meta / 4;
int mod = meta % 4;
int[] northSet = new int[]{0 + div*4, 2 + div*4, 3 + div*4, 1 + div*4};
int[] eastSet = new int[]{1 + div*4, 3 + div*4, 0 + div*4, 2 + div*4};
int[] southSet = new int[]{2 + div*4, 0 + div*4, 1 + div*4, 3 + div*4};
int[] westSet = new int[]{3 + div*4, 1 + div*4, 2 + div*4, 0 + div*4};
int[] northSet = new int[]{div*4, 2 + div*4, 3 + div*4, 1 + div*4}; //First one: 0 +
int[] eastSet = new int[]{1 + div*4, 3 + div*4, div*4, 2 + div*4}; //Third one: 0 +
int[] southSet = new int[]{2 + div*4, div*4, 1 + div*4, 3 + div*4}; //Second one: 0 +
int[] westSet = new int[]{3 + div*4, 1 + div*4, 2 + div*4, div*4}; //Last one: 0 +
switch (mod)
@ -253,7 +252,7 @@ public class BlockSet
public Block getBlock()
{
return this.getBlockForString(blockid);
return getBlockForString(blockid);
}
public static String getPairedIdForBlock(Block block)
@ -369,6 +368,6 @@ public class BlockSet
public boolean isContained(Block block, int defaultMeta)
{
Block thisBlock = this.getBlock();
return thisBlock == null ? false : thisBlock.equals(block) && this.metadata[0] == defaultMeta;
return thisBlock != null && thisBlock.equals(block) && this.metadata[0] == defaultMeta;
}
}

Some files were not shown because too many files have changed in this diff Show more