Skip to content

Commit

Permalink
Mark ParticleTypes as immutable, update tested version
Browse files Browse the repository at this point in the history
  • Loading branch information
dmulloy2 committed Sep 22, 2018
1 parent 6ff6976 commit 083c8e1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ public class ProtocolLibrary {
/**
* The maximum version ProtocolLib has been tested with.
*/
public static final String MAXIMUM_MINECRAFT_VERSION = "1.12.2";
public static final String MAXIMUM_MINECRAFT_VERSION = "1.13.1";

/**
* The date (with ISO 8601 or YYYY-MM-DD) when the most recent version (1.12.2) was released.
* The date (with ISO 8601 or YYYY-MM-DD) when the most recent version (1.13.1) was released.
*/
public static final String MINECRAFT_LAST_RELEASE_DATE = "2017-09-18";
public static final String MINECRAFT_LAST_RELEASE_DATE = "2018-08-22";

/**
* Plugins that are currently incompatible with ProtocolLib.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import javax.crypto.SecretKey;

import com.comphenix.protocol.utility.MinecraftReflection;
import com.comphenix.protocol.utility.MinecraftVersion;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
import com.google.common.primitives.Primitives;
Expand Down Expand Up @@ -62,8 +63,12 @@ public class ImmutableDetector implements Cloner {
add(() -> MinecraftReflection.getMinecraftClass("SoundEffect"));
add(MinecraftReflection::getBlockClass);
add(MinecraftReflection::getItemClass);
add(MinecraftReflection::getFluidTypeClass);
add(MinecraftReflection::getParticleTypeClass);

if (MinecraftVersion.atOrAbove(MinecraftVersion.AQUATIC_UPDATE)) {
add(() -> MinecraftReflection.getMinecraftClass("Particle"));
add(MinecraftReflection::getFluidTypeClass);
add(MinecraftReflection::getParticleTypeClass);
}
}

private static void add(Supplier<Class<?>> getClass) {
Expand Down

0 comments on commit 083c8e1

Please sign in to comment.