Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mostly 1.8 block fixes & 1.13+ modules that don't work. #69

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d7cd06a
Define pathblocks correctly
MarkElf Sep 21, 2019
327b414
Remove pathblocks from multiversion support
MarkElf Sep 21, 2019
2c8cf50
Enable enderpearl check + fix PitchPattern FPs
MarkElf Sep 21, 2019
243da30
Define 1.12 - 1.14 modules
MarkElf Sep 21, 2019
16ce1bf
Use added modules (1.12-1.14)
MarkElf Sep 21, 2019
451cfe2
Readd path block to multiversion support
MarkElf Sep 23, 2019
68f73bc
Set wooden pressure plates as passable
MarkElf Oct 9, 2019
ca2e736
Update BridgeMaterial.java
MarkElf Oct 9, 2019
4d7dd5b
Tell wooden pressure plates to be passable(?)
MarkElf Oct 9, 2019
5b342f2
Correctly remove grass_path
MarkElf Oct 9, 2019
e4d5db5
Correct changes made accidentally
MarkElf Oct 9, 2019
ce6cc9a
Set sweet berry bush as passable
MarkElf Oct 9, 2019
4b631d1
Fix glass panes below 1.13
MarkElf Oct 9, 2019
84364c7
glass pane = thin glass
MarkElf Oct 9, 2019
fd1d165
No space in waterlilly
MarkElf Oct 9, 2019
4738aa9
Patch AAC Jesus bypass
MarkElf Oct 11, 2019
d2fa967
Compile fix
MarkElf Oct 13, 2019
0ed6814
Update pom.xml
MarkElf Oct 13, 2019
6183025
[Fail] Allow mining wooden pressure plates (1.8)
MarkElf Oct 23, 2019
9e9d372
No mistakes, just happy accidents
MarkElf Oct 23, 2019
5cc8793
Fix wood pressure plates mining fp
MarkElf Oct 26, 2019
4d051bf
remove wood pressure plates too
MarkElf Oct 26, 2019
2cdb5d9
Undo wooden pressureplate mining speed
MarkElf Oct 27, 2019
1b53aac
Update pom.xml
MarkElf Oct 27, 2019
adca99a
Commits by hand are annoying
MarkElf Oct 27, 2019
cf0a9d9
Remove coral blocks
MarkElf Nov 1, 2019
7d5147a
Define coral
MarkElf Nov 1, 2019
ea29f3f
Define CORAL_PARTS
MarkElf Nov 1, 2019
d8bf71d
Remove dead coral from config
MarkElf Nov 1, 2019
e4aaae2
Fix standing on the side of an elevated chest
MarkElf Dec 7, 2019
c5f8a07
Update MultiClientProtocolBlockShapePatch.java
MarkElf Dec 11, 2019
538de85
Add files via upload
MarkElf Dec 11, 2019
786be3d
Add files via upload
MarkElf Dec 11, 2019
7a2c0f2
Update MCAccessBukkitBase.java
MarkElf Dec 11, 2019
b54a884
Update MCAccessCBReflect.java
MarkElf Dec 11, 2019
bcbb1d6
Update BlocksMC1_15.java
MarkElf Dec 11, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
52 changes: 52 additions & 0 deletions NCPCompatNonFree/NCPCompatSpigotCB1_12_R1/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatspigotcb1_12_r1</artifactId>
<packaging>jar</packaging>
<name>NCPCompatSpigotCB1_12_R1</name>
<version>1.1-SNAPSHOT</version>

<parent>
<groupId>fr.neatmonster</groupId>
<artifactId>nocheatplus-parent</artifactId>
<version>1.1-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcore</artifactId>
<version>1.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.12-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

<description>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).</description>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

</project>
52 changes: 52 additions & 0 deletions NCPCompatNonFree/NCPCompatSpigotCB1_13_R1/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatspigotcb1_13_r1</artifactId>
<packaging>jar</packaging>
<name>NCPCompatSpigotCB1_13_R1</name>
<version>1.1-SNAPSHOT</version>

<parent>
<groupId>fr.neatmonster</groupId>
<artifactId>nocheatplus-parent</artifactId>
<version>1.1-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcore</artifactId>
<version>1.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.13-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

<description>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).</description>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

</project>
52 changes: 52 additions & 0 deletions NCPCompatNonFree/NCPCompatSpigotCB1_14_R1/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatspigotcb1_14_r1</artifactId>
<packaging>jar</packaging>
<name>NCPCompatSpigotCB1_14_R1</name>
<version>1.1-SNAPSHOT</version>

<parent>
<groupId>fr.neatmonster</groupId>
<artifactId>nocheatplus-parent</artifactId>
<version>1.1-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcore</artifactId>
<version>1.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.14-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

<description>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).</description>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

</project>
46 changes: 46 additions & 0 deletions NCPCompatNonFree/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ The NCPPlugin sub-project contains the relevant factories (MCAccessFactory, Enti
<module>NCPCompatSpigotCB1_9_R2</module>
<module>NCPCompatSpigotCB1_10_R1</module>
<module>NCPCompatSpigotCB1_11_R1</module>
<module>NCPCompatSpigotCB1_12_R1</module>
<module>NCPCompatSpigotCB1_13_R1</module>
<module>NCPCompatSpigotCB1_14_R1</module>
<!-- ... -->
<module>NCPCompatCBDev</module>
</modules>
Expand All @@ -60,6 +63,21 @@ The NCPPlugin sub-project contains the relevant factories (MCAccessFactory, Enti
<version>1.1-SNAPSHOT</version>
</dependency>
<!-- ... -->
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatspigotcb1_14_r1</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatspigotcb1_13_r1</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatspigotcb1_12_r1</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatspigotcb1_11_r1</artifactId>
Expand Down Expand Up @@ -179,6 +197,34 @@ The NCPPlugin sub-project contains the relevant factories (MCAccessFactory, Enti

<!-- ... -->

<profile>
<id>spigot1_14_r1</id>
<modules>
<module>NCPCompatSpigotCB1_14_R1</module>
</modules>
<dependencies>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatspigotcb1_14_r1</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
</dependencies>
</profile>

<profile>
<id>spigot1_13_r1</id>
<modules>
<module>NCPCompatSpigotCB1_13_R1</module>
</modules>
<dependencies>
<dependency>
<groupId>fr.neatmonster</groupId>
<artifactId>ncpcompatspigotcb1_13_r1</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
</dependencies>
</profile>

<profile>
<id>spigot1_12_r1</id>
<modules>
Expand Down
8 changes: 4 additions & 4 deletions NCPCompatProtocolLib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.12-pre2-SNAPSHOT</version>
<version>1.14.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -36,12 +36,12 @@
<dependency>
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib-API</artifactId>
<version>4.3.0-SNAPSHOT</version>
<version>4.4.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

<description>Features using the plugin ProtocolLib:
<description>Features using the plugin ProtocolLib:
https://dev.bukkit.org/bukkit-plugins/protocollib/</description>

<build>
Expand All @@ -56,4 +56,4 @@ https://dev.bukkit.org/bukkit-plugins/protocollib/</description>
</plugins>
</build>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
) {
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}

Expand Down
Loading