Massive rework of configs, items and blocks.

I redone where the items/blocsks are stored and how the configs are
handled to clean up it and give space. You can change the config line to
AWWayofTime if you want to keep the compatibility with old configs. Now
you reference the blocks from the ModBlocks and Items from the ModItems.
This commit is contained in:
Fenn 2014-01-17 21:05:38 +00:00
parent 8601e9faff
commit e3644f2d2b
304 changed files with 3941 additions and 5108 deletions

View file

@ -1,13 +1,9 @@
package WayofTime.alchemicalWizardry.common.rituals;
import java.util.ArrayList;
import java.util.List;
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
import WayofTime.alchemicalWizardry.common.ModBlocks;
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
@ -17,17 +13,16 @@ import net.minecraft.potion.PotionEffect;
import net.minecraft.server.MinecraftServer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class RitualEffectCrushing extends RitualEffect
{
import java.util.ArrayList;
public class RitualEffectCrushing extends RitualEffect {
@Override
public void performEffect(TEMasterStone ritualStone)
{
String owner = ritualStone.getOwner();
World worldSave = MinecraftServer.getServer().worldServers[0];
LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner);
LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner);
if (data == null)
{
@ -51,9 +46,8 @@ public class RitualEffectCrushing extends RitualEffect
if (tile instanceof IInventory)
{
tileEntity = (IInventory)tile;
}
else
tileEntity = (IInventory) tile;
} else
{
return;
}
@ -73,8 +67,7 @@ public class RitualEffectCrushing extends RitualEffect
}
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
}
else
} else
{
//boolean flag = false;
for (int j = -3; j < 0; j++)
@ -89,7 +82,7 @@ public class RitualEffectCrushing extends RitualEffect
if (block != null)
{
if ((block.equals(AlchemicalWizardry.ritualStone) || block.equals(AlchemicalWizardry.blockMasterStone)))
if ((block.equals(ModBlocks.ritualStone) || block.equals(ModBlocks.blockMasterStone)))
{
continue;
}
@ -114,8 +107,7 @@ public class RitualEffectCrushing extends RitualEffect
{
tileEntity.setInventorySlotContents(n, copyStack);
copyStack.stackSize = 0;
}
else
} else
{
if (itemStack.getItem().equals(copyStack.getItem()))
{
@ -128,8 +120,7 @@ public class RitualEffectCrushing extends RitualEffect
copyStack.stackSize = 0;
itemStack.stackSize = itemSize + copySize;
tileEntity.setInventorySlotContents(n, itemStack);
}
else
} else
{
copyStack.stackSize = itemSize + copySize - maxSize;
itemStack.stackSize = maxSize;