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:
parent
8601e9faff
commit
e3644f2d2b
304 changed files with 3941 additions and 5108 deletions
|
@ -1,7 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.common.rituals.Rituals;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -11,15 +17,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.ChatMessageComponent;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.common.rituals.Rituals;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemRitualDiviner extends EnergyItems
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class ItemRitualDiviner extends EnergyItems {
|
||||
private int maxMetaData;
|
||||
|
||||
public ItemRitualDiviner(int id)
|
||||
|
@ -46,8 +47,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
if (this.getMaxRuneDisplacement(par1ItemStack) == 1)
|
||||
{
|
||||
par3List.add("Can place Dusk runes");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Can not place Dusk runes");
|
||||
}
|
||||
|
@ -114,8 +114,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
int ritualID = this.getCurrentRitual(par1ItemStack);
|
||||
return "Ritual: " + Rituals.getNameOfRitual(ritualID);
|
||||
//par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return super.getItemStackDisplayName(par1ItemStack);
|
||||
}
|
||||
|
@ -130,7 +129,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
|
||||
if (tileEntity instanceof TEMasterStone)
|
||||
{
|
||||
TEMasterStone masterStone = (TEMasterStone)tileEntity;
|
||||
TEMasterStone masterStone = (TEMasterStone) tileEntity;
|
||||
List<RitualComponent> ritualList = Rituals.getRitualList(this.getCurrentRitual(par1ItemStack) + 1);
|
||||
int playerInvRitualStoneLocation = -1;
|
||||
|
||||
|
@ -141,7 +140,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
continue;
|
||||
}
|
||||
|
||||
if (new ItemStack(AlchemicalWizardry.ritualStone).isItemEqual(playerInventory[i]))
|
||||
if (new ItemStack(ModBlocks.ritualStone).isItemEqual(playerInventory[i]))
|
||||
{
|
||||
playerInvRitualStoneLocation = i;
|
||||
break;
|
||||
|
@ -165,7 +164,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
par2EntityPlayer.inventory.decrStackSize(playerInvRitualStoneLocation, 1);
|
||||
}
|
||||
|
||||
par3World.setBlock(par4 + rc.getX(), par5 + rc.getY(), par6 + rc.getZ(), AlchemicalWizardry.ritualStone.blockID, rc.getStoneType(), 3);
|
||||
par3World.setBlock(par4 + rc.getX(), par5 + rc.getY(), par6 + rc.getZ(), ModBlocks.ritualStone.blockID, rc.getStoneType(), 3);
|
||||
|
||||
if (par3World.isRemote)
|
||||
{
|
||||
|
@ -176,12 +175,11 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
int blockID = par3World.getBlockId(par4 + rc.getX(), par5 + rc.getY(), par6 + rc.getZ());
|
||||
|
||||
if (blockID == AlchemicalWizardry.ritualStone.blockID)
|
||||
if (blockID == ModBlocks.ritualStone.blockID)
|
||||
{
|
||||
int metadata = par3World.getBlockMetadata(par4 + rc.getX(), par5 + rc.getY(), par6 + rc.getZ());
|
||||
|
||||
|
@ -197,8 +195,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
EnergyItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3World.playAuxSFX(0000, par4, par5 + 1, par6, 0);
|
||||
return true;
|
||||
|
@ -231,8 +228,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
if (currentRitualID + 1 >= maxRitualID)
|
||||
{
|
||||
this.setCurrentRitual(par1ItemStack, 0);
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
this.setCurrentRitual(par1ItemStack, currentRitualID + 1);
|
||||
}
|
||||
|
@ -293,9 +289,9 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(int id, CreativeTabs creativeTab, List list)
|
||||
{
|
||||
list.add(new ItemStack(AlchemicalWizardry.itemRitualDiviner));
|
||||
ItemStack duskRitualDivinerStack = new ItemStack(AlchemicalWizardry.itemRitualDiviner);
|
||||
((ItemRitualDiviner)duskRitualDivinerStack.getItem()).setMaxRuneDisplacement(duskRitualDivinerStack, 1);
|
||||
list.add(new ItemStack(ModItems.itemRitualDiviner));
|
||||
ItemStack duskRitualDivinerStack = new ItemStack(ModItems.itemRitualDiviner);
|
||||
((ItemRitualDiviner) duskRitualDivinerStack.getItem()).setMaxRuneDisplacement(duskRitualDivinerStack, 1);
|
||||
list.add(duskRitualDivinerStack);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue