Mapping updates.

This commit is contained in:
Eloraam 2011-12-21 23:09:18 +00:00
parent 3f8d830899
commit dd1eb6924d
8 changed files with 10 additions and 10 deletions

View file

@ -38,7 +38,7 @@
- float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F; - float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
- EntityItem entityitem = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.seeds)); - EntityItem entityitem = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.seeds));
- entityitem.delayBeforeCanPickup = 10; - entityitem.delayBeforeCanPickup = 10;
- world.entityJoinedWorld(entityitem); - world.spawnEntityInWorld(entityitem);
+ tr.add(new ItemStack(Item.seeds)); + tr.add(new ItemStack(Item.seeds));
} }
} }

View file

@ -11,7 +11,7 @@
- double d2 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D; - double d2 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
- EntityItem entityitem = new EntityItem(world, (double)i + d, (double)j + d1, (double)k + d2, new ItemStack(i1, 1, 0)); - EntityItem entityitem = new EntityItem(world, (double)i + d, (double)j + d1, (double)k + d2, new ItemStack(i1, 1, 0));
- entityitem.delayBeforeCanPickup = 10; - entityitem.delayBeforeCanPickup = 10;
- world.entityJoinedWorld(entityitem); - world.spawnEntityInWorld(entityitem);
- world.setBlockWithNotify(i, j, k, 0); - world.setBlockWithNotify(i, j, k, 0);
+ +
+ dropBlockAsItem(world,i,j,k,l,0); + dropBlockAsItem(world,i,j,k,l,0);

View file

@ -30,7 +30,7 @@
public void dropPlayerItem(ItemStack itemstack) public void dropPlayerItem(ItemStack itemstack)
@@ -548,6 +561,8 @@ @@ -548,6 +561,8 @@
worldObj.entityJoinedWorld(entityitem); worldObj.spawnEntityInWorld(entityitem);
} }
+ /* FORGE: This isnt called anymore + /* FORGE: This isnt called anymore
@ -107,7 +107,7 @@
+ return; + return;
+ } + }
+ +
if(!damagesource.unblockable() && func_35162_ad()) if(!damagesource.isUnblockable() && func_35162_ad())
{ {
i = 1 + i >> 1; i = 1 + i >> 1;
@@ -825,7 +898,9 @@ @@ -825,7 +898,9 @@

View file

@ -137,7 +137,7 @@
+ * others. + * others.
+ */ + */
+ public boolean isBlockNormalCube(World world, int i, int j, int k) { + public boolean isBlockNormalCube(World world, int i, int j, int k) {
+ return blockMaterial.getIsOpaque() && isACube(); + return blockMaterial.getIsOpaque() && renderAsNormalBlock();
+ } + }
+ +
+ /* FORGE: Return true if the block is solid on the given side. This + /* FORGE: Return true if the block is solid on the given side. This

View file

@ -109,7 +109,7 @@
+ return; + return;
+ } + }
+ +
if(!damagesource.unblockable() && func_35180_G()) if(!damagesource.isUnblockable() && func_35180_G())
{ {
i = 1 + i >> 1; i = 1 + i >> 1;
@@ -770,7 +843,9 @@ @@ -770,7 +843,9 @@

View file

@ -19,6 +19,6 @@
+ return customBucket; + return customBucket;
+ } + }
+ +
if(!entityplayer.func_35200_c(i, j, k)) if(!entityplayer.canPlayerEdit(i, j, k))
{ {
return itemstack; return itemstack;

View file

@ -12,8 +12,8 @@
public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l) public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l)
{ {
- if(!entityplayer.func_35200_c(i, j, k)) - if(!entityplayer.canPlayerEdit(i, j, k))
+ if(entityplayer!=null && !entityplayer.func_35200_c(i, j, k)) + if(entityplayer!=null && !entityplayer.canPlayerEdit(i, j, k))
{ {
return false; return false;
} }

View file

@ -154,7 +154,7 @@
- return false; - return false;
- } else - } else
- { - {
- return block.blockMaterial.getIsOpaque() && block.isACube(); - return block.blockMaterial.getIsOpaque() && block.renderAsNormalBlock();
- } - }
+ if(block == null) return false; + if(block == null) return false;
+ return block.isBlockNormalCube(this,i,j,k); + return block.isBlockNormalCube(this,i,j,k);