Merge pull request #2862 from IntellectualSites/bukkit/1.16.1

Update to 1.16.1
This commit is contained in:
NotMyFault 2020-07-01 12:02:57 +02:00 committed by GitHub
commit eff410d1da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 304 additions and 278 deletions

View file

@ -22,10 +22,13 @@ dependencies {
implementation(project(":PlotSquared-Core")) implementation(project(":PlotSquared-Core"))
compile("org.bstats:bstats-bukkit:1.7") compile("org.bstats:bstats-bukkit:1.7")
compile(project(":PlotSquared-Core")) compile(project(":PlotSquared-Core"))
compile("com.destroystokyo.paper:paper-api:1.15.2-R0.1-SNAPSHOT") compile("com.destroystokyo.paper:paper-api:1.16.1-R0.1-SNAPSHOT")
//implementation 'com.onarandombox.multiversecore:Multiverse-Core:3.0.0-SNAPSHOT' //implementation 'com.onarandombox.multiversecore:Multiverse-Core:3.0.0-SNAPSHOT'
implementation("org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT") implementation("org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT")
compile(group: "com.sk89q.worldedit", name: "worldedit-bukkit", version: "7.0.1") compile(group: "com.sk89q.worldedit", name: "worldedit-bukkit", version: "7.1.0") {
exclude(module: "bukkit")
}
compile("io.papermc:paperlib:1.0.2") compile("io.papermc:paperlib:1.0.2")
implementation("net.kyori:text-adapter-bukkit:3.0.3") implementation("net.kyori:text-adapter-bukkit:3.0.3")
compile("com.github.MilkBowl:VaultAPI:1.7") { compile("com.github.MilkBowl:VaultAPI:1.7") {

View file

@ -27,14 +27,20 @@
<dependency> <dependency>
<groupId>com.destroystokyo.paper</groupId> <groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId> <artifactId>paper-api</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version> <version>1.16.1-R0.1-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sk89q.worldedit</groupId> <groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-bukkit</artifactId> <artifactId>worldedit-bukkit</artifactId>
<version>7.0.1</version> <version>7.1.0</version>
<scope>compile</scope> <scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>bukkit</artifactId>
<groupId>*</groupId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.papermc</groupId> <groupId>io.papermc</groupId>
@ -131,7 +137,7 @@
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId> <artifactId>spigot-api</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version> <version>1.16.1-R0.1-SNAPSHOT</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<dependency> <dependency>

View file

@ -125,6 +125,7 @@ import org.bukkit.World;
import org.bukkit.command.ConsoleCommandSender; import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.command.PluginCommand; import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
@ -630,46 +631,46 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
Iterator<Entity> iterator = entities.iterator(); Iterator<Entity> iterator = entities.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
Entity entity = iterator.next(); Entity entity = iterator.next();
switch (entity.getType()) { switch (entity.getType().toString()) {
case EGG: case "EGG":
case FISHING_HOOK: case "FISHING_HOOK":
case ENDER_SIGNAL: case "ENDER_SIGNAL":
case AREA_EFFECT_CLOUD: case "AREA_EFFECT_CLOUD":
case EXPERIENCE_ORB: case "EXPERIENCE_ORB":
case LEASH_HITCH: case "LEASH_HITCH":
case FIREWORK: case "FIREWORK":
case LIGHTNING: case "LIGHTNING":
case WITHER_SKULL: case "WITHER_SKULL":
case UNKNOWN: case "UNKNOWN":
case PLAYER: case "PLAYER":
// non moving / unmovable // non moving / unmovable
continue; continue;
case THROWN_EXP_BOTTLE: case "THROWN_EXP_BOTTLE":
case SPLASH_POTION: case "SPLASH_POTION":
case SNOWBALL: case "SNOWBALL":
case SHULKER_BULLET: case "SHULKER_BULLET":
case SPECTRAL_ARROW: case "SPECTRAL_ARROW":
case ENDER_PEARL: case "ENDER_PEARL":
case ARROW: case "ARROW":
case LLAMA_SPIT: case "LLAMA_SPIT":
case TRIDENT: case "TRIDENT":
// managed elsewhere | projectile // managed elsewhere | projectile
continue; continue;
case ITEM_FRAME: case "ITEM_FRAME":
case PAINTING: case "PAINTING":
// Not vehicles // Not vehicles
continue; continue;
case ARMOR_STAND: case "ARMOR_STAND":
// Temporarily classify as vehicle // Temporarily classify as vehicle
case MINECART: case "MINECART":
case MINECART_CHEST: case "MINECART_CHEST":
case MINECART_COMMAND: case "MINECART_COMMAND":
case MINECART_FURNACE: case "MINECART_FURNACE":
case MINECART_HOPPER: case "MINECART_HOPPER":
case MINECART_MOB_SPAWNER: case "MINECART_MOB_SPAWNER":
case ENDER_CRYSTAL: case "ENDER_CRYSTAL":
case MINECART_TNT: case "MINECART_TNT":
case BOAT: case "BOAT":
if (Settings.Enabled_Components.KILL_ROAD_VEHICLES) { if (Settings.Enabled_Components.KILL_ROAD_VEHICLES) {
com.plotsquared.core.location.Location location = com.plotsquared.core.location.Location location =
BukkitUtil.getLocation(entity.getLocation()); BukkitUtil.getLocation(entity.getLocation());
@ -698,10 +699,10 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
} }
} }
continue; continue;
case SMALL_FIREBALL: case "SMALL_FIREBALL":
case FIREBALL: case "FIREBALL":
case DRAGON_FIREBALL: case "DRAGON_FIREBALL":
case DROPPED_ITEM: case "DROPPED_ITEM":
if (Settings.Enabled_Components.KILL_ROAD_ITEMS && plotArea if (Settings.Enabled_Components.KILL_ROAD_ITEMS && plotArea
.getOwnedPlotAbs(BukkitUtil.getLocation(entity.getLocation())) .getOwnedPlotAbs(BukkitUtil.getLocation(entity.getLocation()))
== null) { == null) {
@ -709,11 +710,11 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
} }
// dropped item // dropped item
continue; continue;
case PRIMED_TNT: case "PRIMED_TNT":
case FALLING_BLOCK: case "FALLING_BLOCK":
// managed elsewhere // managed elsewhere
continue; continue;
case SHULKER: case "SHULKER":
if (Settings.Enabled_Components.KILL_ROAD_MOBS) { if (Settings.Enabled_Components.KILL_ROAD_MOBS) {
LivingEntity livingEntity = (LivingEntity) entity; LivingEntity livingEntity = (LivingEntity) entity;
List<MetadataValue> meta = entity.getMetadata("shulkerPlot"); List<MetadataValue> meta = entity.getMetadata("shulkerPlot");
@ -761,71 +762,76 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
} }
} }
continue; continue;
case LLAMA: case "ZOMBIFIED_PIGLIN":
case DONKEY: case "LLAMA":
case MULE: case "DONKEY":
case ZOMBIE_HORSE: case "MULE":
case SKELETON_HORSE: case "ZOMBIE_HORSE":
case HUSK: case "SKELETON_HORSE":
case ELDER_GUARDIAN: case "HUSK":
case WITHER_SKELETON: case "ELDER_GUARDIAN":
case STRAY: case "WITHER_SKELETON":
case ZOMBIE_VILLAGER: case "STRAY":
case EVOKER: case "ZOMBIE_VILLAGER":
case EVOKER_FANGS: case "EVOKER":
case VEX: case "EVOKER_FANGS":
case VINDICATOR: case "VEX":
case POLAR_BEAR: case "VINDICATOR":
case BAT: case "POLAR_BEAR":
case BLAZE: case "BAT":
case CAVE_SPIDER: case "BLAZE":
case CHICKEN: case "CAVE_SPIDER":
case COW: case "CHICKEN":
case CREEPER: case "COW":
case ENDERMAN: case "CREEPER":
case ENDERMITE: case "ENDERMAN":
case ENDER_DRAGON: case "ENDERMITE":
case GHAST: case "ENDER_DRAGON":
case GIANT: case "GHAST":
case GUARDIAN: case "GIANT":
case HORSE: case "GUARDIAN":
case IRON_GOLEM: case "HORSE":
case MAGMA_CUBE: case "IRON_GOLEM":
case MUSHROOM_COW: case "MAGMA_CUBE":
case OCELOT: case "MUSHROOM_COW":
case PIG: case "OCELOT":
case PIG_ZOMBIE: case "PIG":
case RABBIT: case "PIG_ZOMBIE":
case SHEEP: case "RABBIT":
case SILVERFISH: case "SHEEP":
case SKELETON: case "SILVERFISH":
case SLIME: case "SKELETON":
case SNOWMAN: case "SLIME":
case SPIDER: case "SNOWMAN":
case SQUID: case "SPIDER":
case VILLAGER: case "SQUID":
case WITCH: case "VILLAGER":
case WITHER: case "WITCH":
case WOLF: case "WITHER":
case ZOMBIE: case "WOLF":
case PARROT: case "ZOMBIE":
case SALMON: case "PARROT":
case DOLPHIN: case "SALMON":
case TROPICAL_FISH: case "DOLPHIN":
case DROWNED: case "TROPICAL_FISH":
case COD: case "DROWNED":
case TURTLE: case "COD":
case PUFFERFISH: case "TURTLE":
case PHANTOM: case "PUFFERFISH":
case ILLUSIONER: case "PHANTOM":
case CAT: case "ILLUSIONER":
case PANDA: case "CAT":
case FOX: case "PANDA":
case PILLAGER: case "FOX":
case TRADER_LLAMA: case "PILLAGER":
case WANDERING_TRADER: case "TRADER_LLAMA":
case RAVAGER: case "WANDERING_TRADER":
//case BEE: case "RAVAGER":
case "BEE":
case "HOGLIN":
case "PIGLIN":
case "ZOGLIN":
break;
default: { default: {
if (Settings.Enabled_Components.KILL_ROAD_MOBS) { if (Settings.Enabled_Components.KILL_ROAD_MOBS) {
Location location = entity.getLocation(); Location location = entity.getLocation();

View file

@ -103,51 +103,51 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
if (!entity.hasGravity()) { if (!entity.hasGravity()) {
this.noGravity = true; this.noGravity = true;
} }
switch (entity.getType()) { switch (entity.getType().toString()) {
case BOAT: case "BOAT":
Boat boat = (Boat) entity; Boat boat = (Boat) entity;
this.dataByte = getOrdinal(TreeSpecies.values(), boat.getWoodType()); this.dataByte = getOrdinal(TreeSpecies.values(), boat.getWoodType());
return; return;
case ARROW: case "ARROW":
case EGG: case "EGG":
case ENDER_CRYSTAL: case "ENDER_CRYSTAL":
case ENDER_PEARL: case "ENDER_PEARL":
case ENDER_SIGNAL: case "ENDER_SIGNAL":
case EXPERIENCE_ORB: case "EXPERIENCE_ORB":
case FALLING_BLOCK: case "FALLING_BLOCK":
case FIREBALL: case "FIREBALL":
case FIREWORK: case "FIREWORK":
case FISHING_HOOK: case "FISHING_HOOK":
case LEASH_HITCH: case "LEASH_HITCH":
case LIGHTNING: case "LIGHTNING":
case MINECART: case "MINECART":
case MINECART_COMMAND: case "MINECART_COMMAND":
case MINECART_MOB_SPAWNER: case "MINECART_MOB_SPAWNER":
case MINECART_TNT: case "MINECART_TNT":
case PLAYER: case "PLAYER":
case PRIMED_TNT: case "PRIMED_TNT":
case SLIME: case "SLIME":
case SMALL_FIREBALL: case "SMALL_FIREBALL":
case SNOWBALL: case "SNOWBALL":
case MINECART_FURNACE: case "MINECART_FURNACE":
case SPLASH_POTION: case "SPLASH_POTION":
case THROWN_EXP_BOTTLE: case "THROWN_EXP_BOTTLE":
case WITHER_SKULL: case "WITHER_SKULL":
case UNKNOWN: case "UNKNOWN":
case SPECTRAL_ARROW: case "SPECTRAL_ARROW":
case SHULKER_BULLET: case "SHULKER_BULLET":
case DRAGON_FIREBALL: case "DRAGON_FIREBALL":
case AREA_EFFECT_CLOUD: case "AREA_EFFECT_CLOUD":
case TRIDENT: case "TRIDENT":
case LLAMA_SPIT: case "LLAMA_SPIT":
// Do this stuff later // Do this stuff later
return; return;
// MISC // // MISC //
case DROPPED_ITEM: case "DROPPED_ITEM":
Item item = (Item) entity; Item item = (Item) entity;
this.stack = item.getItemStack(); this.stack = item.getItemStack();
return; return;
case ITEM_FRAME: case "ITEM_FRAME":
this.x = Math.floor(this.x); this.x = Math.floor(this.x);
this.y = Math.floor(this.y); this.y = Math.floor(this.y);
this.z = Math.floor(this.z); this.z = Math.floor(this.z);
@ -155,7 +155,7 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
this.dataByte = getOrdinal(Rotation.values(), itemFrame.getRotation()); this.dataByte = getOrdinal(Rotation.values(), itemFrame.getRotation());
this.stack = itemFrame.getItem().clone(); this.stack = itemFrame.getItem().clone();
return; return;
case PAINTING: case "PAINTING":
this.x = Math.floor(this.x); this.x = Math.floor(this.x);
this.y = Math.floor(this.y); this.y = Math.floor(this.y);
this.z = Math.floor(this.z); this.z = Math.floor(this.z);
@ -170,18 +170,18 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
return; return;
// END MISC // // END MISC //
// INVENTORY HOLDER // // INVENTORY HOLDER //
case MINECART_CHEST: case "MINECART_CHEST":
case MINECART_HOPPER: case "MINECART_HOPPER":
storeInventory((InventoryHolder) entity); storeInventory((InventoryHolder) entity);
return; return;
// START LIVING ENTITY // // START LIVING ENTITY //
// START AGEABLE // // START AGEABLE //
// START TAMEABLE // // START TAMEABLE //
case HORSE: case "HORSE":
case DONKEY: case "DONKEY":
case LLAMA: case "LLAMA":
case MULE: case "MULE":
case SKELETON_HORSE: case "SKELETON_HORSE":
AbstractHorse horse = (AbstractHorse) entity; AbstractHorse horse = (AbstractHorse) entity;
this.horse = new HorseStats(); this.horse = new HorseStats();
this.horse.jump = horse.getJumpStrength(); this.horse.jump = horse.getJumpStrength();
@ -199,15 +199,15 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
storeInventory(horse); storeInventory(horse);
return; return;
// END INVENTORY HOLDER // // END INVENTORY HOLDER //
case WOLF: case "WOLF":
case OCELOT: case "OCELOT":
storeTameable((Tameable) entity); storeTameable((Tameable) entity);
storeAgeable((Ageable) entity); storeAgeable((Ageable) entity);
storeLiving((LivingEntity) entity); storeLiving((LivingEntity) entity);
return; return;
// END TAMEABLE // // END TAMEABLE //
//todo fix sheep //todo fix sheep
case SHEEP: case "SHEEP":
Sheep sheep = (Sheep) entity; Sheep sheep = (Sheep) entity;
if (sheep.isSheared()) { if (sheep.isSheared()) {
this.dataByte = (byte) 1; this.dataByte = (byte) 1;
@ -218,23 +218,23 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
storeAgeable(sheep); storeAgeable(sheep);
storeLiving(sheep); storeLiving(sheep);
return; return;
case VILLAGER: case "VILLAGER":
case CHICKEN: case "CHICKEN":
case COW: case "COW":
case MUSHROOM_COW: case "MUSHROOM_COW":
case PIG: case "PIG":
case TURTLE: case "TURTLE":
case POLAR_BEAR: case "POLAR_BEAR":
storeAgeable((Ageable) entity); storeAgeable((Ageable) entity);
storeLiving((LivingEntity) entity); storeLiving((LivingEntity) entity);
return; return;
case RABBIT: case "RABBIT":
this.dataByte = getOrdinal(Rabbit.Type.values(), ((Rabbit) entity).getRabbitType()); this.dataByte = getOrdinal(Rabbit.Type.values(), ((Rabbit) entity).getRabbitType());
storeAgeable((Ageable) entity); storeAgeable((Ageable) entity);
storeLiving((LivingEntity) entity); storeLiving((LivingEntity) entity);
return; return;
// END AGEABLE // // END AGEABLE //
case ARMOR_STAND: case "ARMOR_STAND":
ArmorStand stand = (ArmorStand) entity; ArmorStand stand = (ArmorStand) entity;
this.inventory = this.inventory =
new ItemStack[] {stand.getItemInHand().clone(), stand.getHelmet().clone(), new ItemStack[] {stand.getItemInHand().clone(), stand.getHelmet().clone(),
@ -286,42 +286,45 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
this.stand.small = true; this.stand.small = true;
} }
return; return;
case ENDERMITE: case "ENDERMITE":
return; return;
case BAT: case "BAT":
if (((Bat) entity).isAwake()) { if (((Bat) entity).isAwake()) {
this.dataByte = (byte) 1; this.dataByte = (byte) 1;
} else { } else {
this.dataByte = (byte) 0; this.dataByte = (byte) 0;
} }
return; return;
case ENDER_DRAGON: case "ENDER_DRAGON":
EnderDragon entity1 = (EnderDragon) entity; EnderDragon entity1 = (EnderDragon) entity;
this.dataByte = (byte) entity1.getPhase().ordinal(); this.dataByte = (byte) entity1.getPhase().ordinal();
return; return;
case SKELETON: case "SKELETON":
case WITHER_SKELETON: case "WITHER_SKELETON":
case GUARDIAN: case "GUARDIAN":
case ELDER_GUARDIAN: case "ELDER_GUARDIAN":
case GHAST: case "GHAST":
case MAGMA_CUBE: case "MAGMA_CUBE":
case SQUID: case "SQUID":
case PIG_ZOMBIE: case "PIG_ZOMBIE":
case ZOMBIE: case "HOGLIN":
case WITHER: case "ZOMBIFIED_PIGLIN":
case WITCH: case "PIGLIN":
case SPIDER: case "ZOMBIE":
case CAVE_SPIDER: case "WITHER":
case SILVERFISH: case "WITCH":
case GIANT: case "SPIDER":
case ENDERMAN: case "CAVE_SPIDER":
case CREEPER: case "SILVERFISH":
case BLAZE: case "GIANT":
case SHULKER: case "ENDERMAN":
case SNOWMAN: case "CREEPER":
case "BLAZE":
case "SHULKER":
case "SNOWMAN":
storeLiving((LivingEntity) entity); storeLiving((LivingEntity) entity);
return; return;
case IRON_GOLEM: case "IRON_GOLEM":
if (((IronGolem) entity).isPlayerCreated()) { if (((IronGolem) entity).isPlayerCreated()) {
this.dataByte = (byte) 1; this.dataByte = (byte) 1;
} else { } else {
@ -463,16 +466,16 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
return null; return null;
} }
Entity entity; Entity entity;
switch (this.getType()) { switch (this.getType().toString()) {
case DROPPED_ITEM: case "DROPPED_ITEM":
return world.dropItem(location, this.stack); return world.dropItem(location, this.stack);
case PLAYER: case "PLAYER":
case LEASH_HITCH: case "LEASH_HITCH":
return null; return null;
case ITEM_FRAME: case "ITEM_FRAME":
entity = world.spawn(location, ItemFrame.class); entity = world.spawn(location, ItemFrame.class);
break; break;
case PAINTING: case "PAINTING":
entity = world.spawn(location, Painting.class); entity = world.spawn(location, Painting.class);
break; break;
default: default:
@ -504,73 +507,73 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
if (this.noGravity) { if (this.noGravity) {
entity.setGravity(false); entity.setGravity(false);
} }
switch (entity.getType()) { switch (entity.getType().toString()) {
case BOAT: case "BOAT":
Boat boat = (Boat) entity; Boat boat = (Boat) entity;
boat.setWoodType(TreeSpecies.values()[dataByte]); boat.setWoodType(TreeSpecies.values()[dataByte]);
return entity; return entity;
case SLIME: case "SLIME":
((Slime) entity).setSize(this.dataByte); ((Slime) entity).setSize(this.dataByte);
return entity; return entity;
case ARROW: case "ARROW":
case EGG: case "EGG":
case ENDER_CRYSTAL: case "ENDER_CRYSTAL":
case ENDER_PEARL: case "ENDER_PEARL":
case ENDER_SIGNAL: case "ENDER_SIGNAL":
case DROPPED_ITEM: case "DROPPED_ITEM":
case EXPERIENCE_ORB: case "EXPERIENCE_ORB":
case FALLING_BLOCK: case "FALLING_BLOCK":
case FIREBALL: case "FIREBALL":
case FIREWORK: case "FIREWORK":
case FISHING_HOOK: case "FISHING_HOOK":
case LEASH_HITCH: case "LEASH_HITCH":
case LIGHTNING: case "LIGHTNING":
case MINECART: case "MINECART":
case MINECART_COMMAND: case "MINECART_COMMAND":
case MINECART_MOB_SPAWNER: case "MINECART_MOB_SPAWNER":
case MINECART_TNT: case "MINECART_TNT":
case PLAYER: case "PLAYER":
case PRIMED_TNT: case "PRIMED_TNT":
case SMALL_FIREBALL: case "SMALL_FIREBALL":
case SNOWBALL: case "SNOWBALL":
case SPLASH_POTION: case "SPLASH_POTION":
case THROWN_EXP_BOTTLE: case "THROWN_EXP_BOTTLE":
case SPECTRAL_ARROW: case "SPECTRAL_ARROW":
case SHULKER_BULLET: case "SHULKER_BULLET":
case AREA_EFFECT_CLOUD: case "AREA_EFFECT_CLOUD":
case DRAGON_FIREBALL: case "DRAGON_FIREBALL":
case WITHER_SKULL: case "WITHER_SKULL":
case MINECART_FURNACE: case "MINECART_FURNACE":
case LLAMA_SPIT: case "LLAMA_SPIT":
case TRIDENT: case "TRIDENT":
case UNKNOWN: case "UNKNOWN":
// Do this stuff later // Do this stuff later
return entity; return entity;
// MISC // // MISC //
case ITEM_FRAME: case "ITEM_FRAME":
ItemFrame itemframe = (ItemFrame) entity; ItemFrame itemframe = (ItemFrame) entity;
itemframe.setRotation(Rotation.values()[this.dataByte]); itemframe.setRotation(Rotation.values()[this.dataByte]);
itemframe.setItem(this.stack); itemframe.setItem(this.stack);
return entity; return entity;
case PAINTING: case "PAINTING":
Painting painting = (Painting) entity; Painting painting = (Painting) entity;
painting.setFacingDirection(BlockFace.values()[this.dataByte], true); painting.setFacingDirection(BlockFace.values()[this.dataByte], true);
painting.setArt(Art.getByName(this.dataString), true); painting.setArt(Art.getByName(this.dataString), true);
return entity; return entity;
// END MISC // // END MISC //
// INVENTORY HOLDER // // INVENTORY HOLDER //
case MINECART_CHEST: case "MINECART_CHEST":
case MINECART_HOPPER: case "MINECART_HOPPER":
restoreInventory((InventoryHolder) entity); restoreInventory((InventoryHolder) entity);
return entity; return entity;
// START LIVING ENTITY // // START LIVING ENTITY //
// START AGEABLE // // START AGEABLE //
// START TAMEABLE // // START TAMEABLE //
case HORSE: case "HORSE":
case LLAMA: case "LLAMA":
case SKELETON_HORSE: case "SKELETON_HORSE":
case DONKEY: case "DONKEY":
case MULE: case "MULE":
AbstractHorse horse = (AbstractHorse) entity; AbstractHorse horse = (AbstractHorse) entity;
horse.setJumpStrength(this.horse.jump); horse.setJumpStrength(this.horse.jump);
if (horse instanceof ChestedHorse) { if (horse instanceof ChestedHorse) {
@ -586,14 +589,14 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
restoreInventory(horse); restoreInventory(horse);
return entity; return entity;
// END INVENTORY HOLDER // // END INVENTORY HOLDER //
case WOLF: case "WOLF":
case OCELOT: case "OCELOT":
restoreTameable((Tameable) entity); restoreTameable((Tameable) entity);
restoreAgeable((Ageable) entity); restoreAgeable((Ageable) entity);
restoreLiving((LivingEntity) entity); restoreLiving((LivingEntity) entity);
return entity; return entity;
// END AGEABLE // // END AGEABLE //
case SHEEP: case "SHEEP":
Sheep sheep = (Sheep) entity; Sheep sheep = (Sheep) entity;
if (this.dataByte == 1) { if (this.dataByte == 1) {
sheep.setSheared(true); sheep.setSheared(true);
@ -604,25 +607,25 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
restoreAgeable(sheep); restoreAgeable(sheep);
restoreLiving(sheep); restoreLiving(sheep);
return sheep; return sheep;
case VILLAGER: case "VILLAGER":
case CHICKEN: case "CHICKEN":
case COW: case "COW":
case TURTLE: case "TURTLE":
case POLAR_BEAR: case "POLAR_BEAR":
case MUSHROOM_COW: case "MUSHROOM_COW":
case PIG: case "PIG":
restoreAgeable((Ageable) entity); restoreAgeable((Ageable) entity);
restoreLiving((LivingEntity) entity); restoreLiving((LivingEntity) entity);
return entity; return entity;
// END AGEABLE // // END AGEABLE //
case RABBIT: case "RABBIT":
if (this.dataByte != 0) { if (this.dataByte != 0) {
((Rabbit) entity).setRabbitType(Rabbit.Type.values()[this.dataByte]); ((Rabbit) entity).setRabbitType(Rabbit.Type.values()[this.dataByte]);
} }
restoreAgeable((Ageable) entity); restoreAgeable((Ageable) entity);
restoreLiving((LivingEntity) entity); restoreLiving((LivingEntity) entity);
return entity; return entity;
case ARMOR_STAND: case "ARMOR_STAND":
// CHECK positions // CHECK positions
ArmorStand stand = (ArmorStand) entity; ArmorStand stand = (ArmorStand) entity;
if (this.inventory[0] != null) { if (this.inventory[0] != null) {
@ -688,42 +691,45 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
} }
restoreLiving(stand); restoreLiving(stand);
return stand; return stand;
case BAT: case "BAT":
if (this.dataByte != 0) { if (this.dataByte != 0) {
((Bat) entity).setAwake(true); ((Bat) entity).setAwake(true);
} }
restoreLiving((LivingEntity) entity); restoreLiving((LivingEntity) entity);
return entity; return entity;
case ENDER_DRAGON: case "ENDER_DRAGON":
if (this.dataByte != 0) { if (this.dataByte != 0) {
((EnderDragon) entity).setPhase(EnderDragon.Phase.values()[this.dataByte]); ((EnderDragon) entity).setPhase(EnderDragon.Phase.values()[this.dataByte]);
} }
restoreLiving((LivingEntity) entity); restoreLiving((LivingEntity) entity);
return entity; return entity;
case ENDERMITE: case "ENDERMITE":
case GHAST: case "GHAST":
case MAGMA_CUBE: case "MAGMA_CUBE":
case SQUID: case "SQUID":
case PIG_ZOMBIE: case "PIG_ZOMBIE":
case ZOMBIE: case "HOGLIN":
case WITHER: case "PIGLIN":
case WITCH: case "ZOMBIFIED_PIGLIN":
case SPIDER: case "ZOMBIE":
case CAVE_SPIDER: case "WITHER":
case SILVERFISH: case "WITCH":
case GIANT: case "SPIDER":
case ENDERMAN: case "CAVE_SPIDER":
case CREEPER: case "SILVERFISH":
case BLAZE: case "GIANT":
case SNOWMAN: case "ENDERMAN":
case SHULKER: case "CREEPER":
case GUARDIAN: case "BLAZE":
case ELDER_GUARDIAN: case "SNOWMAN":
case SKELETON: case "SHULKER":
case WITHER_SKELETON: case "GUARDIAN":
case "ELDER_GUARDIAN":
case "SKELETON":
case "WITHER_SKELETON":
restoreLiving((LivingEntity) entity); restoreLiving((LivingEntity) entity);
return entity; return entity;
case IRON_GOLEM: case "IRON_GOLEM":
if (this.dataByte != 0) { if (this.dataByte != 0) {
((IronGolem) entity).setPlayerCreated(true); ((IronGolem) entity).setPlayerCreated(true);
} }

View file

@ -1389,6 +1389,11 @@ public class PlayerEvents extends PlotListener implements Listener {
case BUBBLE_CORAL_FAN: case BUBBLE_CORAL_FAN:
case FIRE_CORAL_FAN: case FIRE_CORAL_FAN:
case HORN_CORAL_FAN: case HORN_CORAL_FAN:
case BRAIN_CORAL_WALL_FAN:
case BUBBLE_CORAL_WALL_FAN:
case FIRE_CORAL_WALL_FAN:
case HORN_CORAL_WALL_FAN:
case TUBE_CORAL_WALL_FAN:
if (!plot.getFlag(CoralDryFlag.class)) { if (!plot.getFlag(CoralDryFlag.class)) {
plot.debug("Coral could not dry because coral-dry = false"); plot.debug("Coral could not dry because coral-dry = false");
event.setCancelled(true); event.setCancelled(true);

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists