diff --git a/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/MCAccessBukkitBase.java b/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/MCAccessBukkitBase.java
index ad12279e3..68197197e 100644
--- a/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/MCAccessBukkitBase.java
+++ b/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/MCAccessBukkitBase.java
@@ -116,7 +116,7 @@ private void testItchyBlock() {
public String getMCVersion() {
// Bukkit API.
// TODO: maybe output something else.
- return "1.6.1-1.14.4|?"; // uh oh
+ return "1.6.1-1.15|?"; // uh oh
}
@Override
diff --git a/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/MCAccessBukkitModern.java b/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/MCAccessBukkitModern.java
index 57321e643..af4868caf 100644
--- a/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/MCAccessBukkitModern.java
+++ b/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/MCAccessBukkitModern.java
@@ -78,7 +78,7 @@ public class MCAccessBukkitModern extends MCAccessBukkit {
private static final BukkitShapeModel MODEL_GROUND_HEAD= new BukkitStatic(
0.25, 0.5); // TODO: XZ-really? 275 ?
private static final BukkitShapeModel MODEL_SINGLE_CHEST = new BukkitStatic(
- 0.062, .875); // TODO: 0.0625?
+ 0.0625, 0.875);
// Static blocks with full height sorted by inset.
private static final BukkitShapeModel MODEL_INSET16_1_HEIGHT100 = new BukkitStatic(
diff --git a/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/cbreflect/MCAccessCBReflect.java b/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/cbreflect/MCAccessCBReflect.java
index 4f907e1dd..e65e72ad8 100644
--- a/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/cbreflect/MCAccessCBReflect.java
+++ b/NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/cbreflect/MCAccessCBReflect.java
@@ -71,7 +71,7 @@ else if (GenericVersion.compareVersions(mcVersion, "1.14.4") > 0) {
@Override
public String getMCVersion() {
// Potentially all :p.
- return "1.7-1.14.4|?";
+ return "1.7-1.15|?";
}
@Override
diff --git a/NCPCompatNonFree/NCPCompatSpigotCB1_12_R1/pom.xml b/NCPCompatNonFree/NCPCompatSpigotCB1_12_R1/pom.xml
new file mode 100644
index 000000000..b0877b5a6
--- /dev/null
+++ b/NCPCompatNonFree/NCPCompatSpigotCB1_12_R1/pom.xml
@@ -0,0 +1,52 @@
+
+ 4.0.0
+ fr.neatmonster
+ ncpcompatspigotcb1_12_r1
+ jar
+ NCPCompatSpigotCB1_12_R1
+ 1.1-SNAPSHOT
+
+
+ fr.neatmonster
+ nocheatplus-parent
+ 1.1-SNAPSHOT
+
+
+
+
+ fr.neatmonster
+ ncpcore
+ 1.1-SNAPSHOT
+ provided
+
+
+ org.bukkit
+ craftbukkit
+ 1.12-R0.1-SNAPSHOT
+ provided
+
+
+
+ Compatibility for SpigotCB1_12_R1.
+
+To add a new compat module the pom.xml file within NCPCompatNonFree has to be modified:
+- Add as module within the profile with id 'all'.
+- Add as dependency within the profile with id 'all'.
+- (Add a new profile with both the module and dependency set.)
+
+The NCPPlugin sub-project contains the relevant factories (MCAccessFactory, EntityAccessFactory, AttributeAccessFactory).
+
+
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+
+ true
+
+
+
+
+
+
diff --git a/NCPCompatNonFree/NCPCompatSpigotCB1_13_R1/pom.xml b/NCPCompatNonFree/NCPCompatSpigotCB1_13_R1/pom.xml
new file mode 100644
index 000000000..b93370859
--- /dev/null
+++ b/NCPCompatNonFree/NCPCompatSpigotCB1_13_R1/pom.xml
@@ -0,0 +1,52 @@
+
+ 4.0.0
+ fr.neatmonster
+ ncpcompatspigotcb1_13_r1
+ jar
+ NCPCompatSpigotCB1_13_R1
+ 1.1-SNAPSHOT
+
+
+ fr.neatmonster
+ nocheatplus-parent
+ 1.1-SNAPSHOT
+
+
+
+
+ fr.neatmonster
+ ncpcore
+ 1.1-SNAPSHOT
+ provided
+
+
+ org.bukkit
+ craftbukkit
+ 1.13-R0.1-SNAPSHOT
+ provided
+
+
+
+ Compatibility for SpigotCB1_13_R1.
+
+To add a new compat module the pom.xml file within NCPCompatNonFree has to be modified:
+- Add as module within the profile with id 'all'.
+- Add as dependency within the profile with id 'all'.
+- (Add a new profile with both the module and dependency set.)
+
+The NCPPlugin sub-project contains the relevant factories (MCAccessFactory, EntityAccessFactory, AttributeAccessFactory).
+
+
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+
+ true
+
+
+
+
+
+
diff --git a/NCPCompatNonFree/NCPCompatSpigotCB1_14_R1/pom.xml b/NCPCompatNonFree/NCPCompatSpigotCB1_14_R1/pom.xml
new file mode 100644
index 000000000..b7b7e6e0c
--- /dev/null
+++ b/NCPCompatNonFree/NCPCompatSpigotCB1_14_R1/pom.xml
@@ -0,0 +1,52 @@
+
+ 4.0.0
+ fr.neatmonster
+ ncpcompatspigotcb1_14_r1
+ jar
+ NCPCompatSpigotCB1_14_R1
+ 1.1-SNAPSHOT
+
+
+ fr.neatmonster
+ nocheatplus-parent
+ 1.1-SNAPSHOT
+
+
+
+
+ fr.neatmonster
+ ncpcore
+ 1.1-SNAPSHOT
+ provided
+
+
+ org.bukkit
+ craftbukkit
+ 1.14-R0.1-SNAPSHOT
+ provided
+
+
+
+ Compatibility for SpigotCB1_14_R1.
+
+To add a new compat module the pom.xml file within NCPCompatNonFree has to be modified:
+- Add as module within the profile with id 'all'.
+- Add as dependency within the profile with id 'all'.
+- (Add a new profile with both the module and dependency set.)
+
+The NCPPlugin sub-project contains the relevant factories (MCAccessFactory, EntityAccessFactory, AttributeAccessFactory).
+
+
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+
+ true
+
+
+
+
+
+
diff --git a/NCPCompatNonFree/pom.xml b/NCPCompatNonFree/pom.xml
index ad8e0a988..b373383a6 100644
--- a/NCPCompatNonFree/pom.xml
+++ b/NCPCompatNonFree/pom.xml
@@ -49,6 +49,9 @@ The NCPPlugin sub-project contains the relevant factories (MCAccessFactory, Enti
NCPCompatSpigotCB1_9_R2
NCPCompatSpigotCB1_10_R1
NCPCompatSpigotCB1_11_R1
+ NCPCompatSpigotCB1_12_R1
+ NCPCompatSpigotCB1_13_R1
+ NCPCompatSpigotCB1_14_R1
NCPCompatCBDev
@@ -60,6 +63,21 @@ The NCPPlugin sub-project contains the relevant factories (MCAccessFactory, Enti
1.1-SNAPSHOT
+
+ fr.neatmonster
+ ncpcompatspigotcb1_14_r1
+ 1.1-SNAPSHOT
+
+
+ fr.neatmonster
+ ncpcompatspigotcb1_13_r1
+ 1.1-SNAPSHOT
+
+
+ fr.neatmonster
+ ncpcompatspigotcb1_12_r1
+ 1.1-SNAPSHOT
+
fr.neatmonster
ncpcompatspigotcb1_11_r1
@@ -179,6 +197,34 @@ The NCPPlugin sub-project contains the relevant factories (MCAccessFactory, Enti
+
+ spigot1_14_r1
+
+ NCPCompatSpigotCB1_14_R1
+
+
+
+ fr.neatmonster
+ ncpcompatspigotcb1_14_r1
+ 1.1-SNAPSHOT
+
+
+
+
+
+ spigot1_13_r1
+
+ NCPCompatSpigotCB1_13_R1
+
+
+
+ fr.neatmonster
+ ncpcompatspigotcb1_13_r1
+ 1.1-SNAPSHOT
+
+
+
+
spigot1_12_r1
diff --git a/NCPCompatProtocolLib/pom.xml b/NCPCompatProtocolLib/pom.xml
index 664b9d8b2..6c70fe469 100644
--- a/NCPCompatProtocolLib/pom.xml
+++ b/NCPCompatProtocolLib/pom.xml
@@ -24,7 +24,7 @@
org.bukkit
bukkit
- 1.12-pre2-SNAPSHOT
+ 1.14.4-R0.1-SNAPSHOT
provided
@@ -36,12 +36,12 @@
com.comphenix.protocol
ProtocolLib-API
- 4.3.0-SNAPSHOT
+ 4.4.0-SNAPSHOT
provided
- Features using the plugin ProtocolLib:
+ Features using the plugin ProtocolLib:
https://dev.bukkit.org/bukkit-plugins/protocollib/
@@ -56,4 +56,4 @@ https://dev.bukkit.org/bukkit-plugins/protocollib/
-
\ No newline at end of file
+
diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/SurvivalFly.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/SurvivalFly.java
index d1187bee2..93dee34c3 100644
--- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/SurvivalFly.java
+++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/SurvivalFly.java
@@ -19,6 +19,7 @@
import java.util.Locale;
import java.util.Set;
+import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Entity;
@@ -412,8 +413,8 @@ else if (data.liftOffEnvelope == LiftOffEnvelope.LIMIT_LIQUID
// TODO: Find something more effective against more smart methods (limitjump helps already).
// TODO: yDistance == 0D <- should there not be a tolerance +- or 0...x ?
// TODO: Complete re-modeling.
- if (hDistanceAboveLimit <= 0D && hDistance > 0.1D && yDistance == 0D && !toOnGround && !fromOnGround
- && lastMove.toIsValid && lastMove.yDistance == 0D
+ if (hDistanceAboveLimit <= 0.0 && hDistance > 0.1 && yDistance == 0.0 && !toOnGround && !fromOnGround
+ && lastMove.toIsValid && lastMove.yDistance == 0.0
&& BlockProperties.isLiquid(to.getTypeId()) && BlockProperties.isLiquid(from.getTypeId())
&& !from.isHeadObstructed() && !to.isHeadObstructed() && !Bridge1_13.isSwimming(player) // TODO: Might decrease margin here.
) {
@@ -422,7 +423,17 @@ else if (data.liftOffEnvelope == LiftOffEnvelope.LIMIT_LIQUID
hDistanceAboveLimit = Math.max(hDistanceAboveLimit, hDistance);
tags.add("waterwalk");
}
-
+
+ // Prevent players from walking on water or in air with a very low delta between y distances
+ if (hDistanceAboveLimit <= 0D && hDistance > 0.22 && !toOnGround && !fromOnGround
+ && lastMove.toIsValid && (yDistance > 0.0 && yDistance < 0.03 || lastMove.yDistance > 0.0 && lastMove.yDistance < 0.03)
+ && BlockProperties.isLiquid(from.getTypeId())
+ && !from.isHeadObstructed() && !to.isHeadObstructed()) {
+
+ hDistanceAboveLimit = Math.max(hDistanceAboveLimit, hDistance);
+ tags.add("badwalk");
+ }
+
// Detects walking directly above water
Block blockUnder = player.getLocation().subtract(0, 0.3, 0).getBlock();
Material blockAbove = player.getLocation().add(0, 0.10, 0).getBlock().getType();
diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/BridgeMaterial.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/BridgeMaterial.java
index f913fb452..78ed0e347 100644
--- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/BridgeMaterial.java
+++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/BridgeMaterial.java
@@ -226,6 +226,8 @@ public static boolean has(String name) {
/** Classic dirt-like grass block. */
public static final Material GRASS_BLOCK = getFirstNotNull("grass_block", "grass");
+
+ public static final Material GLASS_PANES = getFirstNotNull("glass_pane", "thin_glass");
public static final Material HEAVY_WEIGHTED_PRESSURE_PLATE = getFirstNotNull(
"heavy_weighted_pressure_plate", "iron_plate");
@@ -289,6 +291,8 @@ public static boolean has(String name) {
public static final Material STONE_BRICKS = getFirstNotNull("stone_bricks", "smooth_brick");
public static final Material STONE_BRICK_STAIRS = getFirstNotNull(
"stone_brick_stairs", "smooth_stairs");
+ public static final Material WOODEN_PRESSURE_PLATE = getFirstNotNull(
+ "wooden_pressure_plate", "wood_plate", "acacia_pressure_plate", "birch_pressure_plate", "dark_oak_pressure_plate", "jungle_pressure_plate", "oak_pressure_plate", "spruce_pressure_plate");
public static final Material STONE_PRESSURE_PLATE = getFirstNotNull(
"stone_pressure_plate", "stone_plate");
public static final Material STONE_SLAB = getFirstNotNull("stone_slab", "step");
diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_13.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_13.java
index 7354d2acc..6bb0e8386 100644
--- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_13.java
+++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_13.java
@@ -54,14 +54,7 @@ public void setupBlockProperties(WorldConfigProvider> worldConfigProvider) {
for (Material mat : MaterialUtil.CORAL_BLOCKS) {
BlockInit.setAs(mat, Material.STONE);
}
-
- // Passable (alive) coral parts.
-
- // Dead coral parts (solid + ground already set).
- for (Material mat : MaterialUtil.DEAD_CORAL_PARTS) {
- // (Flags should be set correctly by default.)
- BlockInit.setPropsAs(mat, Material.STONE);
- }
+ //Dead and alive coral handled by BlockProperties
// Kelp.
@@ -180,11 +173,6 @@ public void setupBlockProperties(WorldConfigProvider> worldConfigProvider) {
BlockProperties.setBlockProps("TURTLE_EGG", new BlockProps(
BlockProperties.noTool, 0.5f, BlockProperties.secToMs(0.7)));
- // Grass path.
- BlockFlags.removeFlags(Material.GRASS_PATH, BlockProperties.F_HEIGHT100);
- BlockFlags.addFlags(Material.GRASS_PATH,
- BlockProperties.F_XZ100 | BlockProperties.F_HEIGHT16_15);
-
StaticLog.logInfo("Added block-info for Minecraft 1.13 blocks.");
}
diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_14.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_14.java
index 9ff2c3ebb..8abb509e3 100644
--- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_14.java
+++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_14.java
@@ -144,7 +144,7 @@ public void setupBlockProperties(WorldConfigProvider> worldConfigProvider) {
BlockProperties.setBlockProps("BELL", new BlockProperties.BlockProps(BlockProperties.woodPickaxe, 7f, BlockProperties.secToMs(23.0, 3.8, 2.2, 1, 1.5, 0.8)));
BlockProperties.setBlockProps("LANTERN", new BlockProperties.BlockProps(BlockProperties.woodPickaxe, 6.0f, BlockProperties.secToMs(17.0, 2.8, 1.8, 0.7, 0.8, 0.5)));
BlockFlags.addFlags("LANTERN", BlockProperties.F_GROUND | BlockProperties.F_GROUND_HEIGHT);
- BlockFlags.addFlags("SWEET_BERRY_BUSH", BlockProperties.F_COBWEB);
+ BlockFlags.addFlags("SWEET_BERRY_BUSH", BlockProperties.F_IGN_PASSABLE);
StaticLog.logInfo("Added block-info for Minecraft 1.14 blocks.");
}
diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_15.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_15.java
new file mode 100644
index 000000000..3f9589730
--- /dev/null
+++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_15.java
@@ -0,0 +1,29 @@
+package fr.neatmonster.nocheatplus.compat.blocks.init.vanilla;
+
+import org.bukkit.Material;
+
+import fr.neatmonster.nocheatplus.compat.BridgeMaterial;
+import fr.neatmonster.nocheatplus.compat.blocks.BlockPropertiesSetup;
+import fr.neatmonster.nocheatplus.compat.blocks.init.BlockInit;
+import fr.neatmonster.nocheatplus.config.WorldConfigProvider;
+import fr.neatmonster.nocheatplus.logging.StaticLog;
+import fr.neatmonster.nocheatplus.utilities.map.BlockProperties;
+
+public class BlocksMC1_15 implements BlockPropertiesSetup{
+
+ public BlocksMC1_15() {
+ BlockInit.assertMaterialExists("BEEHIVE");
+ BlockInit.assertMaterialExists("HONEY_BLOCK");
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public void setupBlockProperties(WorldConfigProvider> worldConfigProvider) {
+ BlockProperties.setBlockProps("BEE_NEST", new BlockProperties.BlockProps(BlockProperties.woodAxe, 0.3f, BlockProperties.secToMs(0.45, 0.25, 0.15, 0.1, 0.1, 0.05)));
+ BlockProperties.setBlockProps("BEEHIVE", new BlockProperties.BlockProps(BlockProperties.woodAxe, 0.6f, BlockProperties.secToMs(0.9, 0.45, 0.25, 0.15, 0.15, 0.1)));
+ BlockInit.setAs("HONEY_BLOCK", Material.TNT);
+ BlockProperties.setBlockProps("HONEYCOMB_BLOCK", new BlockProperties.BlockProps(BlockProperties.woodAxe, 0.6f, BlockProperties.secToMs(0.9, 0.9, 0.9, 0.9, 0.9, 0.9)));
+ StaticLog.logInfo("Added block-info for Minecraft 1.15 blocks.");
+ }
+
+}
diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_5.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_5.java
index 7eae0679c..67a5ec23b 100644
--- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_5.java
+++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_5.java
@@ -23,6 +23,7 @@
import fr.neatmonster.nocheatplus.logging.StaticLog;
import fr.neatmonster.nocheatplus.utilities.map.BlockFlags;
import fr.neatmonster.nocheatplus.utilities.map.BlockProperties;
+import fr.neatmonster.nocheatplus.utilities.map.MaterialUtil;
/**
* This is an attempt to add Minecraft 1.5 blocks information without actual 1.5 dependency.
@@ -55,6 +56,11 @@ public void setupBlockProperties(WorldConfigProvider> worldConfigProvider) {
// BlockFlags.addFlags(148, BlockProperties.F_IGN_PASSABLE | BlockProperties.F_GROUND | BlockProperties.F_GROUND_HEIGHT);
BlockInit.setAs(BridgeMaterial.HEAVY_WEIGHTED_PRESSURE_PLATE,
BridgeMaterial.STONE_PRESSURE_PLATE);
+
+ // Wood Pressure Plate
+ for (Material mat : MaterialUtil.WOODEN_PRESSURE_PLATES) {
+ BlockFlags.addFlags(mat, BlockProperties.F_IGN_PASSABLE);
+ }
// HACK 1.13
Material comparator = BridgeMaterial.get("comparator");
diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_9.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_9.java
index f346c2914..ed9820e11 100644
--- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_9.java
+++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_9.java
@@ -78,7 +78,11 @@ public void setupBlockProperties(WorldConfigProvider> worldConfigProvider) {
BlockInit.setInstantPassable(BridgeMaterial.BEETROOTS);
// 208(GRASS_PATH / SOLID+GROUND)
- BlockInit.setAs("GRASS_PATH", BridgeMaterial.GRASS_BLOCK); // Later it'll be lower!
+ BlockInit.setAs("GRASS_PATH", BridgeMaterial.GRASS_BLOCK);
+ BlockFlags.addFlags("GRASS_PATH",
+ BlockProperties.F_MIN_HEIGHT16_15
+ | BlockProperties.F_HEIGHT100
+ | BlockProperties.F_GROUND_HEIGHT);
// 209(END_GATEWAY)
// -> Leave flags as is (like air).
diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/special/MultiClientProtocolBlockShapePatch.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/special/MultiClientProtocolBlockShapePatch.java
index ea91f0075..c102e7f3b 100644
--- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/special/MultiClientProtocolBlockShapePatch.java
+++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/special/MultiClientProtocolBlockShapePatch.java
@@ -29,7 +29,7 @@
import fr.neatmonster.nocheatplus.utilities.map.BlockProperties;
/**
- * Multi client protocol support between 1.7.x - 1.14.x.
+ * Multi client protocol support between 1.7.x - 1.15.x.
*
* @author asofold
*
@@ -52,31 +52,18 @@ public MultiClientProtocolBlockShapePatch() {
public void setupBlockProperties(WorldConfigProvider> worldConfigProvider) {
final List done = new LinkedList();
-
- //This freaks out with 1.8 using viaversion
+ //Lilly pads dont work with 1.8 using viaversion
BlockFlags.addFlags(BridgeMaterial.LILY_PAD,
BlockProperties.F_GROUND
| BlockProperties.F_HEIGHT8_1
| BlockProperties.F_GROUND_HEIGHT);
done.add("water_lily");
-
BlockFlags.addFlags(BridgeMaterial.FARMLAND,
BlockProperties.F_MIN_HEIGHT16_15
| BlockProperties.F_HEIGHT100
| BlockProperties.F_GROUND_HEIGHT);
done.add("soil");
- try {
- BlockFlags.addFlags(Material.GRASS_PATH,
- BlockProperties.F_MIN_HEIGHT16_15
- | BlockProperties.F_HEIGHT100
- | BlockProperties.F_GROUND_HEIGHT);
- done.add("grass_path");
- }
- catch (Throwable t) {
- // TODO: What throws for enum not there.
- }
-
StaticLog.logInfo("Applied block patches for multi client protocol support: "
+ StringUtil.join(done, ", "));
}
diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java
index 05789a601..e28358600 100644
--- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java
+++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java
@@ -301,7 +301,7 @@ public DefaultConfig() {
set(ConfPaths.COMBINED_BEDLEAVE_CHECK, "default", 785);
set(ConfPaths.COMBINED_BEDLEAVE_ACTIONS, "cancel log:bedleave:0:5:if cmd:kickbedleave", 785);
- set(ConfPaths.COMBINED_ENDERPEARL_CHECK, "default", 785);
+ set(ConfPaths.COMBINED_ENDERPEARL_CHECK, true, 785);
set(ConfPaths.COMBINED_ENDERPEARL_PREVENTCLICKBLOCK, true, 785);
set(ConfPaths.COMBINED_IMPROBABLE_CHECK , "default", 785);
@@ -375,10 +375,10 @@ public DefaultConfig() {
set(ConfPaths.FIGHT_PITCHPATTERN_CHECK, "default", 1153);
set(ConfPaths.FIGHT_PITCHPATTERN_ALWAYSACTIVE, false, 1153);
set(ConfPaths.FIGHT_PITCHPATTERN_LIMIT, 10F, 1153);
- set(ConfPaths.FIGHT_PITCHPATTERN_SAMPLE, 25, 1153);
+ set(ConfPaths.FIGHT_PITCHPATTERN_SAMPLE, 30, 1153);
set(ConfPaths.FIGHT_PITCHPATTERN_DIFF, 0.001D, 1153);
set(ConfPaths.FIGHT_PITCHPATTERN_DELTAGCD, 0.00001F, 1153);
- set(ConfPaths.FIGHT_PITCHPATTERN_ACTIONS, "vl>2 log:pitchpattern:0:4:if", 1153);
+ set(ConfPaths.FIGHT_PITCHPATTERN_ACTIONS, "vl>5 log:pitchpattern:0:4:if", 1153);
set(ConfPaths.FIGHT_REACH_CHECK, "default", 785);
set(ConfPaths.FIGHT_REACH_SURVIVALDISTANCE, 4.4, 785);
@@ -743,19 +743,6 @@ public DefaultConfig() {
)) {
set(ConfPaths.COMPATIBILITY_BLOCKS + ConfPaths.SUB_OVERRIDEFLAGS + "." + name, "default+ign_passable+ground_height", 785);
}
- for (final String DeadCoralType : Arrays.asList(
- "DEAD_TUBE",
- "DEAD_BRAIN",
- "DEAD_BUBBLE",
- "DEAD_FIRE",
- "DEAD_HORN"
- )) {
- set(ConfPaths.COMPATIBILITY_BLOCKS + ConfPaths.SUB_OVERRIDEFLAGS + "." + DeadCoralType + "_CORAL", "default+ign_passable+ground_height", 1154);
- set(ConfPaths.COMPATIBILITY_BLOCKS + ConfPaths.SUB_OVERRIDEFLAGS + "." + DeadCoralType + "_CORAL_WALL_FAN", "default+ign_passable+ground_height", 1154);
- }
- set(ConfPaths.COMPATIBILITY_BLOCKS + ConfPaths.SUB_OVERRIDEFLAGS + "." + "DEAD_TUBE_CORAL_FAN", "default+ign_passable+ground_height", 1154);
- set(ConfPaths.COMPATIBILITY_BLOCKS + ConfPaths.SUB_OVERRIDEFLAGS + "." + "DEAD_BRAIN_CORAL_FAN", "default+ign_passable+ground_height", 1154);
- set(ConfPaths.COMPATIBILITY_BLOCKS + ConfPaths.SUB_OVERRIDEFLAGS + "." + "DEAD_BUBBLE_CORAL_FAN", "default+ign_passable+ground_height", 1154);
set(ConfPaths.COMPATIBILITY_BLOCKS_CHANGETRACKER_ACTIVE, true, 1036); // With lastChangedBuildNumber.
set(ConfPaths.COMPATIBILITY_BLOCKS_CHANGETRACKER_PISTONS, true, 785);
set(ConfPaths.COMPATIBILITY_BLOCKS_CHANGETRACKER_MAXAGETICKS, 80, 785);
diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/BlockProperties.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/BlockProperties.java
index 18cd7f777..137aa999d 100644
--- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/BlockProperties.java
+++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/BlockProperties.java
@@ -842,6 +842,7 @@ private static long f_flag() {
/** Cobweb like blocks (adhesive). */
public static final long F_COBWEB = f_flag();
+ public static final long F_COBWEB2 = f_flag();
public static final long F_SOULSAND = f_flag();
/**
@@ -1151,6 +1152,7 @@ else if (mcAccess.isBlockSolid(mat).decide()) {
// Ignore for passable.
for (final Material mat : new Material[]{
// More strictly needed.
+ BridgeMaterial.WOODEN_PRESSURE_PLATE,
BridgeMaterial.STONE_PRESSURE_PLATE,
BridgeMaterial.SIGN,
BridgeMaterial.get("DIODE_BLOCK_ON"),
@@ -1223,7 +1225,7 @@ else if (mcAccess.isBlockSolid(mat).decide()) {
}
// Thin fences (iron fence, glass panes).
- final long paneFlags = F_THIN_FENCE | F_VARIABLE;
+ final long paneFlags = F_THIN_FENCE | F_VARIABLE | F_IGN_PASSABLE;
for (final Material mat : new Material[]{
BridgeMaterial.IRON_BARS,
}) {
@@ -1233,6 +1235,11 @@ else if (mcAccess.isBlockSolid(mat).decide()) {
setFlag(mat, paneFlags);
}
+ for (final Material mat : new Material[]{
+ BridgeMaterial.GLASS_PANES,
+ }) {
+ setFlag(mat, paneFlags);
+ }
// Flexible ground (height):
for (final Material mat : new Material[]{
// Strictly needed (multiple boxes otherwise).
@@ -1295,6 +1302,11 @@ else if (mcAccess.isBlockSolid(mat).decide()) {
for (final Material mat : MaterialUtil.LEAVES) {
setBlock(mat, leafType);
setFlag(mat, F_LEAVES);
+ }
+ // Coral
+ for (final Material mat : MaterialUtil.CORAL_PARTS) {
+ setBlock(mat, instantType);
+ setFlag(mat, F_IGN_PASSABLE);
}
for (Material mat : MaterialUtil.BEDS) { // TODO: Beds are special.
setBlock(mat, leafType);
@@ -2866,7 +2878,7 @@ public static final boolean isTrapDoorAboveLadderSpecialCase(final BlockCache ac
final int data1 = access.getData(x, y, z);
// (Trap door may be attached to top or bottom, regardless.)
// Trap door must be open (really?).
- if ((data1 & 0x04) != 0x04) {
+ if (data1 == 0) {
return false;
}
// Need the facing direction.
@@ -3179,7 +3191,7 @@ && getGroundMinHeight(access, bx, by, bz, node, flags) <= Math.min(fy, fy + dY *
} else if (id.toString().equals("BELL") && (access.getData(bx, by, bz) & 0x4) != 0) {
if (Math.max(fy, fy + dY * dT) >0.39 && Math.max(fy, fy + dY * dT) < 0.9) return true;
} else if (id.toString().equals("CHORUS_PLANT") && !collidesFence(fx, fz, dX, dZ, dT, 0.3)) return true;
- else if (id.toString().equals("BAMBOO")) return true;
+ else if (id.toString().equals("BAMBOO")) return true;
// Nothing found.
return false;
}
diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/MaterialUtil.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/MaterialUtil.java
index 602a495c0..fa65b3f04 100644
--- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/MaterialUtil.java
+++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/MaterialUtil.java
@@ -200,20 +200,10 @@ public static void dumpStaticSets(final Class> clazz, final Level level) {
/** Dead or alive. */
public static final Set CORAL_BLOCKS = Collections.unmodifiableSet(
- BridgeMaterial.getBySuffix("coral_block", AlmostBoolean.YES, "legacy")
- );
+ BridgeMaterial.getBySuffix("coral_block", AlmostBoolean.YES, "legacy"));
- /**
- * Dead coral parts, that have been passable alive, but which are like stone
- * when dead.
- */
- public static final Set DEAD_CORAL_PARTS = Collections.unmodifiableSet(
- BridgeMaterial.getByPrefixAndSuffix(
- Arrays.asList("dead_"),
- Arrays.asList("coral_fan", "coral_wall_fan", "coral"),
- AlmostBoolean.YES,
- "block", "legacy"
- ));
+ public static final Set CORAL_PARTS = Collections.unmodifiableSet(
+ BridgeMaterial.getBySuffix(Arrays.asList("_coral_fan", "_coral_wall_fan", "_coral"), AlmostBoolean.YES, "block", "legacy"));
/** Flower pot and potted plants / things. */
public static final Set FLOWER_POTS = Collections.unmodifiableSet(addBlocks(
@@ -525,7 +515,7 @@ public static void dumpStaticSets(final Class> clazz, final Level level) {
*/
@SuppressWarnings("unchecked")
public static final Set LIQUID_BLOCKS = Collections.unmodifiableSet(join(
- DEAD_CORAL_PARTS,
+ CORAL_PARTS,
NEWLIQ
));
diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/compat/registry/AttributeAccessFactory.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/compat/registry/AttributeAccessFactory.java
index 7d593d961..6f2faffa6 100644
--- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/compat/registry/AttributeAccessFactory.java
+++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/compat/registry/AttributeAccessFactory.java
@@ -39,6 +39,10 @@ public void setupAttributeAccess(final MCAccess mcAccess, final MCAccessConfig c
catch (Throwable t) {}
RegistryHelper.setupGenericInstance(new String[] {
"fr.neatmonster.nocheatplus.compat.cbdev.AttributeAccess",
+ "fr.neatmonster.nocheatplus.compat.spigotcb1_14_R1.AttributeAccess",
+ "fr.neatmonster.nocheatplus.compat.spigotcb1_13_R1.AttributeAccess",
+ "fr.neatmonster.nocheatplus.compat.spigotcb1_12_R1.AttributeAccess",
+ "fr.neatmonster.nocheatplus.compat.spigotcb1_11_R1.AttributeAccess",
"fr.neatmonster.nocheatplus.compat.spigotcb1_10_R1.AttributeAccess",
"fr.neatmonster.nocheatplus.compat.spigotcb1_9_R2.AttributeAccess",
"fr.neatmonster.nocheatplus.compat.spigotcb1_9_R1.AttributeAccess",
diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/compat/registry/MCAccessFactory.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/compat/registry/MCAccessFactory.java
index 7629bab29..b8decba51 100644
--- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/compat/registry/MCAccessFactory.java
+++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/compat/registry/MCAccessFactory.java
@@ -32,7 +32,6 @@
*
*/
public class MCAccessFactory {
-
//Message below is sent when CBDedicated and CBReflect failed to run and NCP switches to bukkit's api as it can't tell the server version.
private final String[] updateLocs = new String[] {
// " Check for updates and support at BukkitDev: https://dev.bukkit.org/projects/nocheatplus/",
@@ -125,6 +124,9 @@ private MCAccess getMCAccessCraftBukkit(List throwables) {
"fr.neatmonster.nocheatplus.compat.cbdev.MCAccessCBDev", // latest / tests.
// Dedicated: CB (Spigot)
+ "fr.neatmonster.nocheatplus.compat.spigotcb1_14_R1.MCAccessSpigotCB1_14_R1", // 1.14.2 (1_14_R1)
+ "fr.neatmonster.nocheatplus.compat.spigotcb1_13_R1.MCAccessSpigotCB1_13_R1", // 1.13.2 (1_13_R1)
+ "fr.neatmonster.nocheatplus.compat.spigotcb1_12_R1.MCAccessSpigotCB1_12_R1", // 1.12.2 (1_12_R1)
"fr.neatmonster.nocheatplus.compat.spigotcb1_11_R1.MCAccessSpigotCB1_11_R1", // 1.11.2 (1_11_R1)
"fr.neatmonster.nocheatplus.compat.spigotcb1_10_R1.MCAccessSpigotCB1_10_R1", // 1.10-1.10.2 (1_10_R1)
"fr.neatmonster.nocheatplus.compat.spigotcb1_9_R2.MCAccessSpigotCB1_9_R2", // 1.9.4 (1_9_R2)