@@ -35,9 +35,9 @@ public class CraftBanner extends CraftBlockEntityState<TileEntityBanner> impleme
|
||||
base = DyeColor.getByWoolData((byte) ((BlockBannerAbstract) this.data.getBlock()).getColor().getColorIndex());
|
||||
patterns = new ArrayList<Pattern>();
|
||||
|
||||
if (banner.patterns != null) {
|
||||
for (int i = 0; i < banner.patterns.size(); i++) {
|
||||
NBTTagCompound p = (NBTTagCompound) banner.patterns.get(i);
|
||||
if (banner.itemPatterns != null) {
|
||||
for (int i = 0; i < banner.itemPatterns.size(); i++) {
|
||||
NBTTagCompound p = (NBTTagCompound) banner.itemPatterns.get(i);
|
||||
patterns.add(new Pattern(DyeColor.getByWoolData((byte) p.getInt("Color")), PatternType.getByIdentifier(p.getString("Pattern"))));
|
||||
}
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public class CraftBanner extends CraftBlockEntityState<TileEntityBanner> impleme
|
||||
public void applyTo(TileEntityBanner banner) {
|
||||
super.applyTo(banner);
|
||||
|
||||
banner.color = EnumColor.fromColorIndex(base.getWoolData());
|
||||
banner.baseColor = EnumColor.fromColorIndex(base.getWoolData());
|
||||
|
||||
NBTTagList newPatterns = new NBTTagList();
|
||||
|
||||
@@ -103,6 +103,6 @@ public class CraftBanner extends CraftBlockEntityState<TileEntityBanner> impleme
|
||||
compound.setString("Pattern", p.getPattern().getIdentifier());
|
||||
newPatterns.add(compound);
|
||||
}
|
||||
banner.patterns = newPatterns;
|
||||
banner.itemPatterns = newPatterns;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,26 +37,26 @@ public class CraftBarrel extends CraftLootable<TileEntityBarrel> implements Barr
|
||||
@Override
|
||||
public void open() {
|
||||
requirePlaced();
|
||||
if (!getTileEntity().opened) {
|
||||
if (!getTileEntity().openersCounter.opened) {
|
||||
IBlockData blockData = getTileEntity().getBlock();
|
||||
boolean open = blockData.get(BlockBarrel.OPEN);
|
||||
|
||||
if (!open) {
|
||||
getTileEntity().setOpenFlag(blockData, true);
|
||||
getTileEntity().playOpenSound(blockData, SoundEffects.BLOCK_BARREL_OPEN);
|
||||
getTileEntity().playOpenSound(blockData, SoundEffects.BARREL_OPEN);
|
||||
}
|
||||
}
|
||||
getTileEntity().opened = true;
|
||||
getTileEntity().openersCounter.opened = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
requirePlaced();
|
||||
if (getTileEntity().opened) {
|
||||
if (getTileEntity().openersCounter.opened) {
|
||||
IBlockData blockData = getTileEntity().getBlock();
|
||||
getTileEntity().setOpenFlag(blockData, false);
|
||||
getTileEntity().playOpenSound(blockData, SoundEffects.BLOCK_BARREL_CLOSE);
|
||||
getTileEntity().playOpenSound(blockData, SoundEffects.BARREL_CLOSE);
|
||||
}
|
||||
getTileEntity().opened = false;
|
||||
getTileEntity().openersCounter.opened = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class CraftBeacon extends CraftBlockEntityState<TileEntityBeacon> impleme
|
||||
if (tileEntity instanceof TileEntityBeacon) {
|
||||
TileEntityBeacon beacon = (TileEntityBeacon) tileEntity;
|
||||
|
||||
Collection<EntityHuman> nms = beacon.getHumansInRange();
|
||||
Collection<EntityHuman> nms = TileEntityBeacon.getHumansInRange(beacon.getWorld(), beacon.getPosition(), beacon.levels);
|
||||
Collection<LivingEntity> bukkit = new ArrayList<LivingEntity>(nms.size());
|
||||
|
||||
for (EntityHuman human : nms) {
|
||||
@@ -57,7 +57,7 @@ public class CraftBeacon extends CraftBlockEntityState<TileEntityBeacon> impleme
|
||||
|
||||
@Override
|
||||
public void setPrimaryEffect(PotionEffectType effect) {
|
||||
this.getSnapshot().primaryEffect = (effect != null) ? MobEffectList.fromId(effect.getId()) : null;
|
||||
this.getSnapshot().primaryPower = (effect != null) ? MobEffectList.fromId(effect.getId()) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -67,13 +67,13 @@ public class CraftBeacon extends CraftBlockEntityState<TileEntityBeacon> impleme
|
||||
|
||||
@Override
|
||||
public void setSecondaryEffect(PotionEffectType effect) {
|
||||
this.getSnapshot().secondaryEffect = (effect != null) ? MobEffectList.fromId(effect.getId()) : null;
|
||||
this.getSnapshot().secondaryPower = (effect != null) ? MobEffectList.fromId(effect.getId()) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCustomName() {
|
||||
TileEntityBeacon beacon = this.getSnapshot();
|
||||
return beacon.customName != null ? CraftChatMessage.fromComponent(beacon.customName) : null;
|
||||
return beacon.name != null ? CraftChatMessage.fromComponent(beacon.name) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -83,16 +83,16 @@ public class CraftBeacon extends CraftBlockEntityState<TileEntityBeacon> impleme
|
||||
|
||||
@Override
|
||||
public boolean isLocked() {
|
||||
return !this.getSnapshot().chestLock.key.isEmpty();
|
||||
return !this.getSnapshot().lockKey.key.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLock() {
|
||||
return this.getSnapshot().chestLock.key;
|
||||
return this.getSnapshot().lockKey.key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLock(String key) {
|
||||
this.getSnapshot().chestLock = (key == null) ? ChestLock.a : new ChestLock(key);
|
||||
this.getSnapshot().lockKey = (key == null) ? ChestLock.NO_LOCK : new ChestLock(key);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,14 +26,14 @@ public class CraftBeehive extends CraftBlockEntityState<TileEntityBeehive> imple
|
||||
|
||||
@Override
|
||||
public Location getFlower() {
|
||||
BlockPosition flower = getSnapshot().flowerPos;
|
||||
BlockPosition flower = getSnapshot().savedFlowerPos;
|
||||
return (flower == null) ? null : new Location(getWorld(), flower.getX(), flower.getY(), flower.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFlower(Location location) {
|
||||
Preconditions.checkArgument(location == null || this.getWorld().equals(location.getWorld()), "Flower must be in same world");
|
||||
getSnapshot().flowerPos = (location == null) ? null : new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ());
|
||||
getSnapshot().savedFlowerPos = (location == null) ? null : new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -472,6 +472,8 @@ public class CraftBlock implements Block {
|
||||
case BEEHIVE:
|
||||
case BEE_NEST:
|
||||
return new CraftBeehive(this);
|
||||
case SCULK_SENSOR:
|
||||
return new CraftSculkSensor(this);
|
||||
default:
|
||||
TileEntity tileEntity = world.getTileEntity(position);
|
||||
if (tileEntity != null) {
|
||||
@@ -583,7 +585,7 @@ public class CraftBlock implements Block {
|
||||
}
|
||||
|
||||
private static int getPower(int i, IBlockData iblockdata) {
|
||||
if (!iblockdata.getBlock().a(Blocks.REDSTONE_WIRE)) {
|
||||
if (!iblockdata.a(Blocks.REDSTONE_WIRE)) {
|
||||
return i;
|
||||
} else {
|
||||
int j = iblockdata.get(BlockRedstoneWire.POWER);
|
||||
@@ -637,7 +639,7 @@ public class CraftBlock implements Block {
|
||||
@Override
|
||||
public boolean applyBoneMeal(BlockFace face) {
|
||||
EnumDirection direction = blockFaceToNotch(face);
|
||||
ItemActionContext context = new ItemActionContext(getCraftWorld().getHandle(), null, EnumHand.MAIN_HAND, Items.BONE_MEAL.createItemStack(), new MovingObjectPositionBlock(Vec3D.ORIGIN, direction, getPosition(), false));
|
||||
ItemActionContext context = new ItemActionContext(getCraftWorld().getHandle(), null, EnumHand.MAIN_HAND, Items.BONE_MEAL.createItemStack(), new MovingObjectPositionBlock(Vec3D.ZERO, direction, getPosition(), false));
|
||||
|
||||
return ItemBoneMeal.applyBonemeal(context) == EnumInteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
|
||||
}
|
||||
|
||||
NBTTagCompound nbtTagCompound = tileEntity.save(new NBTTagCompound());
|
||||
T snapshot = (T) TileEntity.create(getHandle(), nbtTagCompound);
|
||||
T snapshot = (T) TileEntity.create(getPosition(), getHandle(), nbtTagCompound);
|
||||
|
||||
return snapshot;
|
||||
}
|
||||
@@ -57,10 +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(getHandle(), nbtTagCompound);
|
||||
|
||||
// reset the original position:
|
||||
to.setPosition(pos);
|
||||
to.load(nbtTagCompound);
|
||||
}
|
||||
|
||||
// gets the wrapped TileEntity
|
||||
|
||||
@@ -48,8 +48,8 @@ public class CraftBlockState implements BlockState {
|
||||
return new CraftBlockState(CraftBlock.at(world, pos));
|
||||
}
|
||||
|
||||
public static CraftBlockState getBlockState(net.minecraft.world.level.World world, net.minecraft.core.BlockPosition pos, int flag) {
|
||||
return new CraftBlockState(world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()), flag);
|
||||
public static CraftBlockState getBlockState(GeneratorAccess world, net.minecraft.core.BlockPosition pos, int flag) {
|
||||
return new CraftBlockState(CraftBlock.at(world, pos), flag);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,11 +43,11 @@ public class CraftBrewingStand extends CraftContainer<TileEntityBrewingStand> im
|
||||
|
||||
@Override
|
||||
public int getFuelLevel() {
|
||||
return this.getSnapshot().fuelLevel;
|
||||
return this.getSnapshot().fuel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFuelLevel(int level) {
|
||||
this.getSnapshot().fuelLevel = level;
|
||||
this.getSnapshot().fuel = level;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,21 +35,21 @@ public class CraftCampfire extends CraftBlockEntityState<TileEntityCampfire> imp
|
||||
|
||||
@Override
|
||||
public int getCookTime(int index) {
|
||||
return getSnapshot().cookingTimes[index];
|
||||
return getSnapshot().cookingProgress[index];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCookTime(int index, int cookTime) {
|
||||
getSnapshot().cookingTimes[index] = cookTime;
|
||||
getSnapshot().cookingProgress[index] = cookTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCookTimeTotal(int index) {
|
||||
return getSnapshot().cookingTotalTimes[index];
|
||||
return getSnapshot().cookingTime[index];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCookTimeTotal(int index, int cookTimeTotal) {
|
||||
getSnapshot().cookingTotalTimes[index] = cookTimeTotal;
|
||||
getSnapshot().cookingTime[index] = cookTimeTotal;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import net.minecraft.world.ITileInventory;
|
||||
import net.minecraft.world.level.block.BlockChest;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.entity.TileEntityChest;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Chest;
|
||||
@@ -59,22 +60,22 @@ public class CraftChest extends CraftLootable<TileEntityChest> implements Chest
|
||||
@Override
|
||||
public void open() {
|
||||
requirePlaced();
|
||||
if (!getTileEntity().opened) {
|
||||
net.minecraft.world.level.block.Block block = getTileEntity().getBlock().getBlock();
|
||||
getTileEntity().getWorld().playBlockAction(getTileEntity().getPosition(), block, 1, getTileEntity().viewingCount + 1);
|
||||
getTileEntity().playOpenSound(SoundEffects.BLOCK_CHEST_OPEN);
|
||||
if (!getTileEntity().openersCounter.opened) {
|
||||
IBlockData block = getTileEntity().getBlock();
|
||||
getTileEntity().getWorld().playBlockAction(getPosition(), block.getBlock(), 1, getTileEntity().openersCounter.getOpenerCount() + 1);
|
||||
TileEntityChest.playOpenSound(getTileEntity().getWorld(), getPosition(), block, SoundEffects.CHEST_OPEN);
|
||||
}
|
||||
getTileEntity().opened = true;
|
||||
getTileEntity().openersCounter.opened = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
requirePlaced();
|
||||
if (getTileEntity().opened) {
|
||||
net.minecraft.world.level.block.Block block = getTileEntity().getBlock().getBlock();
|
||||
getTileEntity().getWorld().playBlockAction(getTileEntity().getPosition(), block, 1, 0);
|
||||
getTileEntity().playOpenSound(SoundEffects.BLOCK_CHEST_CLOSE);
|
||||
if (getTileEntity().openersCounter.opened) {
|
||||
IBlockData block = getTileEntity().getBlock();
|
||||
getTileEntity().getWorld().playBlockAction(getPosition(), block.getBlock(), 1, 0);
|
||||
TileEntityChest.playOpenSound(getTileEntity().getWorld(), getPosition(), block, SoundEffects.CHEST_OPEN);
|
||||
}
|
||||
getTileEntity().opened = false;
|
||||
getTileEntity().openersCounter.opened = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,23 +19,23 @@ public abstract class CraftContainer<T extends TileEntityContainer> extends Craf
|
||||
|
||||
@Override
|
||||
public boolean isLocked() {
|
||||
return !this.getSnapshot().chestLock.key.isEmpty();
|
||||
return !this.getSnapshot().lockKey.key.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLock() {
|
||||
return this.getSnapshot().chestLock.key;
|
||||
return this.getSnapshot().lockKey.key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLock(String key) {
|
||||
this.getSnapshot().chestLock = (key == null) ? ChestLock.a : new ChestLock(key);
|
||||
this.getSnapshot().lockKey = (key == null) ? ChestLock.NO_LOCK : new ChestLock(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCustomName() {
|
||||
T container = this.getSnapshot();
|
||||
return container.customName != null ? CraftChatMessage.fromComponent(container.getCustomName()) : null;
|
||||
return container.name != null ? CraftChatMessage.fromComponent(container.getCustomName()) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -47,7 +47,7 @@ public abstract class CraftContainer<T extends TileEntityContainer> extends Craf
|
||||
public void applyTo(T container) {
|
||||
super.applyTo(container);
|
||||
|
||||
if (this.getSnapshot().customName == null) {
|
||||
if (this.getSnapshot().name == null) {
|
||||
container.setCustomName(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.bukkit.craftbukkit.block;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.resources.MinecraftKey;
|
||||
import net.minecraft.world.entity.EntityTypes;
|
||||
import net.minecraft.world.level.block.entity.TileEntityMobSpawner;
|
||||
@@ -21,7 +22,7 @@ public class CraftCreatureSpawner extends CraftBlockEntityState<TileEntityMobSpa
|
||||
|
||||
@Override
|
||||
public EntityType getSpawnedType() {
|
||||
MinecraftKey key = this.getSnapshot().getSpawner().getMobName();
|
||||
MinecraftKey key = this.getSnapshot().getSpawner().getMobName(null, BlockPosition.ZERO);
|
||||
return (key == null) ? EntityType.PIG : EntityType.fromName(key.getKey());
|
||||
}
|
||||
|
||||
@@ -36,7 +37,7 @@ public class CraftCreatureSpawner extends CraftBlockEntityState<TileEntityMobSpa
|
||||
|
||||
@Override
|
||||
public String getCreatureTypeName() {
|
||||
return this.getSnapshot().getSpawner().getMobName().getKey();
|
||||
return this.getSnapshot().getSpawner().getMobName(null, BlockPosition.ZERO).getKey();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,33 +34,33 @@ public abstract class CraftFurnace<T extends TileEntityFurnace> extends CraftCon
|
||||
|
||||
@Override
|
||||
public short getBurnTime() {
|
||||
return (short) this.getSnapshot().burnTime;
|
||||
return (short) this.getSnapshot().litTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBurnTime(short burnTime) {
|
||||
this.getSnapshot().burnTime = burnTime;
|
||||
this.getSnapshot().litTime = burnTime;
|
||||
// SPIGOT-844: Allow lighting and relighting using this API
|
||||
this.data = this.data.set(BlockFurnace.LIT, burnTime > 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public short getCookTime() {
|
||||
return (short) this.getSnapshot().cookTime;
|
||||
return (short) this.getSnapshot().cookingProgress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCookTime(short cookTime) {
|
||||
this.getSnapshot().cookTime = cookTime;
|
||||
this.getSnapshot().cookingProgress = cookTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCookTimeTotal() {
|
||||
return this.getSnapshot().cookTimeTotal;
|
||||
return this.getSnapshot().cookingTotalTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCookTimeTotal(int cookTimeTotal) {
|
||||
this.getSnapshot().cookTimeTotal = cookTimeTotal;
|
||||
this.getSnapshot().cookingTotalTime = cookTimeTotal;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class CraftLectern extends CraftBlockEntityState<TileEntityLectern> imple
|
||||
|
||||
@Override
|
||||
public Inventory getSnapshotInventory() {
|
||||
return new CraftInventoryLectern(this.getSnapshot().inventory);
|
||||
return new CraftInventoryLectern(this.getSnapshot().bookAccess);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -39,7 +39,7 @@ public class CraftLectern extends CraftBlockEntityState<TileEntityLectern> imple
|
||||
return this.getSnapshotInventory();
|
||||
}
|
||||
|
||||
return new CraftInventoryLectern(this.getTileEntity().inventory);
|
||||
return new CraftInventoryLectern(this.getTileEntity().bookAccess);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.bukkit.craftbukkit.block;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.minecraft.world.level.block.entity.SculkSensorBlockEntity;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.SculkSensor;
|
||||
|
||||
public class CraftSculkSensor extends CraftBlockEntityState<SculkSensorBlockEntity> implements SculkSensor {
|
||||
|
||||
public CraftSculkSensor(final Block block) {
|
||||
super(block, SculkSensorBlockEntity.class);
|
||||
}
|
||||
|
||||
public CraftSculkSensor(final Material material, final SculkSensorBlockEntity te) {
|
||||
super(material, te);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLastVibrationFrequency() {
|
||||
return getTileEntity().getLastVibrationFrequency();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLastVibrationFrequency(int lastVibrationFrequency) {
|
||||
Preconditions.checkArgument(0 <= lastVibrationFrequency && lastVibrationFrequency <= 15, "Vibration frequency must be between 0-15");
|
||||
getTileEntity().lastVibrationFrequency = lastVibrationFrequency;
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public class CraftShulkerBox extends CraftLootable<TileEntityShulkerBox> impleme
|
||||
if (!getTileEntity().opened) {
|
||||
World world = getTileEntity().getWorld();
|
||||
world.playBlockAction(getPosition(), getTileEntity().getBlock().getBlock(), 1, 1);
|
||||
world.playSound(null, getPosition(), SoundEffects.BLOCK_SHULKER_BOX_OPEN, SoundCategory.BLOCKS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F);
|
||||
world.playSound(null, getPosition(), SoundEffects.SHULKER_BOX_OPEN, SoundCategory.BLOCKS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F);
|
||||
}
|
||||
getTileEntity().opened = true;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public class CraftShulkerBox extends CraftLootable<TileEntityShulkerBox> impleme
|
||||
if (getTileEntity().opened) {
|
||||
World world = getTileEntity().getWorld();
|
||||
world.playBlockAction(getPosition(), getTileEntity().getBlock().getBlock(), 1, 0);
|
||||
world.playSound(null, getPosition(), SoundEffects.BLOCK_SHULKER_BOX_OPEN, SoundCategory.BLOCKS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F);
|
||||
world.playSound(null, getPosition(), SoundEffects.SHULKER_BOX_OPEN, SoundCategory.BLOCKS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F);
|
||||
}
|
||||
getTileEntity().opened = false;
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ public class CraftSign extends CraftBlockEntityState<TileEntitySign> implements
|
||||
if (lines == null) {
|
||||
// Lazy initialization:
|
||||
TileEntitySign sign = this.getSnapshot();
|
||||
lines = new String[sign.lines.length];
|
||||
System.arraycopy(revertComponents(sign.lines), 0, lines, 0, lines.length);
|
||||
lines = new String[sign.messages.length];
|
||||
System.arraycopy(revertComponents(sign.messages), 0, lines, 0, lines.length);
|
||||
originalLines = new String[lines.length];
|
||||
System.arraycopy(lines, 0, originalLines, 0, originalLines.length);
|
||||
}
|
||||
@@ -57,6 +57,16 @@ public class CraftSign extends CraftBlockEntityState<TileEntitySign> implements
|
||||
getSnapshot().isEditable = editable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGlowingText() {
|
||||
return getSnapshot().hasGlowingText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setGlowingText(boolean glowing) {
|
||||
getSnapshot().setHasGlowingText(glowing);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DyeColor getColor() {
|
||||
return DyeColor.getByWoolData((byte) getSnapshot().getColor().getColorIndex());
|
||||
@@ -77,7 +87,7 @@ public class CraftSign extends CraftBlockEntityState<TileEntitySign> implements
|
||||
if (line.equals(originalLines[i])) {
|
||||
continue; // The line contents are still the same, skip.
|
||||
}
|
||||
sign.lines[i] = CraftChatMessage.fromString(line)[0];
|
||||
sign.a(i, CraftChatMessage.fromString(line)[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class CraftSkull extends CraftBlockEntityState<TileEntitySkull> implement
|
||||
public void load(TileEntitySkull skull) {
|
||||
super.load(skull);
|
||||
|
||||
profile = skull.gameProfile;
|
||||
profile = skull.owner;
|
||||
}
|
||||
|
||||
static int getSkullType(SkullType type) {
|
||||
|
||||
@@ -59,7 +59,7 @@ public class CraftStructureBlock extends CraftBlockEntityState<TileEntityStructu
|
||||
|
||||
@Override
|
||||
public BlockVector getRelativePosition() {
|
||||
return new BlockVector(getSnapshot().relativePosition.getX(), getSnapshot().relativePosition.getY(), getSnapshot().relativePosition.getZ());
|
||||
return new BlockVector(getSnapshot().structurePos.getX(), getSnapshot().structurePos.getY(), getSnapshot().structurePos.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -67,12 +67,12 @@ public class CraftStructureBlock extends CraftBlockEntityState<TileEntityStructu
|
||||
Validate.isTrue(isBetween(vector.getBlockX(), -MAX_SIZE, MAX_SIZE), "Structure Size (X) must be between -" + MAX_SIZE + " and " + MAX_SIZE);
|
||||
Validate.isTrue(isBetween(vector.getBlockY(), -MAX_SIZE, MAX_SIZE), "Structure Size (Y) must be between -" + MAX_SIZE + " and " + MAX_SIZE);
|
||||
Validate.isTrue(isBetween(vector.getBlockZ(), -MAX_SIZE, MAX_SIZE), "Structure Size (Z) must be between -" + MAX_SIZE + " and " + MAX_SIZE);
|
||||
getSnapshot().relativePosition = new BlockPosition(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ());
|
||||
getSnapshot().structurePos = new BlockPosition(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockVector getStructureSize() {
|
||||
return new BlockVector(getSnapshot().size.getX(), getSnapshot().size.getY(), getSnapshot().size.getZ());
|
||||
return new BlockVector(getSnapshot().structureSize.getX(), getSnapshot().structureSize.getY(), getSnapshot().structureSize.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -80,7 +80,7 @@ public class CraftStructureBlock extends CraftBlockEntityState<TileEntityStructu
|
||||
Validate.isTrue(isBetween(vector.getBlockX(), 0, MAX_SIZE), "Structure Size (X) must be between 0 and " + MAX_SIZE);
|
||||
Validate.isTrue(isBetween(vector.getBlockY(), 0, MAX_SIZE), "Structure Size (Y) must be between 0 and " + MAX_SIZE);
|
||||
Validate.isTrue(isBetween(vector.getBlockZ(), 0, MAX_SIZE), "Structure Size (Z) must be between 0 and " + MAX_SIZE);
|
||||
getSnapshot().size = new BlockPosition(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ());
|
||||
getSnapshot().structureSize = new BlockPosition(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -105,7 +105,7 @@ public class CraftStructureBlock extends CraftBlockEntityState<TileEntityStructu
|
||||
|
||||
@Override
|
||||
public void setUsageMode(UsageMode mode) {
|
||||
getSnapshot().usageMode = BlockPropertyStructureMode.valueOf(mode.name());
|
||||
getSnapshot().mode = BlockPropertyStructureMode.valueOf(mode.name());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -168,13 +168,13 @@ public class CraftStructureBlock extends CraftBlockEntityState<TileEntityStructu
|
||||
public void setMetadata(String metadata) {
|
||||
Validate.notNull(metadata, "Structure metadata cannot be null");
|
||||
if (getUsageMode() == UsageMode.DATA) {
|
||||
getSnapshot().metadata = metadata;
|
||||
getSnapshot().metaData = metadata;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMetadata() {
|
||||
return getSnapshot().metadata;
|
||||
return getSnapshot().metaData;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -225,7 +225,7 @@ public class CraftBlockData implements BlockData {
|
||||
|
||||
if (!states.isEmpty()) {
|
||||
stateString.append('[');
|
||||
stateString.append(states.entrySet().stream().map(IBlockDataHolder.STATE_TO_VALUE).collect(Collectors.joining(",")));
|
||||
stateString.append(states.entrySet().stream().map(IBlockDataHolder.PROPERTY_ENTRY_TO_STRING_FUNCTION).collect(Collectors.joining(",")));
|
||||
stateString.append(']');
|
||||
}
|
||||
|
||||
@@ -342,6 +342,9 @@ public class CraftBlockData implements BlockData {
|
||||
|
||||
static {
|
||||
//<editor-fold desc="CraftBlockData Registration" defaultstate="collapsed">
|
||||
register(net.minecraft.world.level.block.AmethystClusterBlock.class, org.bukkit.craftbukkit.block.impl.CraftAmethystCluster::new);
|
||||
register(net.minecraft.world.level.block.BigDripleafBlock.class, org.bukkit.craftbukkit.block.impl.CraftBigDripleaf::new);
|
||||
register(net.minecraft.world.level.block.BigDripleafStemBlock.class, org.bukkit.craftbukkit.block.impl.CraftBigDripleafStem::new);
|
||||
register(net.minecraft.world.level.block.BlockAnvil.class, org.bukkit.craftbukkit.block.impl.CraftAnvil::new);
|
||||
register(net.minecraft.world.level.block.BlockBamboo.class, org.bukkit.craftbukkit.block.impl.CraftBamboo::new);
|
||||
register(net.minecraft.world.level.block.BlockBanner.class, org.bukkit.craftbukkit.block.impl.CraftBanner::new);
|
||||
@@ -358,7 +361,6 @@ public class CraftBlockData implements BlockData {
|
||||
register(net.minecraft.world.level.block.BlockCake.class, org.bukkit.craftbukkit.block.impl.CraftCake::new);
|
||||
register(net.minecraft.world.level.block.BlockCampfire.class, org.bukkit.craftbukkit.block.impl.CraftCampfire::new);
|
||||
register(net.minecraft.world.level.block.BlockCarrots.class, org.bukkit.craftbukkit.block.impl.CraftCarrots::new);
|
||||
register(net.minecraft.world.level.block.BlockCauldron.class, org.bukkit.craftbukkit.block.impl.CraftCauldron::new);
|
||||
register(net.minecraft.world.level.block.BlockChain.class, org.bukkit.craftbukkit.block.impl.CraftChain::new);
|
||||
register(net.minecraft.world.level.block.BlockChest.class, org.bukkit.craftbukkit.block.impl.CraftChest::new);
|
||||
register(net.minecraft.world.level.block.BlockChestTrapped.class, org.bukkit.craftbukkit.block.impl.CraftChestTrapped::new);
|
||||
@@ -413,9 +415,6 @@ public class CraftBlockData implements BlockData {
|
||||
register(net.minecraft.world.level.block.BlockNetherWart.class, org.bukkit.craftbukkit.block.impl.CraftNetherWart::new);
|
||||
register(net.minecraft.world.level.block.BlockNote.class, org.bukkit.craftbukkit.block.impl.CraftNote::new);
|
||||
register(net.minecraft.world.level.block.BlockObserver.class, org.bukkit.craftbukkit.block.impl.CraftObserver::new);
|
||||
register(net.minecraft.world.level.block.piston.BlockPiston.class, org.bukkit.craftbukkit.block.impl.CraftPiston::new);
|
||||
register(net.minecraft.world.level.block.piston.BlockPistonExtension.class, org.bukkit.craftbukkit.block.impl.CraftPistonExtension::new);
|
||||
register(net.minecraft.world.level.block.piston.BlockPistonMoving.class, org.bukkit.craftbukkit.block.impl.CraftPistonMoving::new);
|
||||
register(net.minecraft.world.level.block.BlockPortal.class, org.bukkit.craftbukkit.block.impl.CraftPortal::new);
|
||||
register(net.minecraft.world.level.block.BlockPotatoes.class, org.bukkit.craftbukkit.block.impl.CraftPotatoes::new);
|
||||
register(net.minecraft.world.level.block.BlockPoweredRail.class, org.bukkit.craftbukkit.block.impl.CraftPoweredRail::new);
|
||||
@@ -455,7 +454,6 @@ public class CraftBlockData implements BlockData {
|
||||
register(net.minecraft.world.level.block.BlockTNT.class, org.bukkit.craftbukkit.block.impl.CraftTNT::new);
|
||||
register(net.minecraft.world.level.block.BlockTallPlant.class, org.bukkit.craftbukkit.block.impl.CraftTallPlant::new);
|
||||
register(net.minecraft.world.level.block.BlockTallPlantFlower.class, org.bukkit.craftbukkit.block.impl.CraftTallPlantFlower::new);
|
||||
register(net.minecraft.world.level.block.BlockTallSeaGrass.class, org.bukkit.craftbukkit.block.impl.CraftTallSeaGrass::new);
|
||||
register(net.minecraft.world.level.block.BlockTarget.class, org.bukkit.craftbukkit.block.impl.CraftTarget::new);
|
||||
register(net.minecraft.world.level.block.BlockTorchWall.class, org.bukkit.craftbukkit.block.impl.CraftTorchWall::new);
|
||||
register(net.minecraft.world.level.block.BlockTrapdoor.class, org.bukkit.craftbukkit.block.impl.CraftTrapdoor::new);
|
||||
@@ -469,6 +467,26 @@ public class CraftBlockData implements BlockData {
|
||||
register(net.minecraft.world.level.block.BlockWitherSkull.class, org.bukkit.craftbukkit.block.impl.CraftWitherSkull::new);
|
||||
register(net.minecraft.world.level.block.BlockWitherSkullWall.class, org.bukkit.craftbukkit.block.impl.CraftWitherSkullWall::new);
|
||||
register(net.minecraft.world.level.block.BlockWoodButton.class, org.bukkit.craftbukkit.block.impl.CraftWoodButton::new);
|
||||
register(net.minecraft.world.level.block.CandleBlock.class, org.bukkit.craftbukkit.block.impl.CraftCandle::new);
|
||||
register(net.minecraft.world.level.block.CandleCakeBlock.class, org.bukkit.craftbukkit.block.impl.CraftCandleCake::new);
|
||||
register(net.minecraft.world.level.block.CaveVinesBlock.class, org.bukkit.craftbukkit.block.impl.CraftCaveVines::new);
|
||||
register(net.minecraft.world.level.block.CaveVinesPlantBlock.class, org.bukkit.craftbukkit.block.impl.CraftCaveVinesPlant::new);
|
||||
register(net.minecraft.world.level.block.GlowLichenBlock.class, org.bukkit.craftbukkit.block.impl.CraftGlowLichen::new);
|
||||
register(net.minecraft.world.level.block.HangingRootsBlock.class, org.bukkit.craftbukkit.block.impl.CraftHangingRoots::new);
|
||||
register(net.minecraft.world.level.block.InfestedRotatedPillarBlock.class, org.bukkit.craftbukkit.block.impl.CraftInfestedRotatedPillar::new);
|
||||
register(net.minecraft.world.level.block.LayeredCauldronBlock.class, org.bukkit.craftbukkit.block.impl.CraftLayeredCauldron::new);
|
||||
register(net.minecraft.world.level.block.LightBlock.class, org.bukkit.craftbukkit.block.impl.CraftLight::new);
|
||||
register(net.minecraft.world.level.block.LightningRodBlock.class, org.bukkit.craftbukkit.block.impl.CraftLightningRod::new);
|
||||
register(net.minecraft.world.level.block.PointedDripstoneBlock.class, org.bukkit.craftbukkit.block.impl.CraftPointedDripstone::new);
|
||||
register(net.minecraft.world.level.block.PowderSnowCauldronBlock.class, org.bukkit.craftbukkit.block.impl.CraftPowderSnowCauldron::new);
|
||||
register(net.minecraft.world.level.block.SculkSensorBlock.class, org.bukkit.craftbukkit.block.impl.CraftSculkSensor::new);
|
||||
register(net.minecraft.world.level.block.SmallDripleafBlock.class, org.bukkit.craftbukkit.block.impl.CraftSmallDripleaf::new);
|
||||
register(net.minecraft.world.level.block.TallSeagrassBlock.class, org.bukkit.craftbukkit.block.impl.CraftTallSeagrass::new);
|
||||
register(net.minecraft.world.level.block.WeatheringCopperSlabBlock.class, org.bukkit.craftbukkit.block.impl.CraftWeatheringCopperSlab::new);
|
||||
register(net.minecraft.world.level.block.WeatheringCopperStairBlock.class, org.bukkit.craftbukkit.block.impl.CraftWeatheringCopperStair::new);
|
||||
register(net.minecraft.world.level.block.piston.BlockPiston.class, org.bukkit.craftbukkit.block.impl.CraftPiston::new);
|
||||
register(net.minecraft.world.level.block.piston.BlockPistonExtension.class, org.bukkit.craftbukkit.block.impl.CraftPistonExtension::new);
|
||||
register(net.minecraft.world.level.block.piston.BlockPistonMoving.class, org.bukkit.craftbukkit.block.impl.CraftPistonMoving::new);
|
||||
//</editor-fold>
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.bukkit.craftbukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.type.BigDripleaf;
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
|
||||
public abstract class CraftBigDripleaf extends CraftBlockData implements BigDripleaf {
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TILT = getEnum("tilt");
|
||||
|
||||
@Override
|
||||
public Tilt getTilt() {
|
||||
return get(TILT, org.bukkit.block.data.type.BigDripleaf.Tilt.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTilt(org.bukkit.block.data.type.BigDripleaf.Tilt tilt) {
|
||||
set(TILT, tilt);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.bukkit.craftbukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.type.Candle;
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
|
||||
public abstract class CraftCandle extends CraftBlockData implements Candle {
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateInteger CANDLES = getInteger("candles");
|
||||
|
||||
@Override
|
||||
public int getCandles() {
|
||||
return get(CANDLES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCandles(int candles) {
|
||||
set(CANDLES, candles);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumCandles() {
|
||||
return getMax(CANDLES);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.bukkit.craftbukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.type.CaveVinesPlant;
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
|
||||
public abstract class CraftCaveVinesPlant extends CraftBlockData implements CaveVinesPlant {
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean BERRIES = getBoolean("berries");
|
||||
|
||||
@Override
|
||||
public boolean isBerries() {
|
||||
return get(BERRIES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBerries(boolean berries) {
|
||||
set(BERRIES, berries);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package org.bukkit.craftbukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.type.PointedDripstone;
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
|
||||
public abstract class CraftPointedDripstone extends CraftBlockData implements PointedDripstone {
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> VERTICAL_DIRECTION = getEnum("vertical_direction");
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> THICKNESS = getEnum("thickness");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.BlockFace getVerticalDirection() {
|
||||
return get(VERTICAL_DIRECTION, org.bukkit.block.BlockFace.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVerticalDirection(org.bukkit.block.BlockFace direction) {
|
||||
set(VERTICAL_DIRECTION, direction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.util.Set<org.bukkit.block.BlockFace> getVerticalDirections() {
|
||||
return getValues(VERTICAL_DIRECTION, org.bukkit.block.BlockFace.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.data.type.PointedDripstone.Thickness getThickness() {
|
||||
return get(THICKNESS, org.bukkit.block.data.type.PointedDripstone.Thickness.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setThickness(org.bukkit.block.data.type.PointedDripstone.Thickness thickness) {
|
||||
set(THICKNESS, thickness);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.bukkit.craftbukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.type.SculkSensor;
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
|
||||
public abstract class CraftSculkSensor extends CraftBlockData implements SculkSensor {
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> PHASE = getEnum("sculk_sensor_phase");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.data.type.SculkSensor.Phase getPhase() {
|
||||
return get(PHASE, org.bukkit.block.data.type.SculkSensor.Phase.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPhase(org.bukkit.block.data.type.SculkSensor.Phase phase) {
|
||||
set(PHASE, phase);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftAmethystCluster extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.AmethystCluster, org.bukkit.block.data.Directional, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftAmethystCluster() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftAmethystCluster(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftDirectional
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.AmethystClusterBlock.class, "facing");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.BlockFace getFacing() {
|
||||
return get(FACING, org.bukkit.block.BlockFace.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);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.AmethystClusterBlock.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftBigDripleaf extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.BigDripleaf, org.bukkit.block.data.type.Dripleaf, org.bukkit.block.data.Directional, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftBigDripleaf() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftBigDripleaf(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.type.CraftBigDripleaf
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TILT = getEnum(net.minecraft.world.level.block.BigDripleafBlock.class, "tilt");
|
||||
|
||||
@Override
|
||||
public Tilt getTilt() {
|
||||
return get(TILT, org.bukkit.block.data.type.BigDripleaf.Tilt.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTilt(org.bukkit.block.data.type.BigDripleaf.Tilt tilt) {
|
||||
set(TILT, tilt);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftDirectional
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BigDripleafBlock.class, "facing");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.BlockFace getFacing() {
|
||||
return get(FACING, org.bukkit.block.BlockFace.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);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BigDripleafBlock.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftBigDripleafStem extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Dripleaf, org.bukkit.block.data.Directional, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftBigDripleafStem() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftBigDripleafStem(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftDirectional
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BigDripleafStemBlock.class, "facing");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.BlockFace getFacing() {
|
||||
return get(FACING, org.bukkit.block.BlockFace.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);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BigDripleafStemBlock.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftCandle extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Candle, org.bukkit.block.data.Lightable, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftCandle() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftCandle(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.type.CraftCandle
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateInteger CANDLES = getInteger(net.minecraft.world.level.block.CandleBlock.class, "candles");
|
||||
|
||||
@Override
|
||||
public int getCandles() {
|
||||
return get(CANDLES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCandles(int candles) {
|
||||
set(CANDLES, candles);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumCandles() {
|
||||
return getMax(CANDLES);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftLightable
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.CandleBlock.class, "lit");
|
||||
|
||||
@Override
|
||||
public boolean isLit() {
|
||||
return get(LIT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLit(boolean lit) {
|
||||
set(LIT, lit);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.CandleBlock.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftCandleCake extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Lightable {
|
||||
|
||||
public CraftCandleCake() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftCandleCake(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftLightable
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.CandleCakeBlock.class, "lit");
|
||||
|
||||
@Override
|
||||
public boolean isLit() {
|
||||
return get(LIT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLit(boolean lit) {
|
||||
set(LIT, lit);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftCaveVines extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.CaveVines, org.bukkit.block.data.Ageable, org.bukkit.block.data.type.CaveVinesPlant {
|
||||
|
||||
public CraftCaveVines() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftCaveVines(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftAgeable
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.CaveVinesBlock.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);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.type.CraftCaveVinesPlant
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean BERRIES = getBoolean(net.minecraft.world.level.block.CaveVinesBlock.class, "berries");
|
||||
|
||||
@Override
|
||||
public boolean isBerries() {
|
||||
return get(BERRIES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBerries(boolean berries) {
|
||||
set(BERRIES, berries);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftCaveVinesPlant extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.CaveVinesPlant {
|
||||
|
||||
public CraftCaveVinesPlant() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftCaveVinesPlant(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.type.CraftCaveVinesPlant
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean BERRIES = getBoolean(net.minecraft.world.level.block.CaveVinesPlantBlock.class, "berries");
|
||||
|
||||
@Override
|
||||
public boolean isBerries() {
|
||||
return get(BERRIES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBerries(boolean berries) {
|
||||
set(BERRIES, berries);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftGlowLichen extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.GlowLichen, org.bukkit.block.data.MultipleFacing, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftGlowLichen() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftGlowLichen(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftMultipleFacing
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
|
||||
getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "north", true), getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "east", true), getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "south", true), getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "west", true), getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "up", true), getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "down", true)
|
||||
};
|
||||
|
||||
@Override
|
||||
public boolean hasFace(org.bukkit.block.BlockFace face) {
|
||||
net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
|
||||
if (state == null) {
|
||||
throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
|
||||
}
|
||||
return get(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFace(org.bukkit.block.BlockFace face, boolean has) {
|
||||
net.minecraft.world.level.block.state.properties.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();
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftHangingRoots extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftHangingRoots() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftHangingRoots(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.HangingRootsBlock.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftInfestedRotatedPillar extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Orientable {
|
||||
|
||||
public CraftInfestedRotatedPillar() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftInfestedRotatedPillar(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftOrientable
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> AXIS = getEnum(net.minecraft.world.level.block.InfestedRotatedPillarBlock.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 CraftLayeredCauldron extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Levelled {
|
||||
|
||||
public CraftLayeredCauldron() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftLayeredCauldron(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftLevelled
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LEVEL = getInteger(net.minecraft.world.level.block.LayeredCauldronBlock.class, "level");
|
||||
|
||||
@Override
|
||||
public int getLevel() {
|
||||
return get(LEVEL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLevel(int level) {
|
||||
set(LEVEL, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumLevel() {
|
||||
return getMax(LEVEL);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftLight extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Light, org.bukkit.block.data.Levelled, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftLight() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftLight(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftLevelled
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LEVEL = getInteger(net.minecraft.world.level.block.LightBlock.class, "level");
|
||||
|
||||
@Override
|
||||
public int getLevel() {
|
||||
return get(LEVEL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLevel(int level) {
|
||||
set(LEVEL, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumLevel() {
|
||||
return getMax(LEVEL);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.LightBlock.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftLightningRod extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.LightningRod, org.bukkit.block.data.Directional, org.bukkit.block.data.Powerable, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftLightningRod() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftLightningRod(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftDirectional
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.LightningRodBlock.class, "facing");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.BlockFace getFacing() {
|
||||
return get(FACING, org.bukkit.block.BlockFace.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);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftPowerable
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.LightningRodBlock.class, "powered");
|
||||
|
||||
@Override
|
||||
public boolean isPowered() {
|
||||
return get(POWERED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPowered(boolean powered) {
|
||||
set(POWERED, powered);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.LightningRodBlock.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 CraftMinecartDetector extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.RedstoneRail, org.bukkit.block.data.Powerable, org.bukkit.block.data.Rail {
|
||||
public final class CraftMinecartDetector extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.RedstoneRail, org.bukkit.block.data.Powerable, org.bukkit.block.data.Rail, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftMinecartDetector() {
|
||||
super();
|
||||
@@ -45,4 +45,18 @@ public final class CraftMinecartDetector extends org.bukkit.craftbukkit.block.da
|
||||
public java.util.Set<org.bukkit.block.data.Rail.Shape> getShapes() {
|
||||
return getValues(SHAPE, org.bukkit.block.data.Rail.Shape.class);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockMinecartDetector.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 CraftMinecartTrack extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Rail {
|
||||
public final class CraftMinecartTrack extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Rail, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftMinecartTrack() {
|
||||
super();
|
||||
@@ -31,4 +31,18 @@ public final class CraftMinecartTrack extends org.bukkit.craftbukkit.block.data.
|
||||
public java.util.Set<org.bukkit.block.data.Rail.Shape> getShapes() {
|
||||
return getValues(SHAPE, org.bukkit.block.data.Rail.Shape.class);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockMinecartTrack.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftPointedDripstone extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.PointedDripstone, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftPointedDripstone() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftPointedDripstone(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.type.CraftPointedDripstone
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> VERTICAL_DIRECTION = getEnum(net.minecraft.world.level.block.PointedDripstoneBlock.class, "vertical_direction");
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> THICKNESS = getEnum(net.minecraft.world.level.block.PointedDripstoneBlock.class, "thickness");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.BlockFace getVerticalDirection() {
|
||||
return get(VERTICAL_DIRECTION, org.bukkit.block.BlockFace.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVerticalDirection(org.bukkit.block.BlockFace direction) {
|
||||
set(VERTICAL_DIRECTION, direction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.util.Set<org.bukkit.block.BlockFace> getVerticalDirections() {
|
||||
return getValues(VERTICAL_DIRECTION, org.bukkit.block.BlockFace.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.data.type.PointedDripstone.Thickness getThickness() {
|
||||
return get(THICKNESS, org.bukkit.block.data.type.PointedDripstone.Thickness.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setThickness(org.bukkit.block.data.type.PointedDripstone.Thickness thickness) {
|
||||
set(THICKNESS, thickness);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.PointedDripstoneBlock.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftPowderSnowCauldron extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Levelled {
|
||||
|
||||
public CraftPowderSnowCauldron() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftPowderSnowCauldron(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftLevelled
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LEVEL = getInteger(net.minecraft.world.level.block.PowderSnowCauldronBlock.class, "level");
|
||||
|
||||
@Override
|
||||
public int getLevel() {
|
||||
return get(LEVEL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLevel(int level) {
|
||||
set(LEVEL, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumLevel() {
|
||||
return getMax(LEVEL);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftPoweredRail extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.RedstoneRail, org.bukkit.block.data.Powerable, org.bukkit.block.data.Rail {
|
||||
public final class CraftPoweredRail extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.RedstoneRail, org.bukkit.block.data.Powerable, org.bukkit.block.data.Rail, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftPoweredRail() {
|
||||
super();
|
||||
@@ -45,4 +45,18 @@ public final class CraftPoweredRail extends org.bukkit.craftbukkit.block.data.Cr
|
||||
public java.util.Set<org.bukkit.block.data.Rail.Shape> getShapes() {
|
||||
return getValues(SHAPE, org.bukkit.block.data.Rail.Shape.class);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockPoweredRail.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftSculkSensor extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.SculkSensor, org.bukkit.block.data.AnaloguePowerable, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftSculkSensor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftSculkSensor(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.type.CraftSculkSensor
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> PHASE = getEnum(net.minecraft.world.level.block.SculkSensorBlock.class, "sculk_sensor_phase");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.data.type.SculkSensor.Phase getPhase() {
|
||||
return get(PHASE, org.bukkit.block.data.type.SculkSensor.Phase.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPhase(org.bukkit.block.data.type.SculkSensor.Phase phase) {
|
||||
set(PHASE, phase);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftAnaloguePowerable
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateInteger POWER = getInteger(net.minecraft.world.level.block.SculkSensorBlock.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);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.SculkSensorBlock.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftSmallDripleaf extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Dripleaf, org.bukkit.block.data.Directional, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftSmallDripleaf() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftSmallDripleaf(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftDirectional
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.SmallDripleafBlock.class, "facing");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.BlockFace getFacing() {
|
||||
return get(FACING, org.bukkit.block.BlockFace.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);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.SmallDripleafBlock.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
@@ -3,19 +3,19 @@
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftTallSeaGrass extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Bisected {
|
||||
public final class CraftTallSeagrass extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Bisected {
|
||||
|
||||
public CraftTallSeaGrass() {
|
||||
public CraftTallSeagrass() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftTallSeaGrass(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
public CraftTallSeagrass(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftBisected
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum(net.minecraft.world.level.block.BlockTallSeaGrass.class, "half");
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum(net.minecraft.world.level.block.TallSeagrassBlock.class, "half");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.data.Bisected.Half getHalf() {
|
||||
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftWeatheringCopperSlab extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Slab, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftWeatheringCopperSlab() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftWeatheringCopperSlab(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.type.CraftSlab
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TYPE = getEnum(net.minecraft.world.level.block.WeatheringCopperSlabBlock.class, "type");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.data.type.Slab.Type getType() {
|
||||
return get(TYPE, org.bukkit.block.data.type.Slab.Type.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(org.bukkit.block.data.type.Slab.Type type) {
|
||||
set(TYPE, type);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.WeatheringCopperSlabBlock.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* Automatically generated file, changes will be lost.
|
||||
*/
|
||||
package org.bukkit.craftbukkit.block.impl;
|
||||
|
||||
public final class CraftWeatheringCopperStair extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Stairs, org.bukkit.block.data.Bisected, org.bukkit.block.data.Directional, org.bukkit.block.data.Waterlogged {
|
||||
|
||||
public CraftWeatheringCopperStair() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CraftWeatheringCopperStair(net.minecraft.world.level.block.state.IBlockData state) {
|
||||
super(state);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.type.CraftStairs
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> SHAPE = getEnum(net.minecraft.world.level.block.WeatheringCopperStairBlock.class, "shape");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.data.type.Stairs.Shape getShape() {
|
||||
return get(SHAPE, org.bukkit.block.data.type.Stairs.Shape.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setShape(org.bukkit.block.data.type.Stairs.Shape shape) {
|
||||
set(SHAPE, shape);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftBisected
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum(net.minecraft.world.level.block.WeatheringCopperStairBlock.class, "half");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.data.Bisected.Half getHalf() {
|
||||
return get(HALF, org.bukkit.block.data.Bisected.Half.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHalf(org.bukkit.block.data.Bisected.Half half) {
|
||||
set(HALF, half);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftDirectional
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.WeatheringCopperStairBlock.class, "facing");
|
||||
|
||||
@Override
|
||||
public org.bukkit.block.BlockFace getFacing() {
|
||||
return get(FACING, org.bukkit.block.BlockFace.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);
|
||||
}
|
||||
|
||||
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
||||
|
||||
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.WeatheringCopperStairBlock.class, "waterlogged");
|
||||
|
||||
@Override
|
||||
public boolean isWaterlogged() {
|
||||
return get(WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterlogged(boolean waterlogged) {
|
||||
set(WATERLOGGED, waterlogged);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user