@@ -43,12 +43,12 @@ public class CraftBeehive extends CraftBlockEntityState<TileEntityBeehive> imple
|
||||
|
||||
@Override
|
||||
public boolean isSedated() {
|
||||
return isPlaced() && getTileEntity().k(); // PAIL rename isSedated
|
||||
return isPlaced() && getTileEntity().isSedated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEntityCount() {
|
||||
return getSnapshot().j(); // PAIL rename beeCount
|
||||
return getSnapshot().getBeeCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,6 +81,6 @@ public class CraftBeehive extends CraftBlockEntityState<TileEntityBeehive> imple
|
||||
public void addEntity(Bee entity) {
|
||||
Preconditions.checkArgument(entity != null, "Entity must not be null");
|
||||
|
||||
getSnapshot().a(((CraftBee) entity).getHandle(), false); // PAIL rename addBee
|
||||
getSnapshot().addBee(((CraftBee) entity).getHandle(), false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -551,20 +551,29 @@ public class CraftBlock implements Block {
|
||||
@Override
|
||||
public int getBlockPower(BlockFace face) {
|
||||
int power = 0;
|
||||
BlockRedstoneWire wire = (BlockRedstoneWire) Blocks.REDSTONE_WIRE;
|
||||
net.minecraft.server.World world = this.world.getMinecraftWorld();
|
||||
int x = getX();
|
||||
int y = getY();
|
||||
int z = getZ();
|
||||
if ((face == BlockFace.DOWN || face == BlockFace.SELF) && world.isBlockFacePowered(new BlockPosition(x, y - 1, z), EnumDirection.DOWN)) power = wire.getPower(power, world.getType(new BlockPosition(x, y - 1, z)));
|
||||
if ((face == BlockFace.UP || face == BlockFace.SELF) && world.isBlockFacePowered(new BlockPosition(x, y + 1, z), EnumDirection.UP)) power = wire.getPower(power, world.getType(new BlockPosition(x, y + 1, z)));
|
||||
if ((face == BlockFace.EAST || face == BlockFace.SELF) && world.isBlockFacePowered(new BlockPosition(x + 1, y, z), EnumDirection.EAST)) power = wire.getPower(power, world.getType(new BlockPosition(x + 1, y, z)));
|
||||
if ((face == BlockFace.WEST || face == BlockFace.SELF) && world.isBlockFacePowered(new BlockPosition(x - 1, y, z), EnumDirection.WEST)) power = wire.getPower(power, world.getType(new BlockPosition(x - 1, y, z)));
|
||||
if ((face == BlockFace.NORTH || face == BlockFace.SELF) && world.isBlockFacePowered(new BlockPosition(x, y, z - 1), EnumDirection.NORTH)) power = wire.getPower(power, world.getType(new BlockPosition(x, y, z - 1)));
|
||||
if ((face == BlockFace.SOUTH || face == BlockFace.SELF) && world.isBlockFacePowered(new BlockPosition(x, y, z + 1), EnumDirection.SOUTH)) power = wire.getPower(power, world.getType(new BlockPosition(x, y, z + 1)));
|
||||
if ((face == BlockFace.DOWN || face == BlockFace.SELF) && world.isBlockFacePowered(new BlockPosition(x, y - 1, z), EnumDirection.DOWN)) power = getPower(power, world.getType(new BlockPosition(x, y - 1, z)));
|
||||
if ((face == BlockFace.UP || face == BlockFace.SELF) && world.isBlockFacePowered(new BlockPosition(x, y + 1, z), EnumDirection.UP)) power = getPower(power, world.getType(new BlockPosition(x, y + 1, z)));
|
||||
if ((face == BlockFace.EAST || face == BlockFace.SELF) && world.isBlockFacePowered(new BlockPosition(x + 1, y, z), EnumDirection.EAST)) power = getPower(power, world.getType(new BlockPosition(x + 1, y, z)));
|
||||
if ((face == BlockFace.WEST || face == BlockFace.SELF) && world.isBlockFacePowered(new BlockPosition(x - 1, y, z), EnumDirection.WEST)) power = getPower(power, world.getType(new BlockPosition(x - 1, y, z)));
|
||||
if ((face == BlockFace.NORTH || face == BlockFace.SELF) && world.isBlockFacePowered(new BlockPosition(x, y, z - 1), EnumDirection.NORTH)) power = getPower(power, world.getType(new BlockPosition(x, y, z - 1)));
|
||||
if ((face == BlockFace.SOUTH || face == BlockFace.SELF) && world.isBlockFacePowered(new BlockPosition(x, y, z + 1), EnumDirection.SOUTH)) power = getPower(power, world.getType(new BlockPosition(x, y, z + 1)));
|
||||
return power > 0 ? power : (face == BlockFace.SELF ? isBlockIndirectlyPowered() : isBlockFaceIndirectlyPowered(face)) ? 15 : 0;
|
||||
}
|
||||
|
||||
private static int getPower(int i, IBlockData iblockdata) {
|
||||
if (!iblockdata.getBlock().a(Blocks.REDSTONE_WIRE)) {
|
||||
return i;
|
||||
} else {
|
||||
int j = iblockdata.get(BlockRedstoneWire.POWER);
|
||||
|
||||
return j > i ? j : i;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlockPower() {
|
||||
return getBlockPower(BlockFace.SELF);
|
||||
@@ -599,7 +608,7 @@ public class CraftBlock implements Block {
|
||||
boolean result = false;
|
||||
|
||||
// Modelled off EntityHuman#hasBlock
|
||||
if (block != Blocks.AIR && (item == null || iblockdata.getMaterial().isAlwaysDestroyable() || nmsItem.canDestroySpecialBlock(iblockdata))) {
|
||||
if (block != Blocks.AIR && (item == null || iblockdata.isAlwaysDestroyable() || nmsItem.canDestroySpecialBlock(iblockdata))) {
|
||||
net.minecraft.server.Block.dropItems(iblockdata, world.getMinecraftWorld(), position, world.getTileEntity(position), null, nmsItem);
|
||||
result = true;
|
||||
}
|
||||
@@ -623,7 +632,7 @@ public class CraftBlock implements Block {
|
||||
net.minecraft.server.ItemStack nms = CraftItemStack.asNMSCopy(item);
|
||||
|
||||
// Modelled off EntityHuman#hasBlock
|
||||
if (item == null || iblockdata.getMaterial().isAlwaysDestroyable() || nms.canDestroySpecialBlock(iblockdata)) {
|
||||
if (item == null || iblockdata.isAlwaysDestroyable() || nms.canDestroySpecialBlock(iblockdata)) {
|
||||
return net.minecraft.server.Block.getDrops(iblockdata, (WorldServer) world.getMinecraftWorld(), position, world.getTileEntity(position), entity == null ? null : ((CraftEntity) entity).getHandle(), nms)
|
||||
.stream().map(CraftItemStack::asBukkitCopy).collect(Collectors.toList());
|
||||
} else {
|
||||
|
||||
@@ -48,7 +48,7 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
|
||||
}
|
||||
|
||||
NBTTagCompound nbtTagCompound = tileEntity.save(new NBTTagCompound());
|
||||
T snapshot = (T) TileEntity.create(nbtTagCompound);
|
||||
T snapshot = (T) TileEntity.create(getHandle(), nbtTagCompound);
|
||||
|
||||
return snapshot;
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
|
||||
private void copyData(T from, T to) {
|
||||
BlockPosition pos = to.getPosition();
|
||||
NBTTagCompound nbtTagCompound = from.save(new NBTTagCompound());
|
||||
to.load(nbtTagCompound);
|
||||
to.load(getHandle(), nbtTagCompound);
|
||||
|
||||
// reset the original position:
|
||||
to.setPosition(pos);
|
||||
|
||||
@@ -13,12 +13,12 @@ import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import net.minecraft.server.ArgumentBlock;
|
||||
import net.minecraft.server.Block;
|
||||
import net.minecraft.server.BlockDataAbstract;
|
||||
import net.minecraft.server.BlockStateBoolean;
|
||||
import net.minecraft.server.BlockStateEnum;
|
||||
import net.minecraft.server.BlockStateInteger;
|
||||
import net.minecraft.server.EnumDirection;
|
||||
import net.minecraft.server.IBlockData;
|
||||
import net.minecraft.server.IBlockDataHolder;
|
||||
import net.minecraft.server.IBlockState;
|
||||
import net.minecraft.server.INamable;
|
||||
import net.minecraft.server.IRegistry;
|
||||
@@ -93,7 +93,7 @@ public class CraftBlockData implements BlockData {
|
||||
*/
|
||||
protected <B extends Enum<B>, N extends Enum<N> & INamable> void set(BlockStateEnum<N> nms, Enum<B> bukkit) {
|
||||
this.parsedStates = null;
|
||||
this.state = this.state.set(nms, toNMS(bukkit, nms.b()));
|
||||
this.state = this.state.set(nms, toNMS(bukkit, nms.getType()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -241,7 +241,7 @@ public class CraftBlockData implements BlockData {
|
||||
|
||||
@Override
|
||||
public String getAsString() {
|
||||
return toString(((BlockDataAbstract) state).getStateMap());
|
||||
return toString(state.getStateMap());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -269,7 +269,7 @@ public class CraftBlockData implements BlockData {
|
||||
|
||||
if (!states.isEmpty()) {
|
||||
stateString.append('[');
|
||||
stateString.append(states.entrySet().stream().map(BlockDataAbstract.STATE_TO_VALUE).collect(Collectors.joining(",")));
|
||||
stateString.append(states.entrySet().stream().map(IBlockDataHolder.STATE_TO_VALUE).collect(Collectors.joining(",")));
|
||||
stateString.append(']');
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ public class CraftBlockData implements BlockData {
|
||||
for (Map.Entry<IBlockState<?>, Comparable<?>> entry : state.getStateMap().entrySet()) {
|
||||
IBlockState iblockstate = (IBlockState) entry.getKey();
|
||||
|
||||
compound.setString(iblockstate.a(), iblockstate.a(entry.getValue()));
|
||||
compound.setString(iblockstate.getName(), iblockstate.a(entry.getValue()));
|
||||
}
|
||||
|
||||
return compound;
|
||||
@@ -403,6 +403,7 @@ public class CraftBlockData implements BlockData {
|
||||
register(net.minecraft.server.BlockCampfire.class, org.bukkit.craftbukkit.block.impl.CraftCampfire::new);
|
||||
register(net.minecraft.server.BlockCarrots.class, org.bukkit.craftbukkit.block.impl.CraftCarrots::new);
|
||||
register(net.minecraft.server.BlockCauldron.class, org.bukkit.craftbukkit.block.impl.CraftCauldron::new);
|
||||
register(net.minecraft.server.BlockChain.class, org.bukkit.craftbukkit.block.impl.CraftChain::new);
|
||||
register(net.minecraft.server.BlockChest.class, org.bukkit.craftbukkit.block.impl.CraftChest::new);
|
||||
register(net.minecraft.server.BlockChestTrapped.class, org.bukkit.craftbukkit.block.impl.CraftChestTrapped::new);
|
||||
register(net.minecraft.server.BlockChorusFlower.class, org.bukkit.craftbukkit.block.impl.CraftChorusFlower::new);
|
||||
@@ -449,7 +450,6 @@ public class CraftBlockData implements BlockData {
|
||||
register(net.minecraft.server.BlockLeaves.class, org.bukkit.craftbukkit.block.impl.CraftLeaves::new);
|
||||
register(net.minecraft.server.BlockLectern.class, org.bukkit.craftbukkit.block.impl.CraftLectern::new);
|
||||
register(net.minecraft.server.BlockLever.class, org.bukkit.craftbukkit.block.impl.CraftLever::new);
|
||||
register(net.minecraft.server.BlockLogAbstract.class, org.bukkit.craftbukkit.block.impl.CraftLogAbstract::new);
|
||||
register(net.minecraft.server.BlockLoom.class, org.bukkit.craftbukkit.block.impl.CraftLoom::new);
|
||||
register(net.minecraft.server.BlockMinecartDetector.class, org.bukkit.craftbukkit.block.impl.CraftMinecartDetector::new);
|
||||
register(net.minecraft.server.BlockMinecartTrack.class, org.bukkit.craftbukkit.block.impl.CraftMinecartTrack::new);
|
||||
@@ -474,6 +474,7 @@ public class CraftBlockData implements BlockData {
|
||||
register(net.minecraft.server.BlockRedstoneWire.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneWire::new);
|
||||
register(net.minecraft.server.BlockReed.class, org.bukkit.craftbukkit.block.impl.CraftReed::new);
|
||||
register(net.minecraft.server.BlockRepeater.class, org.bukkit.craftbukkit.block.impl.CraftRepeater::new);
|
||||
register(net.minecraft.server.BlockRespawnAnchor.class, org.bukkit.craftbukkit.block.impl.CraftRespawnAnchor::new);
|
||||
register(net.minecraft.server.BlockRotatable.class, org.bukkit.craftbukkit.block.impl.CraftRotatable::new);
|
||||
register(net.minecraft.server.BlockSapling.class, org.bukkit.craftbukkit.block.impl.CraftSapling::new);
|
||||
register(net.minecraft.server.BlockScaffolding.class, org.bukkit.craftbukkit.block.impl.CraftScaffolding::new);
|
||||
@@ -499,13 +500,16 @@ public class CraftBlockData implements BlockData {
|
||||
register(net.minecraft.server.BlockTallPlant.class, org.bukkit.craftbukkit.block.impl.CraftTallPlant::new);
|
||||
register(net.minecraft.server.BlockTallPlantFlower.class, org.bukkit.craftbukkit.block.impl.CraftTallPlantFlower::new);
|
||||
register(net.minecraft.server.BlockTallSeaGrass.class, org.bukkit.craftbukkit.block.impl.CraftTallSeaGrass::new);
|
||||
register(net.minecraft.server.BlockTarget.class, org.bukkit.craftbukkit.block.impl.CraftTarget::new);
|
||||
register(net.minecraft.server.BlockTorchWall.class, org.bukkit.craftbukkit.block.impl.CraftTorchWall::new);
|
||||
register(net.minecraft.server.BlockTrapdoor.class, org.bukkit.craftbukkit.block.impl.CraftTrapdoor::new);
|
||||
register(net.minecraft.server.BlockTripwire.class, org.bukkit.craftbukkit.block.impl.CraftTripwire::new);
|
||||
register(net.minecraft.server.BlockTripwireHook.class, org.bukkit.craftbukkit.block.impl.CraftTripwireHook::new);
|
||||
register(net.minecraft.server.BlockTurtleEgg.class, org.bukkit.craftbukkit.block.impl.CraftTurtleEgg::new);
|
||||
register(net.minecraft.server.BlockTwistingVines.class, org.bukkit.craftbukkit.block.impl.CraftTwistingVines::new);
|
||||
register(net.minecraft.server.BlockVine.class, org.bukkit.craftbukkit.block.impl.CraftVine::new);
|
||||
register(net.minecraft.server.BlockWallSign.class, org.bukkit.craftbukkit.block.impl.CraftWallSign::new);
|
||||
register(net.minecraft.server.BlockWeepingVines.class, org.bukkit.craftbukkit.block.impl.CraftWeepingVines::new);
|
||||
register(net.minecraft.server.BlockWitherSkull.class, org.bukkit.craftbukkit.block.impl.CraftWitherSkull::new);
|
||||
register(net.minecraft.server.BlockWitherSkullWall.class, org.bukkit.craftbukkit.block.impl.CraftWitherSkullWall::new);
|
||||
register(net.minecraft.server.BlockWoodButton.class, org.bukkit.craftbukkit.block.impl.CraftWoodButton::new);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.bukkit.craftbukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.type.Jigsaw;
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
|
||||
public abstract class CraftJigsaw extends CraftBlockData implements Jigsaw {
|
||||
|
||||
private static final net.minecraft.server.BlockStateEnum<?> ORIENTATION = getEnum("orientation");
|
||||
|
||||
@Override
|
||||
public Orientation getOrientation() {
|
||||
return get(ORIENTATION, Orientation.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOrientation(Orientation orientation) {
|
||||
set(ORIENTATION, orientation);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.bukkit.craftbukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.type.RespawnAnchor;
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
|
||||
public abstract class CraftRespawnAnchor extends CraftBlockData implements RespawnAnchor {
|
||||
|
||||
private static final net.minecraft.server.BlockStateInteger CHARGES = getInteger("charges");
|
||||
|
||||
@Override
|
||||
public int getCharges() {
|
||||
return get(CHARGES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCharges(int charges) {
|
||||
set(CHARGES, charges);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumCharges() {
|
||||
return getMax(CHARGES);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.bukkit.craftbukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.type.Wall;
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
|
||||
public abstract class CraftWall extends CraftBlockData implements Wall {
|
||||
|
||||
private static final net.minecraft.server.BlockStateEnum<?>[] HEIGHTS = new net.minecraft.server.BlockStateEnum[]{
|
||||
getEnum("north"), getEnum("east"), getEnum("south"), getEnum("west")
|
||||
};
|
||||
|
||||
@Override
|
||||
public Height getHeight(org.bukkit.block.BlockFace face) {
|
||||
return get(HEIGHTS[face.ordinal()], Height.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHeight(org.bukkit.block.BlockFace face, Height height) {
|
||||
set(HEIGHTS[face.ordinal()], height);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftChain extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftChain() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftChain(net.minecraft.server.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.server.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.server.BlockChain.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftCobbleWall extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Fence, org.bukkit.block.data.MultipleFacing, org.bukkit.block.data.Waterlogged {
|
||||
public final class CraftCobbleWall extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Wall, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftCobbleWall() {
|
||||
super();
|
||||
@@ -13,54 +13,20 @@ public final class CraftCobbleWall extends org.bukkit.craftbukkit.block.data.Cra
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftMultipleFacing
|
||||
// org.bukkit.craftbukkit.block.data.type.CraftWall
|
||||
|
||||
private static final net.minecraft.server.BlockStateBoolean[] FACES = new net.minecraft.server.BlockStateBoolean[]{
|
||||
getBoolean(net.minecraft.server.BlockCobbleWall.class, "north", true), getBoolean(net.minecraft.server.BlockCobbleWall.class, "east", true), getBoolean(net.minecraft.server.BlockCobbleWall.class, "south", true), getBoolean(net.minecraft.server.BlockCobbleWall.class, "west", true), getBoolean(net.minecraft.server.BlockCobbleWall.class, "up", true), getBoolean(net.minecraft.server.BlockCobbleWall.class, "down", true)
|
||||
private static final net.minecraft.server.BlockStateEnum<?>[] HEIGHTS = new net.minecraft.server.BlockStateEnum[]{
|
||||
getEnum(net.minecraft.server.BlockCobbleWall.class, "north"), getEnum(net.minecraft.server.BlockCobbleWall.class, "east"), getEnum(net.minecraft.server.BlockCobbleWall.class, "south"), getEnum(net.minecraft.server.BlockCobbleWall.class, "west")
|
||||
};
|
||||
|
||||
@Override
|
||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
return get(state);
|
||||
public Height getHeight(org.bukkit.block.BlockFace face) {
|
||||
return get(HEIGHTS[face.ordinal()], Height.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
||||
net.minecraft.server.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
set(state, has);
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
|
||||
com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
|
||||
|
||||
for (int i = 0; i < FACES.length; i++) {
|
||||
if (FACES[i] != null && get(FACES[i])) {
|
||||
faces.add(org.bukkit.block.BlockFace.values()[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return faces.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.util.Set<org.bukkit.block.BlockFace> getAllowedFaces() {
|
||||
com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
|
||||
|
||||
for (int i = 0; i < FACES.length; i++) {
|
||||
if (FACES[i] != null) {
|
||||
faces.add(org.bukkit.block.BlockFace.values()[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return faces.build();
|
||||
public void setHeight(org.bukkit.block.BlockFace face, Height height) {
|
||||
set(HEIGHTS[face.ordinal()], height);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftJigsaw extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Directional {
|
||||
public final class CraftJigsaw extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Jigsaw {
|
||||
|
||||
public CraftJigsaw() {
|
||||
super();
|
||||
@@ -13,22 +13,17 @@ public final class CraftJigsaw extends org.bukkit.craftbukkit.block.data.CraftBl
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftDirectional
|
||||
// org.bukkit.craftbukkit.block.data.type.CraftJigsaw
|
||||
|
||||
private static final net.minecraft.server.BlockStateEnum<?> FACING = getEnum(net.minecraft.server.BlockJigsaw.class, "facing");
|
||||
private static final net.minecraft.server.BlockStateEnum<?> ORIENTATION = getEnum(net.minecraft.server.BlockJigsaw.class, "orientation");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.BlockFace getFacing() {
|
||||
return get(FACING, org.bukkit.block.BlockFace.class);
|
||||
public Orientation getOrientation() {
|
||||
return get(ORIENTATION, Orientation.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFacing(org.bukkit.block.BlockFace facing) {
|
||||
set(FACING, facing);
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
|
||||
return getValues(FACING, org.bukkit.block.BlockFace.class);
|
||||
public void setOrientation(Orientation orientation) {
|
||||
set(ORIENTATION, orientation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftLogAbstract extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Orientable {
|
||||
|
||||
public CraftLogAbstract() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftLogAbstract(net.minecraft.server.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftOrientable
|
||||
|
||||
private static final net.minecraft.server.BlockStateEnum<?> AXIS = getEnum(net.minecraft.server.BlockLogAbstract.class, "axis");
|
||||
|
||||
@Override
|
||||
public org.bukkit.Axis getAxis() {
|
||||
return get(AXIS, org.bukkit.Axis.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAxis(org.bukkit.Axis axis) {
|
||||
set(AXIS, axis);
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.util.Set<org.bukkit.Axis> getAxes() {
|
||||
return getValues(AXIS, org.bukkit.Axis.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftRespawnAnchor extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.RespawnAnchor {
|
||||
|
||||
public CraftRespawnAnchor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftRespawnAnchor(net.minecraft.server.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.type.CraftRespawnAnchor
|
||||
|
||||
private static final net.minecraft.server.BlockStateInteger CHARGES = getInteger(net.minecraft.server.BlockRespawnAnchor.class, "charges");
|
||||
|
||||
@Override
|
||||
public int getCharges() {
|
||||
return get(CHARGES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCharges(int charges) {
|
||||
set(CHARGES, charges);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumCharges() {
|
||||
return getMax(CHARGES);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftTarget extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.AnaloguePowerable {
|
||||
|
||||
public CraftTarget() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftTarget(net.minecraft.server.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftAnaloguePowerable
|
||||
|
||||
private static final net.minecraft.server.BlockStateInteger POWER = getInteger(net.minecraft.server.BlockTarget.class, "power");
|
||||
|
||||
@Override
|
||||
public int getPower() {
|
||||
return get(POWER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(int power) {
|
||||
set(POWER, power);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumPower() {
|
||||
return getMax(POWER);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftTwistingVines extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Ageable {
|
||||
|
||||
public CraftTwistingVines() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftTwistingVines(net.minecraft.server.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftAgeable
|
||||
|
||||
private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockTwistingVines.class, "age");
|
||||
|
||||
@Override
|
||||
public int getAge() {
|
||||
return get(AGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAge(int age) {
|
||||
set(AGE, age);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumAge() {
|
||||
return getMax(AGE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftWeepingVines extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Ageable {
|
||||
|
||||
public CraftWeepingVines() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftWeepingVines(net.minecraft.server.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftAgeable
|
||||
|
||||
private static final net.minecraft.server.BlockStateInteger AGE = getInteger(net.minecraft.server.BlockWeepingVines.class, "age");
|
||||
|
||||
@Override
|
||||
public int getAge() {
|
||||
return get(AGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAge(int age) {
|
||||
set(AGE, age);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumAge() {
|
||||
return getMax(AGE);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user