Made all block fields final
This commit is contained in:
parent
f244f2c053
commit
537ccc092c
25 changed files with 242 additions and 254 deletions
|
@ -9,7 +9,6 @@ import WayofTime.bloodmagic.api.teleport.PortalLocation;
|
|||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.ritual.portal.LocationsHandler;
|
||||
import WayofTime.bloodmagic.tile.TileDimensionalPortal;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -56,7 +55,7 @@ public class RitualPortal extends Ritual
|
|||
{
|
||||
for (int k = z - 2; k <= z + 2; k++)
|
||||
{
|
||||
if (!world.isAirBlock(new BlockPos(i, y, k)) && !(getBlockState(world, i, y, k).getBlock() == ModBlocks.ritualStone))
|
||||
if (!world.isAirBlock(new BlockPos(i, y, k)) && !(getBlockState(world, i, y, k).getBlock() == ModBlocks.RITUAL_STONE))
|
||||
{
|
||||
blockState = getBlockState(world, i, y, k);
|
||||
name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
|
||||
|
@ -65,7 +64,7 @@ public class RitualPortal extends Ritual
|
|||
}
|
||||
for (int j = y + 1; j <= y + 5; j++)
|
||||
{
|
||||
if (!world.isAirBlock(new BlockPos(x - 3, j, z)) && !(getBlockState(world, x - 3, j, z).getBlock() == ModBlocks.ritualStone))
|
||||
if (!world.isAirBlock(new BlockPos(x - 3, j, z)) && !(getBlockState(world, x - 3, j, z).getBlock() == ModBlocks.RITUAL_STONE))
|
||||
{
|
||||
blockState = getBlockState(world, x - 3, j, z);
|
||||
name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
|
||||
|
@ -73,7 +72,7 @@ public class RitualPortal extends Ritual
|
|||
}
|
||||
for (int j = y + 1; j <= y + 5; j++)
|
||||
{
|
||||
if (!world.isAirBlock(new BlockPos(x + 3, j, z)) && !(getBlockState(world, x + 3, j, z) == ModBlocks.ritualStone))
|
||||
if (!world.isAirBlock(new BlockPos(x + 3, j, z)) && !(getBlockState(world, x + 3, j, z) == ModBlocks.RITUAL_STONE))
|
||||
{
|
||||
blockState = getBlockState(world, x + 3, j, z);
|
||||
name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
|
||||
|
@ -85,7 +84,7 @@ public class RitualPortal extends Ritual
|
|||
{
|
||||
for (int i = x - 2; i <= x + 2; i++)
|
||||
{
|
||||
if (!world.isAirBlock(new BlockPos(i, y, k)) && !(getBlockState(world, i, y, k).getBlock() == ModBlocks.ritualStone))
|
||||
if (!world.isAirBlock(new BlockPos(i, y, k)) && !(getBlockState(world, i, y, k).getBlock() == ModBlocks.RITUAL_STONE))
|
||||
{
|
||||
blockState = getBlockState(world, i, y, k);
|
||||
name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
|
||||
|
@ -94,7 +93,7 @@ public class RitualPortal extends Ritual
|
|||
}
|
||||
for (int j = y + 1; j <= y + 5; j++)
|
||||
{
|
||||
if (!world.isAirBlock(new BlockPos(x, j, z - 3)) && !(getBlockState(world, x, j, z - 3).getBlock() == ModBlocks.ritualStone))
|
||||
if (!world.isAirBlock(new BlockPos(x, j, z - 3)) && !(getBlockState(world, x, j, z - 3).getBlock() == ModBlocks.RITUAL_STONE))
|
||||
{
|
||||
blockState = getBlockState(world, x, j, z - 3);
|
||||
name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
|
||||
|
@ -102,7 +101,7 @@ public class RitualPortal extends Ritual
|
|||
}
|
||||
for (int j = y + 1; j <= y + 5; j++)
|
||||
{
|
||||
if (!world.isAirBlock(new BlockPos(x, j, z + 3)) && !(getBlockState(world, x, j, z + 3).getBlock() == ModBlocks.ritualStone))
|
||||
if (!world.isAirBlock(new BlockPos(x, j, z + 3)) && !(getBlockState(world, x, j, z + 3).getBlock() == ModBlocks.RITUAL_STONE))
|
||||
{
|
||||
blockState = getBlockState(world, x, j, z + 3);
|
||||
name = addStringToEnd(name, ForgeRegistries.BLOCKS.getKey(blockState.getBlock()) + String.valueOf(blockState.getBlock().getMetaFromState(blockState)));
|
||||
|
@ -146,7 +145,7 @@ public class RitualPortal extends Ritual
|
|||
|
||||
if (world.isAirBlock(tempPos))
|
||||
{
|
||||
IBlockState blockState = ModBlocks.dimensionalPortal.getStateFromMeta(0);
|
||||
IBlockState blockState = ModBlocks.DIMENSIONAL_PORTAL.getStateFromMeta(0);
|
||||
world.setBlockState(tempPos, blockState, 3);
|
||||
|
||||
if (world.getTileEntity(tempPos) != null && world.getTileEntity(tempPos) instanceof TileDimensionalPortal)
|
||||
|
@ -167,7 +166,7 @@ public class RitualPortal extends Ritual
|
|||
BlockPos tempPos = new BlockPos(x, j, k);
|
||||
if (world.isAirBlock(tempPos))
|
||||
{
|
||||
IBlockState blockState = ModBlocks.dimensionalPortal.getStateFromMeta(1);
|
||||
IBlockState blockState = ModBlocks.DIMENSIONAL_PORTAL.getStateFromMeta(1);
|
||||
world.setBlockState(tempPos, blockState, 3);
|
||||
|
||||
if (world.getTileEntity(tempPos) != null && world.getTileEntity(tempPos) instanceof TileDimensionalPortal)
|
||||
|
@ -203,7 +202,7 @@ public class RitualPortal extends Ritual
|
|||
{
|
||||
for (int j = y + 1; j <= y + 3; j++)
|
||||
{
|
||||
if (getBlockState(world, i, j, z).getBlock() == ModBlocks.dimensionalPortal)
|
||||
if (getBlockState(world, i, j, z).getBlock() == ModBlocks.DIMENSIONAL_PORTAL)
|
||||
{
|
||||
world.setBlockToAir(new BlockPos(i, j, z));
|
||||
}
|
||||
|
@ -215,7 +214,7 @@ public class RitualPortal extends Ritual
|
|||
{
|
||||
for (int j = y + 1; j <= y + 3; j++)
|
||||
{
|
||||
if (getBlockState(world, x, j, k).getBlock() == ModBlocks.dimensionalPortal)
|
||||
if (getBlockState(world, x, j, k).getBlock() == ModBlocks.DIMENSIONAL_PORTAL)
|
||||
{
|
||||
world.setBlockToAir(new BlockPos(x, j, k));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue