Merge branch '1.5udpate'
Moving 1.5 update into master Conflicts: StevenDimDoors/mod_pocketDim/mod_pocketDim.java Signed-off-by: StevenRS11 <stevenrs11@aol.com>
|
@ -4,6 +4,7 @@ import java.util.Random;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
|
@ -14,14 +15,20 @@ public class BlockDimWall extends Block
|
|||
|
||||
protected BlockDimWall(int i, int j, Material par2Material)
|
||||
{
|
||||
super(i, j, Material.ground);
|
||||
super(i, Material.ground);
|
||||
setTickRandomly(true);
|
||||
this.setCreativeTab(CreativeTabs.tabBlock);
|
||||
this.setTextureFile("/PocketBlockTextures.png");
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2());
|
||||
}
|
||||
|
||||
public void onBlockDestroyedByPlayer(World par1World, int par2, int par3, int par4, int par5) {}
|
||||
|
||||
public int quantityDropped(Random par1Random)
|
||||
|
@ -46,7 +53,7 @@ public class BlockDimWall extends Block
|
|||
{
|
||||
entityPlayer.getCurrentEquippedItem().stackSize--;
|
||||
}
|
||||
par1World.setBlockAndMetadataWithNotify(par2, par3, par4, entityPlayer.getCurrentEquippedItem().itemID, entityPlayer.getCurrentEquippedItem().getItemDamage());
|
||||
par1World.setBlock(par2, par3, par4, entityPlayer.getCurrentEquippedItem().itemID, entityPlayer.getCurrentEquippedItem().getItemDamage(),0);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.Random;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -13,15 +14,20 @@ public class BlockDimWallPerm extends Block
|
|||
|
||||
protected BlockDimWallPerm(int i, int j, Material par2Material)
|
||||
{
|
||||
super(i, j, Material.ground);
|
||||
super(i, Material.ground);
|
||||
setTickRandomly(true);
|
||||
// this.setCreativeTab(CreativeTabs.tabBlock);
|
||||
this.setTextureFile("/PocketBlockTextures.png");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2().replace("perm", ""));
|
||||
}
|
||||
public int quantityDropped(Random par1Random)
|
||||
{
|
||||
|
||||
|
@ -75,7 +81,7 @@ public class BlockDimWallPerm extends Block
|
|||
EntityPlayer.class.cast(par5Entity).setPositionAndUpdate( x, y, z );
|
||||
|
||||
//makes sure they can breath when they teleport
|
||||
dimHelper.getWorld(0).setBlockWithNotify(x, y, z, 0);
|
||||
dimHelper.getWorld(0).setBlock(x, y, z, 0);
|
||||
int i=x;
|
||||
int j=y-1;
|
||||
int k=z;
|
||||
|
@ -97,7 +103,7 @@ public class BlockDimWallPerm extends Block
|
|||
else if(Math.abs(xc)+Math.abs(zc)<rand.nextInt(3)+3)
|
||||
|
||||
{
|
||||
dimHelper.getWorld(0).setBlockAndMetadata(i+xc, j-1+yc, k+zc, mod_pocketDim.blockLimboID,2);
|
||||
dimHelper.getWorld(0).setBlock(i+xc, j-1+yc, k+zc, mod_pocketDim.blockLimboID,2,0);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.Random;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
|
@ -15,15 +16,18 @@ public class BlockLimbo extends Block
|
|||
|
||||
protected BlockLimbo(int i, int j, Material par2Material)
|
||||
{
|
||||
super(i, j, Material.ground);
|
||||
super(i, Material.ground);
|
||||
setTickRandomly(false);
|
||||
this.setCreativeTab(CreativeTabs.tabBlock);
|
||||
this.setTextureFile("/PocketBlockTextures.png");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2());
|
||||
|
||||
}
|
||||
|
||||
public void onBlockDestroyedByPlayer(World par1World, int par2, int par3, int par4, int par5) {}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.Random;
|
|||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
@ -22,10 +23,9 @@ public class BlockRift extends BlockContainer
|
|||
|
||||
protected BlockRift(int i, int j, Material par2Material)
|
||||
{
|
||||
super(i, j, Material.snow);
|
||||
super(i, Material.snow);
|
||||
setTickRandomly(true);
|
||||
// this.setCreativeTab(CreativeTabs.tabBlock);
|
||||
this.setTextureFile("/PocketBlockTextures.png");
|
||||
this.setLightOpacity(14);
|
||||
|
||||
|
||||
|
@ -33,6 +33,10 @@ public class BlockRift extends BlockContainer
|
|||
|
||||
|
||||
}
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2());
|
||||
}
|
||||
//sends a packet informing the client that there is a link present so it renders properly. (when placed)
|
||||
public void onBlockAdded(World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
|
@ -133,7 +137,7 @@ public class BlockRift extends BlockContainer
|
|||
{
|
||||
if(MathHelper.abs(i)+MathHelper.abs(j)+MathHelper.abs(k)!=0&&random.nextInt(2)==0)
|
||||
{
|
||||
world.setBlockWithNotify(x+i, y+j, z+k,0);
|
||||
world.setBlock(x+i, y+j, z+k,0);
|
||||
flag=random.nextBoolean()||random.nextBoolean();
|
||||
}
|
||||
|
||||
|
|
|
@ -5,12 +5,14 @@ import java.util.Random;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
@ -21,15 +23,39 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class ChaosDoor extends dimDoor
|
||||
{
|
||||
|
||||
private Icon blockIconBottom;
|
||||
protected ChaosDoor(int par1, Material material)
|
||||
{
|
||||
super(par1, Material.iron);
|
||||
// this.blockIndexInTexture = 18;
|
||||
this.setTextureFile("/PocketBlockTextures.png");
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_top");
|
||||
this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_bottom");
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
/**
|
||||
* Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side
|
||||
*/
|
||||
public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
if(par1IBlockAccess.getBlockId(par2, par3-1, par4)==this.blockID)
|
||||
{
|
||||
return this.blockIcon;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.blockIconBottom;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
|
@ -102,7 +128,7 @@ public class ChaosDoor extends dimDoor
|
|||
{
|
||||
if(dimHelper.getWorld(link.locDimID).isAirBlock(link.locXCoord,link.locYCoord,link.locZCoord))
|
||||
{
|
||||
dimHelper.getWorld(link.locDimID).setBlockWithNotify(link.locXCoord,link.locYCoord,link.locZCoord, mod_pocketDim.blockRiftID);
|
||||
dimHelper.getWorld(link.locDimID).setBlock(link.locXCoord,link.locYCoord,link.locZCoord, mod_pocketDim.blockRiftID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public class CommonTickHandler implements ITickHandler
|
|||
}
|
||||
else
|
||||
{
|
||||
dimHelper.getWorld(link.locDimID).setBlockWithNotify(link.locXCoord, link.locYCoord, link.locZCoord, mod_pocketDim.blockRiftID);
|
||||
dimHelper.getWorld(link.locDimID).setBlock(link.locXCoord, link.locYCoord, link.locZCoord, mod_pocketDim.blockRiftID);
|
||||
TileEntityRift.class.cast(dimHelper.getWorld(link.locDimID).getBlockTileEntity(link.locXCoord, link.locYCoord, link.locZCoord)).hasGrownRifts=true;
|
||||
}
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ public class CommonTickHandler implements ITickHandler
|
|||
if(idToSet!=-1)
|
||||
{
|
||||
|
||||
dimHelper.getWorld(mod_pocketDim.limboDimID).setBlockWithNotify(point.getX(), point.getY(), point.getZ(), idToSet);
|
||||
dimHelper.getWorld(mod_pocketDim.limboDimID).setBlock(point.getX(), point.getY(), point.getZ(), idToSet);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,6 +65,8 @@ public class EventHookContainer
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
for(WorldServer world : dimHelper.getWorlds())
|
||||
{
|
||||
int linkCount=0;
|
||||
|
@ -84,7 +86,8 @@ public class EventHookContainer
|
|||
{
|
||||
break;
|
||||
}
|
||||
dimHelper.getWorld(link.locDimID).setBlockWithNotify(link.locXCoord, link.locYCoord, link.locZCoord, mod_pocketDim.blockRiftID);
|
||||
dimHelper.getWorld(link.locDimID).setBlock(link.locXCoord, link.locYCoord, link.locZCoord, mod_pocketDim.blockRiftID);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -2,33 +2,45 @@ package StevenDimDoors.mod_pocketDim;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ExitDoor extends dimDoor
|
||||
{
|
||||
|
||||
private Icon blockIconBottom;
|
||||
protected ExitDoor(int par1, Material par2Material)
|
||||
{
|
||||
|
||||
super(par1, Material.wood);
|
||||
// this.blockIndexInTexture = 19;
|
||||
this.setTextureFile("/PocketBlockTextures.png");
|
||||
|
||||
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_top");
|
||||
this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_bottom");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureFile()
|
||||
{
|
||||
return "/PocketBlockTextures.png";
|
||||
}
|
||||
@Override
|
||||
public void onBlockAdded(World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
|
@ -96,7 +108,22 @@ public class ExitDoor extends dimDoor
|
|||
//this.onPoweredBlockChange(par1World, par2, par3, par4, false);
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
/**
|
||||
* Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side
|
||||
*/
|
||||
public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
if(par1IBlockAccess.getBlockId(par2, par3-1, par4)==this.blockID)
|
||||
{
|
||||
return this.blockIcon;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.blockIconBottom;
|
||||
}
|
||||
}
|
||||
|
||||
public int idPicked(World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemDoor;
|
||||
|
@ -21,11 +22,11 @@ public class ItemChaosDoor extends itemDimDoor
|
|||
this.doorMaterial = par2Material;
|
||||
this.setCreativeTab(CreativeTabs.tabTransport);
|
||||
}
|
||||
@Override
|
||||
public String getTextureFile()
|
||||
{
|
||||
return "/PocketBlockTextures.png";
|
||||
}
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.iconIndex = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
|
||||
|
||||
}
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.Random;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
|
@ -302,11 +303,11 @@ public class ItemRiftBlade extends itemDimDoor
|
|||
return par1ItemStack;
|
||||
|
||||
}
|
||||
@Override
|
||||
public String getTextureFile()
|
||||
{
|
||||
return "/PocketBlockTextures.png";
|
||||
}
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.iconIndex = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
|
||||
|
||||
}
|
||||
public int getItemEnchantability()
|
||||
{
|
||||
return EnumToolMaterial.GOLD.getEnchantability();
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package StevenDimDoors.mod_pocketDim;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.EnumArmorMaterial;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
|
@ -16,9 +17,5 @@ public class ItemRiftGoggles extends ItemArmor
|
|||
// this.setIconIndex(Item.doorWood.getIconFromDamage(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureFile()
|
||||
{
|
||||
return "/PocketBlockTextures.png";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,9 @@ package StevenDimDoors.mod_pocketDim;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -16,23 +18,25 @@ public class ItemStableFabric extends Item
|
|||
public ItemStableFabric(int par1, int par2)
|
||||
{
|
||||
super(par1);
|
||||
this.setCreativeTab(CreativeTabs.tabRedstone);
|
||||
// this.setIconIndex(Item.doorWood.getIconFromDamage(0));
|
||||
this.setCreativeTab(CreativeTabs.tabTransport);
|
||||
|
||||
}
|
||||
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.iconIndex = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
|
||||
|
||||
}
|
||||
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
|
||||
{
|
||||
|
||||
System.out.println("Block metadata is "+par3World.getBlockMetadata(par4, par5, par6));
|
||||
System.out.println("Block texture data is "+Block.blocksList[par3World.getBlockId(par4, par5, par6)].getBlockTexture(par3World,par4, par5, par6,par7).getIconName());
|
||||
System.out.println("Block name is is "+Block.blocksList[par3World.getBlockId(par4, par5, par6)].getUnlocalizedName2());
|
||||
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String getTextureFile()
|
||||
{
|
||||
return "/PocketBlockTextures.png";
|
||||
}
|
||||
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
|
||||
|
|
|
@ -393,12 +393,7 @@ public class LimboGenerator extends ChunkProviderGenerate implements IChunkProvi
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean unload100OldestChunks() {
|
||||
// TODO Auto-generated method stub
|
||||
return super.unload100OldestChunks();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canSave() {
|
||||
// TODO Auto-generated method stub
|
||||
|
|
|
@ -35,12 +35,13 @@ public class PacketHandler implements IPacketHandler
|
|||
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player)
|
||||
{
|
||||
|
||||
if (packet.channel.equals("GenericRandom"))
|
||||
if (packet.channel.equals("DimDoorPackets"))
|
||||
{
|
||||
handleRandom(packet,player);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void handleRandom(Packet250CustomPayload packet, Player player)
|
||||
|
@ -231,7 +232,7 @@ public class PacketHandler implements IPacketHandler
|
|||
}
|
||||
|
||||
Packet250CustomPayload packet= new Packet250CustomPayload();
|
||||
packet.channel="GenericRandom";
|
||||
packet.channel="DimDoorPackets";
|
||||
packet.data = bos.toByteArray();
|
||||
packet.length = bos.size();;
|
||||
PacketDispatcher.sendPacketToAllPlayers(packet);
|
||||
|
@ -267,7 +268,7 @@ public class PacketHandler implements IPacketHandler
|
|||
}
|
||||
|
||||
Packet250CustomPayload packet= new Packet250CustomPayload();
|
||||
packet.channel="GenericRandom";
|
||||
packet.channel="DimDoorPackets";
|
||||
packet.data = bos.toByteArray();
|
||||
packet.length = bos.size();;
|
||||
PacketDispatcher.sendPacketToAllPlayers(packet);
|
||||
|
@ -307,7 +308,7 @@ public class PacketHandler implements IPacketHandler
|
|||
}
|
||||
|
||||
Packet250CustomPayload packet= new Packet250CustomPayload();
|
||||
packet.channel="GenericRandom";
|
||||
packet.channel="DimDoorPackets";
|
||||
packet.data = bos.toByteArray();
|
||||
packet.length = bos.size();;
|
||||
PacketDispatcher.sendPacketToAllPlayers(packet);
|
||||
|
@ -348,7 +349,7 @@ public class PacketHandler implements IPacketHandler
|
|||
}
|
||||
|
||||
Packet250CustomPayload packet= new Packet250CustomPayload();
|
||||
packet.channel="GenericRandom";
|
||||
packet.channel="DimDoorPackets";
|
||||
packet.data = bos.toByteArray();
|
||||
packet.length = bos.size();
|
||||
|
||||
|
@ -396,7 +397,7 @@ public class PacketHandler implements IPacketHandler
|
|||
dataOut.writeObject(dim);
|
||||
|
||||
Packet250CustomPayload packet= new Packet250CustomPayload();
|
||||
packet.channel="GenericRandom";
|
||||
packet.channel="DimDoorPackets";
|
||||
packet.data = bos.toByteArray();
|
||||
packet.length = bos.size();;
|
||||
PacketDispatcher.sendPacketToAllPlayers(packet);
|
||||
|
|
|
@ -92,11 +92,7 @@ public class RailTeleporter extends Teleporter
|
|||
entity.lastTickPosZ = entity.prevPosZ = entity.posZ = z;
|
||||
entity.setPosition(x, y, z);
|
||||
}
|
||||
@Override
|
||||
public boolean func_85188_a(Entity par1Entity)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_85189_a(long par1)
|
||||
{
|
||||
|
|
|
@ -185,7 +185,7 @@ public class RiftGenerator implements IWorldGenerator
|
|||
else if(Math.abs(xc)+Math.abs(zc)<rand.nextInt(3)+3)
|
||||
|
||||
{
|
||||
world.setBlockAndMetadata(i+xc, j-1+yc, k+zc, blockID,2);
|
||||
world.setBlock(i+xc, j-1+yc, k+zc, blockID,2,1);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -198,12 +198,12 @@ public class RiftGenerator implements IWorldGenerator
|
|||
ItemRiftBlade.placeDoorBlock(world, i, j+1, k, 0, mod_pocketDim.transientDoor);
|
||||
|
||||
{
|
||||
world.setBlockAndMetadata(i, j+1, k-1, blockID,0);
|
||||
world.setBlockAndMetadata(i, j+1, k+1, blockID,0);
|
||||
world.setBlockAndMetadata(i, j, k-1, blockID,0);
|
||||
world.setBlockAndMetadata(i, j, k+1, blockID,0);
|
||||
world.setBlockAndMetadata(i, j+2, k+1, blockID,3);
|
||||
world.setBlockAndMetadata(i, j+2, k-1, blockID,3);
|
||||
world.setBlock(i, j+1, k-1, blockID,0,1);
|
||||
world.setBlock(i, j+1, k+1, blockID,0,1);
|
||||
world.setBlock(i, j, k-1, blockID,0,1);
|
||||
world.setBlock(i, j, k+1, blockID,0,1);
|
||||
world.setBlock(i, j+2, k+1, blockID,3,1);
|
||||
world.setBlock(i, j+2, k-1, blockID,3,1);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ public class TileEntityRift extends TileEntity
|
|||
if(count2>40)
|
||||
{
|
||||
this.invalidate();
|
||||
this.worldObj.setBlockWithNotify(this.xCoord, this.yCoord, this.zCoord,0);
|
||||
this.worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord,0);
|
||||
if(dimHelper.instance.getLinkDataFromCoords(this.xCoord, this.yCoord, this.zCoord, this.worldObj.provider.dimensionId)!=null)
|
||||
{
|
||||
dimHelper.instance.removeLink(this.worldObj.provider.dimensionId, this.xCoord, this.yCoord, this.zCoord);
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.Random;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -12,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
@ -27,9 +29,27 @@ public class TransientDoor extends ExitDoor
|
|||
{
|
||||
super(par1, Material.grass);
|
||||
// this.blockIndexInTexture = 18;
|
||||
this.setTextureFile("/PocketBlockTextures.png");
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_top");
|
||||
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
/**
|
||||
* Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side
|
||||
*/
|
||||
public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
|
||||
return this.blockIcon;
|
||||
|
||||
|
||||
}
|
||||
public boolean isCollidable()
|
||||
{
|
||||
return false;
|
||||
|
@ -65,7 +85,7 @@ public class TransientDoor extends ExitDoor
|
|||
if(dimHelper.dimList.containsKey(linkData.destDimID))
|
||||
{
|
||||
dimHelper.instance.teleportToPocket(par1World, linkData, par5Entity);
|
||||
par1World.setBlockWithNotify(par2, par3-1, par4, 0);
|
||||
par1World.setBlock(par2, par3-1, par4, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,7 +97,7 @@ public class TransientDoor extends ExitDoor
|
|||
if(dimHelper.dimList.containsKey(linkData.destDimID))
|
||||
{
|
||||
dimHelper.instance.teleportToPocket(par1World, linkData, par5Entity);
|
||||
par1World.setBlockWithNotify(par2, par3, par4, 0);
|
||||
par1World.setBlock(par2, par3, par4, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class CommandDeleteAllLinks extends CommandBase
|
|||
|
||||
|
||||
|
||||
targetWorld.setBlockWithNotify(link.locXCoord, link.locYCoord, link.locZCoord, 0);
|
||||
targetWorld.setBlock(link.locXCoord, link.locYCoord, link.locZCoord, 0);
|
||||
|
||||
|
||||
linksRemoved++;
|
||||
|
|
|
@ -85,7 +85,7 @@ public class CommandDeleteRifts extends CommandBase
|
|||
|
||||
|
||||
|
||||
targetWorld.setBlockWithNotify(link.locXCoord, link.locYCoord, link.locZCoord, 0);
|
||||
targetWorld.setBlock(link.locXCoord, link.locYCoord, link.locZCoord, 0);
|
||||
|
||||
|
||||
linksRemoved++;
|
||||
|
|
|
@ -5,12 +5,14 @@ import java.util.Random;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
@ -21,7 +23,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class dimDoor extends BlockContainer
|
||||
{
|
||||
|
||||
private static Icon blockIconBottom;
|
||||
protected dimDoor(int par1, Material material)
|
||||
{
|
||||
super(par1, Material.iron);
|
||||
|
@ -31,11 +33,13 @@ public class dimDoor extends BlockContainer
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getTextureFile()
|
||||
{
|
||||
return "/PocketBlockTextures.png";
|
||||
}
|
||||
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_top");
|
||||
this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_bottom");
|
||||
|
||||
}
|
||||
|
||||
//spawns the rift attatched to the block. Doesnt work in creative mode for some reason
|
||||
//TODO make work in creative
|
||||
|
@ -46,19 +50,19 @@ public class dimDoor extends BlockContainer
|
|||
if(dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World)!=null)
|
||||
{
|
||||
LinkData link= dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World);
|
||||
par1World.setBlockWithNotify(par2, par3, par4, mod_pocketDim.blockRiftID);
|
||||
par1World.setBlock(par2, par3, par4, mod_pocketDim.blockRiftID);
|
||||
|
||||
}
|
||||
if(dimHelper.instance.getLinkDataFromCoords(par2, par3-1, par4, par1World)!=null)
|
||||
{
|
||||
LinkData link= dimHelper.instance.getLinkDataFromCoords(par2, par3-1, par4, par1World);
|
||||
par1World.setBlockWithNotify(par2, par3-1, par4, mod_pocketDim.blockRiftID);
|
||||
par1World.setBlock(par2, par3-1, par4, mod_pocketDim.blockRiftID);
|
||||
|
||||
}
|
||||
if(dimHelper.instance.getLinkDataFromCoords(par2, par3+1, par4, par1World)!=null)
|
||||
{
|
||||
LinkData link= dimHelper.instance.getLinkDataFromCoords(par2, par3+1, par4, par1World);
|
||||
par1World.setBlockWithNotify(par2, par3+1, par4, mod_pocketDim.blockRiftID);
|
||||
par1World.setBlock(par2, par3+1, par4, mod_pocketDim.blockRiftID);
|
||||
|
||||
}
|
||||
|
||||
|
@ -99,7 +103,7 @@ public class dimDoor extends BlockContainer
|
|||
|
||||
|
||||
|
||||
System.out.println(linkData.destDimID);
|
||||
|
||||
dimHelper.instance.teleportToPocket(par1World, linkData, par5Entity);
|
||||
this.onPoweredBlockChange(par1World, par2, par3, par4, false);
|
||||
|
||||
|
@ -134,7 +138,7 @@ public class dimDoor extends BlockContainer
|
|||
{
|
||||
var12=dimHelper.instance.flipDoorMetadata(var12);
|
||||
}
|
||||
par1World.setBlockMetadataWithNotify(par2, par3-1, par4, var12);
|
||||
par1World.setBlockMetadataWithNotify(par2, par3-1, par4, var12,1);
|
||||
if( dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World)!=null)
|
||||
{
|
||||
dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World).linkOrientation= par1World.getBlockMetadata(par2, par3-1, par4);
|
||||
|
@ -148,7 +152,7 @@ public class dimDoor extends BlockContainer
|
|||
{
|
||||
var12=dimHelper.instance.flipDoorMetadata(var12);
|
||||
}
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var12);
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var12,1);
|
||||
if( dimHelper.instance.getLinkDataFromCoords(par2, par3+1, par4, par1World)!=null)
|
||||
{
|
||||
dimHelper.instance.getLinkDataFromCoords(par2, par3+1, par4, par1World).linkOrientation= par1World.getBlockMetadata(par2, par3, par4);
|
||||
|
@ -179,12 +183,12 @@ public class dimDoor extends BlockContainer
|
|||
|
||||
if ((var10 & 8) == 0)
|
||||
{
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var11);
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var11,1);
|
||||
par1World.markBlockRangeForRenderUpdate(par2, par3, par4, par2, par3, par4);
|
||||
}
|
||||
else
|
||||
{
|
||||
par1World.setBlockMetadataWithNotify(par2, par3 - 1, par4, var11);
|
||||
par1World.setBlockMetadataWithNotify(par2, par3 - 1, par4, var11,1);
|
||||
par1World.markBlockRangeForRenderUpdate(par2, par3 - 1, par4, par2, par3, par4);
|
||||
}
|
||||
|
||||
|
@ -217,12 +221,12 @@ public class dimDoor extends BlockContainer
|
|||
|
||||
if ((var6 & 8) == 0)
|
||||
{
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var8);
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var8,2);
|
||||
par1World.markBlockRangeForRenderUpdate(par2, par3, par4, par2, par3, par4);
|
||||
}
|
||||
else
|
||||
{
|
||||
par1World.setBlockMetadataWithNotify(par2, par3 - 1, par4, var8);
|
||||
par1World.setBlockMetadataWithNotify(par2, par3 - 1, par4, var8,2);
|
||||
par1World.markBlockRangeForRenderUpdate(par2, par3 - 1, par4, par2, par3, par4);
|
||||
}
|
||||
|
||||
|
@ -268,73 +272,16 @@ public class dimDoor extends BlockContainer
|
|||
/**
|
||||
* Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side
|
||||
*/
|
||||
public int getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
if (par5 != 0 && par5 != 1)
|
||||
{
|
||||
int var6 = this.getFullMetadata(par1IBlockAccess, par2, par3, par4);
|
||||
int var7 = this.blockIndexInTexture;
|
||||
|
||||
if ((var6 & 8) != 0)
|
||||
{
|
||||
var7 -= 16;
|
||||
}
|
||||
|
||||
int var8 = var6 & 3;
|
||||
boolean var9 = (var6 & 4) != 0;
|
||||
|
||||
if (var9)
|
||||
{
|
||||
if (var8 == 0 && par5 == 2)
|
||||
{
|
||||
var7 = -var7;
|
||||
}
|
||||
else if (var8 == 1 && par5 == 5)
|
||||
{
|
||||
var7 = -var7;
|
||||
}
|
||||
else if (var8 == 2 && par5 == 3)
|
||||
{
|
||||
var7 = -var7;
|
||||
}
|
||||
else if (var8 == 3 && par5 == 4)
|
||||
{
|
||||
var7 = -var7;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (var8 == 0 && par5 == 5)
|
||||
{
|
||||
var7 = -var7;
|
||||
}
|
||||
else if (var8 == 1 && par5 == 3)
|
||||
{
|
||||
var7 = -var7;
|
||||
}
|
||||
else if (var8 == 2 && par5 == 4)
|
||||
{
|
||||
var7 = -var7;
|
||||
}
|
||||
else if (var8 == 3 && par5 == 2)
|
||||
{
|
||||
var7 = -var7;
|
||||
}
|
||||
|
||||
if ((var6 & 16) != 0)
|
||||
{
|
||||
var7 = -var7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return Math.abs(var7);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.blockIndexInTexture;
|
||||
}
|
||||
if(par1IBlockAccess.getBlockId(par2, par3-1, par4)==this.blockID)
|
||||
{
|
||||
return this.blockIcon;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.blockIconBottom;
|
||||
}
|
||||
}
|
||||
|
||||
//Called to update the render information on the tile entity. Could probably implement a data watcher, but this works fine and is more versatile I think.
|
||||
|
@ -565,7 +512,7 @@ public class dimDoor extends BlockContainer
|
|||
|
||||
if (par1World.getBlockId(par2, par3 + 1, par4) != this.blockID)
|
||||
{
|
||||
par1World.setBlockWithNotify(par2, par3, par4, 0);
|
||||
par1World.setBlock(par2, par3, par4, 0);
|
||||
var7 = true;
|
||||
}
|
||||
|
||||
|
@ -603,7 +550,7 @@ public class dimDoor extends BlockContainer
|
|||
{
|
||||
if (par1World.getBlockId(par2, par3 - 1, par4) != this.blockID)
|
||||
{
|
||||
par1World.setBlockWithNotify(par2, par3, par4, 0);
|
||||
par1World.setBlock(par2, par3, par4, 0);
|
||||
}
|
||||
|
||||
if (par5 > 0 && par5 != this.blockID)
|
||||
|
@ -692,7 +639,7 @@ public class dimDoor extends BlockContainer
|
|||
{
|
||||
if (par6EntityPlayer.capabilities.isCreativeMode && (par5 & 8) != 0 && par1World.getBlockId(par2, par3 - 1, par4) == this.blockID)
|
||||
{
|
||||
par1World.setBlockWithNotify(par2, par3 - 1, par4, 0);
|
||||
par1World.setBlock(par2, par3 - 1, par4, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim;
|
|||
|
||||
import net.minecraft.block.BlockTrapDoor;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -20,19 +21,18 @@ public class dimHatch extends BlockTrapDoor
|
|||
// this.blockIndexInTexture = 16;
|
||||
}
|
||||
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureFile()
|
||||
{
|
||||
this.blockIndexInTexture = 16;
|
||||
return "/PocketBlockTextures.png";
|
||||
}
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
|
||||
{
|
||||
int var10 = par1World.getBlockMetadata(par2, par3, par4);
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var10 ^ 4);
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var10 ^ 4,2);
|
||||
par1World.playAuxSFXAtEntity(par5EntityPlayer, 1003, par2, par3, par4, 0);
|
||||
return true;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ public class dimHatch extends BlockTrapDoor
|
|||
|
||||
if (var7 != par5)
|
||||
{
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 ^ 4);
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 ^ 4,2);
|
||||
par1World.playAuxSFXAtEntity((EntityPlayer)null, 1003, par2, par3, par4, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -384,7 +384,7 @@ public class dimHelper extends DimensionManager
|
|||
{
|
||||
if(Block.blocksList[entity.worldObj.getBlockId(playerXCoord,playerYCoord+1,playerZCoord)].isOpaqueCube())
|
||||
{
|
||||
entity.worldObj.setBlockWithNotify(playerXCoord,playerYCoord+1,playerZCoord,0);
|
||||
entity.worldObj.setBlock(playerXCoord,playerYCoord+1,playerZCoord,0);
|
||||
}
|
||||
}
|
||||
if(entity.worldObj.getBlockId(x, y, z)==mod_pocketDim.dimDoorID||entity.worldObj.getBlockId(x, y, z)==mod_pocketDim.ExitDoorID)
|
||||
|
@ -494,7 +494,7 @@ public class dimHelper extends DimensionManager
|
|||
|
||||
if(!mod_pocketDim.blocksImmuneToRift.contains(blocktoReplace))
|
||||
{
|
||||
dimHelper.getWorld(link.locDimID).setBlockWithNotify(link.locXCoord, link.locYCoord, link.locZCoord, mod_pocketDim.blockRiftID);
|
||||
dimHelper.getWorld(link.locDimID).setBlock(link.locXCoord, link.locYCoord, link.locZCoord, mod_pocketDim.blockRiftID);
|
||||
|
||||
}
|
||||
|
||||
|
@ -626,15 +626,15 @@ public class dimHelper extends DimensionManager
|
|||
int blockToReplace= this.getWorld(destinationID).getBlockId(destX, destY, destZ);
|
||||
if(blockToReplace!=mod_pocketDim.dimDoorID&&blockToReplace!=mod_pocketDim.linkExitDoorID&&blockToReplace!=mod_pocketDim.linkDimDoorID&&blockToReplace!=mod_pocketDim.ExitDoorID&&blockToReplace!=mod_pocketDim.transientDoorID)
|
||||
{
|
||||
this.getWorld(destinationID).setBlockAndMetadata(destX, destY-1, destZ, doorTypeToPlace,dimHelper.instance.flipDoorMetadata(world.getBlockMetadata(locX, locY-1, locZ)));
|
||||
this.getWorld(destinationID).setBlockAndMetadata(destX, destY, destZ, doorTypeToPlace,world.getBlockMetadata(locX, locY, locZ));
|
||||
this.getWorld(destinationID).setBlock(destX, destY-1, destZ, doorTypeToPlace,dimHelper.instance.flipDoorMetadata(world.getBlockMetadata(locX, locY-1, locZ)),2);
|
||||
this.getWorld(destinationID).setBlock(destX, destY, destZ, doorTypeToPlace,world.getBlockMetadata(locX, locY, locZ),2);
|
||||
// System.out.println("Genned door");
|
||||
}
|
||||
|
||||
if(id==mod_pocketDim.transientDoorID&&!dimHelper.dimList.get((destinationID)).hasBeenFilled)
|
||||
{
|
||||
this.getWorld(destinationID).setBlockAndMetadata(destX, destY-1, destZ, id,dimHelper.instance.flipDoorMetadata(world.getBlockMetadata(locX, locY-1, locZ)));
|
||||
this.getWorld(destinationID).setBlockAndMetadata(destX, destY, destZ, id,world.getBlockMetadata(locX, locY, locZ));
|
||||
this.getWorld(destinationID).setBlock(destX, destY-1, destZ, id,dimHelper.instance.flipDoorMetadata(world.getBlockMetadata(locX, locY-1, locZ)),2);
|
||||
this.getWorld(destinationID).setBlock(destX, destY, destZ, id,world.getBlockMetadata(locX, locY, locZ),2);
|
||||
}
|
||||
|
||||
linkData.hasGennedDoor=true;
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemDoor;
|
||||
|
@ -21,12 +22,11 @@ public class itemDimDoor extends ItemDoor
|
|||
this.doorMaterial = par2Material;
|
||||
this.setCreativeTab(CreativeTabs.tabTransport);
|
||||
}
|
||||
@Override
|
||||
public String getTextureFile()
|
||||
{
|
||||
return "/PocketBlockTextures.png";
|
||||
}
|
||||
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.iconIndex = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemDoor;
|
||||
|
@ -24,11 +25,11 @@ public class itemExitDoor extends itemDimDoor
|
|||
// this.setIconIndex(Item.doorWood.getIconFromDamage(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureFile()
|
||||
{
|
||||
return "/PocketBlockTextures.png";
|
||||
}
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.iconIndex = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -44,11 +45,11 @@ public class itemLinkSignature extends Item
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getTextureFile()
|
||||
{
|
||||
return "/PocketBlockTextures.png";
|
||||
}
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.iconIndex = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
|
||||
|
|
|
@ -3,6 +3,7 @@ package StevenDimDoors.mod_pocketDim;
|
|||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
@ -33,11 +34,11 @@ public class itemRiftRemover extends Item
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getTextureFile()
|
||||
{
|
||||
return "/PocketBlockTextures.png";
|
||||
}
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.iconIndex = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
|
|
|
@ -2,118 +2,51 @@ package StevenDimDoors.mod_pocketDim;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class linkDimDoor extends dimDoor
|
||||
{
|
||||
|
||||
protected linkDimDoor(int par1, Material par2Material)
|
||||
{
|
||||
|
||||
super(par1, par2Material);
|
||||
//this.blockIndexInTexture = 17;
|
||||
this.setTextureFile("/PocketBlockTextures.png");
|
||||
|
||||
private Icon blockIconBottom;
|
||||
protected linkDimDoor(int par1, Material material) {
|
||||
super(par1, material);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureFile()
|
||||
{
|
||||
return "/PocketBlockTextures.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
if(!par1World.isRemote&&par1World.getBlockId(par2, par3-1, par4)==this.blockID)
|
||||
{
|
||||
if(dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World)!=null)
|
||||
{
|
||||
dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World).linkOrientation=par1World.getBlockMetadata(par2, par3-1, par4);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println("couldnt find parent link!!!!!!");
|
||||
}
|
||||
|
||||
}
|
||||
//this.onPoweredBlockChange(par1World, par2, par3, par4, false);
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
/**
|
||||
* Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side
|
||||
*/
|
||||
public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
|
||||
int var12 = (int) (MathHelper.floor_double((double)((par5Entity.rotationYaw+90) * 4.0F / 360.0F) + 0.5D) & 3);
|
||||
|
||||
int num = par1World.getBlockMetadata(par2, par3-1, par4);
|
||||
if(!par1World.isRemote&&(num==5||num==4||num==6||num==7)&&(num-4)==var12&&par1World.getBlockId(par2, par3-1, par4)==mod_pocketDim.linkDimDoorID)
|
||||
{
|
||||
EntityPlayer player;
|
||||
if(par5Entity instanceof EntityPlayerMP)
|
||||
{
|
||||
|
||||
player= (EntityPlayer) par5Entity;
|
||||
//int destinationID= dimHelper.instance.getDestIDFromCoords(par2, par3, par4, par1World);
|
||||
|
||||
this.onPoweredBlockChange(par1World, par2, par3, par4, false);
|
||||
|
||||
LinkData linkData= dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World);
|
||||
dimHelper.instance.teleportToPocket(par1World, linkData, player);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if(par1IBlockAccess.getBlockId(par2, par3-1, par4)==this.blockID)
|
||||
{
|
||||
return this.blockIcon;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.blockIconBottom;
|
||||
}
|
||||
}
|
||||
|
||||
public int idPicked(World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
return Item.doorSteel.itemID;
|
||||
}
|
||||
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
{
|
||||
return (par1 & 8) != 0 ? 0 : (Item.doorSteel.itemID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
|
||||
|
||||
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_top");
|
||||
this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_bottom");
|
||||
|
||||
|
||||
//System.out.println(String.valueOf(par1World.getBlockMetadata(par2, par3-1, par4)));
|
||||
|
||||
int var10 = this.getFullMetadata(par1World, par2, par3, par4);
|
||||
int var11 = var10 & 7;
|
||||
var11 ^= 4;
|
||||
|
||||
if ((var10 & 8) == 0)
|
||||
{
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var11);
|
||||
par1World.markBlockRangeForRenderUpdate(par2, par3, par4, par2, par3, par4);
|
||||
}
|
||||
else
|
||||
{
|
||||
par1World.setBlockMetadataWithNotify(par2, par3 - 1, par4, var11);
|
||||
par1World.markBlockRangeForRenderUpdate(par2, par3 - 1, par4, par2, par3, par4);
|
||||
}
|
||||
|
||||
par1World.playAuxSFXAtEntity(par5EntityPlayer, 1003, par2, par3, par4, 0);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -2,17 +2,23 @@ package StevenDimDoors.mod_pocketDim;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class linkExitDoor extends dimDoor
|
||||
public class linkExitDoor extends ExitDoor
|
||||
{
|
||||
|
||||
private Icon blockIconBottom;
|
||||
protected linkExitDoor(int par1,Material par2Material)
|
||||
{
|
||||
|
||||
|
@ -22,99 +28,27 @@ public class linkExitDoor extends dimDoor
|
|||
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureFile()
|
||||
{
|
||||
return "/PocketBlockTextures.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
if(!par1World.isRemote&&par1World.getBlockId(par2, par3-1, par4)==this.blockID)
|
||||
{
|
||||
if(dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World)!=null)
|
||||
{
|
||||
dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World).linkOrientation=par1World.getBlockMetadata(par2, par3-1, par4);
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println("couldnt find parent link!!!!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//this.onPoweredBlockChange(par1World, par2, par3, par4, false);
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
|
||||
/**
|
||||
* Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side
|
||||
*/
|
||||
public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
|
||||
|
||||
|
||||
int var12 = (int) (MathHelper.floor_double((double)((par5Entity.rotationYaw+90) * 4.0F / 360.0F) + 0.5D) & 3);
|
||||
|
||||
int num = par1World.getBlockMetadata(par2, par3-1, par4);
|
||||
if(!par1World.isRemote&&(num==5||num==4||num==6||num==7)&&(num-4)==var12&&par1World.getBlockId(par2, par3-1, par4)==mod_pocketDim.linkExitDoorID)
|
||||
{
|
||||
EntityPlayer player;
|
||||
if(par5Entity instanceof EntityPlayer)
|
||||
{
|
||||
|
||||
player= (EntityPlayer) par5Entity;
|
||||
//int destinationID= dimHelper.instance.getDestIDFromCoords(par2, par3, par4, par1World);
|
||||
|
||||
this.onPoweredBlockChange(par1World, par2, par3, par4, false);
|
||||
|
||||
LinkData linkData= dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World);
|
||||
dimHelper.instance.teleportToPocket(par1World, linkData, player);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if(par1IBlockAccess.getBlockId(par2, par3-1, par4)==this.blockID)
|
||||
{
|
||||
return this.blockIcon;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.blockIconBottom;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
//System.out.println(String.valueOf(par1World.getBlockMetadata(par2, par3-1, par4)));
|
||||
|
||||
int var10 = this.getFullMetadata(par1World, par2, par3, par4);
|
||||
int var11 = var10 & 7;
|
||||
var11 ^= 4;
|
||||
|
||||
if ((var10 & 8) == 0)
|
||||
{
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var11);
|
||||
par1World.markBlockRangeForRenderUpdate(par2, par3, par4, par2, par3, par4);
|
||||
}
|
||||
else
|
||||
{
|
||||
par1World.setBlockMetadataWithNotify(par2, par3 - 1, par4, var11);
|
||||
par1World.markBlockRangeForRenderUpdate(par2, par3 - 1, par4, par2, par3, par4);
|
||||
}
|
||||
|
||||
par1World.playAuxSFXAtEntity(par5EntityPlayer, 1003, par2, par3, par4, 0);
|
||||
return true;
|
||||
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_top");
|
||||
this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_bottom");
|
||||
|
||||
}
|
||||
public int idPicked(World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
return Item.doorWood.itemID;
|
||||
}
|
||||
|
||||
public int idDropped(int par1, Random par2Random, int par3)
|
||||
{
|
||||
return (par1 & 8) != 0 ? 0 : (Item.doorWood.itemID);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -39,19 +39,25 @@ import StevenDimDoors.mod_pocketDim.commands.CommandDeleteDimData;
|
|||
import StevenDimDoors.mod_pocketDim.commands.CommandDeleteRifts;
|
||||
import StevenDimDoors.mod_pocketDim.commands.CommandPruneDims;
|
||||
|
||||
@Mod(modid = "DimensionalDoors", name = "Dimensional Doors", version = mod_pocketDim.version)
|
||||
|
||||
@Mod(modid = mod_pocketDim.modid, name = "Dimensional Doors", version = mod_pocketDim.version)
|
||||
|
||||
|
||||
|
||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false,
|
||||
clientPacketHandlerSpec =
|
||||
@SidedPacketHandler(channels = {"pocketDim" }, packetHandler = ClientPacketHandler.class),
|
||||
serverPacketHandlerSpec =
|
||||
@SidedPacketHandler(channels = {"pocketDim" }, packetHandler = ServerPacketHandler.class),
|
||||
channels={"GenericRandom"}, packetHandler = PacketHandler.class, connectionHandler=ConnectionHandler.class)
|
||||
channels={"DimDoorPackets"}, packetHandler = PacketHandler.class, connectionHandler=ConnectionHandler.class)
|
||||
|
||||
public class mod_pocketDim
|
||||
{
|
||||
|
||||
public static final String version = "1.4.7R1.3.1RC2";
|
||||
|
||||
public static final String version = "1.5.1R1.3.3B2";
|
||||
public static final String modid = "DimensionalDoors";
|
||||
|
||||
//need to clean up
|
||||
@SidedProxy(clientSide = "StevenDimDoors.mod_pocketDimClient.ClientProxy", serverSide = "StevenDimDoors.mod_pocketDim.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
@ -213,12 +219,14 @@ public class mod_pocketDim
|
|||
|
||||
MinecraftForge.EVENT_BUS.register(new EventHookContainer());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Configuration config = new Configuration(event.getSuggestedConfigurationFile());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -287,27 +295,27 @@ public class mod_pocketDim
|
|||
|
||||
|
||||
|
||||
transientDoor = (new TransientDoor(transientDoorID, Material.iron)).setHardness(1.0F).setRequiresSelfNotify().setBlockName("transientDoor");
|
||||
transientDoor = (new TransientDoor(transientDoorID, Material.iron)).setHardness(1.0F) .setUnlocalizedName("transientDoor");
|
||||
|
||||
linkDimDoor = (new linkDimDoor(linkDimDoorID, Material.iron)).setHardness(1.0F).setRequiresSelfNotify().setBlockName("dimDoor");
|
||||
blockDimWall = (new BlockDimWall(blockDimWallID, 0, Material.iron)).setLightValue(1.0F).setHardness(0.1F).setBlockName("blockDimWall");
|
||||
blockDimWallPerm = (new BlockDimWallPerm(blockDimWallPermID, 0, Material.iron)).setLightValue(1.0F).setBlockUnbreakable().setHardness(100000.0F).setBlockName("blockDimWallPerm");
|
||||
ExitDoor = (new ExitDoor(ExitDoorID, Material.wood)).setHardness(1.0F).setRequiresSelfNotify().setBlockName("dimDoorexit");
|
||||
linkExitDoor = (new linkExitDoor(linkExitDoorID, Material.wood)).setHardness(1.0F).setRequiresSelfNotify().setBlockName("dimDoorexitlink");
|
||||
blockRift = (new BlockRift(blockRiftID, 0, Material.air).setHardness(1.0F).setRequiresSelfNotify().setBlockName("rift"));
|
||||
blockLimbo = (new BlockLimbo(blockLimboID, 15, Material.iron).setHardness(.2F).setBlockName("limob").setLightValue(.0F));
|
||||
chaosDoor = (new ChaosDoor(chaosDoorID, Material.iron).setHardness(.2F).setBlockName("chaosDoor").setLightValue(.0F).setRequiresSelfNotify());
|
||||
dimDoor = (new dimDoor(dimDoorID, Material.iron)).setHardness(1.0F).setRequiresSelfNotify().setBlockName("dimDoor");
|
||||
dimHatch = (new dimHatch(dimHatchID, 84, Material.iron)).setHardness(1.0F).setRequiresSelfNotify().setBlockName("dimHatch");
|
||||
// dimRail = (new DimRail(dimRailID, 88, false)).setHardness(.5F).setRequiresSelfNotify().setBlockName("dimRail");
|
||||
linkDimDoor = (new linkDimDoor(linkDimDoorID, Material.iron)).setHardness(1.0F) .setUnlocalizedName("dimDoorLink");
|
||||
blockDimWall = (new BlockDimWall(blockDimWallID, 0, Material.iron)).setLightValue(1.0F).setHardness(0.1F).setUnlocalizedName("blockDimWall");
|
||||
blockDimWallPerm = (new BlockDimWallPerm(blockDimWallPermID, 0, Material.iron)).setLightValue(1.0F).setBlockUnbreakable().setHardness(100000.0F).setUnlocalizedName("blockDimWallPerm");
|
||||
ExitDoor = (new ExitDoor(ExitDoorID, Material.wood)).setHardness(1.0F) .setUnlocalizedName("dimDoorWarp");
|
||||
linkExitDoor = (new linkExitDoor(linkExitDoorID, Material.wood)).setHardness(1.0F) .setUnlocalizedName("dimDoorexitlink");
|
||||
blockRift = (new BlockRift(blockRiftID, 0, Material.air).setHardness(1.0F) .setUnlocalizedName("rift"));
|
||||
blockLimbo = (new BlockLimbo(blockLimboID, 15, Material.iron).setHardness(.2F).setUnlocalizedName("BlockLimbo").setLightValue(.0F));
|
||||
chaosDoor = (new ChaosDoor(chaosDoorID, Material.iron).setHardness(.2F).setUnlocalizedName("chaosDoor").setLightValue(.0F) );
|
||||
dimDoor = (new dimDoor(dimDoorID, Material.iron)).setHardness(1.0F).setResistance(2000.0F) .setUnlocalizedName("dimDoor");
|
||||
dimHatch = (new dimHatch(dimHatchID, 84, Material.iron)).setHardness(1.0F) .setUnlocalizedName("dimHatch");
|
||||
// dimRail = (new DimRail(dimRailID, 88, false)).setHardness(.5F) .setUnlocalizedName("dimRail");
|
||||
|
||||
itemDimDoor = (new itemDimDoor(itemDimDoorID, Material.iron)).setItemName("itemDimDoor");
|
||||
itemExitDoor = (new itemExitDoor(itemExitDoorID, Material.wood)).setItemName("itemDimDoorexit");
|
||||
itemLinkSignature = (new itemLinkSignature(itemLinkSignatureID, Material.wood)).setItemName("itemLinkSignature");
|
||||
itemRiftRemover = (new itemRiftRemover(itemRiftRemoverID, Material.wood)).setItemName("itemRiftRemover");
|
||||
itemStableFabric = (new ItemStableFabric(itemStableFabricID, 0)).setItemName("itemStableFabric");
|
||||
itemChaosDoor = (new ItemChaosDoor(itemChaosDoorID, Material.iron)).setItemName("itemChaosDoor");
|
||||
itemRiftBlade = (new ItemRiftBlade(itemRiftBladeID, Material.iron)).setItemName("ItemRiftBlade");
|
||||
itemDimDoor = (new itemDimDoor(itemDimDoorID, Material.iron)).setUnlocalizedName("itemDimDoor");
|
||||
itemExitDoor = (new itemExitDoor(itemExitDoorID, Material.wood)).setUnlocalizedName("itemDimDoorWarp");
|
||||
itemLinkSignature = (new itemLinkSignature(itemLinkSignatureID, Material.wood)).setUnlocalizedName("itemLinkSignature");
|
||||
itemRiftRemover = (new itemRiftRemover(itemRiftRemoverID, Material.wood)).setUnlocalizedName("itemRiftRemover");
|
||||
itemStableFabric = (new ItemStableFabric(itemStableFabricID, 0)).setUnlocalizedName("itemStableFabric");
|
||||
itemChaosDoor = (new ItemChaosDoor(itemChaosDoorID, Material.iron)).setUnlocalizedName("itemChaosDoor");
|
||||
itemRiftBlade = (new ItemRiftBlade(itemRiftBladeID, Material.iron)).setUnlocalizedName("ItemRiftBlade");
|
||||
|
||||
|
||||
proxy.loadTextures();
|
||||
|
@ -568,7 +576,7 @@ public class mod_pocketDim
|
|||
|
||||
|
||||
this.metadataFlipList.add(Block.dispenser.blockID);
|
||||
this.metadataFlipList.add(Block.stairsStoneBrickSmooth.blockID);
|
||||
this.metadataFlipList.add(Block.stairsStoneBrick.blockID);
|
||||
this.metadataFlipList.add(Block.lever.blockID);
|
||||
this.metadataFlipList.add(Block.stoneButton.blockID);
|
||||
this.metadataFlipList.add(Block.redstoneRepeaterIdle.blockID);
|
||||
|
|
|
@ -205,11 +205,7 @@ public class pocketTeleporter extends Teleporter
|
|||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean func_85188_a(Entity par1Entity)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_85189_a(long par1)
|
||||
{
|
||||
|
|
|
@ -14,11 +14,11 @@ public class ClientProxy extends CommonProxy
|
|||
public void registerRenderers()
|
||||
{
|
||||
|
||||
MinecraftForgeClient.preloadTexture(BLOCK_PNG);
|
||||
//MinecraftForgeClient.preloadTexture(BLOCK_PNG);
|
||||
MinecraftForgeClient.preloadTexture(WARP_PNG);
|
||||
MinecraftForgeClient.preloadTexture(RIFT_PNG);
|
||||
|
||||
MinecraftForgeClient.preloadTexture(RIFT2_PNG);
|
||||
//MinecraftForgeClient.preloadTexture(RIFT2_PNG);
|
||||
|
||||
|
||||
|
||||
|
@ -29,28 +29,9 @@ public class ClientProxy extends CommonProxy
|
|||
public void loadTextures()
|
||||
{
|
||||
|
||||
mod_pocketDim.itemStableFabric.setIconIndex(9).setItemName("451");
|
||||
mod_pocketDim.itemRiftBlade.setIconIndex(10).setItemName("445");
|
||||
|
||||
|
||||
mod_pocketDim.itemDimDoor.setIconIndex(8).setItemName("45");
|
||||
mod_pocketDim.itemExitDoor.setIconIndex(7).setItemName("233");
|
||||
mod_pocketDim.itemLinkSignature.setIconIndex(5).setItemName("5");
|
||||
mod_pocketDim.itemRiftRemover.setIconIndex(6).setItemName("6");
|
||||
mod_pocketDim.blockRift.blockIndexInTexture=0;
|
||||
mod_pocketDim.blockDimWall.blockIndexInTexture=0;
|
||||
mod_pocketDim.blockLimbo.blockIndexInTexture=15;
|
||||
mod_pocketDim.itemChaosDoor.setIconIndex(21).setItemName("9");
|
||||
|
||||
mod_pocketDim.blockDimWallPerm.blockIndexInTexture=0;
|
||||
mod_pocketDim.blockRift.blockIndexInTexture=200;
|
||||
mod_pocketDim.dimDoor.blockIndexInTexture=18;
|
||||
// mod_pocketDim.dimRail.blockIndexInTexture=13;
|
||||
mod_pocketDim.ExitDoor.blockIndexInTexture=19;
|
||||
mod_pocketDim.chaosDoor.blockIndexInTexture=30;
|
||||
mod_pocketDim.transientDoor.blockIndexInTexture=200;
|
||||
|
||||
mod_pocketDim.linkDimDoor.blockIndexInTexture=17;
|
||||
mod_pocketDim.linkExitDoor.blockIndexInTexture=20;
|
||||
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDimDoor.class, new RenderDimDoor());
|
||||
|
|
|
@ -23,7 +23,7 @@ public class ClosingRiftFX extends EntityFX
|
|||
|
||||
public ClosingRiftFX(World par1World, double par2, double par4, double par6, double par8, double par10, double par12, EffectRenderer par14EffectRenderer)
|
||||
{
|
||||
|
||||
|
||||
super(par1World, par2, par4, par6);
|
||||
this.motionX = par8;
|
||||
this.motionY = par10;
|
||||
|
@ -62,16 +62,16 @@ public class ClosingRiftFX extends EntityFX
|
|||
}
|
||||
|
||||
/**
|
||||
* returns the bounding box for this entity
|
||||
*/
|
||||
* returns the bounding box for this entity
|
||||
*/
|
||||
public AxisAlignedBB getBoundingBox()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this entity should push and be pushed by other entities when colliding.
|
||||
*/
|
||||
* Returns true if this entity should push and be pushed by other entities when colliding.
|
||||
*/
|
||||
public boolean canBePushed()
|
||||
{
|
||||
return false;
|
||||
|
@ -87,9 +87,9 @@ public class ClosingRiftFX extends EntityFX
|
|||
|
||||
public void doRenderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
float var8 = (float)(super.getParticleTextureIndex() % 16) / 16.0F;
|
||||
float var8 = (float)(super.particleTextureIndexX % 16) / 16.0F;
|
||||
float var9 = var8 + 0.0624375F;
|
||||
float var10 = (float)(this.getParticleTextureIndex() / 16) / 16.0F;
|
||||
float var10 = (float)(this.particleTextureIndexX / 16) / 16.0F;
|
||||
float var11 = var10 + 0.0624375F;
|
||||
float var12 = 0.1F * this.particleScale;
|
||||
float var13 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)par2 - interpPosX);
|
||||
|
@ -98,18 +98,18 @@ public class ClosingRiftFX extends EntityFX
|
|||
float var16 = .8F;
|
||||
try
|
||||
{
|
||||
if(dimHelper.dimList.get(this.worldObj.provider.dimensionId).isPocket)
|
||||
{
|
||||
var16=.4F;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
if(dimHelper.dimList.get(this.worldObj.provider.dimensionId).isPocket)
|
||||
{
|
||||
var16=.4F;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
catch(Exception E)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
par1Tessellator.setColorRGBA_F(this.particleRed * var16, this.particleGreen * var16, this.particleBlue * var16, (float) .7);
|
||||
|
||||
|
@ -120,8 +120,8 @@ public class ClosingRiftFX extends EntityFX
|
|||
}
|
||||
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
public void onUpdate()
|
||||
{
|
||||
this.prevPosX = this.posX;
|
||||
|
@ -183,10 +183,10 @@ public class ClosingRiftFX extends EntityFX
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets how bright this entity is.
|
||||
*/
|
||||
* Gets how bright this entity is.
|
||||
*/
|
||||
public float getBrightness(float par1)
|
||||
{
|
||||
return 1.0F;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ package StevenDimDoors.mod_pocketDimClient;
|
|||
import StevenDimDoors.mod_pocketDim.dimHelper;
|
||||
import net.minecraft.client.particle.EffectRenderer;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.particle.EntityFireworkSparkFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -10,7 +11,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GoggleRiftFX extends EntityFX
|
||||
public class GoggleRiftFX extends EntityFireworkSparkFX
|
||||
{
|
||||
private int field_92049_a = 160;
|
||||
private boolean field_92054_ax;
|
||||
|
@ -24,7 +25,7 @@ public class GoggleRiftFX extends EntityFX
|
|||
public GoggleRiftFX(World par1World, double par2, double par4, double par6, double par8, double par10, double par12, EffectRenderer par14EffectRenderer)
|
||||
{
|
||||
|
||||
super(par1World, par2, par4, par6);
|
||||
super(par1World, par2, par4, par6, par12, par12, par12, par14EffectRenderer);
|
||||
this.motionX = par8;
|
||||
this.motionY = par10;
|
||||
this.motionZ = par12;
|
||||
|
@ -33,6 +34,48 @@ public class GoggleRiftFX extends EntityFX
|
|||
this.particleMaxAge = 30 + this.rand.nextInt(16);
|
||||
this.noClip = false;
|
||||
}
|
||||
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
if (!this.field_92048_ay || this.particleAge < this.particleMaxAge / 3 || (this.particleAge + this.particleMaxAge) / 3 % 2 == 0)
|
||||
{
|
||||
this.doRenderParticle(par1Tessellator, par2, par3, par4, par5, par6, par7);
|
||||
}
|
||||
}
|
||||
|
||||
public void doRenderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
float var8 = (float)(super.particleTextureIndexX % 16) / 16.0F;
|
||||
float var9 = var8 + 0.0624375F;
|
||||
float var10 = (float)(this.particleTextureIndexX / 16) / 16.0F;
|
||||
float var11 = var10 + 0.0624375F;
|
||||
float var12 = 0.1F * this.particleScale;
|
||||
float var13 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)par2 - interpPosX);
|
||||
float var14 = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)par2 - interpPosY);
|
||||
float var15 = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)par2 - interpPosZ);
|
||||
float var16 = .0F;
|
||||
try
|
||||
{
|
||||
if(dimHelper.dimList.get(this.worldObj.provider.dimensionId).isPocket)
|
||||
{
|
||||
var16=.7F;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
catch(Exception E)
|
||||
{
|
||||
|
||||
}
|
||||
par1Tessellator.setColorRGBA_F(this.particleRed * var16, this.particleGreen * var16, this.particleBlue * var16, (float) .7);
|
||||
|
||||
par1Tessellator.addVertexWithUV((double)(var13 - par3 * var12 - par6 * var12), (double)(var14 - par4 * var12), (double)(var15 - par5 * var12 - par7 * var12), (double)var9, (double)var11);
|
||||
par1Tessellator.addVertexWithUV((double)(var13 - par3 * var12 + par6 * var12), (double)(var14 + par4 * var12), (double)(var15 - par5 * var12 + par7 * var12), (double)var9, (double)var10);
|
||||
par1Tessellator.addVertexWithUV((double)(var13 + par3 * var12 + par6 * var12), (double)(var14 + par4 * var12), (double)(var15 + par5 * var12 + par7 * var12), (double)var8, (double)var10);
|
||||
par1Tessellator.addVertexWithUV((double)(var13 + par3 * var12 - par6 * var12), (double)(var14 - par4 * var12), (double)(var15 + par5 * var12 - par7 * var12), (double)var8, (double)var11);
|
||||
}
|
||||
|
||||
|
||||
public void func_92045_e(boolean par1)
|
||||
{
|
||||
|
@ -77,48 +120,8 @@ public class GoggleRiftFX extends EntityFX
|
|||
return false;
|
||||
}
|
||||
|
||||
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
if (!this.field_92048_ay || this.particleAge < this.particleMaxAge / 3 || (this.particleAge + this.particleMaxAge) / 3 % 2 == 0)
|
||||
{
|
||||
this.doRenderParticle(par1Tessellator, par2, par3, par4, par5, par6, par7);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void doRenderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
float var8 = (float)(super.getParticleTextureIndex() % 16) / 16.0F;
|
||||
float var9 = var8 + 0.0624375F;
|
||||
float var10 = (float)(this.getParticleTextureIndex() / 16) / 16.0F;
|
||||
float var11 = var10 + 0.0624375F;
|
||||
float var12 = 0.1F * this.particleScale;
|
||||
float var13 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)par2 - interpPosX);
|
||||
float var14 = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)par2 - interpPosY);
|
||||
float var15 = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)par2 - interpPosZ);
|
||||
float var16 = .0F;
|
||||
try
|
||||
{
|
||||
if(dimHelper.dimList.get(this.worldObj.provider.dimensionId).isPocket)
|
||||
{
|
||||
var16=.7F;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
catch(Exception E)
|
||||
{
|
||||
|
||||
}
|
||||
par1Tessellator.setColorRGBA_F(this.particleRed * var16, this.particleGreen * var16, this.particleBlue * var16, (float) .7);
|
||||
|
||||
par1Tessellator.addVertexWithUV((double)(var13 - par3 * var12 - par6 * var12), (double)(var14 - par4 * var12), (double)(var15 - par5 * var12 - par7 * var12), (double)var9, (double)var11);
|
||||
par1Tessellator.addVertexWithUV((double)(var13 - par3 * var12 + par6 * var12), (double)(var14 + par4 * var12), (double)(var15 - par5 * var12 + par7 * var12), (double)var9, (double)var10);
|
||||
par1Tessellator.addVertexWithUV((double)(var13 + par3 * var12 + par6 * var12), (double)(var14 + par4 * var12), (double)(var15 + par5 * var12 + par7 * var12), (double)var8, (double)var10);
|
||||
par1Tessellator.addVertexWithUV((double)(var13 + par3 * var12 - par6 * var12), (double)(var14 - par4 * var12), (double)(var15 + par5 * var12 - par7 * var12), (double)var8, (double)var11);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
|
|
|
@ -3,6 +3,7 @@ package StevenDimDoors.mod_pocketDimClient;
|
|||
import StevenDimDoors.mod_pocketDim.dimHelper;
|
||||
import net.minecraft.client.particle.EffectRenderer;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.particle.EntityFireworkSparkFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -10,7 +11,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RiftFX extends EntityFX
|
||||
public class RiftFX extends EntityFireworkSparkFX
|
||||
{
|
||||
private int field_92049_a = 160;
|
||||
private boolean field_92054_ax;
|
||||
|
@ -24,7 +25,7 @@ public class RiftFX extends EntityFX
|
|||
public RiftFX(World par1World, double par2, double par4, double par6, double par8, double par10, double par12, EffectRenderer par14EffectRenderer)
|
||||
{
|
||||
|
||||
super(par1World, par2, par4, par6);
|
||||
super(par1World, par2, par4, par6, par12, par12, par12, par14EffectRenderer);
|
||||
this.motionX = par8;
|
||||
this.motionY = par10;
|
||||
this.motionZ = par12;
|
||||
|
@ -84,12 +85,11 @@ public class RiftFX extends EntityFX
|
|||
this.doRenderParticle(par1Tessellator, par2, par3, par4, par5, par6, par7);
|
||||
}
|
||||
}
|
||||
|
||||
public void doRenderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
float var8 = (float)(super.getParticleTextureIndex() % 16) / 16.0F;
|
||||
float var8 = (float)(super.particleTextureIndexX % 16) / 16.0F;
|
||||
float var9 = var8 + 0.0624375F;
|
||||
float var10 = (float)(this.getParticleTextureIndex() / 16) / 16.0F;
|
||||
float var10 = (float)(this.particleTextureIndexX / 16) / 16.0F;
|
||||
float var11 = var10 + 0.0624375F;
|
||||
float var12 = 0.1F * this.particleScale;
|
||||
float var13 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)par2 - interpPosX);
|
||||
|
@ -98,18 +98,18 @@ public class RiftFX extends EntityFX
|
|||
float var16 = .0F;
|
||||
try
|
||||
{
|
||||
if(dimHelper.dimList.get(this.worldObj.provider.dimensionId).isPocket)
|
||||
{
|
||||
var16=.7F;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
if(dimHelper.dimList.get(this.worldObj.provider.dimensionId).isPocket)
|
||||
{
|
||||
var16=.7F;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
catch(Exception E)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
par1Tessellator.setColorRGBA_F(this.particleRed * var16, this.particleGreen * var16, this.particleBlue * var16, (float) .7);
|
||||
|
||||
|
@ -119,6 +119,7 @@ public class RiftFX extends EntityFX
|
|||
par1Tessellator.addVertexWithUV((double)(var13 + par3 * var12 - par6 * var12), (double)(var14 - par4 * var12), (double)(var15 + par5 * var12 - par7 * var12), (double)var8, (double)var11);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
<property name="build.dir" value="build" />
|
||||
<property name="classes.dir" value="${build.dir}/packaging" />
|
||||
<property name="src.dir" value="src" />
|
||||
<property name="forge.version" value="1.4.7-6.6.2.534" />
|
||||
<property name="forge.version" value="1.5.1-7.7.1.617" />
|
||||
<property name="forge.url" value="http://files.minecraftforge.net/minecraftforge/minecraftforge-src-${forge.version}.zip" />
|
||||
<property name="mcp.version" value="726a" />
|
||||
<property name="mcp.version" value="744" />
|
||||
<property name="forge.dir" value="${build.dir}/forge" />
|
||||
<property name="mcp.dir" value="${forge.dir}/mcp" />
|
||||
<property name="mcpsrc.dir" value="${mcp.dir}/src/minecraft" />
|
||||
<property name="resources.dir" value="resources" />
|
||||
|
||||
<property name="package.meta-inf" value="META-INF" />
|
||||
<property name="build.ver" value="1.4.7" />
|
||||
<property name="build.ver" value="1.5.1" />
|
||||
<property name="dist.dir" value="${build.dir}/dist" />
|
||||
|
||||
<property name="download.dir" value="downloads" />
|
||||
|
@ -25,7 +25,7 @@
|
|||
|
||||
<property file="${forge.dir}/forgeversion.properties" />
|
||||
<condition property="forge.already.installed">
|
||||
<equals arg1="${forge.build.number}" arg2="534" />
|
||||
<equals arg1="${forge.build.number}" arg2="617" />
|
||||
</condition>
|
||||
|
||||
<property name="verclass.dir" value="${mcpsrc.dir}/StevenDimDoors/mod_pocketDim/" />
|
||||
|
|
BIN
resources/mods/DimensionalDoors/textures/blocks/BlockLimbo.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
resources/mods/DimensionalDoors/textures/blocks/blockDimWall.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 551 B |
After Width: | Height: | Size: 613 B |
After Width: | Height: | Size: 625 B |
After Width: | Height: | Size: 540 B |
After Width: | Height: | Size: 778 B |
After Width: | Height: | Size: 698 B |
After Width: | Height: | Size: 625 B |
BIN
resources/mods/DimensionalDoors/textures/blocks/dimDoor_top.png
Normal file
After Width: | Height: | Size: 540 B |
After Width: | Height: | Size: 778 B |
After Width: | Height: | Size: 698 B |
BIN
resources/mods/DimensionalDoors/textures/blocks/dimHatch.png
Normal file
After Width: | Height: | Size: 676 B |
BIN
resources/mods/DimensionalDoors/textures/blocks/rift.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
BIN
resources/mods/DimensionalDoors/textures/items/ItemRiftBlade.png
Normal file
After Width: | Height: | Size: 210 B |
BIN
resources/mods/DimensionalDoors/textures/items/dimDoorexit.png
Normal file
After Width: | Height: | Size: 194 B |
After Width: | Height: | Size: 210 B |
After Width: | Height: | Size: 194 B |
After Width: | Height: | Size: 217 B |
After Width: | Height: | Size: 189 B |
After Width: | Height: | Size: 205 B |
After Width: | Height: | Size: 205 B |
After Width: | Height: | Size: 173 B |
BIN
resources/mods/DimensionalDoors/textures/items/itemChaosDoor.png
Normal file
After Width: | Height: | Size: 217 B |
BIN
resources/mods/DimensionalDoors/textures/items/itemDimDoor.png
Normal file
After Width: | Height: | Size: 189 B |
After Width: | Height: | Size: 205 B |
After Width: | Height: | Size: 205 B |
After Width: | Height: | Size: 173 B |