From 32f0337b3d51323471d2e18409559253c9045e85 Mon Sep 17 00:00:00 2001 From: Magnus Ulf Date: Sun, 14 Mar 2021 16:48:39 +0100 Subject: [PATCH] Merge 3.3.3 from magnusulf-master --- pom.xml | 208 +++++++++--------- .../factions/cmd/CmdFactionsHome.java | 7 +- .../factions/cmd/CmdFactionsSethome.java | 6 +- .../factions/cmd/CmdFactionsUnsethome.java | 6 +- .../factions/engine/EnginePermBuild.java | 17 +- .../integration/dynmap/AreaMarkerValues.java | 59 +++-- .../integration/dynmap/EngineDynmap.java | 95 ++++++-- .../factions/util/EnumerationUtil.java | 58 ++++- 8 files changed, 302 insertions(+), 154 deletions(-) diff --git a/pom.xml b/pom.xml index 9aabd6fd..1f17a59b 100644 --- a/pom.xml +++ b/pom.xml @@ -1,104 +1,104 @@ - - 4.0.0 - - - - com.massivecraft.massivesuper - MassiveSuper - 3.3.3 - ../MassiveSuper - - - - com.massivecraft.factions - Factions - jar - - - ${project.artifactId} - ${massiveColorInfo}${project.name} allows the players to team up and claim land as their own and start wars with other factions. This way we hope to inspire politics, intrigue, and team spirit. ${massiveDescriptionSuffix} - ${massiveBaseUrl}/factions - - - - - - org.spigotmc - spigot-api - - - - com.massivecraft.massivecore - MassiveCore - - - - com.sk89q.worldedit - worldedit-core - - - com.sk89q.worldedit - worldedit-bukkit - - - - com.sk89q.worldguard - worldguard-core - - - com.sk89q.worldguard - worldguard-bukkit - - - - net.goldtreeservers - worldguardextraflags - - - - net.milkbowl.vault - Vault - - - - com.griefcraft - lwc - - - - me.clip - placeholderapi - - - - mineverse.Aust1n46.chat - MineverseChat - - - - us.dynmap - dynmap - - - - - - - - - - ${project.basedir} - true - - *.yml - - - - - ${project.build.sourceDirectory} - false - - - - - + + 4.0.0 + + + + com.massivecraft.massivesuper + MassiveSuper + 3.3.3 + ../MassiveSuper + + + + com.massivecraft.factions + Factions + jar + + + ${project.artifactId} + ${massiveColorInfo}${project.name} allows the players to team up and claim land as their own and start wars with other factions. This way we hope to inspire politics, intrigue, and team spirit. ${massiveDescriptionSuffix} + ${massiveBaseUrl}/factions + + + + + + org.spigotmc + spigot-api + + + + com.massivecraft.massivecore + MassiveCore + + + + com.sk89q.worldedit + worldedit-core + + + com.sk89q.worldedit + worldedit-bukkit + + + + com.sk89q.worldguard + worldguard-core + + + com.sk89q.worldguard + worldguard-bukkit + + + + net.goldtreeservers + worldguardextraflags + + + + net.milkbowl.vault + Vault + + + + com.griefcraft + lwc + + + + me.clip + placeholderapi + + + + mineverse.Aust1n46.chat + MineverseChat + + + + us.dynmap + dynmap + + + + + + + + + + ${project.basedir} + true + + *.yml + + + + + ${project.build.sourceDirectory} + false + + + + + diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsHome.java b/src/com/massivecraft/factions/cmd/CmdFactionsHome.java index bd829096..22617606 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsHome.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsHome.java @@ -1,5 +1,6 @@ package com.massivecraft.factions.cmd; +import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; @@ -19,6 +20,10 @@ public class CmdFactionsHome extends FactionsCommandWarp // Requirements this.addRequirements(RequirementIsPlayer.get()); + // Parameters + this.addParameter(TypeFaction.get(), "faction", "you"); + + // Visibility this.setVisibility(Visibility.INVISIBLE); } @@ -30,7 +35,7 @@ public class CmdFactionsHome extends FactionsCommandWarp @Override public void perform() throws MassiveException { - List args = MUtil.list(MConf.get().warpsHomeName); + List args = MUtil.list(MConf.get().warpsHomeName, this.argAt(0)); CmdFactions.get().cmdFactionsWarp.cmdFactionsWarpGo.execute(me, args); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSethome.java b/src/com/massivecraft/factions/cmd/CmdFactionsSethome.java index 65d8fb3b..feca44bb 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSethome.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSethome.java @@ -1,5 +1,6 @@ package com.massivecraft.factions.cmd; +import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; @@ -19,6 +20,9 @@ public class CmdFactionsSethome extends FactionsCommandWarp // Requirements this.addRequirements(RequirementIsPlayer.get()); + // Parameters + this.addParameter(TypeFaction.get(), "faction", "you"); + // Visibility this.setVisibility(Visibility.INVISIBLE); } @@ -30,7 +34,7 @@ public class CmdFactionsSethome extends FactionsCommandWarp @Override public void perform() throws MassiveException { - List args = MUtil.list(MConf.get().warpsHomeName); + List args = MUtil.list(MConf.get().warpsHomeName, this.argAt(0)); CmdFactions.get().cmdFactionsWarp.cmdFactionWarpAdd.execute(me, args); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java b/src/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java index 00edce4c..54907a47 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java @@ -1,5 +1,6 @@ package com.massivecraft.factions.cmd; +import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.entity.MConf; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; @@ -19,6 +20,9 @@ public class CmdFactionsUnsethome extends FactionsCommandWarp // Requirements this.addRequirements(RequirementIsPlayer.get()); + // Parameters + this.addParameter(TypeFaction.get(), "faction", "you"); + // Visibility this.setVisibility(Visibility.INVISIBLE); } @@ -30,7 +34,7 @@ public class CmdFactionsUnsethome extends FactionsCommandWarp @Override public void perform() throws MassiveException { - List args = MUtil.list(MConf.get().warpsHomeName); + List args = MUtil.list(MConf.get().warpsHomeName, this.argAt(0)); CmdFactions.get().cmdFactionsWarp.cmdFactionWarpRemove.execute(me, args); } diff --git a/src/com/massivecraft/factions/engine/EnginePermBuild.java b/src/com/massivecraft/factions/engine/EnginePermBuild.java index de93789b..76e79f13 100644 --- a/src/com/massivecraft/factions/engine/EnginePermBuild.java +++ b/src/com/massivecraft/factions/engine/EnginePermBuild.java @@ -26,12 +26,12 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.block.Action; import org.bukkit.event.block.BlockBreakEvent; -import org.bukkit.event.block.BlockDamageEvent; import org.bukkit.event.block.BlockFromToEvent; import org.bukkit.event.block.BlockPistonExtendEvent; import org.bukkit.event.block.BlockPistonRetractEvent; import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.block.SignChangeEvent; +import org.bukkit.event.entity.EntityChangeBlockEvent; import org.bukkit.event.entity.EntityCombustByEntityEvent; import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent; @@ -139,9 +139,6 @@ public class EnginePermBuild extends Engine @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void build(BlockBreakEvent event) { build(event.getPlayer(), event.getBlock(), event); } - @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) - public void build(BlockDamageEvent event) { build(event.getPlayer(), event.getBlock(), event); } - @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void build(SignChangeEvent event) { build(event.getPlayer(), event.getBlock(), event); } @@ -151,6 +148,18 @@ public class EnginePermBuild extends Engine @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void build(HangingBreakByEntityEvent event) { build(event.getRemover(), event.getEntity().getLocation().getBlock(), event); } + @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) + public void build(EntityChangeBlockEvent event) + { + // Handling lilypads being broken by boats + Entity entity = event.getEntity(); + if (entity.getType() != EntityType.BOAT || entity.getPassengers().size() <= 0) return; + Entity player = entity.getPassengers().stream().filter(MUtil::isPlayer).findAny().orElse(entity); + + build(player, event.getBlock(), event); + } + + // -------------------------------------------- // // USE > ITEM // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/integration/dynmap/AreaMarkerValues.java b/src/com/massivecraft/factions/integration/dynmap/AreaMarkerValues.java index b85df912..c2a38e80 100644 --- a/src/com/massivecraft/factions/integration/dynmap/AreaMarkerValues.java +++ b/src/com/massivecraft/factions/integration/dynmap/AreaMarkerValues.java @@ -1,5 +1,6 @@ package com.massivecraft.factions.integration.dynmap; +import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; import org.dynmap.markers.AreaMarker; import org.dynmap.markers.MarkerAPI; @@ -13,68 +14,67 @@ public class AreaMarkerValues private final String label; public String getLabel() { return label; } - public AreaMarkerValues withLabel(String label) { return new AreaMarkerValues(label, world, x, z, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } + public AreaMarkerValues withLabel(String label) { return new AreaMarkerValues(label, world, corners, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } private final String world; public String getWorld() { return world; } - public AreaMarkerValues withWorld(String world) { return new AreaMarkerValues(label, world, x, z, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } + public AreaMarkerValues withWorld(String world) { return new AreaMarkerValues(label, world, corners, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } - private final double[] x; - public double[] getX() { return x; } - public AreaMarkerValues withX(double[] x) { return new AreaMarkerValues(label, world, x, z, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } - - private final double[] z; - public double[] getZ() { return z; } - public AreaMarkerValues withZ(double[] z) { return new AreaMarkerValues(label, world, x, z, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } + private final PS[] corners; + public PS[] getCorners() { return this.corners; } + public AreaMarkerValues withCorners() { return new AreaMarkerValues(label, world, corners, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } private final String description; public String getDescription() { return description; } - public AreaMarkerValues withDescription(String description) { return new AreaMarkerValues(label, world, x, z, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } + public AreaMarkerValues withDescription(String description) { return new AreaMarkerValues(label, world, corners, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } private final int lineColor; public int getLineColor() { return lineColor; } - public AreaMarkerValues withLineColor(int lineColor) { return new AreaMarkerValues(label, world, x, z, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } + public AreaMarkerValues withLineColor(int lineColor) { return new AreaMarkerValues(label, world, corners, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } private final double lineOpacity; public double getLineOpacity() { return lineOpacity; } - public AreaMarkerValues withLineOpacity(double lineOpacity) { return new AreaMarkerValues(label, world, x, z, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } + public AreaMarkerValues withLineOpacity(double lineOpacity) { return new AreaMarkerValues(label, world, corners, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } private final int lineWeight; public int getLineWeight() { return lineWeight; } - public AreaMarkerValues withLineWright(int lineWeight) { return new AreaMarkerValues(label, world, x, z, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } + public AreaMarkerValues withLineWright(int lineWeight) { return new AreaMarkerValues(label, world, corners, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } private final int fillColor; public int getFillColor() { return fillColor; } - public AreaMarkerValues withFillColor(int fillColor) { return new AreaMarkerValues(label, world, x, z, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } + public AreaMarkerValues withFillColor(int fillColor) { return new AreaMarkerValues(label, world, corners, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } private final double fillOpacity; public double getFillOpacity() { return fillOpacity; } - public AreaMarkerValues withFillOpacity(double fillOpacity) { return new AreaMarkerValues(label, world, x, z, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } + public AreaMarkerValues withFillOpacity(double fillOpacity) { return new AreaMarkerValues(label, world, corners, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } private final boolean boost; public boolean isBoost() { return boost; } - public AreaMarkerValues withBoost(boolean boost) { return new AreaMarkerValues(label, world, x, z, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } + public AreaMarkerValues withBoost(boolean boost) { return new AreaMarkerValues(label, world, corners, description, lineColor, lineOpacity, lineWeight, fillColor, fillOpacity, boost); } public AreaMarkerValues withStyle(DynmapStyle style) { - return new AreaMarkerValues(label, world, x, z, description, style); + return new AreaMarkerValues(label, world, corners, description, style); } + // Caches + private final double[] x; + private final double[] z; + // -------------------------------------------- // // CONSTRUCTOR // -------------------------------------------- // - public AreaMarkerValues(String label, String world, double[] x, double[] z, String description, DynmapStyle style) + public AreaMarkerValues(String label, String world, PS[] corners, String description, DynmapStyle style) { - this(label, world, x, z, description, style.getLineColor(), style.getLineOpacity(), style.getLineWeight(), style.getFillColor(), style.getFillOpacity(), style.getBoost()); + this(label, world, corners, description, style.getLineColor(), style.getLineOpacity(), style.getLineWeight(), style.getFillColor(), style.getFillOpacity(), style.getBoost()); } - public AreaMarkerValues(String label, String world, double[] x, double[] z, String description, int lineColor, double lineOpacity, int lineWeight, int fillColor, double fillOpacity, boolean boost) + public AreaMarkerValues(String label, String world, PS[] corners, String description, int lineColor, double lineOpacity, int lineWeight, int fillColor, double fillOpacity, boolean boost) { this.label = label; this.world = world; - this.x = x; - this.z = z; + this.corners = corners; this.description = description; this.lineColor = lineColor; this.lineOpacity = lineOpacity; @@ -82,6 +82,17 @@ public class AreaMarkerValues this.fillColor = fillColor; this.fillOpacity = fillOpacity; this.boost = boost; + + int sz = corners.length; + x = new double[sz]; + z = new double[sz]; + + for (int i = 0; i < sz; i++) + { + PS ps = corners[i]; + x[i] = ps.getLocationX(true); + z[i] = ps.getLocationZ(true); + } } // -------------------------------------------- // @@ -120,8 +131,8 @@ public class AreaMarkerValues this.getLabel(), false, this.getWorld(), - this.getX(), - this.getZ(), + this.x, + this.z, false // not persistent ); diff --git a/src/com/massivecraft/factions/integration/dynmap/EngineDynmap.java b/src/com/massivecraft/factions/integration/dynmap/EngineDynmap.java index 47e41f5c..40c75a0f 100644 --- a/src/com/massivecraft/factions/integration/dynmap/EngineDynmap.java +++ b/src/com/massivecraft/factions/integration/dynmap/EngineDynmap.java @@ -30,6 +30,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -246,35 +247,103 @@ public class EngineDynmap extends Engine while (!allChunksSource.isEmpty()) { - PS somePs = allChunksSource.iterator().next(); + Iterator it = allChunksSource.iterator(); + PS somePs = it.next(); + List linelist = new MassiveList<>(); // Create the polygon Set polygonChunks = new MassiveSet<>(); floodFillTarget(allChunksSource, polygonChunks, somePs); - List linelist = getLineList(polygonChunks); - // Calc the x and y arrays - int sz = linelist.size(); - double[] x = new double[sz]; - double[] z = new double[sz]; - - int i = 0; - for (PS ps : linelist) + List polygonCorners = new MassiveList<>(); + for (PS chunk : polygonChunks) { - x[i] = ps.getLocationX(true); - z[i] = ps.getLocationZ(true); - i++; + for (Direction d : Direction.values()) + { + polygonCorners.add(d.getCorner(chunk)); + } + } + + Set points = new MassiveSet<>(); + for (PS corner : polygonCorners) + { + if (points.contains(corner)) + points.remove(corner); + else + points.add(corner); + } + + Map edges_h = new MassiveMap<>(); + Map edges_v = new MassiveMap<>(); + + List sorted_x = new MassiveList<>(points); + Collections.sort(sorted_x, this::xThenZ); + List sorted_z = new MassiveList<>(points); + Collections.sort(sorted_z, this::zThenX); + + // Create horizontal edges + for (int i = 0; i < points.size();) + { + int curr_z = sorted_z.get(i).getChunkZ(); + while (i < points.size() && curr_z == sorted_z.get(i+1).getChunkZ()) + { + edges_h.put(sorted_z.get(i), sorted_z.get(i+1)); + edges_h.put(sorted_z.get(i+1), sorted_z.get(i)); + i += 2; + } + } + + // Create vertical edges + for (int i = 0; i < points.size();) + { + int curr_x = sorted_x.get(i).getChunkX(); + while (i < points.size() && curr_x == sorted_x.get(i+1).getChunkX()) + { + edges_v.put(sorted_x.get(i), sorted_x.get(i+1)); + edges_v.put(sorted_x.get(i+1), sorted_x.get(i)); + i += 2; + } + } + + //List linelist = getLineList(polygonChunks); + + + linelist = new MassiveList<>(new LinkedHashSet<>(linelist)); + + for (Direction d : Direction.values()) + { + linelist.add(d.getCorner(somePs)); } // Build information for specific area String markerId = calcMarkerId(world, faction); - AreaMarkerValues values = new AreaMarkerValues(faction.getName(), world, x, z, description, style); + AreaMarkerValues values = new AreaMarkerValues(faction.getName(), world, linelist.toArray(new PS[]{}), description, style); ret.put(markerId, values); } return ret; } + private int zThenX(PS a, PS b) + { + if (a.getChunkZ() < b.getChunkZ() || (a.getChunkZ().equals(b.getChunkZ()) && a.getChunkX() < b.getChunkX())) + return -1; + else if (a.equals(b)) + return 0; + else + return 1; + } + + private int xThenZ(PS a, PS b) + { + if (a.getChunkX() < b.getChunkX() || (a.getChunkX().equals(b.getChunkX()) && a.getChunkZ() < b.getChunkZ())) + return -1; + else if (a.equals(b)) + return 0; + else + return 1; + } + private static PS getMinimum(Collection pss) { int minimumX = Integer.MAX_VALUE; diff --git a/src/com/massivecraft/factions/util/EnumerationUtil.java b/src/com/massivecraft/factions/util/EnumerationUtil.java index f0690b5d..3abbe52e 100644 --- a/src/com/massivecraft/factions/util/EnumerationUtil.java +++ b/src/com/massivecraft/factions/util/EnumerationUtil.java @@ -22,7 +22,39 @@ public class EnumerationUtil "LECTERN", // Minecraft 1.14 "BEEHIVE", // Minecraft 1.15 "BEE_NEST", // Minecraft 1.5 - "FLOWER_POT" // Minecraft 1.? + "FLOWER_POT", // Minecraft 1.? + + // The various flower pots, they had to make each one a different material -.- + "POTTED_ACACIA_SAPLING", // Minecraft 1.13 + "POTTED_ALLIUM", // Minecraft 1.13 + "POTTED_AZURE_BLUET", // Minecraft 1.13 + "POTTED_BAMBOO", // Minecraft 1.13 + "POTTED_BIRCH_SAPLING", // Minecraft 1.13 + "POTTED_BLUE_ORCHID", // Minecraft 1.13 + "POTTED_BROWN_MUSHROOM", // Minecraft 1.13 + "POTTED_CACTUS", // Minecraft 1.13 + "POTTED_CACTUS", // Minecraft 1.13 + "POTTED_CORNFLOWER", // Minecraft 1.13 + "POTTED_DANDELION", // Minecraft 1.13 + "POTTED_DARK_OAK_SAPLING", // Minecraft 1.13 + "POTTED_DEAD_BUSH", // Minecraft 1.13 + "POTTED_FERN", // Minecraft 1.13 + "POTTED_JUNGLE_SAPLING", // Minecraft 1.13 + "POTTED_LILY_OF_THE_VALLEY", // Minecraft 1.13 + "POTTED_OAK_SAPLING", // Minecraft 1.13 + "POTTED_ORANGE_TULIP", // Minecraft 1.13 + "POTTED_OXEYE_DAISY", // Minecraft 1.13 + "POTTED_PINK_TULIP", // Minecraft 1.13 + "POTTED_POPPY", // Minecraft 1.13 + "POTTED_RED_MUSHROOM", // Minecraft 1.13 + "POTTED_RED_TULIP", // Minecraft 1.13 + "POTTED_SPRUCE_SAPLING", // Minecraft 1.13 + "POTTED_WHITE_TULIP", // Minecraft 1.13 + "POTTED_WITHER_ROSE", // Minecraft 1.13 + "POTTED_CRIMSON_FUNGUS", // Minecraft 1.16 + "POTTED_CRIMSON_ROOTS", // Minecraft 1.16 + "POTTED_WARPED_FUNGUS", // Minecraft 1.16 + "POTTED_WARPED_ROOTS" // Minecraft 1.16 ); public static boolean isMaterialEditOnInteract(Material material) @@ -54,7 +86,8 @@ public class EnumerationUtil "TRAPPED_CHEST", // Minecraft 1.? "SIGN", // Minecraft 1.? "WOOD_DOOR", // Minecraft 1.? - "IRON_DOOR" // Minecraft 1.? + "IRON_DOOR", // Minecraft 1.? + "BONE_MEAL" // Minecraft 1.? ); public static boolean isMaterialEditTool(Material material) @@ -73,7 +106,7 @@ public class EnumerationUtil "OAK_FENCE_GATE", "ACACIA_DOOR", "ACACIA_TRAPDOOR", - "AKACIA_FENCE_GATE", + "ACACIA_FENCE_GATE", "BIRCH_DOOR", "BIRCH_TRAPDOOR", "BIRCH_FENCE_GATE", @@ -85,7 +118,15 @@ public class EnumerationUtil "JUNGLE_FENCE_GATE", "SPRUCE_DOOR", "SPRUCE_TRAPDOOR", - "SPRUCE_FENCE_GATE" + "SPRUCE_FENCE_GATE", + + // Minecraft 1.16 + "CRIMSON_DOOR", + "CRIMSON_TRAPDOOR", + "CRIMSON_FENCE_GATE", + "WARPED_DOOR", + "WARPED_TRAPDOOR", + "WARPED_FENCE_GATE" ); public static boolean isMaterialDoor(Material material) @@ -113,6 +154,8 @@ public class EnumerationUtil "DROPPER", "BARREL", // Minecraft 1.14 "BLAST_FURNACE", // Minecraft 1.14 + "SMOKER", // 1.14 + "RESPAWN_ANCHOR", // 1.16 // The various shulker boxes, they had to make each one a different material -.- "SHULKER_BOX", @@ -225,7 +268,9 @@ public class EnumerationUtil "DROWNED", // Minecraft 1.13 "PILLAGER", // Minecraft 1.14 "RAVAGER", // Minercraft 1.14 - "ZOMBIFIED_PIGLIN" // Minecraft 1.16 (rename of PIG_ZOMBIE) + "ZOMBIFIED_PIGLIN", // Minecraft 1.16 (rename of PIG_ZOMBIE) + "HOGLIN", // Minecraft 1.16 + "ZOGLIN" // 1.16 ); public static boolean isEntityTypeMonster(EntityType entityType) @@ -264,7 +309,8 @@ public class EnumerationUtil "FOX", // Minecraft 1.14 "PANDA", // Minecraft 1.14 "LLAMA", // Minecraft 1.14 - "LLAMA_SPIT" // Minecraft 1.14 + "LLAMA_SPIT", // Minecraft 1.14 + "STRIDER" // Minecraft 1.16 ); public static boolean isEntityTypeAnimal(EntityType entityType)