Added creative tab
This commit is contained in:
@@ -32,7 +32,7 @@ public class BlockLimbo extends Block
|
|||||||
{
|
{
|
||||||
super(i, Material.ground);
|
super(i, Material.ground);
|
||||||
setTickRandomly(false);
|
setTickRandomly(false);
|
||||||
this.setCreativeTab(CreativeTabs.tabBlock);
|
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ public class ExitDoor extends dimDoor
|
|||||||
{
|
{
|
||||||
|
|
||||||
super(par1, Material.wood);
|
super(par1, Material.wood);
|
||||||
// this.blockIndexInTexture = 19;
|
|
||||||
|
|
||||||
|
|
||||||
// TODO Auto-generated constructor stub
|
// TODO Auto-generated constructor stub
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class dimHatch extends BlockTrapDoor
|
|||||||
public dimHatch(int par1,int par2, Material par2Material)
|
public dimHatch(int par1,int par2, Material par2Material)
|
||||||
{
|
{
|
||||||
super(par1, Material.iron);
|
super(par1, Material.iron);
|
||||||
this.setCreativeTab(CreativeTabs.tabTransport);
|
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||||
// this.setTextureFile("/PocketBlockTextures.png");
|
// this.setTextureFile("/PocketBlockTextures.png");
|
||||||
// this.blockIndexInTexture = 16;
|
// this.blockIndexInTexture = 16;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,10 @@ public class linkDimDoor extends dimDoor
|
|||||||
{
|
{
|
||||||
private Icon blockIconBottom;
|
private Icon blockIconBottom;
|
||||||
public linkDimDoor(int par1, Material material) {
|
public linkDimDoor(int par1, Material material) {
|
||||||
|
|
||||||
super(par1, material);
|
super(par1, material);
|
||||||
// TODO Auto-generated constructor stub
|
// TODO Auto-generated constructor stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ public class linkExitDoor extends ExitDoor
|
|||||||
|
|
||||||
super(par1, Material.wood);
|
super(par1, Material.wood);
|
||||||
//this.blockIndexInTexture = 20;
|
//this.blockIndexInTexture = 20;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO Auto-generated constructor stub
|
// TODO Auto-generated constructor stub
|
||||||
|
|||||||
@@ -532,8 +532,7 @@ public class DungeonHelper
|
|||||||
int depth = dimHelper.instance.getDimDepth(incoming.locDimID);
|
int depth = dimHelper.instance.getDimDepth(incoming.locDimID);
|
||||||
int depthWeight = rand.nextInt(depth + 2) + rand.nextInt(depth + 2) - 2;
|
int depthWeight = rand.nextInt(depth + 2) + rand.nextInt(depth + 2) - 2;
|
||||||
|
|
||||||
ArrayList array = getDungeonDataBelow(dimHelper.dimList.get(incoming.destDimID));
|
|
||||||
array.hashCode();
|
|
||||||
int count = 10;
|
int count = 10;
|
||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
try
|
try
|
||||||
@@ -651,6 +650,11 @@ public class DungeonHelper
|
|||||||
{
|
{
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(getDungeonDataInChain(dimHelper.dimList.get(incoming.locDimID)).contains(dungeon))
|
||||||
|
{
|
||||||
|
flag=false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
while (!flag && count > 0);
|
while (!flag && count > 0);
|
||||||
}
|
}
|
||||||
@@ -721,13 +725,13 @@ public class DungeonHelper
|
|||||||
WeightedContainer<DungeonGenerator> resultContainer = (WeightedContainer<DungeonGenerator>) WeightedRandom.getRandomItem(random, weights);
|
WeightedContainer<DungeonGenerator> resultContainer = (WeightedContainer<DungeonGenerator>) WeightedRandom.getRandomItem(random, weights);
|
||||||
return (resultContainer != null) ? resultContainer.getData() : null;
|
return (resultContainer != null) ? resultContainer.getData() : null;
|
||||||
}
|
}
|
||||||
public static ArrayList<DungeonGenerator> getDungeonDataBelow(DimData dimData)
|
public static ArrayList<DungeonGenerator> getDungeonDataInChain(DimData dimData)
|
||||||
{
|
{
|
||||||
DimData startingDim = dimHelper.dimList.get(dimHelper.instance.getLinkDataFromCoords(dimData.exitDimLink.destXCoord, dimData.exitDimLink.destYCoord, dimData.exitDimLink.destZCoord, dimData.exitDimLink.destDimID).destDimID);
|
DimData startingDim = dimHelper.dimList.get(dimHelper.instance.getLinkDataFromCoords(dimData.exitDimLink.destXCoord, dimData.exitDimLink.destYCoord, dimData.exitDimLink.destZCoord, dimData.exitDimLink.destDimID).destDimID);
|
||||||
|
|
||||||
return getDungeonDataAbove(startingDim);
|
return getDungeonDataBelow(startingDim);
|
||||||
}
|
}
|
||||||
private static ArrayList<DungeonGenerator> getDungeonDataAbove(DimData dimData)
|
private static ArrayList<DungeonGenerator> getDungeonDataBelow(DimData dimData)
|
||||||
{
|
{
|
||||||
ArrayList<DungeonGenerator> dungeonData = new ArrayList<DungeonGenerator>();
|
ArrayList<DungeonGenerator> dungeonData = new ArrayList<DungeonGenerator>();
|
||||||
if(dimData.dungeonGenerator!=null)
|
if(dimData.dungeonGenerator!=null)
|
||||||
@@ -740,7 +744,7 @@ public class DungeonHelper
|
|||||||
{
|
{
|
||||||
if(dimHelper.dimList.get(link.destDimID).dungeonGenerator!=null&&dimHelper.instance.getDimDepth(link.destDimID)==dimData.depth+1)
|
if(dimHelper.dimList.get(link.destDimID).dungeonGenerator!=null&&dimHelper.instance.getDimDepth(link.destDimID)==dimData.depth+1)
|
||||||
{
|
{
|
||||||
for(DungeonGenerator dungeonGen :getDungeonDataAbove(dimHelper.dimList.get(link.destDimID)) )
|
for(DungeonGenerator dungeonGen :getDungeonDataBelow(dimHelper.dimList.get(link.destDimID)) )
|
||||||
{
|
{
|
||||||
if(!dungeonData.contains(dungeonGen))
|
if(!dungeonData.contains(dungeonGen))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class ItemChaosDoor extends itemDimDoor
|
|||||||
{
|
{
|
||||||
super(par1, par2Material);
|
super(par1, par2Material);
|
||||||
this.doorMaterial = par2Material;
|
this.doorMaterial = par2Material;
|
||||||
this.setCreativeTab(CreativeTabs.tabTransport);
|
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||||
}
|
}
|
||||||
public void registerIcons(IconRegister par1IconRegister)
|
public void registerIcons(IconRegister par1IconRegister)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class ItemRiftBlade extends itemDimDoor
|
|||||||
super(par1, par2Material);
|
super(par1, par2Material);
|
||||||
|
|
||||||
// this.setTextureFile("/PocketBlockTextures.png");
|
// this.setTextureFile("/PocketBlockTextures.png");
|
||||||
this.setCreativeTab(CreativeTabs.tabTransport);
|
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||||
this.setMaxStackSize(1);
|
this.setMaxStackSize(1);
|
||||||
|
|
||||||
// this.itemIcon=5;
|
// this.itemIcon=5;
|
||||||
|
|||||||
@@ -27,14 +27,9 @@ public class ItemStabilizedRiftSignature extends itemLinkSignature
|
|||||||
{
|
{
|
||||||
super(par);
|
super(par);
|
||||||
this.setMaxStackSize(1);
|
this.setMaxStackSize(1);
|
||||||
// this.setTextureFile("/PocketBlockTextures.png");
|
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||||
this.setCreativeTab(CreativeTabs.tabTransport);
|
|
||||||
|
|
||||||
// this.itemIndex=5;
|
|
||||||
this.setMaxDamage(0);
|
this.setMaxDamage(0);
|
||||||
this.hasSubtypes=true;
|
this.hasSubtypes=true;
|
||||||
//TODO move to proxy
|
|
||||||
|
|
||||||
if (properties == null)
|
if (properties == null)
|
||||||
properties = DDProperties.instance();
|
properties = DDProperties.instance();
|
||||||
}
|
}
|
||||||
@@ -44,8 +39,6 @@ public class ItemStabilizedRiftSignature extends itemLinkSignature
|
|||||||
public boolean hasEffect(ItemStack par1ItemStack)
|
public boolean hasEffect(ItemStack par1ItemStack)
|
||||||
{
|
{
|
||||||
// adds effect if item has a link stored
|
// adds effect if item has a link stored
|
||||||
|
|
||||||
|
|
||||||
if(par1ItemStack.hasTagCompound())
|
if(par1ItemStack.hasTagCompound())
|
||||||
{
|
{
|
||||||
if(par1ItemStack.stackTagCompound.getBoolean("isCreated"))
|
if(par1ItemStack.stackTagCompound.getBoolean("isCreated"))
|
||||||
@@ -53,14 +46,12 @@ public class ItemStabilizedRiftSignature extends itemLinkSignature
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void registerIcons(IconRegister par1IconRegister)
|
public void registerIcons(IconRegister par1IconRegister)
|
||||||
{
|
{
|
||||||
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -69,38 +60,23 @@ public class ItemStabilizedRiftSignature extends itemLinkSignature
|
|||||||
int key;
|
int key;
|
||||||
LinkData linkData;
|
LinkData linkData;
|
||||||
int thisWorldID=par3World.provider.dimensionId;
|
int thisWorldID=par3World.provider.dimensionId;
|
||||||
|
Integer[] linkCoords =this.readFromNBT(par1ItemStack);
|
||||||
|
|
||||||
|
|
||||||
|
int offset = 2;
|
||||||
|
if(par1ItemStack.getTagCompound()!=null)
|
||||||
|
{
|
||||||
//par1ItemStack= par2EntityPlayer.getCurrentEquippedItem();
|
|
||||||
Integer[] linkCoords =this.readFromNBT(par1ItemStack);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//System.out.println(key);
|
|
||||||
int offset = 2;
|
|
||||||
if(par1ItemStack.getTagCompound()!=null)
|
|
||||||
{
|
|
||||||
if(par1ItemStack.getTagCompound().getBoolean("isCreated"))
|
if(par1ItemStack.getTagCompound().getBoolean("isCreated"))
|
||||||
{
|
{
|
||||||
boolean hasEnder = false;
|
boolean hasEnder = false;
|
||||||
// checks to see if the item has a link stored, if so, it creates it
|
// checks to see if the item has a link stored, if so, it creates it
|
||||||
|
|
||||||
if(par2EntityPlayer.inventory.hasItem(Item.enderPearl.itemID)||par2EntityPlayer.inventory.hasItem(properties.StableFabricItemID))
|
if(par2EntityPlayer.inventory.hasItem(Item.enderPearl.itemID)||par2EntityPlayer.inventory.hasItem(properties.StableFabricItemID))
|
||||||
{
|
{
|
||||||
if(!par2EntityPlayer.inventory.consumeInventoryItem(properties.StableFabricItemID))
|
if(!par2EntityPlayer.inventory.consumeInventoryItem(properties.StableFabricItemID))
|
||||||
|
|
||||||
{
|
{
|
||||||
par2EntityPlayer.inventory.consumeInventoryItem(Item.enderPearl.itemID);
|
par2EntityPlayer.inventory.consumeInventoryItem(Item.enderPearl.itemID);
|
||||||
|
|
||||||
}
|
}
|
||||||
hasEnder=true;
|
hasEnder=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(par3World.getBlockId(par4, par5, par6)==Block.snow.blockID)
|
if(par3World.getBlockId(par4, par5, par6)==Block.snow.blockID)
|
||||||
{
|
{
|
||||||
offset = 1;
|
offset = 1;
|
||||||
@@ -110,7 +86,6 @@ public class ItemStabilizedRiftSignature extends itemLinkSignature
|
|||||||
if(dimHelper.instance.getLinkDataFromCoords(linkCoords[0], linkCoords[1], linkCoords[2], par3World)==null)
|
if(dimHelper.instance.getLinkDataFromCoords(linkCoords[0], linkCoords[1], linkCoords[2], par3World)==null)
|
||||||
{
|
{
|
||||||
dimHelper.instance.createLink(linkCoords[3], par3World.provider.dimensionId, linkCoords[0], linkCoords[1], linkCoords[2],par4, par5+offset, par6);
|
dimHelper.instance.createLink(linkCoords[3], par3World.provider.dimensionId, linkCoords[0], linkCoords[1], linkCoords[2],par4, par5+offset, par6);
|
||||||
|
|
||||||
}
|
}
|
||||||
dimHelper.instance.createLink(par3World.provider.dimensionId, linkCoords[3], par4, par5+offset, par6, linkCoords[0], linkCoords[1], linkCoords[2]);
|
dimHelper.instance.createLink(par3World.provider.dimensionId, linkCoords[3], par4, par5+offset, par6, linkCoords[0], linkCoords[1], linkCoords[2]);
|
||||||
par2EntityPlayer.sendChatToPlayer("Rift Created");
|
par2EntityPlayer.sendChatToPlayer("Rift Created");
|
||||||
@@ -119,37 +94,20 @@ public class ItemStabilizedRiftSignature extends itemLinkSignature
|
|||||||
{
|
{
|
||||||
par2EntityPlayer.sendChatToPlayer("No Ender Pearls!");
|
par2EntityPlayer.sendChatToPlayer("No Ender Pearls!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if(!par3World.isRemote)
|
}
|
||||||
{
|
else if(!par3World.isRemote)
|
||||||
if(par3World.getBlockId(par4, par5, par6)==Block.snow.blockID)
|
{
|
||||||
{
|
if(par3World.getBlockId(par4, par5, par6)==Block.snow.blockID)
|
||||||
offset = 1;
|
{
|
||||||
}
|
offset = 1;
|
||||||
//otherwise, it creates the first half of the link. Next click will complete it.
|
}
|
||||||
key= dimHelper.instance.createUniqueInterDimLinkKey();
|
//otherwise, it creates the first half of the link. Next click will complete it.
|
||||||
this.writeToNBT(par1ItemStack, par4, par5+offset, par6,par3World.provider.dimensionId);
|
key= dimHelper.instance.createUniqueInterDimLinkKey();
|
||||||
|
this.writeToNBT(par1ItemStack, par4, par5+offset, par6,par3World.provider.dimensionId);
|
||||||
|
par2EntityPlayer.sendChatToPlayer("Rift Signature Stored");
|
||||||
|
}
|
||||||
par2EntityPlayer.sendChatToPlayer("Rift Signature Stored");
|
return true;
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//dimHelper.instance.save();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@@ -159,7 +117,6 @@ public class ItemStabilizedRiftSignature extends itemLinkSignature
|
|||||||
*/
|
*/
|
||||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(par1ItemStack.hasTagCompound())
|
if(par1ItemStack.hasTagCompound())
|
||||||
{
|
{
|
||||||
if(par1ItemStack.stackTagCompound.getBoolean("isCreated"))
|
if(par1ItemStack.stackTagCompound.getBoolean("isCreated"))
|
||||||
@@ -167,9 +124,7 @@ public class ItemStabilizedRiftSignature extends itemLinkSignature
|
|||||||
Integer[] coords = this.readFromNBT(par1ItemStack);
|
Integer[] coords = this.readFromNBT(par1ItemStack);
|
||||||
par3List.add(String.valueOf("Leads to dim "+coords[3] +" with depth "+dimHelper.instance.getDimDepth(dimHelper.instance.getDimDepth(coords[3]))));
|
par3List.add(String.valueOf("Leads to dim "+coords[3] +" with depth "+dimHelper.instance.getDimDepth(dimHelper.instance.getDimDepth(coords[3]))));
|
||||||
par3List.add("at x="+coords[0]+" y="+coords[1]+" z="+coords[2]);
|
par3List.add("at x="+coords[0]+" y="+coords[1]+" z="+coords[2]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -177,41 +132,34 @@ public class ItemStabilizedRiftSignature extends itemLinkSignature
|
|||||||
par3List.add ("second click creates two rifts,");
|
par3List.add ("second click creates two rifts,");
|
||||||
par3List.add("that link the first location");
|
par3List.add("that link the first location");
|
||||||
par3List.add("with the second location");
|
par3List.add("with the second location");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(ItemStack itemStack,int x, int y, int z, int dimID)
|
public void writeToNBT(ItemStack itemStack,int x, int y, int z, int dimID)
|
||||||
{
|
{
|
||||||
NBTTagCompound tag;
|
NBTTagCompound tag;
|
||||||
|
|
||||||
if(itemStack.hasTagCompound())
|
|
||||||
{
|
|
||||||
tag = itemStack.getTagCompound();
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tag= new NBTTagCompound();
|
|
||||||
}
|
|
||||||
|
|
||||||
tag.setInteger("linkX", x);
|
|
||||||
tag.setInteger("linkY", y);
|
|
||||||
tag.setInteger("linkZ", z);
|
|
||||||
tag.setInteger("linkDimID", dimID);
|
|
||||||
tag.setBoolean("isCreated", true);
|
|
||||||
|
|
||||||
itemStack.setTagCompound(tag);
|
|
||||||
|
|
||||||
|
if(itemStack.hasTagCompound())
|
||||||
|
{
|
||||||
|
tag = itemStack.getTagCompound();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tag= new NBTTagCompound();
|
||||||
|
}
|
||||||
|
tag.setInteger("linkX", x);
|
||||||
|
tag.setInteger("linkY", y);
|
||||||
|
tag.setInteger("linkZ", z);
|
||||||
|
tag.setInteger("linkDimID", dimID);
|
||||||
|
tag.setBoolean("isCreated", true);
|
||||||
|
itemStack.setTagCompound(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read the stack fields from a NBT object.
|
* Read the stack fields from a NBT object.
|
||||||
*/
|
*/
|
||||||
public Integer[] readFromNBT(ItemStack itemStack)
|
public Integer[] readFromNBT(ItemStack itemStack)
|
||||||
{
|
{
|
||||||
|
|
||||||
NBTTagCompound tag;
|
NBTTagCompound tag;
|
||||||
Integer[] linkCoords = new Integer[5];
|
Integer[] linkCoords = new Integer[5];
|
||||||
if(itemStack.hasTagCompound())
|
if(itemStack.hasTagCompound())
|
||||||
@@ -226,11 +174,8 @@ public class ItemStabilizedRiftSignature extends itemLinkSignature
|
|||||||
linkCoords[1]=tag.getInteger("linkY");
|
linkCoords[1]=tag.getInteger("linkY");
|
||||||
linkCoords[2]=tag.getInteger("linkZ");
|
linkCoords[2]=tag.getInteger("linkZ");
|
||||||
linkCoords[3]=tag.getInteger("linkDimID");
|
linkCoords[3]=tag.getInteger("linkDimID");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return linkCoords;
|
return linkCoords;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class ItemStableFabric extends Item
|
|||||||
{
|
{
|
||||||
super(par1);
|
super(par1);
|
||||||
// this.setitemIcon(Item.doorWood.getIconFromDamage(0));
|
// this.setitemIcon(Item.doorWood.getIconFromDamage(0));
|
||||||
this.setCreativeTab(CreativeTabs.tabTransport);
|
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||||
|
|
||||||
}
|
}
|
||||||
public void registerIcons(IconRegister par1IconRegister)
|
public void registerIcons(IconRegister par1IconRegister)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class itemDimDoor extends ItemDoor
|
|||||||
{
|
{
|
||||||
super(par1, par2Material);
|
super(par1, par2Material);
|
||||||
this.setMaxStackSize(64);
|
this.setMaxStackSize(64);
|
||||||
this.setCreativeTab(CreativeTabs.tabTransport);
|
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||||
if (properties == null)
|
if (properties == null)
|
||||||
properties = DDProperties.instance();
|
properties = DDProperties.instance();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class itemExitDoor extends itemDimDoor
|
|||||||
{
|
{
|
||||||
super(par1, par2Material);
|
super(par1, par2Material);
|
||||||
this.doorMaterial = par2Material;
|
this.doorMaterial = par2Material;
|
||||||
this.setCreativeTab(CreativeTabs.tabTransport);
|
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class itemLinkSignature extends Item
|
|||||||
super(par1);
|
super(par1);
|
||||||
this.setMaxStackSize(1);
|
this.setMaxStackSize(1);
|
||||||
// this.setTextureFile("/PocketBlockTextures.png");
|
// this.setTextureFile("/PocketBlockTextures.png");
|
||||||
this.setCreativeTab(CreativeTabs.tabTransport);
|
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||||
|
|
||||||
// this.itemIcon=5;
|
// this.itemIcon=5;
|
||||||
this.setMaxDamage(0);
|
this.setMaxDamage(0);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class itemRiftRemover extends Item
|
|||||||
super(par1);
|
super(par1);
|
||||||
this.setMaxStackSize(1);
|
this.setMaxStackSize(1);
|
||||||
// this.setTextureFile("/PocketBlockTextures.png");
|
// this.setTextureFile("/PocketBlockTextures.png");
|
||||||
this.setCreativeTab(CreativeTabs.tabTransport);
|
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||||
|
|
||||||
// this.itemIcon=6;
|
// this.itemIcon=6;
|
||||||
this.setMaxDamage(5);
|
this.setMaxDamage(5);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.EntityEggInfo;
|
import net.minecraft.entity.EntityEggInfo;
|
||||||
import net.minecraft.entity.EntityList;
|
import net.minecraft.entity.EntityList;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
@@ -133,6 +134,23 @@ public class mod_pocketDim
|
|||||||
|
|
||||||
public static long genTime;
|
public static long genTime;
|
||||||
public static int teleTimer = 0;
|
public static int teleTimer = 0;
|
||||||
|
|
||||||
|
public static CreativeTabs dimDoorsCreativeTab = new CreativeTabs("dimDoorsCreativeTab")
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public ItemStack getIconItemStack()
|
||||||
|
{
|
||||||
|
return new ItemStack(mod_pocketDim.itemDimDoor, 1, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTranslatedTabLabel()
|
||||||
|
{
|
||||||
|
return "Dimensional Doors";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PreInit
|
@PreInit
|
||||||
public void PreInit(FMLPreInitializationEvent event)
|
public void PreInit(FMLPreInitializationEvent event)
|
||||||
@@ -217,6 +235,8 @@ public class mod_pocketDim
|
|||||||
LanguageRegistry.addName(itemChaosDoor , "Unstable Door");
|
LanguageRegistry.addName(itemChaosDoor , "Unstable Door");
|
||||||
LanguageRegistry.addName(itemDimDoor, "Dimensional Door");
|
LanguageRegistry.addName(itemDimDoor, "Dimensional Door");
|
||||||
LanguageRegistry.addName(itemRiftBlade , "Rift Blade");
|
LanguageRegistry.addName(itemRiftBlade , "Rift Blade");
|
||||||
|
|
||||||
|
LanguageRegistry.instance().addStringLocalization("itemGroup.dimDoorsCustomTab", "en_US", "Dimensional Doors Items");
|
||||||
|
|
||||||
TickRegistry.registerTickHandler(new ClientTickHandler(), Side.CLIENT);
|
TickRegistry.registerTickHandler(new ClientTickHandler(), Side.CLIENT);
|
||||||
TickRegistry.registerTickHandler(new CommonTickHandler(), Side.SERVER);
|
TickRegistry.registerTickHandler(new CommonTickHandler(), Side.SERVER);
|
||||||
@@ -403,13 +423,13 @@ public class mod_pocketDim
|
|||||||
CommandPrintDimensionData.instance().register(event);
|
CommandPrintDimensionData.instance().register(event);
|
||||||
CommandPruneDimensions.instance().register(event);
|
CommandPruneDimensions.instance().register(event);
|
||||||
CommandStartDungeonCreation.instance().register(event);
|
CommandStartDungeonCreation.instance().register(event);
|
||||||
|
|
||||||
dimHelper.instance.load();
|
dimHelper.instance.load();
|
||||||
|
|
||||||
if(!dimHelper.dimList.containsKey(properties.LimboDimensionID))
|
if(!dimHelper.dimList.containsKey(properties.LimboDimensionID))
|
||||||
{
|
{
|
||||||
dimHelper.dimList.put(properties.LimboDimensionID, new DimData( properties.LimboDimensionID, false, 0, new LinkData()));
|
dimHelper.dimList.put(properties.LimboDimensionID, new DimData( properties.LimboDimensionID, false, 0, new LinkData()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user