From d23812cb4c72d68cbbefb34eb1ff62faaad5c240 Mon Sep 17 00:00:00 2001 From: Eloraam Date: Wed, 3 Aug 2011 05:15:31 +0000 Subject: [PATCH] Added secondary block properties patch. --- .../src/forge/IBlockSecondaryProperties.java | 52 ++++ forge/minecraft.patch | 266 +++++++++++++++--- 2 files changed, 276 insertions(+), 42 deletions(-) create mode 100644 forge/forge_common/net/minecraft/src/forge/IBlockSecondaryProperties.java diff --git a/forge/forge_common/net/minecraft/src/forge/IBlockSecondaryProperties.java b/forge/forge_common/net/minecraft/src/forge/IBlockSecondaryProperties.java new file mode 100644 index 000000000..cb6482b53 --- /dev/null +++ b/forge/forge_common/net/minecraft/src/forge/IBlockSecondaryProperties.java @@ -0,0 +1,52 @@ +/** + * This software is provided under the terms of the Minecraft Forge Public + * License v1.0. + */ + +package net.minecraft.src.forge; + +import net.minecraft.src.EntityPlayer; +import net.minecraft.src.World; + +/** + * This interface provides access to a number of secondary block properties through providing + * overrides to methods within world.class. + */ + +public interface IBlockSecondaryProperties +{ + /** + * Return true if this block should be treated as a normal cube by game logic + * (this is independant of rendering), false otherwise. This allows for things like secondary + * blocks (torches, rails, redstone dust, etc.) being attached to the surface of + * the block regardless of whether it is opaque, or posesses other rendering properties that + * would not normally make this possible. + */ + public boolean isBlockNormalCube( World world, int i, int j, int k ); + + /** + * Return true if this block can be replaced by another by the player, false otherwise. This provides + * a means of allowing blocks to not be considered when the player attempts to place another within + * their bounds, in the same way that water, lava, fire, and some other blocks behave within the game. + * Provides an override to the coresponding section in canBlockBePlacedAt() in world.class + */ + public boolean isBlockReplaceable( World world, int i, int j, int k ); + + /** + * Return true if this block should set fire and deal fire damage to entities coming into contact with + * it, false otherwise. Provides an override to the related test within isBoundingBoxBurning() within + * world.class + */ + public boolean isBlockBurning( World world, int i, int j, int k ); + + /** + * Return true if this block should be treated as an air block by the rest of the code, false + * otherwise. This method is primarily useful for creating pure logic-blocks that will be invisible + * to the player and otherwise interact as air would. + * Provides an override to isAirBlock() within world.class + */ + public boolean isAirBlock( World world, int i, int j, int k ); + +} + + diff --git a/forge/minecraft.patch b/forge/minecraft.patch index fda4610c4..2b0d46c84 100644 --- a/forge/minecraft.patch +++ b/forge/minecraft.patch @@ -1,6 +1,6 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/BlockRedstoneWire.java ../src_work/minecraft/net/minecraft/src/BlockRedstoneWire.java ---- ../src_base/minecraft/net/minecraft/src/BlockRedstoneWire.java 2011-07-29 16:35:27.000000000 -0400 -+++ ../src_work/minecraft/net/minecraft/src/BlockRedstoneWire.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft/net/minecraft/src/BlockRedstoneWire.java 2011-08-02 16:05:38.000000000 -0400 ++++ ../src_work/minecraft/net/minecraft/src/BlockRedstoneWire.java 2011-08-02 16:07:39.000000000 -0400 @@ -3,6 +3,7 @@ // Decompiler options: packimports(3) braces deadcode @@ -21,8 +21,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/BlockReds { return true; diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Chunk.java ../src_work/minecraft/net/minecraft/src/Chunk.java ---- ../src_base/minecraft/net/minecraft/src/Chunk.java 2011-07-29 16:35:26.000000000 -0400 -+++ ../src_work/minecraft/net/minecraft/src/Chunk.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft/net/minecraft/src/Chunk.java 2011-08-02 16:05:38.000000000 -0400 ++++ ../src_work/minecraft/net/minecraft/src/Chunk.java 2011-08-02 16:07:39.000000000 -0400 @@ -3,6 +3,7 @@ // Decompiler options: packimports(3) braces deadcode @@ -60,8 +60,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Chunk.jav if(j1 != 0) { diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/EffectRenderer.java ../src_work/minecraft/net/minecraft/src/EffectRenderer.java ---- ../src_base/minecraft/net/minecraft/src/EffectRenderer.java 2011-07-29 16:35:27.000000000 -0400 -+++ ../src_work/minecraft/net/minecraft/src/EffectRenderer.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft/net/minecraft/src/EffectRenderer.java 2011-08-02 16:05:39.000000000 -0400 ++++ ../src_work/minecraft/net/minecraft/src/EffectRenderer.java 2011-08-02 16:07:40.000000000 -0400 @@ -7,6 +7,9 @@ import java.util.*; import org.lwjgl.opengl.GL11; @@ -205,8 +205,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/EffectRen private Random rand; } diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/EntityPlayer.java ../src_work/minecraft/net/minecraft/src/EntityPlayer.java ---- ../src_base/minecraft/net/minecraft/src/EntityPlayer.java 2011-07-29 16:35:27.000000000 -0400 -+++ ../src_work/minecraft/net/minecraft/src/EntityPlayer.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft/net/minecraft/src/EntityPlayer.java 2011-08-02 16:05:39.000000000 -0400 ++++ ../src_work/minecraft/net/minecraft/src/EntityPlayer.java 2011-08-02 16:07:41.000000000 -0400 @@ -6,6 +6,8 @@ import java.util.*; @@ -239,8 +239,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/EntityPla int k = i * j + damageRemainder; inventory.damageArmor(i); diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Explosion.java ../src_work/minecraft/net/minecraft/src/Explosion.java ---- ../src_base/minecraft/net/minecraft/src/Explosion.java 2011-07-29 16:35:27.000000000 -0400 -+++ ../src_work/minecraft/net/minecraft/src/Explosion.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft/net/minecraft/src/Explosion.java 2011-08-02 16:05:38.000000000 -0400 ++++ ../src_work/minecraft/net/minecraft/src/Explosion.java 2011-08-02 16:07:42.000000000 -0400 @@ -3,6 +3,7 @@ // Decompiler options: packimports(3) braces deadcode @@ -269,8 +269,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Explosion if(f1 > 0.0F) { diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemBucket.java ../src_work/minecraft/net/minecraft/src/ItemBucket.java ---- ../src_base/minecraft/net/minecraft/src/ItemBucket.java 2011-07-29 16:35:27.000000000 -0400 -+++ ../src_work/minecraft/net/minecraft/src/ItemBucket.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft/net/minecraft/src/ItemBucket.java 2011-08-02 16:05:39.000000000 -0400 ++++ ../src_work/minecraft/net/minecraft/src/ItemBucket.java 2011-08-02 16:07:42.000000000 -0400 @@ -6,6 +6,8 @@ import java.util.Random; @@ -295,8 +295,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemBucke { world.setBlockWithNotify(i, j, k, 0); diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemPickaxe.java ../src_work/minecraft/net/minecraft/src/ItemPickaxe.java ---- ../src_base/minecraft/net/minecraft/src/ItemPickaxe.java 2011-07-29 16:35:26.000000000 -0400 -+++ ../src_work/minecraft/net/minecraft/src/ItemPickaxe.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft/net/minecraft/src/ItemPickaxe.java 2011-08-02 16:05:38.000000000 -0400 ++++ ../src_work/minecraft/net/minecraft/src/ItemPickaxe.java 2011-08-02 16:07:42.000000000 -0400 @@ -4,6 +4,8 @@ package net.minecraft.src; @@ -317,8 +317,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemPicka { return true; diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemRenderer.java ../src_work/minecraft/net/minecraft/src/ItemRenderer.java ---- ../src_base/minecraft/net/minecraft/src/ItemRenderer.java 2011-07-29 16:35:27.000000000 -0400 -+++ ../src_work/minecraft/net/minecraft/src/ItemRenderer.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft/net/minecraft/src/ItemRenderer.java 2011-08-02 16:05:38.000000000 -0400 ++++ ../src_work/minecraft/net/minecraft/src/ItemRenderer.java 2011-08-02 16:07:42.000000000 -0400 @@ -5,6 +5,8 @@ package net.minecraft.src; @@ -348,8 +348,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemRende Tessellator tessellator = Tessellator.instance; int i = entityliving.getItemIcon(itemstack); diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemTool.java ../src_work/minecraft/net/minecraft/src/ItemTool.java ---- ../src_base/minecraft/net/minecraft/src/ItemTool.java 2011-07-29 16:35:27.000000000 -0400 -+++ ../src_work/minecraft/net/minecraft/src/ItemTool.java 2011-07-31 21:49:24.000000000 -0400 +--- ../src_base/minecraft/net/minecraft/src/ItemTool.java 2011-08-02 16:05:38.000000000 -0400 ++++ ../src_work/minecraft/net/minecraft/src/ItemTool.java 2011-08-02 16:07:42.000000000 -0400 @@ -4,6 +4,7 @@ package net.minecraft.src; @@ -371,8 +371,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemTool. + } } diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/PlayerController.java ../src_work/minecraft/net/minecraft/src/PlayerController.java ---- ../src_base/minecraft/net/minecraft/src/PlayerController.java 2011-07-29 16:35:27.000000000 -0400 -+++ ../src_work/minecraft/net/minecraft/src/PlayerController.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft/net/minecraft/src/PlayerController.java 2011-08-02 16:05:39.000000000 -0400 ++++ ../src_work/minecraft/net/minecraft/src/PlayerController.java 2011-08-02 16:07:42.000000000 -0400 @@ -3,6 +3,7 @@ // Decompiler options: packimports(3) braces deadcode @@ -395,8 +395,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/PlayerCon if(i1 > 0 && Block.blocksList[i1].blockActivated(world, i, j, k, entityplayer)) { diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/RenderItem.java ../src_work/minecraft/net/minecraft/src/RenderItem.java ---- ../src_base/minecraft/net/minecraft/src/RenderItem.java 2011-07-29 16:35:27.000000000 -0400 -+++ ../src_work/minecraft/net/minecraft/src/RenderItem.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft/net/minecraft/src/RenderItem.java 2011-08-02 16:05:39.000000000 -0400 ++++ ../src_work/minecraft/net/minecraft/src/RenderItem.java 2011-08-02 16:07:42.000000000 -0400 @@ -5,6 +5,9 @@ package net.minecraft.src; @@ -457,9 +457,100 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/RenderIte } int k1 = Item.itemsList[i].getColorFromDamage(j); float f = (float)(k1 >> 16 & 0xff) / 255F; +diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/World.java ../src_work/minecraft/net/minecraft/src/World.java +--- ../src_base/minecraft/net/minecraft/src/World.java 2011-08-02 16:05:38.000000000 -0400 ++++ ../src_work/minecraft/net/minecraft/src/World.java 2011-08-03 01:10:53.000000000 -0400 +@@ -7,6 +7,8 @@ + import java.io.PrintStream; + import java.util.*; + ++import net.minecraft.src.forge.IBlockSecondaryProperties; ++ + // Referenced classes of package net.minecraft.src: + // IBlockAccess, WorldProvider, WorldInfo, MapStorage, + // ISaveHandler, ChunkProvider, EntityPlayer, ChunkProviderLoadOrGenerate, +@@ -313,7 +315,25 @@ + + public boolean isAirBlock(int i, int j, int k) + { +- return getBlockId(i, j, k) == 0; ++ int iBlockID = getBlockId( i, j, k ); ++ ++ if ( iBlockID == 0 ) ++ { ++ return true; ++ } ++ else ++ { ++ Block block = Block.blocksList[iBlockID]; ++ ++ if ( block instanceof IBlockSecondaryProperties ) ++ { ++ return ((IBlockSecondaryProperties)block).isAirBlock( this, i, j, k ); ++ } ++ else ++ { ++ return false; ++ } ++ } + } + + public boolean blockExists(int i, int j, int k) +@@ -1608,6 +1628,18 @@ + { + return true; + } ++ else ++ { ++ Block block = Block.blocksList[j2]; ++ ++ if ( block instanceof IBlockSecondaryProperties ) ++ { ++ if ( ((IBlockSecondaryProperties)block).isBlockBurning( this, k1, i1, i2 ) ) ++ { ++ return true; ++ } ++ } ++ } + } + + } +@@ -1900,7 +1932,14 @@ + return false; + } else + { +- return block.blockMaterial.getIsTranslucent() && block.renderAsNormalBlock(); ++ if ( block instanceof IBlockSecondaryProperties ) ++ { ++ return ((IBlockSecondaryProperties)block).isBlockNormalCube( this, i, j, k ); ++ } ++ else ++ { ++ return block.blockMaterial.getIsTranslucent() && block.renderAsNormalBlock(); ++ } + } + } + +@@ -2425,6 +2464,16 @@ + { + block = null; + } ++ else ++ { ++ if ( block instanceof IBlockSecondaryProperties ) ++ { ++ if ( ((IBlockSecondaryProperties)block).isBlockReplaceable( this, j, k, l ) ) ++ { ++ block = null; ++ } ++ } ++ } + return i > 0 && block == null && block1.canPlaceBlockOnSide(this, j, k, l, i1); + } + diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/WorldRenderer.java ../src_work/minecraft/net/minecraft/src/WorldRenderer.java ---- ../src_base/minecraft/net/minecraft/src/WorldRenderer.java 2011-07-29 16:35:27.000000000 -0400 -+++ ../src_work/minecraft/net/minecraft/src/WorldRenderer.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft/net/minecraft/src/WorldRenderer.java 2011-08-02 16:05:39.000000000 -0400 ++++ ../src_work/minecraft/net/minecraft/src/WorldRenderer.java 2011-08-02 16:07:42.000000000 -0400 @@ -3,8 +3,12 @@ // Decompiler options: packimports(3) braces deadcode @@ -503,8 +594,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/WorldRend } diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/BlockRedstoneWire.java ../src_work/minecraft_server/net/minecraft/src/BlockRedstoneWire.java ---- ../src_base/minecraft_server/net/minecraft/src/BlockRedstoneWire.java 2011-07-29 16:35:28.000000000 -0400 -+++ ../src_work/minecraft_server/net/minecraft/src/BlockRedstoneWire.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft_server/net/minecraft/src/BlockRedstoneWire.java 2011-08-02 16:05:40.000000000 -0400 ++++ ../src_work/minecraft_server/net/minecraft/src/BlockRedstoneWire.java 2011-08-02 16:07:43.000000000 -0400 @@ -3,6 +3,7 @@ // Decompiler options: packimports(3) braces deadcode @@ -525,8 +616,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Bl { return true; diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Chunk.java ../src_work/minecraft_server/net/minecraft/src/Chunk.java ---- ../src_base/minecraft_server/net/minecraft/src/Chunk.java 2011-07-29 16:35:28.000000000 -0400 -+++ ../src_work/minecraft_server/net/minecraft/src/Chunk.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft_server/net/minecraft/src/Chunk.java 2011-08-02 16:05:39.000000000 -0400 ++++ ../src_work/minecraft_server/net/minecraft/src/Chunk.java 2011-08-02 16:07:43.000000000 -0400 @@ -3,6 +3,7 @@ // Decompiler options: packimports(3) braces deadcode @@ -564,8 +655,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Ch if(j1 != 0) { diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/EntityPlayer.java ../src_work/minecraft_server/net/minecraft/src/EntityPlayer.java ---- ../src_base/minecraft_server/net/minecraft/src/EntityPlayer.java 2011-07-29 16:35:28.000000000 -0400 -+++ ../src_work/minecraft_server/net/minecraft/src/EntityPlayer.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft_server/net/minecraft/src/EntityPlayer.java 2011-08-02 16:05:40.000000000 -0400 ++++ ../src_work/minecraft_server/net/minecraft/src/EntityPlayer.java 2011-08-02 16:07:43.000000000 -0400 @@ -6,6 +6,8 @@ import java.util.*; @@ -598,8 +689,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/En int k = i * j + damageRemainder; inventory.damageArmor(i); diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Explosion.java ../src_work/minecraft_server/net/minecraft/src/Explosion.java ---- ../src_base/minecraft_server/net/minecraft/src/Explosion.java 2011-07-29 16:35:28.000000000 -0400 -+++ ../src_work/minecraft_server/net/minecraft/src/Explosion.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft_server/net/minecraft/src/Explosion.java 2011-08-02 16:05:39.000000000 -0400 ++++ ../src_work/minecraft_server/net/minecraft/src/Explosion.java 2011-08-02 16:07:43.000000000 -0400 @@ -3,6 +3,7 @@ // Decompiler options: packimports(3) braces deadcode @@ -627,8 +718,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Ex if(f1 > 0.0F) { diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/ItemBucket.java ../src_work/minecraft_server/net/minecraft/src/ItemBucket.java ---- ../src_base/minecraft_server/net/minecraft/src/ItemBucket.java 2011-07-29 16:35:28.000000000 -0400 -+++ ../src_work/minecraft_server/net/minecraft/src/ItemBucket.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft_server/net/minecraft/src/ItemBucket.java 2011-08-02 16:05:40.000000000 -0400 ++++ ../src_work/minecraft_server/net/minecraft/src/ItemBucket.java 2011-08-02 16:07:43.000000000 -0400 @@ -6,6 +6,8 @@ import java.util.Random; @@ -653,8 +744,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/It { world.setBlockWithNotify(i, j, k, 0); diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/ItemInWorldManager.java ../src_work/minecraft_server/net/minecraft/src/ItemInWorldManager.java ---- ../src_base/minecraft_server/net/minecraft/src/ItemInWorldManager.java 2011-07-29 16:35:28.000000000 -0400 -+++ ../src_work/minecraft_server/net/minecraft/src/ItemInWorldManager.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft_server/net/minecraft/src/ItemInWorldManager.java 2011-08-02 16:05:39.000000000 -0400 ++++ ../src_work/minecraft_server/net/minecraft/src/ItemInWorldManager.java 2011-08-02 16:07:43.000000000 -0400 @@ -3,6 +3,7 @@ // Decompiler options: packimports(3) braces deadcode @@ -676,8 +767,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/It if(i1 > 0 && Block.blocksList[i1].blockActivated(world, i, j, k, entityplayer)) { diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/ItemPickaxe.java ../src_work/minecraft_server/net/minecraft/src/ItemPickaxe.java ---- ../src_base/minecraft_server/net/minecraft/src/ItemPickaxe.java 2011-07-29 16:35:28.000000000 -0400 -+++ ../src_work/minecraft_server/net/minecraft/src/ItemPickaxe.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft_server/net/minecraft/src/ItemPickaxe.java 2011-08-02 16:05:39.000000000 -0400 ++++ ../src_work/minecraft_server/net/minecraft/src/ItemPickaxe.java 2011-08-02 16:07:43.000000000 -0400 @@ -4,6 +4,8 @@ package net.minecraft.src; @@ -698,8 +789,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/It { return true; diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/ItemTool.java ../src_work/minecraft_server/net/minecraft/src/ItemTool.java ---- ../src_base/minecraft_server/net/minecraft/src/ItemTool.java 2011-07-29 16:35:28.000000000 -0400 -+++ ../src_work/minecraft_server/net/minecraft/src/ItemTool.java 2011-07-31 21:49:37.000000000 -0400 +--- ../src_base/minecraft_server/net/minecraft/src/ItemTool.java 2011-08-02 16:05:39.000000000 -0400 ++++ ../src_work/minecraft_server/net/minecraft/src/ItemTool.java 2011-08-02 16:07:43.000000000 -0400 @@ -4,6 +4,8 @@ package net.minecraft.src; @@ -722,8 +813,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/It + } } diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/PlayerInstance.java ../src_work/minecraft_server/net/minecraft/src/PlayerInstance.java ---- ../src_base/minecraft_server/net/minecraft/src/PlayerInstance.java 2011-07-29 16:35:28.000000000 -0400 -+++ ../src_work/minecraft_server/net/minecraft/src/PlayerInstance.java 2011-07-31 21:44:50.000000000 -0400 +--- ../src_base/minecraft_server/net/minecraft/src/PlayerInstance.java 2011-08-02 16:05:40.000000000 -0400 ++++ ../src_work/minecraft_server/net/minecraft/src/PlayerInstance.java 2011-08-02 16:07:43.000000000 -0400 @@ -169,12 +169,11 @@ sendPacketToPlayersInInstance(new Packet52MultiBlockChange(chunkX, chunkZ, blocksToUpdate, numBlocksToUpdate, worldserver)); for(int k = 0; k < numBlocksToUpdate; k++) @@ -740,3 +831,94 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Pl updateTileEntity(worldserver.getBlockTileEntity(j1, i2, k2)); } } +diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/World.java ../src_work/minecraft_server/net/minecraft/src/World.java +--- ../src_base/minecraft_server/net/minecraft/src/World.java 2011-08-02 16:05:39.000000000 -0400 ++++ ../src_work/minecraft_server/net/minecraft/src/World.java 2011-08-03 01:10:51.000000000 -0400 +@@ -7,6 +7,8 @@ + import java.io.PrintStream; + import java.util.*; + ++import net.minecraft.src.forge.IBlockSecondaryProperties; ++ + // Referenced classes of package net.minecraft.src: + // IBlockAccess, WorldProvider, MapStorage, ISaveHandler, + // WorldInfo, ChunkProvider, IChunkProvider, IProgressUpdate, +@@ -166,7 +168,25 @@ + + public boolean isAirBlock(int i, int j, int k) + { +- return getBlockId(i, j, k) == 0; ++ int iBlockID = getBlockId( i, j, k ); ++ ++ if ( iBlockID == 0 ) ++ { ++ return true; ++ } ++ else ++ { ++ Block block = Block.blocksList[iBlockID]; ++ ++ if ( block instanceof IBlockSecondaryProperties ) ++ { ++ return ((IBlockSecondaryProperties)block).isAirBlock( this, i, j, k ); ++ } ++ else ++ { ++ return false; ++ } ++ } + } + + public boolean blockExists(int i, int j, int k) +@@ -1409,6 +1429,18 @@ + { + return true; + } ++ else ++ { ++ Block block = Block.blocksList[j2]; ++ ++ if ( block instanceof IBlockSecondaryProperties ) ++ { ++ if ( ((IBlockSecondaryProperties)block).isBlockBurning( this, k1, i1, i2 ) ) ++ { ++ return true; ++ } ++ } ++ } + } + + } +@@ -1686,7 +1718,14 @@ + return false; + } else + { +- return block.blockMaterial.getIsOpaque() && block.isACube(); ++ if ( block instanceof IBlockSecondaryProperties ) ++ { ++ return ((IBlockSecondaryProperties)block).isBlockNormalCube( this, i, j, k ); ++ } ++ else ++ { ++ return block.blockMaterial.getIsOpaque() && block.isACube(); ++ } + } + } + +@@ -2178,6 +2217,16 @@ + { + block = null; + } ++ else ++ { ++ if ( block instanceof IBlockSecondaryProperties ) ++ { ++ if ( ((IBlockSecondaryProperties)block).isBlockReplaceable( this, j, k, l ) ) ++ { ++ block = null; ++ } ++ } ++ } + return i > 0 && block == null && block1.canPlaceBlockOnSide(this, j, k, l, i1); + } +