remove block metadata
This commit is contained in:
parent
a1a15dcdf6
commit
6ef8caddbe
7 changed files with 373 additions and 438 deletions
|
@ -113,30 +113,30 @@ public class BlockLever extends Block
|
|||
}
|
||||
}
|
||||
|
||||
public static int getMetadataForFacing(Facing facing)
|
||||
public static EnumOrientation getMetadataForFacing(Facing facing)
|
||||
{
|
||||
switch (facing)
|
||||
{
|
||||
case DOWN:
|
||||
return 0;
|
||||
return EnumOrientation.DOWN_X;
|
||||
|
||||
case UP:
|
||||
return 5;
|
||||
return EnumOrientation.UP_Z;
|
||||
|
||||
case NORTH:
|
||||
return 4;
|
||||
return EnumOrientation.NORTH;
|
||||
|
||||
case SOUTH:
|
||||
return 3;
|
||||
return EnumOrientation.SOUTH;
|
||||
|
||||
case WEST:
|
||||
return 2;
|
||||
return EnumOrientation.WEST;
|
||||
|
||||
case EAST:
|
||||
return 1;
|
||||
return EnumOrientation.EAST;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package server.worldgen.structure;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import common.block.artificial.BlockStairs;
|
||||
import common.collect.Lists;
|
||||
import common.entity.npc.EntityDarkMage;
|
||||
import common.init.Blocks;
|
||||
|
@ -9,6 +10,7 @@ import common.rng.Random;
|
|||
import common.tags.TagObject;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.world.State;
|
||||
import server.vars.SVars;
|
||||
import server.world.WorldServer;
|
||||
import server.worldgen.LootConstants;
|
||||
|
@ -267,7 +269,7 @@ public class StructureBridge
|
|||
|
||||
public boolean addComponentParts(WorldServer worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
|
||||
{
|
||||
int i = this.getMetadataWithOffset(Blocks.blood_brick_stairs, 2);
|
||||
State i = this.getMetadataWithOffset(Blocks.blood_brick_stairs.getState().withProperty(BlockStairs.FACING, Facing.SOUTH));
|
||||
|
||||
for (int j = 0; j <= 9; ++j)
|
||||
{
|
||||
|
@ -279,9 +281,9 @@ public class StructureBridge
|
|||
|
||||
if (j <= 6)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.blood_brick_stairs.getStateFromMeta(i), 1, k + 1, j, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.blood_brick_stairs.getStateFromMeta(i), 2, k + 1, j, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.blood_brick_stairs.getStateFromMeta(i), 3, k + 1, j, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 1, k + 1, j, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 2, k + 1, j, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 3, k + 1, j, structureBoundingBoxIn);
|
||||
}
|
||||
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, l, j, 4, l, j, Blocks.blood_brick.getState(), Blocks.blood_brick.getState(), false);
|
||||
|
@ -857,7 +859,7 @@ public class StructureBridge
|
|||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 11, 7, j1, 11, 8, j1, Blocks.blood_brick_fence.getState(), Blocks.blood_brick_fence.getState(), false);
|
||||
}
|
||||
|
||||
int k1 = this.getMetadataWithOffset(Blocks.blood_brick_stairs, 3);
|
||||
State k1 = this.getMetadataWithOffset(Blocks.blood_brick_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH));
|
||||
|
||||
for (int j = 0; j <= 6; ++j)
|
||||
{
|
||||
|
@ -865,7 +867,7 @@ public class StructureBridge
|
|||
|
||||
for (int l = 5; l <= 7; ++l)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.blood_brick_stairs.getStateFromMeta(k1), l, 5 + j, k, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, k1, l, 5 + j, k, structureBoundingBoxIn);
|
||||
}
|
||||
|
||||
if (k >= 5 && k <= 8)
|
||||
|
@ -885,7 +887,7 @@ public class StructureBridge
|
|||
|
||||
for (int l1 = 5; l1 <= 7; ++l1)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.blood_brick_stairs.getStateFromMeta(k1), l1, 12, 11, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, k1, l1, 12, 11, structureBoundingBoxIn);
|
||||
}
|
||||
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 6, 7, 5, 7, 7, Blocks.blood_brick_fence.getState(), Blocks.blood_brick_fence.getState(), false);
|
||||
|
@ -897,16 +899,16 @@ public class StructureBridge
|
|||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 9, 5, 2, 10, 5, 3, Blocks.blood_brick.getState(), Blocks.blood_brick.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 9, 5, 9, 10, 5, 10, Blocks.blood_brick.getState(), Blocks.blood_brick.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 10, 5, 4, 10, 5, 8, Blocks.blood_brick.getState(), Blocks.blood_brick.getState(), false);
|
||||
int i2 = this.getMetadataWithOffset(Blocks.blood_brick_stairs, 0);
|
||||
int j2 = this.getMetadataWithOffset(Blocks.blood_brick_stairs, 1);
|
||||
this.setBlockState(worldIn, Blocks.blood_brick_stairs.getStateFromMeta(j2), 4, 5, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.blood_brick_stairs.getStateFromMeta(j2), 4, 5, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.blood_brick_stairs.getStateFromMeta(j2), 4, 5, 9, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.blood_brick_stairs.getStateFromMeta(j2), 4, 5, 10, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.blood_brick_stairs.getStateFromMeta(i2), 8, 5, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.blood_brick_stairs.getStateFromMeta(i2), 8, 5, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.blood_brick_stairs.getStateFromMeta(i2), 8, 5, 9, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.blood_brick_stairs.getStateFromMeta(i2), 8, 5, 10, structureBoundingBoxIn);
|
||||
State i2 = this.getMetadataWithOffset(Blocks.blood_brick_stairs.getState().withProperty(BlockStairs.FACING, Facing.EAST));
|
||||
State j2 = this.getMetadataWithOffset(Blocks.blood_brick_stairs.getState().withProperty(BlockStairs.FACING, Facing.WEST));
|
||||
this.setBlockState(worldIn, j2, 4, 5, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, j2, 4, 5, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, j2, 4, 5, 9, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, j2, 4, 5, 10, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i2, 8, 5, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i2, 8, 5, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i2, 8, 5, 9, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i2, 8, 5, 10, structureBoundingBoxIn);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 4, 4, 4, 4, 8, Blocks.soul_sand.getState(), Blocks.soul_sand.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 8, 4, 4, 9, 4, 8, Blocks.soul_sand.getState(), Blocks.soul_sand.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 5, 4, 4, 5, 8, Blocks.soul_wart.getState(), Blocks.soul_wart.getState(), false);
|
||||
|
|
|
@ -3,8 +3,15 @@ package server.worldgen.structure;
|
|||
import java.util.List;
|
||||
|
||||
import common.block.Block;
|
||||
import common.block.Directional;
|
||||
import common.block.Rotatable;
|
||||
import common.block.artificial.BlockDoor;
|
||||
import common.block.tech.BlockButton;
|
||||
import common.block.tech.BlockDispenser;
|
||||
import common.block.tech.BlockLever;
|
||||
import common.block.tech.BlockPistonBase;
|
||||
import common.block.tech.BlockRail;
|
||||
import common.block.tech.BlockRailBase;
|
||||
import common.init.Blocks;
|
||||
import common.item.RngLoot;
|
||||
import common.item.block.ItemDoor;
|
||||
|
@ -251,342 +258,253 @@ public abstract class StructureComponent
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the direction-shifted metadata for blocks that require orientation, e.g. doors, stairs, ladders.
|
||||
*/
|
||||
protected int getMetadataWithOffset(Block blockIn, int meta)
|
||||
protected final State getMetadataWithOffset(State state)
|
||||
{
|
||||
Block blockIn = state.getBlock();
|
||||
if (blockIn == Blocks.rail)
|
||||
{
|
||||
if (this.coordBaseMode == Facing.WEST || this.coordBaseMode == Facing.EAST)
|
||||
{
|
||||
if (meta == 1)
|
||||
if (state.getValue(BlockRail.SHAPE) == BlockRailBase.EnumRailDirection.EAST_WEST)
|
||||
{
|
||||
return 0;
|
||||
return state.withProperty(BlockRail.SHAPE, BlockRailBase.EnumRailDirection.NORTH_SOUTH);
|
||||
}
|
||||
|
||||
return 1;
|
||||
return state.withProperty(BlockRail.SHAPE, BlockRailBase.EnumRailDirection.EAST_WEST);
|
||||
}
|
||||
}
|
||||
else if (blockIn instanceof BlockDoor)
|
||||
else if (blockIn instanceof Rotatable)
|
||||
{
|
||||
Facing meta = state.getValue(Rotatable.FACING);
|
||||
if (this.coordBaseMode == Facing.SOUTH)
|
||||
{
|
||||
if (meta == 0)
|
||||
if (meta == Facing.NORTH)
|
||||
{
|
||||
return 2;
|
||||
return state.withProperty(Rotatable.FACING, Facing.SOUTH);
|
||||
}
|
||||
|
||||
if (meta == 2)
|
||||
if (meta == Facing.SOUTH)
|
||||
{
|
||||
return 0;
|
||||
return state.withProperty(Rotatable.FACING, Facing.NORTH);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (this.coordBaseMode == Facing.WEST)
|
||||
{
|
||||
if (this.coordBaseMode == Facing.WEST)
|
||||
if (meta == Facing.NORTH)
|
||||
{
|
||||
return meta + 1 & 3;
|
||||
return state.withProperty(Rotatable.FACING, Facing.WEST);
|
||||
}
|
||||
|
||||
if (this.coordBaseMode == Facing.EAST)
|
||||
if (meta == Facing.SOUTH)
|
||||
{
|
||||
return meta + 3 & 3;
|
||||
return state.withProperty(Rotatable.FACING, Facing.EAST);
|
||||
}
|
||||
|
||||
if (meta == Facing.WEST)
|
||||
{
|
||||
return state.withProperty(Rotatable.FACING, Facing.NORTH);
|
||||
}
|
||||
|
||||
if (meta == Facing.EAST)
|
||||
{
|
||||
return state.withProperty(Rotatable.FACING, Facing.SOUTH);
|
||||
}
|
||||
}
|
||||
else if (this.coordBaseMode == Facing.EAST)
|
||||
{
|
||||
if (meta == Facing.NORTH)
|
||||
{
|
||||
return state.withProperty(Rotatable.FACING, Facing.EAST);
|
||||
}
|
||||
|
||||
if (meta == Facing.SOUTH)
|
||||
{
|
||||
return state.withProperty(Rotatable.FACING, Facing.WEST);
|
||||
}
|
||||
|
||||
if (meta == Facing.WEST)
|
||||
{
|
||||
return state.withProperty(Rotatable.FACING, Facing.NORTH);
|
||||
}
|
||||
|
||||
if (meta == Facing.EAST)
|
||||
{
|
||||
return state.withProperty(Rotatable.FACING, Facing.SOUTH);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (blockIn != Blocks.cobblestone_stairs && blockIn != Blocks.oak_stairs && blockIn != Blocks.blood_brick_stairs && blockIn != Blocks.stonebrick_stairs && blockIn != Blocks.sandstone_stairs)
|
||||
if (blockIn instanceof BlockButton)
|
||||
{
|
||||
if (blockIn == Blocks.ladder)
|
||||
Facing meta = state.getValue(BlockButton.FACING);
|
||||
if (this.coordBaseMode == Facing.SOUTH)
|
||||
{
|
||||
if (this.coordBaseMode == Facing.SOUTH)
|
||||
if (meta == Facing.SOUTH)
|
||||
{
|
||||
if (meta == Facing.NORTH.getIndex())
|
||||
{
|
||||
return Facing.SOUTH.getIndex();
|
||||
}
|
||||
|
||||
if (meta == Facing.SOUTH.getIndex())
|
||||
{
|
||||
return Facing.NORTH.getIndex();
|
||||
}
|
||||
return state.withProperty(BlockButton.FACING, Facing.NORTH);
|
||||
}
|
||||
else if (this.coordBaseMode == Facing.WEST)
|
||||
|
||||
if (meta == Facing.NORTH)
|
||||
{
|
||||
if (meta == Facing.NORTH.getIndex())
|
||||
{
|
||||
return Facing.WEST.getIndex();
|
||||
}
|
||||
|
||||
if (meta == Facing.SOUTH.getIndex())
|
||||
{
|
||||
return Facing.EAST.getIndex();
|
||||
}
|
||||
|
||||
if (meta == Facing.WEST.getIndex())
|
||||
{
|
||||
return Facing.NORTH.getIndex();
|
||||
}
|
||||
|
||||
if (meta == Facing.EAST.getIndex())
|
||||
{
|
||||
return Facing.SOUTH.getIndex();
|
||||
}
|
||||
}
|
||||
else if (this.coordBaseMode == Facing.EAST)
|
||||
{
|
||||
if (meta == Facing.NORTH.getIndex())
|
||||
{
|
||||
return Facing.EAST.getIndex();
|
||||
}
|
||||
|
||||
if (meta == Facing.SOUTH.getIndex())
|
||||
{
|
||||
return Facing.WEST.getIndex();
|
||||
}
|
||||
|
||||
if (meta == Facing.WEST.getIndex())
|
||||
{
|
||||
return Facing.NORTH.getIndex();
|
||||
}
|
||||
|
||||
if (meta == Facing.EAST.getIndex())
|
||||
{
|
||||
return Facing.SOUTH.getIndex();
|
||||
}
|
||||
return state.withProperty(BlockButton.FACING, Facing.SOUTH);
|
||||
}
|
||||
}
|
||||
else if (blockIn == Blocks.stone_button)
|
||||
else if (this.coordBaseMode == Facing.WEST)
|
||||
{
|
||||
if (this.coordBaseMode == Facing.SOUTH)
|
||||
if (meta == Facing.SOUTH)
|
||||
{
|
||||
if (meta == 3)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
if (meta == 4)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
return state.withProperty(BlockButton.FACING, Facing.EAST);
|
||||
}
|
||||
else if (this.coordBaseMode == Facing.WEST)
|
||||
|
||||
if (meta == Facing.NORTH)
|
||||
{
|
||||
if (meta == 3)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (meta == 4)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (meta == 2)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
if (meta == 1)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
return state.withProperty(BlockButton.FACING, Facing.WEST);
|
||||
}
|
||||
else if (this.coordBaseMode == Facing.EAST)
|
||||
|
||||
if (meta == Facing.WEST)
|
||||
{
|
||||
if (meta == 3)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return state.withProperty(BlockButton.FACING, Facing.SOUTH);
|
||||
}
|
||||
|
||||
if (meta == 4)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (meta == 2)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
if (meta == 1)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
if (meta == Facing.EAST)
|
||||
{
|
||||
return state.withProperty(BlockButton.FACING, Facing.NORTH);
|
||||
}
|
||||
}
|
||||
else if (blockIn != Blocks.tripwire_hook && !(blockIn instanceof Rotatable))
|
||||
else if (this.coordBaseMode == Facing.EAST)
|
||||
{
|
||||
if (blockIn == Blocks.piston || blockIn == Blocks.sticky_piston || blockIn == Blocks.lever || blockIn == Blocks.dispenser)
|
||||
if (meta == Facing.SOUTH)
|
||||
{
|
||||
if (this.coordBaseMode == Facing.SOUTH)
|
||||
{
|
||||
if (meta == Facing.NORTH.getIndex() || meta == Facing.SOUTH.getIndex())
|
||||
{
|
||||
return Facing.getFront(meta).getOpposite().getIndex();
|
||||
}
|
||||
}
|
||||
else if (this.coordBaseMode == Facing.WEST)
|
||||
{
|
||||
if (meta == Facing.NORTH.getIndex())
|
||||
{
|
||||
return Facing.WEST.getIndex();
|
||||
}
|
||||
|
||||
if (meta == Facing.SOUTH.getIndex())
|
||||
{
|
||||
return Facing.EAST.getIndex();
|
||||
}
|
||||
|
||||
if (meta == Facing.WEST.getIndex())
|
||||
{
|
||||
return Facing.NORTH.getIndex();
|
||||
}
|
||||
|
||||
if (meta == Facing.EAST.getIndex())
|
||||
{
|
||||
return Facing.SOUTH.getIndex();
|
||||
}
|
||||
}
|
||||
else if (this.coordBaseMode == Facing.EAST)
|
||||
{
|
||||
if (meta == Facing.NORTH.getIndex())
|
||||
{
|
||||
return Facing.EAST.getIndex();
|
||||
}
|
||||
|
||||
if (meta == Facing.SOUTH.getIndex())
|
||||
{
|
||||
return Facing.WEST.getIndex();
|
||||
}
|
||||
|
||||
if (meta == Facing.WEST.getIndex())
|
||||
{
|
||||
return Facing.NORTH.getIndex();
|
||||
}
|
||||
|
||||
if (meta == Facing.EAST.getIndex())
|
||||
{
|
||||
return Facing.SOUTH.getIndex();
|
||||
}
|
||||
}
|
||||
return state.withProperty(BlockButton.FACING, Facing.WEST);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Facing enumfacing = Facing.getHorizontal(meta);
|
||||
|
||||
if (this.coordBaseMode == Facing.SOUTH)
|
||||
if (meta == Facing.NORTH)
|
||||
{
|
||||
if (enumfacing == Facing.SOUTH || enumfacing == Facing.NORTH)
|
||||
{
|
||||
return enumfacing.getOpposite().getHorizontalIndex();
|
||||
}
|
||||
return state.withProperty(BlockButton.FACING, Facing.EAST);
|
||||
}
|
||||
else if (this.coordBaseMode == Facing.WEST)
|
||||
|
||||
if (meta == Facing.WEST)
|
||||
{
|
||||
if (enumfacing == Facing.NORTH)
|
||||
{
|
||||
return Facing.WEST.getHorizontalIndex();
|
||||
}
|
||||
|
||||
if (enumfacing == Facing.SOUTH)
|
||||
{
|
||||
return Facing.EAST.getHorizontalIndex();
|
||||
}
|
||||
|
||||
if (enumfacing == Facing.WEST)
|
||||
{
|
||||
return Facing.NORTH.getHorizontalIndex();
|
||||
}
|
||||
|
||||
if (enumfacing == Facing.EAST)
|
||||
{
|
||||
return Facing.SOUTH.getHorizontalIndex();
|
||||
}
|
||||
return state.withProperty(BlockButton.FACING, Facing.SOUTH);
|
||||
}
|
||||
else if (this.coordBaseMode == Facing.EAST)
|
||||
|
||||
if (meta == Facing.EAST)
|
||||
{
|
||||
if (enumfacing == Facing.NORTH)
|
||||
{
|
||||
return Facing.EAST.getHorizontalIndex();
|
||||
}
|
||||
|
||||
if (enumfacing == Facing.SOUTH)
|
||||
{
|
||||
return Facing.WEST.getHorizontalIndex();
|
||||
}
|
||||
|
||||
if (enumfacing == Facing.WEST)
|
||||
{
|
||||
return Facing.NORTH.getHorizontalIndex();
|
||||
}
|
||||
|
||||
if (enumfacing == Facing.EAST)
|
||||
{
|
||||
return Facing.SOUTH.getHorizontalIndex();
|
||||
}
|
||||
return state.withProperty(BlockButton.FACING, Facing.NORTH);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (this.coordBaseMode == Facing.SOUTH)
|
||||
else if (blockIn instanceof BlockPistonBase || blockIn instanceof BlockDispenser)
|
||||
{
|
||||
if (meta == 2)
|
||||
Facing meta = state.getValue(Directional.FACING);
|
||||
if (this.coordBaseMode == Facing.SOUTH)
|
||||
{
|
||||
return 3;
|
||||
if (meta == Facing.NORTH || meta == Facing.SOUTH)
|
||||
{
|
||||
return state.withProperty(Directional.FACING, meta.getOpposite());
|
||||
}
|
||||
}
|
||||
|
||||
if (meta == 3)
|
||||
else if (this.coordBaseMode == Facing.WEST)
|
||||
{
|
||||
return 2;
|
||||
if (meta == Facing.NORTH)
|
||||
{
|
||||
return state.withProperty(Directional.FACING, Facing.WEST);
|
||||
}
|
||||
|
||||
if (meta == Facing.SOUTH)
|
||||
{
|
||||
return state.withProperty(Directional.FACING, Facing.EAST);
|
||||
}
|
||||
|
||||
if (meta == Facing.WEST)
|
||||
{
|
||||
return state.withProperty(Directional.FACING, Facing.NORTH);
|
||||
}
|
||||
|
||||
if (meta == Facing.EAST)
|
||||
{
|
||||
return state.withProperty(Directional.FACING, Facing.SOUTH);
|
||||
}
|
||||
}
|
||||
else if (this.coordBaseMode == Facing.EAST)
|
||||
{
|
||||
if (meta == Facing.NORTH)
|
||||
{
|
||||
return state.withProperty(Directional.FACING, Facing.EAST);
|
||||
}
|
||||
|
||||
if (meta == Facing.SOUTH)
|
||||
{
|
||||
return state.withProperty(Directional.FACING, Facing.WEST);
|
||||
}
|
||||
|
||||
if (meta == Facing.WEST)
|
||||
{
|
||||
return state.withProperty(Directional.FACING, Facing.NORTH);
|
||||
}
|
||||
|
||||
if (meta == Facing.EAST)
|
||||
{
|
||||
return state.withProperty(Directional.FACING, Facing.SOUTH);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (this.coordBaseMode == Facing.WEST)
|
||||
else if (blockIn instanceof BlockLever)
|
||||
{
|
||||
if (meta == 0)
|
||||
BlockLever.EnumOrientation meta = state.getValue(BlockLever.FACING);
|
||||
if (this.coordBaseMode == Facing.SOUTH)
|
||||
{
|
||||
return 2;
|
||||
if (meta == BlockLever.EnumOrientation.NORTH || meta == BlockLever.EnumOrientation.SOUTH)
|
||||
{
|
||||
return state.withProperty(BlockLever.FACING, meta == BlockLever.EnumOrientation.NORTH ? BlockLever.EnumOrientation.SOUTH : BlockLever.EnumOrientation.NORTH);
|
||||
}
|
||||
}
|
||||
else if (this.coordBaseMode == Facing.WEST)
|
||||
{
|
||||
if (meta == BlockLever.EnumOrientation.NORTH)
|
||||
{
|
||||
return state.withProperty(BlockLever.FACING, BlockLever.EnumOrientation.WEST);
|
||||
}
|
||||
|
||||
if (meta == 1)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
if (meta == BlockLever.EnumOrientation.SOUTH)
|
||||
{
|
||||
return state.withProperty(BlockLever.FACING, BlockLever.EnumOrientation.EAST);
|
||||
}
|
||||
|
||||
if (meta == 2)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (meta == BlockLever.EnumOrientation.WEST)
|
||||
{
|
||||
return state.withProperty(BlockLever.FACING, BlockLever.EnumOrientation.NORTH);
|
||||
}
|
||||
|
||||
if (meta == 3)
|
||||
{
|
||||
return 1;
|
||||
if (meta == BlockLever.EnumOrientation.EAST)
|
||||
{
|
||||
return state.withProperty(BlockLever.FACING, BlockLever.EnumOrientation.SOUTH);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (this.coordBaseMode == Facing.EAST)
|
||||
{
|
||||
if (meta == 0)
|
||||
else if (this.coordBaseMode == Facing.EAST)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
if (meta == BlockLever.EnumOrientation.NORTH)
|
||||
{
|
||||
return state.withProperty(BlockLever.FACING, BlockLever.EnumOrientation.EAST);
|
||||
}
|
||||
|
||||
if (meta == 1)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
if (meta == BlockLever.EnumOrientation.SOUTH)
|
||||
{
|
||||
return state.withProperty(BlockLever.FACING, BlockLever.EnumOrientation.WEST);
|
||||
}
|
||||
|
||||
if (meta == 2)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (meta == BlockLever.EnumOrientation.WEST)
|
||||
{
|
||||
return state.withProperty(BlockLever.FACING, BlockLever.EnumOrientation.NORTH);
|
||||
}
|
||||
|
||||
if (meta == 3)
|
||||
{
|
||||
return 0;
|
||||
if (meta == BlockLever.EnumOrientation.EAST)
|
||||
{
|
||||
return state.withProperty(BlockLever.FACING, BlockLever.EnumOrientation.SOUTH);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return meta;
|
||||
return state;
|
||||
}
|
||||
|
||||
protected void setBlockState(WorldServer worldIn, State blockstateIn, int x, int y, int z, StructureBoundingBox boundingboxIn)
|
||||
|
@ -800,13 +718,13 @@ public abstract class StructureComponent
|
|||
}
|
||||
}
|
||||
|
||||
protected boolean generateDispenserContents(WorldServer worldIn, StructureBoundingBox boundingBoxIn, Random rand, int x, int y, int z, int meta, WeightedList<RngLoot> listIn, int max)
|
||||
protected boolean generateDispenserContents(WorldServer worldIn, StructureBoundingBox boundingBoxIn, Random rand, int x, int y, int z, Facing dir, WeightedList<RngLoot> listIn, int max)
|
||||
{
|
||||
BlockPos blockpos = new BlockPos(this.getXWithOffset(x, z), this.getYWithOffset(y), this.getZWithOffset(x, z));
|
||||
|
||||
if (boundingBoxIn.isVecInside(blockpos) && worldIn.getState(blockpos).getBlock() != Blocks.dispenser)
|
||||
{
|
||||
worldIn.setState(blockpos, Blocks.dispenser.getStateFromMeta(this.getMetadataWithOffset(Blocks.dispenser, meta)), 2);
|
||||
worldIn.setState(blockpos, this.getMetadataWithOffset(Blocks.dispenser.getState().withProperty(BlockDispenser.FACING, dir)), 2);
|
||||
TileEntity tileentity = worldIn.getTileEntity(blockpos);
|
||||
|
||||
if (tileentity instanceof TileEntityDispenser)
|
||||
|
@ -825,13 +743,13 @@ public abstract class StructureComponent
|
|||
/**
|
||||
* Places door on given position
|
||||
*/
|
||||
protected void placeDoorCurrentPosition(WorldServer worldIn, StructureBoundingBox boundingBoxIn, Random rand, int x, int y, int z, Facing facing)
|
||||
protected void placeDoorCurrentPosition(WorldServer worldIn, StructureBoundingBox boundingBoxIn, Random rand, int x, int y, int z, State state)
|
||||
{
|
||||
BlockPos blockpos = new BlockPos(this.getXWithOffset(x, z), this.getYWithOffset(y), this.getZWithOffset(x, z));
|
||||
|
||||
if (boundingBoxIn.isVecInside(blockpos))
|
||||
{
|
||||
ItemDoor.placeDoor(worldIn, blockpos, facing.rotateYCCW(), Blocks.oak_door, true);
|
||||
ItemDoor.placeDoor(worldIn, blockpos, state.getValue(BlockDoor.FACING).rotateYCCW(), Blocks.oak_door, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,9 @@ package server.worldgen.structure;
|
|||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import common.block.tech.BlockRail;
|
||||
import common.block.tech.BlockRailBase;
|
||||
import common.block.tech.BlockTorch;
|
||||
import common.entity.item.EntityChestCart;
|
||||
import common.entity.npc.EntityArachnoid;
|
||||
import common.init.Blocks;
|
||||
|
@ -289,8 +292,8 @@ public class StructureMineshaft
|
|||
|
||||
if (boundingBoxIn.isVecInside(blockpos) && worldIn.getState(blockpos).getBlock() == Blocks.air)
|
||||
{
|
||||
int i = rand.chance() ? 1 : 0;
|
||||
worldIn.setState(blockpos, Blocks.rail.getStateFromMeta(this.getMetadataWithOffset(Blocks.rail, i)), 2);
|
||||
BlockRailBase.EnumRailDirection i = rand.chance() ? BlockRailBase.EnumRailDirection.EAST_WEST : BlockRailBase.EnumRailDirection.NORTH_SOUTH;
|
||||
worldIn.setState(blockpos, this.getMetadataWithOffset(Blocks.rail.getState().withProperty(BlockRail.SHAPE, i)), 2);
|
||||
EntityChestCart entityminecartchest = new EntityChestCart(worldIn, (double)((float)blockpos.getX() + 0.5F), (double)((float)blockpos.getY() + 0.5F), (double)((float)blockpos.getZ() + 0.5F));
|
||||
RngLoot.generateChestContents(rand, listIn, entityminecartchest, max);
|
||||
worldIn.spawnEntityInWorld(entityminecartchest);
|
||||
|
@ -347,8 +350,8 @@ public class StructureMineshaft
|
|||
this.randomlyPlaceBlock(worldIn, structureBoundingBoxIn, randomIn, 0.05F, 2, 2, k1 - 2, Blocks.web.getState());
|
||||
this.randomlyPlaceBlock(worldIn, structureBoundingBoxIn, randomIn, 0.05F, 0, 2, k1 + 2, Blocks.web.getState());
|
||||
this.randomlyPlaceBlock(worldIn, structureBoundingBoxIn, randomIn, 0.05F, 2, 2, k1 + 2, Blocks.web.getState());
|
||||
this.randomlyPlaceBlock(worldIn, structureBoundingBoxIn, randomIn, 0.05F, 1, 2, k1 - 1, Blocks.torch.getStateFromMeta(Facing.UP.getIndex()));
|
||||
this.randomlyPlaceBlock(worldIn, structureBoundingBoxIn, randomIn, 0.05F, 1, 2, k1 + 1, Blocks.torch.getStateFromMeta(Facing.UP.getIndex()));
|
||||
this.randomlyPlaceBlock(worldIn, structureBoundingBoxIn, randomIn, 0.05F, 1, 2, k1 - 1, Blocks.torch.getState().withProperty(BlockTorch.FACING, Facing.UP));
|
||||
this.randomlyPlaceBlock(worldIn, structureBoundingBoxIn, randomIn, 0.05F, 1, 2, k1 + 1, Blocks.torch.getState().withProperty(BlockTorch.FACING, Facing.UP));
|
||||
|
||||
if (randomIn.zrange(100) == 0)
|
||||
{
|
||||
|
@ -402,7 +405,7 @@ public class StructureMineshaft
|
|||
|
||||
if (iblockstate.getBlock() != Blocks.air && iblockstate.getBlock().isFullBlock())
|
||||
{
|
||||
this.randomlyPlaceBlock(worldIn, structureBoundingBoxIn, randomIn, 0.7F, 1, 0, l2, Blocks.rail.getStateFromMeta(this.getMetadataWithOffset(Blocks.rail, 0)));
|
||||
this.randomlyPlaceBlock(worldIn, structureBoundingBoxIn, randomIn, 0.7F, 1, 0, l2, this.getMetadataWithOffset(Blocks.rail.getState().withProperty(BlockRail.SHAPE, BlockRailBase.EnumRailDirection.NORTH_SOUTH)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package server.worldgen.structure;
|
||||
|
||||
import common.block.artificial.BlockStairs;
|
||||
import common.block.foliage.BlockVine;
|
||||
import common.block.tech.BlockLever;
|
||||
import common.block.tech.BlockPistonBase;
|
||||
import common.block.tech.BlockRedstoneRepeater;
|
||||
import common.block.tech.BlockTripWire;
|
||||
import common.block.tech.BlockTripWireHook;
|
||||
import common.entity.npc.EntityMage;
|
||||
|
@ -11,6 +15,7 @@ import common.rng.Random;
|
|||
import common.tags.TagObject;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.world.State;
|
||||
import server.vars.SVars;
|
||||
import server.world.WorldServer;
|
||||
import server.worldgen.LootConstants;
|
||||
|
@ -73,22 +78,22 @@ public class StructureScattered
|
|||
}
|
||||
}
|
||||
|
||||
int k2 = this.getMetadataWithOffset(Blocks.sandstone_stairs, 3);
|
||||
int l2 = this.getMetadataWithOffset(Blocks.sandstone_stairs, 2);
|
||||
int i3 = this.getMetadataWithOffset(Blocks.sandstone_stairs, 0);
|
||||
int l = this.getMetadataWithOffset(Blocks.sandstone_stairs, 1);
|
||||
State k2 = this.getMetadataWithOffset(Blocks.sandstone_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH));
|
||||
State l2 = this.getMetadataWithOffset(Blocks.sandstone_stairs.getState().withProperty(BlockStairs.FACING, Facing.SOUTH));
|
||||
State i3 = this.getMetadataWithOffset(Blocks.sandstone_stairs.getState().withProperty(BlockStairs.FACING, Facing.EAST));
|
||||
State l = this.getMetadataWithOffset(Blocks.sandstone_stairs.getState().withProperty(BlockStairs.FACING, Facing.WEST));
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 0, 0, 4, 9, 4, Blocks.sandstone.getState(), Blocks.air.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 10, 1, 3, 10, 3, Blocks.sandstone.getState(), Blocks.sandstone.getState(), false);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getStateFromMeta(k2), 2, 10, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getStateFromMeta(l2), 2, 10, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getStateFromMeta(i3), 0, 10, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getStateFromMeta(l), 4, 10, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, k2, 2, 10, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l2, 2, 10, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i3, 0, 10, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l, 4, 10, 2, structureBoundingBoxIn);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, this.scatteredFeatureSizeX - 5, 0, 0, this.scatteredFeatureSizeX - 1, 9, 4, Blocks.sandstone.getState(), Blocks.air.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, this.scatteredFeatureSizeX - 4, 10, 1, this.scatteredFeatureSizeX - 2, 10, 3, Blocks.sandstone.getState(), Blocks.sandstone.getState(), false);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getStateFromMeta(k2), this.scatteredFeatureSizeX - 3, 10, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getStateFromMeta(l2), this.scatteredFeatureSizeX - 3, 10, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getStateFromMeta(i3), this.scatteredFeatureSizeX - 5, 10, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getStateFromMeta(l), this.scatteredFeatureSizeX - 1, 10, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, k2, this.scatteredFeatureSizeX - 3, 10, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l2, this.scatteredFeatureSizeX - 3, 10, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i3, this.scatteredFeatureSizeX - 5, 10, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l, this.scatteredFeatureSizeX - 1, 10, 2, structureBoundingBoxIn);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 8, 0, 0, 12, 4, 4, Blocks.sandstone.getState(), Blocks.air.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 9, 1, 0, 11, 3, 4, Blocks.air.getState(), Blocks.air.getState(), false);
|
||||
this.setBlockState(worldIn, Blocks.smooth_sandstone.getState(), 9, 1, 1, structureBoundingBoxIn);
|
||||
|
@ -122,18 +127,18 @@ public class StructureScattered
|
|||
this.setBlockState(worldIn, Blocks.air.getState(), this.scatteredFeatureSizeX - 7, 6, 10, structureBoundingBoxIn);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, 4, 4, 2, 6, 4, Blocks.air.getState(), Blocks.air.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, this.scatteredFeatureSizeX - 3, 4, 4, this.scatteredFeatureSizeX - 3, 6, 4, Blocks.air.getState(), Blocks.air.getState(), false);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getStateFromMeta(k2), 2, 4, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getStateFromMeta(k2), 2, 3, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getStateFromMeta(k2), this.scatteredFeatureSizeX - 3, 4, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getStateFromMeta(k2), this.scatteredFeatureSizeX - 3, 3, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, k2, 2, 4, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, k2, 2, 3, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, k2, this.scatteredFeatureSizeX - 3, 4, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, k2, this.scatteredFeatureSizeX - 3, 3, 4, structureBoundingBoxIn);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 3, 2, 2, 3, Blocks.sandstone.getState(), Blocks.sandstone.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, this.scatteredFeatureSizeX - 3, 1, 3, this.scatteredFeatureSizeX - 2, 2, 3, Blocks.sandstone.getState(), Blocks.sandstone.getState(), false);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getState(), 1, 1, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getState(), this.scatteredFeatureSizeX - 2, 1, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_slab.getState(), 1, 2, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_slab.getState(), this.scatteredFeatureSizeX - 2, 2, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getStateFromMeta(l), 2, 1, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sandstone_stairs.getStateFromMeta(i3), this.scatteredFeatureSizeX - 3, 1, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l, 2, 1, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i3, this.scatteredFeatureSizeX - 3, 1, 2, structureBoundingBoxIn);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 4, 3, 5, 4, 3, 18, Blocks.sandstone.getState(), Blocks.sandstone.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, this.scatteredFeatureSizeX - 5, 3, 5, this.scatteredFeatureSizeX - 5, 3, 17, Blocks.sandstone.getState(), Blocks.sandstone.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 1, 5, 4, 2, 16, Blocks.air.getState(), Blocks.air.getState(), false);
|
||||
|
@ -385,10 +390,10 @@ public class StructureScattered
|
|||
}
|
||||
else
|
||||
{
|
||||
int i = this.getMetadataWithOffset(Blocks.cobblestone_stairs, 3);
|
||||
int j = this.getMetadataWithOffset(Blocks.cobblestone_stairs, 2);
|
||||
int k = this.getMetadataWithOffset(Blocks.cobblestone_stairs, 0);
|
||||
int l = this.getMetadataWithOffset(Blocks.cobblestone_stairs, 1);
|
||||
State i = this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH));
|
||||
State j = this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.SOUTH));
|
||||
State k = this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.EAST));
|
||||
State l = this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.WEST));
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 0, -4, 0, this.scatteredFeatureSizeX - 1, 0, this.scatteredFeatureSizeZ - 1, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 2, 1, 2, 9, 2, 2, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 2, 1, 12, 9, 2, 12, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
|
@ -446,31 +451,31 @@ public class StructureScattered
|
|||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 4, 9, 10, 4, 9, 10, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 7, 9, 10, 7, 9, 10, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 5, 9, 7, 6, 9, 7, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 5, 9, 6, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 6, 9, 6, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(j), 5, 9, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(j), 6, 9, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 4, 0, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 5, 0, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 6, 0, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 7, 0, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 4, 1, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 4, 2, 9, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 4, 3, 10, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 7, 1, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 7, 2, 9, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 7, 3, 10, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 5, 9, 6, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 6, 9, 6, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, j, 5, 9, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, j, 6, 9, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 4, 0, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 5, 0, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 6, 0, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 7, 0, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 4, 1, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 4, 2, 9, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 4, 3, 10, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 7, 1, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 7, 2, 9, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 7, 3, 10, structureBoundingBoxIn);
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 4, 1, 9, 4, 1, 9, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 7, 1, 9, 7, 1, 9, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 4, 1, 10, 7, 2, 10, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 5, 4, 5, 6, 4, 5, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(k), 4, 4, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(l), 7, 4, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, k, 4, 4, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l, 7, 4, 5, structureBoundingBoxIn);
|
||||
|
||||
for (int l1 = 0; l1 < 4; ++l1)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(j), 5, 0 - l1, 6 + l1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(j), 6, 0 - l1, 6 + l1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, j, 5, 0 - l1, 6 + l1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, j, 6, 0 - l1, 6 + l1, structureBoundingBoxIn);
|
||||
this.fillWithAir(worldIn, structureBoundingBoxIn, 5, 0 - l1, 7 + l1, 6, 0 - l1, 9 + l1);
|
||||
}
|
||||
|
||||
|
@ -492,8 +497,8 @@ public class StructureScattered
|
|||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 7, -2, 1, 9, -2, 1, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 6, -3, 1, 6, -3, 1, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 6, -1, 1, 6, -1, 1, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
this.setBlockState(worldIn, Blocks.tripwire_hook.getStateFromMeta(this.getMetadataWithOffset(Blocks.tripwire_hook, Facing.EAST.getHorizontalIndex())).withProperty(BlockTripWireHook.ATTACHED, Boolean.valueOf(true)), 1, -3, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.tripwire_hook.getStateFromMeta(this.getMetadataWithOffset(Blocks.tripwire_hook, Facing.WEST.getHorizontalIndex())).withProperty(BlockTripWireHook.ATTACHED, Boolean.valueOf(true)), 4, -3, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.tripwire_hook.getState().withProperty(BlockTripWireHook.FACING, Facing.EAST).withProperty(BlockTripWireHook.ATTACHED, Boolean.valueOf(true))), 1, -3, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.tripwire_hook.getState().withProperty(BlockTripWireHook.FACING, Facing.WEST).withProperty(BlockTripWireHook.ATTACHED, Boolean.valueOf(true))), 4, -3, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.string.getState().withProperty(BlockTripWire.ATTACHED, Boolean.valueOf(true)), 2, -3, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.string.getState().withProperty(BlockTripWire.ATTACHED, Boolean.valueOf(true)), 3, -3, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.redstone.getState(), 5, -3, 7, structureBoundingBoxIn);
|
||||
|
@ -508,12 +513,12 @@ public class StructureScattered
|
|||
|
||||
if (!this.placedTrap1)
|
||||
{
|
||||
this.placedTrap1 = this.generateDispenserContents(worldIn, structureBoundingBoxIn, randomIn, 3, -2, 1, Facing.NORTH.getIndex(), LootConstants.JUNGLE_TRAP, 2);
|
||||
this.placedTrap1 = this.generateDispenserContents(worldIn, structureBoundingBoxIn, randomIn, 3, -2, 1, Facing.NORTH, LootConstants.JUNGLE_TRAP, 2);
|
||||
}
|
||||
|
||||
this.setBlockState(worldIn, Blocks.vine.getStateFromMeta(15), 3, -2, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.tripwire_hook.getStateFromMeta(this.getMetadataWithOffset(Blocks.tripwire_hook, Facing.NORTH.getHorizontalIndex())).withProperty(BlockTripWireHook.ATTACHED, Boolean.valueOf(true)), 7, -3, 1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.tripwire_hook.getStateFromMeta(this.getMetadataWithOffset(Blocks.tripwire_hook, Facing.SOUTH.getHorizontalIndex())).withProperty(BlockTripWireHook.ATTACHED, Boolean.valueOf(true)), 7, -3, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.vine.getState().withProperty(BlockVine.EAST, true).withProperty(BlockVine.NORTH, true).withProperty(BlockVine.SOUTH, true).withProperty(BlockVine.WEST, true), 3, -2, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.tripwire_hook.getState().withProperty(BlockTripWireHook.FACING, Facing.NORTH).withProperty(BlockTripWireHook.ATTACHED, Boolean.valueOf(true))), 7, -3, 1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.tripwire_hook.getState().withProperty(BlockTripWireHook.FACING, Facing.SOUTH).withProperty(BlockTripWireHook.ATTACHED, Boolean.valueOf(true))), 7, -3, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.string.getState().withProperty(BlockTripWire.ATTACHED, Boolean.valueOf(true)), 7, -3, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.string.getState().withProperty(BlockTripWire.ATTACHED, Boolean.valueOf(true)), 7, -3, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.string.getState().withProperty(BlockTripWire.ATTACHED, Boolean.valueOf(true)), 7, -3, 4, structureBoundingBoxIn);
|
||||
|
@ -525,11 +530,11 @@ public class StructureScattered
|
|||
|
||||
if (!this.placedTrap2)
|
||||
{
|
||||
this.placedTrap2 = this.generateDispenserContents(worldIn, structureBoundingBoxIn, randomIn, 9, -2, 3, Facing.WEST.getIndex(), LootConstants.JUNGLE_TRAP, 2);
|
||||
this.placedTrap2 = this.generateDispenserContents(worldIn, structureBoundingBoxIn, randomIn, 9, -2, 3, Facing.WEST, LootConstants.JUNGLE_TRAP, 2);
|
||||
}
|
||||
|
||||
this.setBlockState(worldIn, Blocks.vine.getStateFromMeta(15), 8, -1, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.vine.getStateFromMeta(15), 8, -2, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.vine.getState().withProperty(BlockVine.EAST, true).withProperty(BlockVine.NORTH, true).withProperty(BlockVine.SOUTH, true).withProperty(BlockVine.WEST, true), 8, -1, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.vine.getState().withProperty(BlockVine.EAST, true).withProperty(BlockVine.NORTH, true).withProperty(BlockVine.SOUTH, true).withProperty(BlockVine.WEST, true), 8, -2, 3, structureBoundingBoxIn);
|
||||
|
||||
if (!this.placedMainChest)
|
||||
{
|
||||
|
@ -550,19 +555,19 @@ public class StructureScattered
|
|||
this.setBlockState(worldIn, Blocks.carved_stonebrick.getState(), 8, -2, 11, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.carved_stonebrick.getState(), 9, -2, 11, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.carved_stonebrick.getState(), 10, -2, 11, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.lever.getStateFromMeta(BlockLever.getMetadataForFacing(Facing.getFront(this.getMetadataWithOffset(Blocks.lever, Facing.NORTH.getIndex())))), 8, -2, 12, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.lever.getStateFromMeta(BlockLever.getMetadataForFacing(Facing.getFront(this.getMetadataWithOffset(Blocks.lever, Facing.NORTH.getIndex())))), 9, -2, 12, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.lever.getStateFromMeta(BlockLever.getMetadataForFacing(Facing.getFront(this.getMetadataWithOffset(Blocks.lever, Facing.NORTH.getIndex())))), 10, -2, 12, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.lever.getState().withProperty(BlockLever.FACING, BlockLever.EnumOrientation.NORTH)), 8, -2, 12, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.lever.getState().withProperty(BlockLever.FACING, BlockLever.EnumOrientation.NORTH)), 9, -2, 12, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.lever.getState().withProperty(BlockLever.FACING, BlockLever.EnumOrientation.NORTH)), 10, -2, 12, structureBoundingBoxIn);
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 8, -3, 8, 8, -3, 10, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 10, -3, 8, 10, -3, 10, false, randomIn, junglePyramidsRandomScatteredStones);
|
||||
this.setBlockState(worldIn, Blocks.mossy_cobblestone.getState(), 10, -2, 9, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.redstone.getState(), 8, -2, 9, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.redstone.getState(), 8, -2, 10, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.redstone.getState(), 10, -1, 9, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sticky_piston.getStateFromMeta(Facing.UP.getIndex()), 9, -2, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sticky_piston.getStateFromMeta(this.getMetadataWithOffset(Blocks.sticky_piston, Facing.WEST.getIndex())), 10, -2, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sticky_piston.getStateFromMeta(this.getMetadataWithOffset(Blocks.sticky_piston, Facing.WEST.getIndex())), 10, -1, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.repeater.getStateFromMeta(this.getMetadataWithOffset(Blocks.repeater, Facing.NORTH.getHorizontalIndex())), 10, -2, 10, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.sticky_piston.getState().withProperty(BlockPistonBase.FACING, Facing.UP), 9, -2, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.sticky_piston.getState().withProperty(BlockPistonBase.FACING, Facing.WEST)), 10, -2, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.sticky_piston.getState().withProperty(BlockPistonBase.FACING, Facing.WEST)), 10, -1, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.repeater.getState().withProperty(BlockRedstoneRepeater.FACING, Facing.NORTH)), 10, -2, 10, structureBoundingBoxIn);
|
||||
|
||||
if (!this.placedHiddenChest)
|
||||
{
|
||||
|
@ -647,14 +652,14 @@ public class StructureScattered
|
|||
this.setBlockState(worldIn, Blocks.cauldron.getState(), 4, 2, 6, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_fence.getState(), 1, 2, 1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_fence.getState(), 5, 2, 1, structureBoundingBoxIn);
|
||||
int i = this.getMetadataWithOffset(Blocks.oak_stairs, 3);
|
||||
int j = this.getMetadataWithOffset(Blocks.oak_stairs, 1);
|
||||
int k = this.getMetadataWithOffset(Blocks.oak_stairs, 0);
|
||||
int l = this.getMetadataWithOffset(Blocks.oak_stairs, 2);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 4, 1, 6, 4, 1, Blocks.spruce_stairs.getStateFromMeta(i), Blocks.spruce_stairs.getStateFromMeta(i), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 4, 2, 0, 4, 7, Blocks.spruce_stairs.getStateFromMeta(k), Blocks.spruce_stairs.getStateFromMeta(k), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 4, 2, 6, 4, 7, Blocks.spruce_stairs.getStateFromMeta(j), Blocks.spruce_stairs.getStateFromMeta(j), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 4, 8, 6, 4, 8, Blocks.spruce_stairs.getStateFromMeta(l), Blocks.spruce_stairs.getStateFromMeta(l), false);
|
||||
State i = this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH));
|
||||
State j = this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.WEST));
|
||||
State k = this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.EAST));
|
||||
State l = this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.SOUTH));
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 4, 1, 6, 4, 1, i, i, false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 4, 2, 0, 4, 7, k, k, false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 4, 2, 6, 4, 7, j, j, false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 4, 8, 6, 4, 8, l, l, false);
|
||||
|
||||
for (int i1 = 2; i1 <= 7; i1 += 5)
|
||||
{
|
||||
|
|
|
@ -3,7 +3,11 @@ package server.worldgen.structure;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import common.block.artificial.BlockDoor;
|
||||
import common.block.artificial.BlockLadder;
|
||||
import common.block.artificial.BlockSlab;
|
||||
import common.block.artificial.BlockStairs;
|
||||
import common.block.tech.BlockButton;
|
||||
import common.collect.Lists;
|
||||
import common.collect.Maps;
|
||||
import common.entity.npc.EntityHaunter;
|
||||
|
@ -14,6 +18,7 @@ import common.rng.Random;
|
|||
import common.tags.TagObject;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.world.State;
|
||||
import server.vars.SVars;
|
||||
import server.world.WorldServer;
|
||||
import server.worldgen.LootConstants;
|
||||
|
@ -708,14 +713,14 @@ public class StructureStronghold
|
|||
this.setBlockState(worldIn, Blocks.oak_fence.getState(), 9, 6, 11, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_fence.getState(), 8, 6, 11, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_fence.getState(), 9, 6, 10, structureBoundingBoxIn);
|
||||
int l1 = this.getMetadataWithOffset(Blocks.ladder, 3);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(l1), 10, 1, 13, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(l1), 10, 2, 13, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(l1), 10, 3, 13, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(l1), 10, 4, 13, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(l1), 10, 5, 13, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(l1), 10, 6, 13, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(l1), 10, 7, 13, structureBoundingBoxIn);
|
||||
State l1 = this.getMetadataWithOffset(Blocks.ladder.getState().withProperty(BlockLadder.FACING, Facing.SOUTH));
|
||||
this.setBlockState(worldIn, l1, 10, 1, 13, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l1, 10, 2, 13, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l1, 10, 3, 13, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l1, 10, 4, 13, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l1, 10, 5, 13, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l1, 10, 6, 13, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l1, 10, 7, 13, structureBoundingBoxIn);
|
||||
int i1 = 7;
|
||||
int j1 = 7;
|
||||
this.setBlockState(worldIn, Blocks.oak_fence.getState(), i1 - 1, 9, j1, structureBoundingBoxIn);
|
||||
|
@ -844,16 +849,16 @@ public class StructureStronghold
|
|||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, k1, 3, 15, k1, 4, 15, Blocks.iron_bars.getState(), Blocks.iron_bars.getState(), false);
|
||||
}
|
||||
|
||||
int l1 = this.getMetadataWithOffset(Blocks.stonebrick_stairs, 3);
|
||||
State l1 = this.getMetadataWithOffset(Blocks.stonebrick_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH));
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 4, 1, 5, 6, 1, 7, false, randomIn, StructureStronghold.strongholdStones);
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 4, 2, 6, 6, 2, 7, false, randomIn, StructureStronghold.strongholdStones);
|
||||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 4, 3, 7, 6, 3, 7, false, randomIn, StructureStronghold.strongholdStones);
|
||||
|
||||
for (int k = 4; k <= 6; ++k)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.stonebrick_stairs.getStateFromMeta(l1), k, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.stonebrick_stairs.getStateFromMeta(l1), k, 2, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.stonebrick_stairs.getStateFromMeta(l1), k, 3, 6, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l1, k, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l1, k, 2, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, l1, k, 3, 6, structureBoundingBoxIn);
|
||||
}
|
||||
|
||||
int i2 = Facing.NORTH.getHorizontalIndex();
|
||||
|
@ -961,10 +966,10 @@ public class StructureStronghold
|
|||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 1, 5, 7, 3, 5, Blocks.iron_bars.getState(), Blocks.iron_bars.getState(), false);
|
||||
this.setBlockState(worldIn, Blocks.iron_bars.getState(), 4, 3, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.iron_bars.getState(), 4, 3, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.iron_door.getStateFromMeta(this.getMetadataWithOffset(Blocks.iron_door, 3)), 4, 1, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.iron_door.getStateFromMeta(this.getMetadataWithOffset(Blocks.iron_door, 3) + 8), 4, 2, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.iron_door.getStateFromMeta(this.getMetadataWithOffset(Blocks.iron_door, 3)), 4, 1, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.iron_door.getStateFromMeta(this.getMetadataWithOffset(Blocks.iron_door, 3) + 8), 4, 2, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.iron_door.getState().withProperty(BlockDoor.FACING, Facing.NORTH)), 4, 1, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.iron_door.getState().withProperty(BlockDoor.FACING, Facing.NORTH).withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER)), 4, 2, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.iron_door.getState().withProperty(BlockDoor.FACING, Facing.NORTH)), 4, 1, 8, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.iron_door.getState().withProperty(BlockDoor.FACING, Facing.NORTH).withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER)), 4, 2, 8, structureBoundingBoxIn);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1148,9 +1153,9 @@ public class StructureStronghold
|
|||
this.setBlockState(worldIn, Blocks.oak_planks.getState(), 8, 3, l, structureBoundingBoxIn);
|
||||
}
|
||||
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(this.getMetadataWithOffset(Blocks.ladder, Facing.WEST.getIndex())), 9, 1, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(this.getMetadataWithOffset(Blocks.ladder, Facing.WEST.getIndex())), 9, 2, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(this.getMetadataWithOffset(Blocks.ladder, Facing.WEST.getIndex())), 9, 3, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.ladder.getState().withProperty(BlockLadder.FACING, Facing.WEST)), 9, 1, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.ladder.getState().withProperty(BlockLadder.FACING, Facing.WEST)), 9, 2, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.ladder.getState().withProperty(BlockLadder.FACING, Facing.WEST)), 9, 3, 3, structureBoundingBoxIn);
|
||||
this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 4, 8, RngLoot.addToList(LootConstants.STRONGHOLD_CROSS, Items.enchanted_book.getRandom(randomIn)), 1 + randomIn.zrange(4));
|
||||
}
|
||||
|
||||
|
@ -1313,13 +1318,13 @@ public class StructureStronghold
|
|||
this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 0, 0, 0, 4, 10, 7, true, randomIn, StructureStronghold.strongholdStones);
|
||||
this.placeDoor(worldIn, randomIn, structureBoundingBoxIn, this.field_143013_d, 1, 7, 0);
|
||||
this.placeDoor(worldIn, randomIn, structureBoundingBoxIn, StructureStronghold.Stronghold.Door.OPENING, 1, 1, 7);
|
||||
int i = this.getMetadataWithOffset(Blocks.cobblestone_stairs, 2);
|
||||
State i = this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.SOUTH));
|
||||
|
||||
for (int j = 0; j < 6; ++j)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 1, 6 - j, 1 + j, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 2, 6 - j, 1 + j, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(i), 3, 6 - j, 1 + j, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 1, 6 - j, 1 + j, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 2, 6 - j, 1 + j, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 3, 6 - j, 1 + j, structureBoundingBoxIn);
|
||||
|
||||
if (j < 5)
|
||||
{
|
||||
|
@ -1496,7 +1501,7 @@ public class StructureStronghold
|
|||
this.setBlockState(worldIn, Blocks.stonebrick.getState(), p_74990_5_ + 2, p_74990_6_ + 1, p_74990_7_, p_74990_3_);
|
||||
this.setBlockState(worldIn, Blocks.stonebrick.getState(), p_74990_5_ + 2, p_74990_6_, p_74990_7_, p_74990_3_);
|
||||
this.setBlockState(worldIn, Blocks.oak_door.getState(), p_74990_5_ + 1, p_74990_6_, p_74990_7_, p_74990_3_);
|
||||
this.setBlockState(worldIn, Blocks.oak_door.getStateFromMeta(8), p_74990_5_ + 1, p_74990_6_ + 1, p_74990_7_, p_74990_3_);
|
||||
this.setBlockState(worldIn, Blocks.oak_door.getState().withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER), p_74990_5_ + 1, p_74990_6_ + 1, p_74990_7_, p_74990_3_);
|
||||
break;
|
||||
|
||||
case GRATES:
|
||||
|
@ -1520,9 +1525,9 @@ public class StructureStronghold
|
|||
this.setBlockState(worldIn, Blocks.stonebrick.getState(), p_74990_5_ + 2, p_74990_6_ + 1, p_74990_7_, p_74990_3_);
|
||||
this.setBlockState(worldIn, Blocks.stonebrick.getState(), p_74990_5_ + 2, p_74990_6_, p_74990_7_, p_74990_3_);
|
||||
this.setBlockState(worldIn, Blocks.iron_door.getState(), p_74990_5_ + 1, p_74990_6_, p_74990_7_, p_74990_3_);
|
||||
this.setBlockState(worldIn, Blocks.iron_door.getStateFromMeta(8), p_74990_5_ + 1, p_74990_6_ + 1, p_74990_7_, p_74990_3_);
|
||||
this.setBlockState(worldIn, Blocks.stone_button.getStateFromMeta(this.getMetadataWithOffset(Blocks.stone_button, 4)), p_74990_5_ + 2, p_74990_6_ + 1, p_74990_7_ + 1, p_74990_3_);
|
||||
this.setBlockState(worldIn, Blocks.stone_button.getStateFromMeta(this.getMetadataWithOffset(Blocks.stone_button, 3)), p_74990_5_ + 2, p_74990_6_ + 1, p_74990_7_ - 1, p_74990_3_);
|
||||
this.setBlockState(worldIn, Blocks.iron_door.getState().withProperty(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER), p_74990_5_ + 1, p_74990_6_ + 1, p_74990_7_, p_74990_3_);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.stone_button.getState().withProperty(BlockButton.FACING, Facing.NORTH)), p_74990_5_ + 2, p_74990_6_ + 1, p_74990_7_ + 1, p_74990_3_);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.stone_button.getState().withProperty(BlockButton.FACING, Facing.SOUTH)), p_74990_5_ + 2, p_74990_6_ + 1, p_74990_7_ - 1, p_74990_3_);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
|
||||
import common.biome.Biome;
|
||||
import common.block.artificial.BlockDoor;
|
||||
import common.block.artificial.BlockLadder;
|
||||
import common.block.artificial.BlockSlab;
|
||||
import common.block.artificial.BlockStairs;
|
||||
import common.block.foliage.BlockCrops;
|
||||
|
@ -320,11 +322,11 @@ public class StructureVillage
|
|||
this.setBlockState(worldIn, Blocks.cobblestone.getState(), 2, 1, 7, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone.getState(), 3, 1, 6, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone.getState(), 3, 1, 7, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.cobblestone_stairs, 3)), 1, 1, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.cobblestone_stairs, 3)), 2, 1, 6, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.cobblestone_stairs, 3)), 3, 1, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.cobblestone_stairs, 1)), 1, 2, 7, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.cobblestone_stairs, 0)), 3, 2, 7, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH)), 1, 1, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH)), 2, 1, 6, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH)), 3, 1, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.WEST)), 1, 2, 7, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.EAST)), 3, 2, 7, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.glass_pane.getState(), 0, 2, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.glass_pane.getState(), 0, 3, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.glass_pane.getState(), 4, 2, 2, structureBoundingBoxIn);
|
||||
|
@ -344,20 +346,20 @@ public class StructureVillage
|
|||
this.setBlockState(worldIn, Blocks.torch.getState().withProperty(BlockTorch.FACING, this.coordBaseMode.rotateY()), 1, 4, 6, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.torch.getState().withProperty(BlockTorch.FACING, this.coordBaseMode.rotateYCCW()), 3, 4, 6, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.torch.getState().withProperty(BlockTorch.FACING, this.coordBaseMode), 2, 4, 5, structureBoundingBoxIn);
|
||||
int i = this.getMetadataWithOffset(Blocks.ladder, 4);
|
||||
State i = this.getMetadataWithOffset(Blocks.ladder.getState().withProperty(BlockLadder.FACING, Facing.WEST));
|
||||
|
||||
for (int j = 1; j <= 9; ++j)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(i), 3, j, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 3, j, 3, structureBoundingBoxIn);
|
||||
}
|
||||
|
||||
this.setBlockState(worldIn, Blocks.air.getState(), 2, 1, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.air.getState(), 2, 2, 0, structureBoundingBoxIn);
|
||||
this.placeDoorCurrentPosition(worldIn, structureBoundingBoxIn, randomIn, 2, 1, 0, Facing.getHorizontal(this.getMetadataWithOffset(Blocks.oak_door, 1)));
|
||||
this.placeDoorCurrentPosition(worldIn, structureBoundingBoxIn, randomIn, 2, 1, 0, this.getMetadataWithOffset(Blocks.oak_door.getState().withProperty(BlockDoor.FACING, Facing.SOUTH)));
|
||||
|
||||
if (this.getBlockStateFromPos(worldIn, 2, 0, -1, structureBoundingBoxIn).getBlock() == Blocks.air && this.getBlockStateFromPos(worldIn, 2, -1, -1, structureBoundingBoxIn).getBlock() != Blocks.air)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.cobblestone_stairs, 3)), 2, 0, -1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH)), 2, 0, -1, structureBoundingBoxIn);
|
||||
}
|
||||
|
||||
for (int l = 0; l < 9; ++l)
|
||||
|
@ -643,15 +645,15 @@ public class StructureVillage
|
|||
this.setBlockState(worldIn, Blocks.oak_planks.getState(), 0, 4, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_planks.getState(), 8, 4, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_planks.getState(), 8, 4, 3, structureBoundingBoxIn);
|
||||
int i = this.getMetadataWithOffset(Blocks.oak_stairs, 3);
|
||||
int j = this.getMetadataWithOffset(Blocks.oak_stairs, 2);
|
||||
State i = this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH));
|
||||
State j = this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.SOUTH));
|
||||
|
||||
for (int k = -1; k <= 2; ++k)
|
||||
{
|
||||
for (int l = 0; l <= 8; ++l)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(i), l, 4 + k, k, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(j), l, 4 + k, 5 - k, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, l, 4 + k, k, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, j, l, 4 + k, 5 - k, structureBoundingBoxIn);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -670,25 +672,25 @@ public class StructureVillage
|
|||
this.setBlockState(worldIn, Blocks.oak_fence.getState(), 2, 1, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.wooden_pressure_plate.getState(), 2, 2, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_planks.getState(), 1, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.oak_stairs, 3)), 2, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.oak_stairs, 1)), 1, 1, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH)), 2, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.WEST)), 1, 1, 3, structureBoundingBoxIn);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 0, 1, 7, 0, 3, Blocks.stone_slab.getState().withProperty(BlockSlab.DOUBLE, true), Blocks.stone_slab.getState().withProperty(BlockSlab.DOUBLE, true), false);
|
||||
this.setBlockState(worldIn, Blocks.stone_slab.getState().withProperty(BlockSlab.DOUBLE, true), 6, 1, 1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.stone_slab.getState().withProperty(BlockSlab.DOUBLE, true), 6, 1, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.air.getState(), 2, 1, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.air.getState(), 2, 2, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.torch.getState().withProperty(BlockTorch.FACING, this.coordBaseMode), 2, 3, 1, structureBoundingBoxIn);
|
||||
this.placeDoorCurrentPosition(worldIn, structureBoundingBoxIn, randomIn, 2, 1, 0, Facing.getHorizontal(this.getMetadataWithOffset(Blocks.oak_door, 1)));
|
||||
this.placeDoorCurrentPosition(worldIn, structureBoundingBoxIn, randomIn, 2, 1, 0, this.getMetadataWithOffset(Blocks.oak_door.getState().withProperty(BlockDoor.FACING, Facing.SOUTH)));
|
||||
|
||||
if (this.getBlockStateFromPos(worldIn, 2, 0, -1, structureBoundingBoxIn).getBlock() == Blocks.air && this.getBlockStateFromPos(worldIn, 2, -1, -1, structureBoundingBoxIn).getBlock() != Blocks.air)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.cobblestone_stairs, 3)), 2, 0, -1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH)), 2, 0, -1, structureBoundingBoxIn);
|
||||
}
|
||||
|
||||
this.setBlockState(worldIn, Blocks.air.getState(), 6, 1, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.air.getState(), 6, 2, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.torch.getState().withProperty(BlockTorch.FACING, this.coordBaseMode.getOpposite()), 6, 3, 4, structureBoundingBoxIn);
|
||||
this.placeDoorCurrentPosition(worldIn, structureBoundingBoxIn, randomIn, 6, 1, 5, Facing.getHorizontal(this.getMetadataWithOffset(Blocks.oak_door, 1)));
|
||||
this.placeDoorCurrentPosition(worldIn, structureBoundingBoxIn, randomIn, 6, 1, 5, this.getMetadataWithOffset(Blocks.oak_door.getState().withProperty(BlockDoor.FACING, Facing.SOUTH)));
|
||||
|
||||
for (int i1 = 0; i1 < 5; ++i1)
|
||||
{
|
||||
|
@ -747,15 +749,15 @@ public class StructureVillage
|
|||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 5, 0, 8, 5, 5, Blocks.cobblestone.getState(), Blocks.cobblestone.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 6, 1, 8, 6, 4, Blocks.cobblestone.getState(), Blocks.cobblestone.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 7, 2, 8, 7, 3, Blocks.cobblestone.getState(), Blocks.cobblestone.getState(), false);
|
||||
int i = this.getMetadataWithOffset(Blocks.oak_stairs, 3);
|
||||
int j = this.getMetadataWithOffset(Blocks.oak_stairs, 2);
|
||||
State i = this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH));
|
||||
State j = this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.SOUTH));
|
||||
|
||||
for (int k = -1; k <= 2; ++k)
|
||||
{
|
||||
for (int l = 0; l <= 8; ++l)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(i), l, 6 + k, k, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(j), l, 6 + k, 5 - k, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, l, 6 + k, k, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, j, l, 6 + k, 5 - k, structureBoundingBoxIn);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -793,12 +795,12 @@ public class StructureVillage
|
|||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 4, 4, 7, 4, 4, Blocks.oak_planks.getState(), Blocks.oak_planks.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 4, 7, 3, 4, Blocks.bookshelf.getState(), Blocks.bookshelf.getState(), false);
|
||||
this.setBlockState(worldIn, Blocks.oak_planks.getState(), 7, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.oak_stairs, 0)), 7, 1, 3, structureBoundingBoxIn);
|
||||
int j1 = this.getMetadataWithOffset(Blocks.oak_stairs, 3);
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(j1), 6, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(j1), 5, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(j1), 4, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(j1), 3, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.EAST)), 7, 1, 3, structureBoundingBoxIn);
|
||||
State j1 = this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH));
|
||||
this.setBlockState(worldIn, j1, 6, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, j1, 5, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, j1, 4, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, j1, 3, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_fence.getState(), 6, 1, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.wooden_pressure_plate.getState(), 6, 2, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_fence.getState(), 4, 1, 3, structureBoundingBoxIn);
|
||||
|
@ -806,11 +808,11 @@ public class StructureVillage
|
|||
this.setBlockState(worldIn, Blocks.workbench.getState(), 7, 1, 1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.air.getState(), 1, 1, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.air.getState(), 1, 2, 0, structureBoundingBoxIn);
|
||||
this.placeDoorCurrentPosition(worldIn, structureBoundingBoxIn, randomIn, 1, 1, 0, Facing.getHorizontal(this.getMetadataWithOffset(Blocks.oak_door, 1)));
|
||||
this.placeDoorCurrentPosition(worldIn, structureBoundingBoxIn, randomIn, 1, 1, 0, this.getMetadataWithOffset(Blocks.oak_door.getState().withProperty(BlockDoor.FACING, Facing.SOUTH)));
|
||||
|
||||
if (this.getBlockStateFromPos(worldIn, 1, 0, -1, structureBoundingBoxIn).getBlock() == Blocks.air && this.getBlockStateFromPos(worldIn, 1, -1, -1, structureBoundingBoxIn).getBlock() != Blocks.air)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.cobblestone_stairs, 3)), 1, 0, -1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH)), 1, 0, -1, structureBoundingBoxIn);
|
||||
}
|
||||
|
||||
for (int k1 = 0; k1 < 6; ++k1)
|
||||
|
@ -912,8 +914,8 @@ public class StructureVillage
|
|||
this.setBlockState(worldIn, Blocks.oak_fence.getState(), 2, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.wooden_pressure_plate.getState(), 2, 2, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_planks.getState(), 1, 1, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.oak_stairs, 3)), 2, 1, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.oak_stairs, 1)), 1, 1, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH)), 2, 1, 5, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.WEST)), 1, 1, 4, structureBoundingBoxIn);
|
||||
|
||||
if (!this.hasMadeChest && structureBoundingBoxIn.isVecInside(new BlockPos(this.getXWithOffset(5, 5), this.getYWithOffset(1), this.getZWithOffset(5, 5))))
|
||||
{
|
||||
|
@ -925,7 +927,7 @@ public class StructureVillage
|
|||
{
|
||||
if (this.getBlockStateFromPos(worldIn, i, 0, -1, structureBoundingBoxIn).getBlock() == Blocks.air && this.getBlockStateFromPos(worldIn, i, -1, -1, structureBoundingBoxIn).getBlock() != Blocks.air)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.cobblestone_stairs, 3)), i, 0, -1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH)), i, 0, -1, structureBoundingBoxIn);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1001,18 +1003,18 @@ public class StructureVillage
|
|||
this.setBlockState(worldIn, Blocks.oak_planks.getState(), 8, 4, 2, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_planks.getState(), 8, 4, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_planks.getState(), 8, 4, 4, structureBoundingBoxIn);
|
||||
int i = this.getMetadataWithOffset(Blocks.oak_stairs, 3);
|
||||
int j = this.getMetadataWithOffset(Blocks.oak_stairs, 2);
|
||||
State i = this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH));
|
||||
State j = this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.SOUTH));
|
||||
|
||||
for (int k = -1; k <= 2; ++k)
|
||||
{
|
||||
for (int l = 0; l <= 8; ++l)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(i), l, 4 + k, k, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, l, 4 + k, k, structureBoundingBoxIn);
|
||||
|
||||
if ((k > -1 || l <= 1) && (k > 0 || l <= 3) && (k > 1 || l <= 4 || l >= 6))
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(j), l, 4 + k, 5 - k, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, j, l, 4 + k, 5 - k, structureBoundingBoxIn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1022,7 +1024,7 @@ public class StructureVillage
|
|||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 4, 5, 4, 4, 5, 10, Blocks.oak_planks.getState(), Blocks.oak_planks.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 5, 4, 6, 5, 10, Blocks.oak_planks.getState(), Blocks.oak_planks.getState(), false);
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 6, 3, 5, 6, 10, Blocks.oak_planks.getState(), Blocks.oak_planks.getState(), false);
|
||||
int k1 = this.getMetadataWithOffset(Blocks.oak_stairs, 0);
|
||||
State k1 = this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.EAST));
|
||||
|
||||
for (int l1 = 4; l1 >= 1; --l1)
|
||||
{
|
||||
|
@ -1030,20 +1032,20 @@ public class StructureVillage
|
|||
|
||||
for (int i1 = 8 - l1; i1 <= 10; ++i1)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(k1), l1, 2 + l1, i1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, k1, l1, 2 + l1, i1, structureBoundingBoxIn);
|
||||
}
|
||||
}
|
||||
|
||||
int i2 = this.getMetadataWithOffset(Blocks.oak_stairs, 1);
|
||||
State i2 = this.getMetadataWithOffset(Blocks.oak_stairs.getState().withProperty(BlockStairs.FACING, Facing.WEST));
|
||||
this.setBlockState(worldIn, Blocks.oak_planks.getState(), 6, 6, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_planks.getState(), 7, 5, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(i2), 6, 6, 4, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i2, 6, 6, 4, structureBoundingBoxIn);
|
||||
|
||||
for (int j2 = 6; j2 <= 8; ++j2)
|
||||
{
|
||||
for (int j1 = 5; j1 <= 10; ++j1)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.oak_stairs.getStateFromMeta(i2), j2, 12 - j2, j1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i2, j2, 12 - j2, j1, structureBoundingBoxIn);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1074,12 +1076,12 @@ public class StructureVillage
|
|||
this.setBlockState(worldIn, Blocks.air.getState(), 2, 1, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.air.getState(), 2, 2, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.torch.getState().withProperty(BlockTorch.FACING, this.coordBaseMode), 2, 3, 1, structureBoundingBoxIn);
|
||||
this.placeDoorCurrentPosition(worldIn, structureBoundingBoxIn, randomIn, 2, 1, 0, Facing.getHorizontal(this.getMetadataWithOffset(Blocks.oak_door, 1)));
|
||||
this.placeDoorCurrentPosition(worldIn, structureBoundingBoxIn, randomIn, 2, 1, 0, this.getMetadataWithOffset(Blocks.oak_door.getState().withProperty(BlockDoor.FACING, Facing.SOUTH)));
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 0, -1, 3, 2, -1, Blocks.air.getState(), Blocks.air.getState(), false);
|
||||
|
||||
if (this.getBlockStateFromPos(worldIn, 2, 0, -1, structureBoundingBoxIn).getBlock() == Blocks.air && this.getBlockStateFromPos(worldIn, 2, -1, -1, structureBoundingBoxIn).getBlock() != Blocks.air)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.cobblestone_stairs, 3)), 2, 0, -1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH)), 2, 0, -1, structureBoundingBoxIn);
|
||||
}
|
||||
|
||||
for (int k2 = 0; k2 < 5; ++k2)
|
||||
|
@ -1184,7 +1186,7 @@ public class StructureVillage
|
|||
|
||||
if (this.getBlockStateFromPos(worldIn, 2, 0, -1, structureBoundingBoxIn).getBlock() == Blocks.air && this.getBlockStateFromPos(worldIn, 2, -1, -1, structureBoundingBoxIn).getBlock() != Blocks.air)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.cobblestone_stairs, 3)), 2, 0, -1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH)), 2, 0, -1, structureBoundingBoxIn);
|
||||
}
|
||||
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 1, 3, 3, 3, Blocks.air.getState(), Blocks.air.getState(), false);
|
||||
|
@ -1211,11 +1213,11 @@ public class StructureVillage
|
|||
|
||||
if (this.isRoofAccessible)
|
||||
{
|
||||
int i = this.getMetadataWithOffset(Blocks.ladder, 3);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(i), 3, 1, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(i), 3, 2, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(i), 3, 3, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(i), 3, 4, 3, structureBoundingBoxIn);
|
||||
State i = this.getMetadataWithOffset(Blocks.ladder.getState().withProperty(BlockLadder.FACING, Facing.SOUTH));
|
||||
this.setBlockState(worldIn, i, 3, 1, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 3, 2, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 3, 3, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, i, 3, 4, 3, structureBoundingBoxIn);
|
||||
}
|
||||
|
||||
this.setBlockState(worldIn, Blocks.torch.getState().withProperty(BlockTorch.FACING, this.coordBaseMode), 2, 3, 1, structureBoundingBoxIn);
|
||||
|
@ -1863,11 +1865,11 @@ public class StructureVillage
|
|||
|
||||
this.setBlockState(worldIn, Blocks.air.getState(), 1, 1, 0, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.air.getState(), 1, 2, 0, structureBoundingBoxIn);
|
||||
this.placeDoorCurrentPosition(worldIn, structureBoundingBoxIn, randomIn, 1, 1, 0, Facing.getHorizontal(this.getMetadataWithOffset(Blocks.oak_door, 1)));
|
||||
this.placeDoorCurrentPosition(worldIn, structureBoundingBoxIn, randomIn, 1, 1, 0, this.getMetadataWithOffset(Blocks.oak_door.getState().withProperty(BlockDoor.FACING, Facing.SOUTH)));
|
||||
|
||||
if (this.getBlockStateFromPos(worldIn, 1, 0, -1, structureBoundingBoxIn).getBlock() == Blocks.air && this.getBlockStateFromPos(worldIn, 1, -1, -1, structureBoundingBoxIn).getBlock() != Blocks.air)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.cobblestone_stairs.getStateFromMeta(this.getMetadataWithOffset(Blocks.cobblestone_stairs, 3)), 1, 0, -1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.cobblestone_stairs.getState().withProperty(BlockStairs.FACING, Facing.NORTH)), 1, 0, -1, structureBoundingBoxIn);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 5; ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue