Correct Stone Torch placement

master
tmcgeorge 2013-06-17 15:41:47 -05:00
parent 1b338fe6fa
commit 5716367529
1 changed files with 21 additions and 1 deletions

View File

@ -96,6 +96,26 @@ public class StoneTorch extends Block
{
int j1 = par9;
if (par5 == 0)
{
if (this.canPlaceTorchOn(par1World, par2, par3 - 1, par4))
{
j1 = 5;
}
else if (par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH, true)) {
j1 = 4;
}
else if (par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH, true)) {
j1 = 3;
}
else if (par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST, true)) {
j1 = 2;
}
else if (par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST, true)) {
j1 = 1;
}
}
if (par5 == 1 && this.canPlaceTorchOn(par1World, par2, par3 - 1, par4))
{
j1 = 5;