@@ -109,15 +109,15 @@ public boolean checkRecipe(ItemStack aStack) {
109109 World w = getBaseMetaTileEntity ().getWorld ();
110110 if (w ==null ) return false ;
111111 Chunk c = w .getChunkProvider ().provideChunk (x >>4 ,z >>4 );
112- x = x & 15 ;
113- z = z & 15 ;
112+ int x1 = x & 15 ;
113+ int z1 = z & 15 ;
114114 int yTo = getYTo ();
115115 for (int yLevel = getYFrom (); yLevel >=yTo ; yLevel --)
116116 {
117- Block tBlock = c .getBlock (x ,yLevel ,z );
118- int tMetaID = c .getBlockMetadata (x ,yLevel ,z );
117+ Block tBlock = c .getBlock (x1 ,yLevel ,z1 );
118+ int tMetaID = c .getBlockMetadata (x1 ,yLevel ,z1 );
119119 if (tBlock instanceof GT_Block_Ores_Abstract ) {
120- TileEntity tTileEntity = c .getTileEntityUnsafe (x ,yLevel ,z );
120+ TileEntity tTileEntity = c .getTileEntityUnsafe (x1 ,yLevel ,z1 );
121121 if ((tTileEntity !=null )
122122 && (tTileEntity instanceof GT_TileEntity_Ores )
123123 && ((GT_TileEntity_Ores ) tTileEntity ).mNatural == true
@@ -144,7 +144,11 @@ public boolean checkRecipe(ItemStack aStack) {
144144 while ((tMineBlock ==null || tMineBlock == Blocks .air ) && !mMineList .isEmpty ()) {
145145 mle = mMineList .get (0 );
146146 mMineList .remove (0 );
147- tMineBlock = getBaseMetaTileEntity ().getBlock (mle .chunkPosX , mle .chunkPosY , mle .chunkPosZ );
147+ tMineBlock = getBaseMetaTileEntity ()
148+ .getWorld ()
149+ .getChunkProvider ()
150+ .provideChunk ( mle .chunkPosX >> 4 , mle .chunkPosZ >> 4 )
151+ .getBlock (mle .chunkPosX &15 , mle .chunkPosY , mle .chunkPosZ &15 );
148152 }
149153
150154 if (tMineBlock !=null && tMineBlock !=Blocks .air ) {
0 commit comments