Fix Sigil of the Phantom Bridge
I'm tentatively considering this fixed. I'd rather not do it this way, but it seems to work...
This commit is contained in:
parent
0d70eb359e
commit
9950b32d53
3 changed files with 39 additions and 29 deletions
|
@ -1,11 +1,8 @@
|
|||
package WayofTime.bloodmagic.item.sigil;
|
||||
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.tile.TilePhantomBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -28,9 +25,6 @@ public class ItemSigilPhantomBridge extends ItemSigilToggleable
|
|||
if (player.isSneaking())
|
||||
verticalOffset--;
|
||||
|
||||
if (world.isRemote)
|
||||
verticalOffset--;
|
||||
|
||||
int posX = (int) Math.round(player.posX - 0.5f);
|
||||
int posY = (int) player.posY;
|
||||
int posZ = (int) Math.round(player.posZ - 0.5f);
|
||||
|
@ -40,25 +34,9 @@ public class ItemSigilPhantomBridge extends ItemSigilToggleable
|
|||
for (int iz = posZ - range; iz <= posZ + range; iz++)
|
||||
{
|
||||
BlockPos blockPos = new BlockPos(ix, posY + verticalOffset, iz);
|
||||
Block block = world.getBlockState(blockPos).getBlock();
|
||||
|
||||
if (world.isAirBlock(blockPos))
|
||||
{
|
||||
world.setBlockState(blockPos, ModBlocks.phantomBlock.getDefaultState(), 3);
|
||||
|
||||
TileEntity tile = world.getTileEntity(blockPos);
|
||||
if (tile instanceof TilePhantomBlock)
|
||||
{
|
||||
((TilePhantomBlock) tile).setDuration(100);
|
||||
}
|
||||
} else if (block == ModBlocks.phantomBlock)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(blockPos);
|
||||
if (tile instanceof TilePhantomBlock)
|
||||
{
|
||||
((TilePhantomBlock) tile).setDuration(100);
|
||||
}
|
||||
}
|
||||
world.setBlockState(blockPos, ModBlocks.phantomBlock.getDefaultState());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue