switch (attachedChests.size()) { case 0: chest.setFacingDirection(normalFacing); state.setData(chest); return; BlockFace facing = getFacingDirection(normalFacing, otherChest.getFacing(), otherPart, player); chest.setFacingDirection(facing); state.setData(chest); otherChest.setFacingDirection(facing); otherPartState.setData(otherChest); otherPartState.update();
.createRandomItemsContainer(new Vector(x, 1, z), random, chestContent, new Chest(face), 8); break;
/** * Instantiate a chest facing in a particular direction. * * @param direction the direction the chest's lit opens towards */ public Chest(BlockFace direction) { this(); setFacingDirection(direction); }
BlockFace facing = ((Chest) data).getFacing(); ArrayList<Block> chests = new ArrayList<>(); if (facing == BlockFace.NORTH || facing == BlockFace.SOUTH) {
hasPlacedChest0 = builder .createRandomItemsContainer(new Vector(10, 3, 12), random, chestContent, new Chest(getRelativeFacing(BlockFace.NORTH)), random.nextInt(5) + 2); new Chest(getRelativeFacing(BlockFace.EAST)), random.nextInt(5) + 2); new Chest(getRelativeFacing(BlockFace.SOUTH)), random.nextInt(5) + 2); new Chest(getRelativeFacing(BlockFace.WEST)), random.nextInt(5) + 2);
/** * Instantiate a chest facing in a particular direction. * * @param direction the direction the chest's lit opens towards */ public Chest(BlockFace direction) { this(); setFacingDirection(direction); }
new Chest(0, 0, 0, Arrays.asList(0), false, false)
List<Integer> list = Arrays.asList(1,2,3); Chest chest = new Chest(0, 0, 0, list, false, false);
Chest chest = new Chest(0, 0, 0, new ArrayList<Integer>(), false, false);
new Chest(0, 0, 0, Collections.emptyList(), false, false)
chest = new Chest(0,0,0, Arrays.asList(5, 6, 7),false,false);