mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Merge pull request #2862 from IntellectualSites/bukkit/1.16.1
Update to 1.16.1
This commit is contained in:
commit
eff410d1da
6 changed files with 304 additions and 278 deletions
|
@ -22,10 +22,13 @@ dependencies {
|
|||
implementation(project(":PlotSquared-Core"))
|
||||
compile("org.bstats:bstats-bukkit:1.7")
|
||||
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("org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT")
|
||||
compile(group: "com.sk89q.worldedit", name: "worldedit-bukkit", version: "7.0.1")
|
||||
implementation("org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT")
|
||||
compile(group: "com.sk89q.worldedit", name: "worldedit-bukkit", version: "7.1.0") {
|
||||
exclude(module: "bukkit")
|
||||
|
||||
}
|
||||
compile("io.papermc:paperlib:1.0.2")
|
||||
implementation("net.kyori:text-adapter-bukkit:3.0.3")
|
||||
compile("com.github.MilkBowl:VaultAPI:1.7") {
|
||||
|
|
|
@ -27,14 +27,20 @@
|
|||
<dependency>
|
||||
<groupId>com.destroystokyo.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.15.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.16.1-R0.1-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sk89q.worldedit</groupId>
|
||||
<artifactId>worldedit-bukkit</artifactId>
|
||||
<version>7.0.1</version>
|
||||
<version>7.1.0</version>
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<groupId>*</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.papermc</groupId>
|
||||
|
@ -131,7 +137,7 @@
|
|||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.15.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.16.1-R0.1-SNAPSHOT</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -125,6 +125,7 @@ import org.bukkit.World;
|
|||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.command.PluginCommand;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Listener;
|
||||
|
@ -630,46 +631,46 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||
Iterator<Entity> iterator = entities.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity = iterator.next();
|
||||
switch (entity.getType()) {
|
||||
case EGG:
|
||||
case FISHING_HOOK:
|
||||
case ENDER_SIGNAL:
|
||||
case AREA_EFFECT_CLOUD:
|
||||
case EXPERIENCE_ORB:
|
||||
case LEASH_HITCH:
|
||||
case FIREWORK:
|
||||
case LIGHTNING:
|
||||
case WITHER_SKULL:
|
||||
case UNKNOWN:
|
||||
case PLAYER:
|
||||
switch (entity.getType().toString()) {
|
||||
case "EGG":
|
||||
case "FISHING_HOOK":
|
||||
case "ENDER_SIGNAL":
|
||||
case "AREA_EFFECT_CLOUD":
|
||||
case "EXPERIENCE_ORB":
|
||||
case "LEASH_HITCH":
|
||||
case "FIREWORK":
|
||||
case "LIGHTNING":
|
||||
case "WITHER_SKULL":
|
||||
case "UNKNOWN":
|
||||
case "PLAYER":
|
||||
// non moving / unmovable
|
||||
continue;
|
||||
case THROWN_EXP_BOTTLE:
|
||||
case SPLASH_POTION:
|
||||
case SNOWBALL:
|
||||
case SHULKER_BULLET:
|
||||
case SPECTRAL_ARROW:
|
||||
case ENDER_PEARL:
|
||||
case ARROW:
|
||||
case LLAMA_SPIT:
|
||||
case TRIDENT:
|
||||
case "THROWN_EXP_BOTTLE":
|
||||
case "SPLASH_POTION":
|
||||
case "SNOWBALL":
|
||||
case "SHULKER_BULLET":
|
||||
case "SPECTRAL_ARROW":
|
||||
case "ENDER_PEARL":
|
||||
case "ARROW":
|
||||
case "LLAMA_SPIT":
|
||||
case "TRIDENT":
|
||||
// managed elsewhere | projectile
|
||||
continue;
|
||||
case ITEM_FRAME:
|
||||
case PAINTING:
|
||||
case "ITEM_FRAME":
|
||||
case "PAINTING":
|
||||
// Not vehicles
|
||||
continue;
|
||||
case ARMOR_STAND:
|
||||
case "ARMOR_STAND":
|
||||
// Temporarily classify as vehicle
|
||||
case MINECART:
|
||||
case MINECART_CHEST:
|
||||
case MINECART_COMMAND:
|
||||
case MINECART_FURNACE:
|
||||
case MINECART_HOPPER:
|
||||
case MINECART_MOB_SPAWNER:
|
||||
case ENDER_CRYSTAL:
|
||||
case MINECART_TNT:
|
||||
case BOAT:
|
||||
case "MINECART":
|
||||
case "MINECART_CHEST":
|
||||
case "MINECART_COMMAND":
|
||||
case "MINECART_FURNACE":
|
||||
case "MINECART_HOPPER":
|
||||
case "MINECART_MOB_SPAWNER":
|
||||
case "ENDER_CRYSTAL":
|
||||
case "MINECART_TNT":
|
||||
case "BOAT":
|
||||
if (Settings.Enabled_Components.KILL_ROAD_VEHICLES) {
|
||||
com.plotsquared.core.location.Location location =
|
||||
BukkitUtil.getLocation(entity.getLocation());
|
||||
|
@ -698,10 +699,10 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||
}
|
||||
}
|
||||
continue;
|
||||
case SMALL_FIREBALL:
|
||||
case FIREBALL:
|
||||
case DRAGON_FIREBALL:
|
||||
case DROPPED_ITEM:
|
||||
case "SMALL_FIREBALL":
|
||||
case "FIREBALL":
|
||||
case "DRAGON_FIREBALL":
|
||||
case "DROPPED_ITEM":
|
||||
if (Settings.Enabled_Components.KILL_ROAD_ITEMS && plotArea
|
||||
.getOwnedPlotAbs(BukkitUtil.getLocation(entity.getLocation()))
|
||||
== null) {
|
||||
|
@ -709,11 +710,11 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||
}
|
||||
// dropped item
|
||||
continue;
|
||||
case PRIMED_TNT:
|
||||
case FALLING_BLOCK:
|
||||
case "PRIMED_TNT":
|
||||
case "FALLING_BLOCK":
|
||||
// managed elsewhere
|
||||
continue;
|
||||
case SHULKER:
|
||||
case "SHULKER":
|
||||
if (Settings.Enabled_Components.KILL_ROAD_MOBS) {
|
||||
LivingEntity livingEntity = (LivingEntity) entity;
|
||||
List<MetadataValue> meta = entity.getMetadata("shulkerPlot");
|
||||
|
@ -761,71 +762,76 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||
}
|
||||
}
|
||||
continue;
|
||||
case LLAMA:
|
||||
case DONKEY:
|
||||
case MULE:
|
||||
case ZOMBIE_HORSE:
|
||||
case SKELETON_HORSE:
|
||||
case HUSK:
|
||||
case ELDER_GUARDIAN:
|
||||
case WITHER_SKELETON:
|
||||
case STRAY:
|
||||
case ZOMBIE_VILLAGER:
|
||||
case EVOKER:
|
||||
case EVOKER_FANGS:
|
||||
case VEX:
|
||||
case VINDICATOR:
|
||||
case POLAR_BEAR:
|
||||
case BAT:
|
||||
case BLAZE:
|
||||
case CAVE_SPIDER:
|
||||
case CHICKEN:
|
||||
case COW:
|
||||
case CREEPER:
|
||||
case ENDERMAN:
|
||||
case ENDERMITE:
|
||||
case ENDER_DRAGON:
|
||||
case GHAST:
|
||||
case GIANT:
|
||||
case GUARDIAN:
|
||||
case HORSE:
|
||||
case IRON_GOLEM:
|
||||
case MAGMA_CUBE:
|
||||
case MUSHROOM_COW:
|
||||
case OCELOT:
|
||||
case PIG:
|
||||
case PIG_ZOMBIE:
|
||||
case RABBIT:
|
||||
case SHEEP:
|
||||
case SILVERFISH:
|
||||
case SKELETON:
|
||||
case SLIME:
|
||||
case SNOWMAN:
|
||||
case SPIDER:
|
||||
case SQUID:
|
||||
case VILLAGER:
|
||||
case WITCH:
|
||||
case WITHER:
|
||||
case WOLF:
|
||||
case ZOMBIE:
|
||||
case PARROT:
|
||||
case SALMON:
|
||||
case DOLPHIN:
|
||||
case TROPICAL_FISH:
|
||||
case DROWNED:
|
||||
case COD:
|
||||
case TURTLE:
|
||||
case PUFFERFISH:
|
||||
case PHANTOM:
|
||||
case ILLUSIONER:
|
||||
case CAT:
|
||||
case PANDA:
|
||||
case FOX:
|
||||
case PILLAGER:
|
||||
case TRADER_LLAMA:
|
||||
case WANDERING_TRADER:
|
||||
case RAVAGER:
|
||||
//case BEE:
|
||||
case "ZOMBIFIED_PIGLIN":
|
||||
case "LLAMA":
|
||||
case "DONKEY":
|
||||
case "MULE":
|
||||
case "ZOMBIE_HORSE":
|
||||
case "SKELETON_HORSE":
|
||||
case "HUSK":
|
||||
case "ELDER_GUARDIAN":
|
||||
case "WITHER_SKELETON":
|
||||
case "STRAY":
|
||||
case "ZOMBIE_VILLAGER":
|
||||
case "EVOKER":
|
||||
case "EVOKER_FANGS":
|
||||
case "VEX":
|
||||
case "VINDICATOR":
|
||||
case "POLAR_BEAR":
|
||||
case "BAT":
|
||||
case "BLAZE":
|
||||
case "CAVE_SPIDER":
|
||||
case "CHICKEN":
|
||||
case "COW":
|
||||
case "CREEPER":
|
||||
case "ENDERMAN":
|
||||
case "ENDERMITE":
|
||||
case "ENDER_DRAGON":
|
||||
case "GHAST":
|
||||
case "GIANT":
|
||||
case "GUARDIAN":
|
||||
case "HORSE":
|
||||
case "IRON_GOLEM":
|
||||
case "MAGMA_CUBE":
|
||||
case "MUSHROOM_COW":
|
||||
case "OCELOT":
|
||||
case "PIG":
|
||||
case "PIG_ZOMBIE":
|
||||
case "RABBIT":
|
||||
case "SHEEP":
|
||||
case "SILVERFISH":
|
||||
case "SKELETON":
|
||||
case "SLIME":
|
||||
case "SNOWMAN":
|
||||
case "SPIDER":
|
||||
case "SQUID":
|
||||
case "VILLAGER":
|
||||
case "WITCH":
|
||||
case "WITHER":
|
||||
case "WOLF":
|
||||
case "ZOMBIE":
|
||||
case "PARROT":
|
||||
case "SALMON":
|
||||
case "DOLPHIN":
|
||||
case "TROPICAL_FISH":
|
||||
case "DROWNED":
|
||||
case "COD":
|
||||
case "TURTLE":
|
||||
case "PUFFERFISH":
|
||||
case "PHANTOM":
|
||||
case "ILLUSIONER":
|
||||
case "CAT":
|
||||
case "PANDA":
|
||||
case "FOX":
|
||||
case "PILLAGER":
|
||||
case "TRADER_LLAMA":
|
||||
case "WANDERING_TRADER":
|
||||
case "RAVAGER":
|
||||
case "BEE":
|
||||
case "HOGLIN":
|
||||
case "PIGLIN":
|
||||
case "ZOGLIN":
|
||||
break;
|
||||
default: {
|
||||
if (Settings.Enabled_Components.KILL_ROAD_MOBS) {
|
||||
Location location = entity.getLocation();
|
||||
|
|
|
@ -103,51 +103,51 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||
if (!entity.hasGravity()) {
|
||||
this.noGravity = true;
|
||||
}
|
||||
switch (entity.getType()) {
|
||||
case BOAT:
|
||||
switch (entity.getType().toString()) {
|
||||
case "BOAT":
|
||||
Boat boat = (Boat) entity;
|
||||
this.dataByte = getOrdinal(TreeSpecies.values(), boat.getWoodType());
|
||||
return;
|
||||
case ARROW:
|
||||
case EGG:
|
||||
case ENDER_CRYSTAL:
|
||||
case ENDER_PEARL:
|
||||
case ENDER_SIGNAL:
|
||||
case EXPERIENCE_ORB:
|
||||
case FALLING_BLOCK:
|
||||
case FIREBALL:
|
||||
case FIREWORK:
|
||||
case FISHING_HOOK:
|
||||
case LEASH_HITCH:
|
||||
case LIGHTNING:
|
||||
case MINECART:
|
||||
case MINECART_COMMAND:
|
||||
case MINECART_MOB_SPAWNER:
|
||||
case MINECART_TNT:
|
||||
case PLAYER:
|
||||
case PRIMED_TNT:
|
||||
case SLIME:
|
||||
case SMALL_FIREBALL:
|
||||
case SNOWBALL:
|
||||
case MINECART_FURNACE:
|
||||
case SPLASH_POTION:
|
||||
case THROWN_EXP_BOTTLE:
|
||||
case WITHER_SKULL:
|
||||
case UNKNOWN:
|
||||
case SPECTRAL_ARROW:
|
||||
case SHULKER_BULLET:
|
||||
case DRAGON_FIREBALL:
|
||||
case AREA_EFFECT_CLOUD:
|
||||
case TRIDENT:
|
||||
case LLAMA_SPIT:
|
||||
case "ARROW":
|
||||
case "EGG":
|
||||
case "ENDER_CRYSTAL":
|
||||
case "ENDER_PEARL":
|
||||
case "ENDER_SIGNAL":
|
||||
case "EXPERIENCE_ORB":
|
||||
case "FALLING_BLOCK":
|
||||
case "FIREBALL":
|
||||
case "FIREWORK":
|
||||
case "FISHING_HOOK":
|
||||
case "LEASH_HITCH":
|
||||
case "LIGHTNING":
|
||||
case "MINECART":
|
||||
case "MINECART_COMMAND":
|
||||
case "MINECART_MOB_SPAWNER":
|
||||
case "MINECART_TNT":
|
||||
case "PLAYER":
|
||||
case "PRIMED_TNT":
|
||||
case "SLIME":
|
||||
case "SMALL_FIREBALL":
|
||||
case "SNOWBALL":
|
||||
case "MINECART_FURNACE":
|
||||
case "SPLASH_POTION":
|
||||
case "THROWN_EXP_BOTTLE":
|
||||
case "WITHER_SKULL":
|
||||
case "UNKNOWN":
|
||||
case "SPECTRAL_ARROW":
|
||||
case "SHULKER_BULLET":
|
||||
case "DRAGON_FIREBALL":
|
||||
case "AREA_EFFECT_CLOUD":
|
||||
case "TRIDENT":
|
||||
case "LLAMA_SPIT":
|
||||
// Do this stuff later
|
||||
return;
|
||||
// MISC //
|
||||
case DROPPED_ITEM:
|
||||
case "DROPPED_ITEM":
|
||||
Item item = (Item) entity;
|
||||
this.stack = item.getItemStack();
|
||||
return;
|
||||
case ITEM_FRAME:
|
||||
case "ITEM_FRAME":
|
||||
this.x = Math.floor(this.x);
|
||||
this.y = Math.floor(this.y);
|
||||
this.z = Math.floor(this.z);
|
||||
|
@ -155,7 +155,7 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||
this.dataByte = getOrdinal(Rotation.values(), itemFrame.getRotation());
|
||||
this.stack = itemFrame.getItem().clone();
|
||||
return;
|
||||
case PAINTING:
|
||||
case "PAINTING":
|
||||
this.x = Math.floor(this.x);
|
||||
this.y = Math.floor(this.y);
|
||||
this.z = Math.floor(this.z);
|
||||
|
@ -170,18 +170,18 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||
return;
|
||||
// END MISC //
|
||||
// INVENTORY HOLDER //
|
||||
case MINECART_CHEST:
|
||||
case MINECART_HOPPER:
|
||||
case "MINECART_CHEST":
|
||||
case "MINECART_HOPPER":
|
||||
storeInventory((InventoryHolder) entity);
|
||||
return;
|
||||
// START LIVING ENTITY //
|
||||
// START AGEABLE //
|
||||
// START TAMEABLE //
|
||||
case HORSE:
|
||||
case DONKEY:
|
||||
case LLAMA:
|
||||
case MULE:
|
||||
case SKELETON_HORSE:
|
||||
case "HORSE":
|
||||
case "DONKEY":
|
||||
case "LLAMA":
|
||||
case "MULE":
|
||||
case "SKELETON_HORSE":
|
||||
AbstractHorse horse = (AbstractHorse) entity;
|
||||
this.horse = new HorseStats();
|
||||
this.horse.jump = horse.getJumpStrength();
|
||||
|
@ -199,15 +199,15 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||
storeInventory(horse);
|
||||
return;
|
||||
// END INVENTORY HOLDER //
|
||||
case WOLF:
|
||||
case OCELOT:
|
||||
case "WOLF":
|
||||
case "OCELOT":
|
||||
storeTameable((Tameable) entity);
|
||||
storeAgeable((Ageable) entity);
|
||||
storeLiving((LivingEntity) entity);
|
||||
return;
|
||||
// END TAMEABLE //
|
||||
//todo fix sheep
|
||||
case SHEEP:
|
||||
case "SHEEP":
|
||||
Sheep sheep = (Sheep) entity;
|
||||
if (sheep.isSheared()) {
|
||||
this.dataByte = (byte) 1;
|
||||
|
@ -218,23 +218,23 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||
storeAgeable(sheep);
|
||||
storeLiving(sheep);
|
||||
return;
|
||||
case VILLAGER:
|
||||
case CHICKEN:
|
||||
case COW:
|
||||
case MUSHROOM_COW:
|
||||
case PIG:
|
||||
case TURTLE:
|
||||
case POLAR_BEAR:
|
||||
case "VILLAGER":
|
||||
case "CHICKEN":
|
||||
case "COW":
|
||||
case "MUSHROOM_COW":
|
||||
case "PIG":
|
||||
case "TURTLE":
|
||||
case "POLAR_BEAR":
|
||||
storeAgeable((Ageable) entity);
|
||||
storeLiving((LivingEntity) entity);
|
||||
return;
|
||||
case RABBIT:
|
||||
case "RABBIT":
|
||||
this.dataByte = getOrdinal(Rabbit.Type.values(), ((Rabbit) entity).getRabbitType());
|
||||
storeAgeable((Ageable) entity);
|
||||
storeLiving((LivingEntity) entity);
|
||||
return;
|
||||
// END AGEABLE //
|
||||
case ARMOR_STAND:
|
||||
case "ARMOR_STAND":
|
||||
ArmorStand stand = (ArmorStand) entity;
|
||||
this.inventory =
|
||||
new ItemStack[] {stand.getItemInHand().clone(), stand.getHelmet().clone(),
|
||||
|
@ -286,42 +286,45 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||
this.stand.small = true;
|
||||
}
|
||||
return;
|
||||
case ENDERMITE:
|
||||
case "ENDERMITE":
|
||||
return;
|
||||
case BAT:
|
||||
case "BAT":
|
||||
if (((Bat) entity).isAwake()) {
|
||||
this.dataByte = (byte) 1;
|
||||
} else {
|
||||
this.dataByte = (byte) 0;
|
||||
}
|
||||
return;
|
||||
case ENDER_DRAGON:
|
||||
case "ENDER_DRAGON":
|
||||
EnderDragon entity1 = (EnderDragon) entity;
|
||||
this.dataByte = (byte) entity1.getPhase().ordinal();
|
||||
return;
|
||||
case SKELETON:
|
||||
case WITHER_SKELETON:
|
||||
case GUARDIAN:
|
||||
case ELDER_GUARDIAN:
|
||||
case GHAST:
|
||||
case MAGMA_CUBE:
|
||||
case SQUID:
|
||||
case PIG_ZOMBIE:
|
||||
case ZOMBIE:
|
||||
case WITHER:
|
||||
case WITCH:
|
||||
case SPIDER:
|
||||
case CAVE_SPIDER:
|
||||
case SILVERFISH:
|
||||
case GIANT:
|
||||
case ENDERMAN:
|
||||
case CREEPER:
|
||||
case BLAZE:
|
||||
case SHULKER:
|
||||
case SNOWMAN:
|
||||
case "SKELETON":
|
||||
case "WITHER_SKELETON":
|
||||
case "GUARDIAN":
|
||||
case "ELDER_GUARDIAN":
|
||||
case "GHAST":
|
||||
case "MAGMA_CUBE":
|
||||
case "SQUID":
|
||||
case "PIG_ZOMBIE":
|
||||
case "HOGLIN":
|
||||
case "ZOMBIFIED_PIGLIN":
|
||||
case "PIGLIN":
|
||||
case "ZOMBIE":
|
||||
case "WITHER":
|
||||
case "WITCH":
|
||||
case "SPIDER":
|
||||
case "CAVE_SPIDER":
|
||||
case "SILVERFISH":
|
||||
case "GIANT":
|
||||
case "ENDERMAN":
|
||||
case "CREEPER":
|
||||
case "BLAZE":
|
||||
case "SHULKER":
|
||||
case "SNOWMAN":
|
||||
storeLiving((LivingEntity) entity);
|
||||
return;
|
||||
case IRON_GOLEM:
|
||||
case "IRON_GOLEM":
|
||||
if (((IronGolem) entity).isPlayerCreated()) {
|
||||
this.dataByte = (byte) 1;
|
||||
} else {
|
||||
|
@ -463,16 +466,16 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||
return null;
|
||||
}
|
||||
Entity entity;
|
||||
switch (this.getType()) {
|
||||
case DROPPED_ITEM:
|
||||
switch (this.getType().toString()) {
|
||||
case "DROPPED_ITEM":
|
||||
return world.dropItem(location, this.stack);
|
||||
case PLAYER:
|
||||
case LEASH_HITCH:
|
||||
case "PLAYER":
|
||||
case "LEASH_HITCH":
|
||||
return null;
|
||||
case ITEM_FRAME:
|
||||
case "ITEM_FRAME":
|
||||
entity = world.spawn(location, ItemFrame.class);
|
||||
break;
|
||||
case PAINTING:
|
||||
case "PAINTING":
|
||||
entity = world.spawn(location, Painting.class);
|
||||
break;
|
||||
default:
|
||||
|
@ -504,73 +507,73 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||
if (this.noGravity) {
|
||||
entity.setGravity(false);
|
||||
}
|
||||
switch (entity.getType()) {
|
||||
case BOAT:
|
||||
switch (entity.getType().toString()) {
|
||||
case "BOAT":
|
||||
Boat boat = (Boat) entity;
|
||||
boat.setWoodType(TreeSpecies.values()[dataByte]);
|
||||
return entity;
|
||||
case SLIME:
|
||||
case "SLIME":
|
||||
((Slime) entity).setSize(this.dataByte);
|
||||
return entity;
|
||||
case ARROW:
|
||||
case EGG:
|
||||
case ENDER_CRYSTAL:
|
||||
case ENDER_PEARL:
|
||||
case ENDER_SIGNAL:
|
||||
case DROPPED_ITEM:
|
||||
case EXPERIENCE_ORB:
|
||||
case FALLING_BLOCK:
|
||||
case FIREBALL:
|
||||
case FIREWORK:
|
||||
case FISHING_HOOK:
|
||||
case LEASH_HITCH:
|
||||
case LIGHTNING:
|
||||
case MINECART:
|
||||
case MINECART_COMMAND:
|
||||
case MINECART_MOB_SPAWNER:
|
||||
case MINECART_TNT:
|
||||
case PLAYER:
|
||||
case PRIMED_TNT:
|
||||
case SMALL_FIREBALL:
|
||||
case SNOWBALL:
|
||||
case SPLASH_POTION:
|
||||
case THROWN_EXP_BOTTLE:
|
||||
case SPECTRAL_ARROW:
|
||||
case SHULKER_BULLET:
|
||||
case AREA_EFFECT_CLOUD:
|
||||
case DRAGON_FIREBALL:
|
||||
case WITHER_SKULL:
|
||||
case MINECART_FURNACE:
|
||||
case LLAMA_SPIT:
|
||||
case TRIDENT:
|
||||
case UNKNOWN:
|
||||
case "ARROW":
|
||||
case "EGG":
|
||||
case "ENDER_CRYSTAL":
|
||||
case "ENDER_PEARL":
|
||||
case "ENDER_SIGNAL":
|
||||
case "DROPPED_ITEM":
|
||||
case "EXPERIENCE_ORB":
|
||||
case "FALLING_BLOCK":
|
||||
case "FIREBALL":
|
||||
case "FIREWORK":
|
||||
case "FISHING_HOOK":
|
||||
case "LEASH_HITCH":
|
||||
case "LIGHTNING":
|
||||
case "MINECART":
|
||||
case "MINECART_COMMAND":
|
||||
case "MINECART_MOB_SPAWNER":
|
||||
case "MINECART_TNT":
|
||||
case "PLAYER":
|
||||
case "PRIMED_TNT":
|
||||
case "SMALL_FIREBALL":
|
||||
case "SNOWBALL":
|
||||
case "SPLASH_POTION":
|
||||
case "THROWN_EXP_BOTTLE":
|
||||
case "SPECTRAL_ARROW":
|
||||
case "SHULKER_BULLET":
|
||||
case "AREA_EFFECT_CLOUD":
|
||||
case "DRAGON_FIREBALL":
|
||||
case "WITHER_SKULL":
|
||||
case "MINECART_FURNACE":
|
||||
case "LLAMA_SPIT":
|
||||
case "TRIDENT":
|
||||
case "UNKNOWN":
|
||||
// Do this stuff later
|
||||
return entity;
|
||||
// MISC //
|
||||
case ITEM_FRAME:
|
||||
case "ITEM_FRAME":
|
||||
ItemFrame itemframe = (ItemFrame) entity;
|
||||
itemframe.setRotation(Rotation.values()[this.dataByte]);
|
||||
itemframe.setItem(this.stack);
|
||||
return entity;
|
||||
case PAINTING:
|
||||
case "PAINTING":
|
||||
Painting painting = (Painting) entity;
|
||||
painting.setFacingDirection(BlockFace.values()[this.dataByte], true);
|
||||
painting.setArt(Art.getByName(this.dataString), true);
|
||||
return entity;
|
||||
// END MISC //
|
||||
// INVENTORY HOLDER //
|
||||
case MINECART_CHEST:
|
||||
case MINECART_HOPPER:
|
||||
case "MINECART_CHEST":
|
||||
case "MINECART_HOPPER":
|
||||
restoreInventory((InventoryHolder) entity);
|
||||
return entity;
|
||||
// START LIVING ENTITY //
|
||||
// START AGEABLE //
|
||||
// START TAMEABLE //
|
||||
case HORSE:
|
||||
case LLAMA:
|
||||
case SKELETON_HORSE:
|
||||
case DONKEY:
|
||||
case MULE:
|
||||
case "HORSE":
|
||||
case "LLAMA":
|
||||
case "SKELETON_HORSE":
|
||||
case "DONKEY":
|
||||
case "MULE":
|
||||
AbstractHorse horse = (AbstractHorse) entity;
|
||||
horse.setJumpStrength(this.horse.jump);
|
||||
if (horse instanceof ChestedHorse) {
|
||||
|
@ -586,14 +589,14 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||
restoreInventory(horse);
|
||||
return entity;
|
||||
// END INVENTORY HOLDER //
|
||||
case WOLF:
|
||||
case OCELOT:
|
||||
case "WOLF":
|
||||
case "OCELOT":
|
||||
restoreTameable((Tameable) entity);
|
||||
restoreAgeable((Ageable) entity);
|
||||
restoreLiving((LivingEntity) entity);
|
||||
return entity;
|
||||
// END AGEABLE //
|
||||
case SHEEP:
|
||||
case "SHEEP":
|
||||
Sheep sheep = (Sheep) entity;
|
||||
if (this.dataByte == 1) {
|
||||
sheep.setSheared(true);
|
||||
|
@ -604,25 +607,25 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||
restoreAgeable(sheep);
|
||||
restoreLiving(sheep);
|
||||
return sheep;
|
||||
case VILLAGER:
|
||||
case CHICKEN:
|
||||
case COW:
|
||||
case TURTLE:
|
||||
case POLAR_BEAR:
|
||||
case MUSHROOM_COW:
|
||||
case PIG:
|
||||
case "VILLAGER":
|
||||
case "CHICKEN":
|
||||
case "COW":
|
||||
case "TURTLE":
|
||||
case "POLAR_BEAR":
|
||||
case "MUSHROOM_COW":
|
||||
case "PIG":
|
||||
restoreAgeable((Ageable) entity);
|
||||
restoreLiving((LivingEntity) entity);
|
||||
return entity;
|
||||
// END AGEABLE //
|
||||
case RABBIT:
|
||||
case "RABBIT":
|
||||
if (this.dataByte != 0) {
|
||||
((Rabbit) entity).setRabbitType(Rabbit.Type.values()[this.dataByte]);
|
||||
}
|
||||
restoreAgeable((Ageable) entity);
|
||||
restoreLiving((LivingEntity) entity);
|
||||
return entity;
|
||||
case ARMOR_STAND:
|
||||
case "ARMOR_STAND":
|
||||
// CHECK positions
|
||||
ArmorStand stand = (ArmorStand) entity;
|
||||
if (this.inventory[0] != null) {
|
||||
|
@ -688,42 +691,45 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||
}
|
||||
restoreLiving(stand);
|
||||
return stand;
|
||||
case BAT:
|
||||
case "BAT":
|
||||
if (this.dataByte != 0) {
|
||||
((Bat) entity).setAwake(true);
|
||||
}
|
||||
restoreLiving((LivingEntity) entity);
|
||||
return entity;
|
||||
case ENDER_DRAGON:
|
||||
case "ENDER_DRAGON":
|
||||
if (this.dataByte != 0) {
|
||||
((EnderDragon) entity).setPhase(EnderDragon.Phase.values()[this.dataByte]);
|
||||
}
|
||||
restoreLiving((LivingEntity) entity);
|
||||
return entity;
|
||||
case ENDERMITE:
|
||||
case GHAST:
|
||||
case MAGMA_CUBE:
|
||||
case SQUID:
|
||||
case PIG_ZOMBIE:
|
||||
case ZOMBIE:
|
||||
case WITHER:
|
||||
case WITCH:
|
||||
case SPIDER:
|
||||
case CAVE_SPIDER:
|
||||
case SILVERFISH:
|
||||
case GIANT:
|
||||
case ENDERMAN:
|
||||
case CREEPER:
|
||||
case BLAZE:
|
||||
case SNOWMAN:
|
||||
case SHULKER:
|
||||
case GUARDIAN:
|
||||
case ELDER_GUARDIAN:
|
||||
case SKELETON:
|
||||
case WITHER_SKELETON:
|
||||
case "ENDERMITE":
|
||||
case "GHAST":
|
||||
case "MAGMA_CUBE":
|
||||
case "SQUID":
|
||||
case "PIG_ZOMBIE":
|
||||
case "HOGLIN":
|
||||
case "PIGLIN":
|
||||
case "ZOMBIFIED_PIGLIN":
|
||||
case "ZOMBIE":
|
||||
case "WITHER":
|
||||
case "WITCH":
|
||||
case "SPIDER":
|
||||
case "CAVE_SPIDER":
|
||||
case "SILVERFISH":
|
||||
case "GIANT":
|
||||
case "ENDERMAN":
|
||||
case "CREEPER":
|
||||
case "BLAZE":
|
||||
case "SNOWMAN":
|
||||
case "SHULKER":
|
||||
case "GUARDIAN":
|
||||
case "ELDER_GUARDIAN":
|
||||
case "SKELETON":
|
||||
case "WITHER_SKELETON":
|
||||
restoreLiving((LivingEntity) entity);
|
||||
return entity;
|
||||
case IRON_GOLEM:
|
||||
case "IRON_GOLEM":
|
||||
if (this.dataByte != 0) {
|
||||
((IronGolem) entity).setPlayerCreated(true);
|
||||
}
|
||||
|
|
|
@ -1389,6 +1389,11 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||
case BUBBLE_CORAL_FAN:
|
||||
case FIRE_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)) {
|
||||
plot.debug("Coral could not dry because coral-dry = false");
|
||||
event.setCancelled(true);
|
||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
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
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
Loading…
Reference in a new issue