Remove unnecessary client features
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Fri, 3 May 2024 19:50:32 +0900
|
||||
Subject: [PATCH] Warn on startup
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index c3bce9206aee05b18ddd8b2788f892a972146737..fc378b08c10c7f670be93d52937c7642b986ed0d 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -115,6 +115,18 @@ public class Main {
|
||||
if (io.papermc.paper.ServerBrandConstants.ASCII_LOGO != null)
|
||||
System.out.println(io.papermc.paper.ServerBrandConstants.ASCII_LOGO);
|
||||
// Plazma end - Fork-friendly Rebranding
|
||||
+ // Plazma start - Warn on startup
|
||||
+ if (!org.plazmamc.plazma.Options.NO_WARN) {
|
||||
+ LOGGER.warn("Warning! " + io.papermc.paper.ServerBrandConstants.BRAND_NAME + " may cause unexpected problems, so be sure to test it thoroughly before using it on a public server.");
|
||||
+ if (io.papermc.paper.ServerBuildInfo.buildInfo().asString(io.papermc.paper.ServerBuildInfo.StringRepresentation.VERSION_FULL).contains("DEV")) {
|
||||
+ LOGGER.error("*********************** CAUTION ***********************");
|
||||
+ LOGGER.error("This version is a development version of {}.", io.papermc.paper.ServerBrandConstants.BRAND_NAME);
|
||||
+ LOGGER.error("Nobody knows what kind of problem you're going to have, and there's always the possibility of unexpected problems.");
|
||||
+ LOGGER.error("Never use this version on a public server, and after you've tested it enough before using it!");
|
||||
+ LOGGER.error("*******************************************************");
|
||||
+ }
|
||||
+ }
|
||||
+ // Plazma end
|
||||
|
||||
Path path = (Path) optionset.valueOf("pidFile"); // CraftBukkit
|
||||
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/Options.java b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
index ca11bd22a65c8b9f4fffb1832ada8c519ab75b98..5d41bd4d4b86ca0c7c03d3ac6e75b3f1f1abe73b 100644
|
||||
--- a/src/main/java/org/plazmamc/plazma/Options.java
|
||||
+++ b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
@@ -6,5 +6,6 @@ import static java.lang.System.getProperty;
|
||||
public interface Options {
|
||||
|
||||
boolean NO_OPTIMIZE = getBoolean("Plazma.disableConfigOptimization");
|
||||
+ boolean NO_WARN = getBoolean("Plazma.iKnowWhatIAmDoing");
|
||||
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 19 Feb 2025 22:54:37 +0900
|
||||
Subject: [PATCH] Remove demo feature
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java
|
||||
index 57a3bc6c47468b40bb448a41cb6bb3d5eaecb5af..abfcde5bd61bd031ab555e70ce10f8d0df6e9bcd 100644
|
||||
--- a/net/minecraft/server/Main.java
|
||||
+++ b/net/minecraft/server/Main.java
|
||||
@@ -271,25 +271,25 @@ public class Main {
|
||||
LevelSettings levelSettings;
|
||||
WorldOptions worldOptions;
|
||||
WorldDimensions worldDimensions;
|
||||
+ // Plazma start - Remove demo feature
|
||||
if (optionSet.has("demo")) { // CraftBukkit
|
||||
- levelSettings = MinecraftServer.DEMO_SETTINGS;
|
||||
- worldOptions = WorldOptions.DEMO_OPTIONS;
|
||||
- worldDimensions = WorldPresets.createNormalWorldDimensions(context.datapackWorldgen());
|
||||
- } else {
|
||||
- DedicatedServerProperties properties = dedicatedServerSettings.getProperties();
|
||||
- levelSettings = new LevelSettings(
|
||||
- properties.levelName,
|
||||
- properties.gamemode,
|
||||
- properties.hardcore,
|
||||
- properties.difficulty,
|
||||
- false,
|
||||
- new GameRules(context.dataConfiguration().enabledFeatures()),
|
||||
- context.dataConfiguration()
|
||||
- );
|
||||
- worldOptions = optionSet.has("bonusChest") ? properties.worldOptions.withBonusChest(true) : properties.worldOptions; // CraftBukkit
|
||||
- worldDimensions = properties.createDimensions(context.datapackWorldgen());
|
||||
+ LOGGER.warn("Demo feature is removed since Plazma 1.21.4, defaulting to normal generation...");
|
||||
}
|
||||
|
||||
+ DedicatedServerProperties properties = dedicatedServerSettings.getProperties();
|
||||
+ levelSettings = new LevelSettings(
|
||||
+ properties.levelName,
|
||||
+ properties.gamemode,
|
||||
+ properties.hardcore,
|
||||
+ properties.difficulty,
|
||||
+ false,
|
||||
+ new GameRules(context.dataConfiguration().enabledFeatures()),
|
||||
+ context.dataConfiguration()
|
||||
+ );
|
||||
+ worldOptions = optionSet.has("bonusChest") ? properties.worldOptions.withBonusChest(true) : properties.worldOptions; // CraftBukkit
|
||||
+ worldDimensions = properties.createDimensions(context.datapackWorldgen());
|
||||
+ // Plazma end - Remove demo feature
|
||||
+
|
||||
WorldDimensions.Complete complete = worldDimensions.bake(registry);
|
||||
Lifecycle lifecycle = complete.lifecycle().add(context.datapackWorldgen().allRegistriesLifecycle());
|
||||
return new WorldLoader.DataLoadOutput<>(
|
||||
@@ -322,7 +322,6 @@ public class Main {
|
||||
if (optionSet.has("serverId")) {
|
||||
dedicatedServer1.setId((String) optionSet.valueOf("serverId"));
|
||||
}
|
||||
- dedicatedServer1.setDemo(optionSet.has("demo"));
|
||||
// Paper end
|
||||
boolean flag = !optionSet.has("nogui") && !optionSet.nonOptionArguments().contains("nogui");
|
||||
if (flag && !GraphicsEnvironment.isHeadless()) {
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 74203ebce0f370a05014a7cf19e23be3a878b44d..4c3d5fab206a923dab0d8956bf74eae1f7e60625 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -603,24 +603,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
LevelSettings levelSettings;
|
||||
WorldOptions worldOptions;
|
||||
net.minecraft.world.level.levelgen.WorldDimensions worldDimensions;
|
||||
- if (this.isDemo()) {
|
||||
- levelSettings = MinecraftServer.DEMO_SETTINGS;
|
||||
- worldOptions = WorldOptions.DEMO_OPTIONS;
|
||||
- worldDimensions = net.minecraft.world.level.levelgen.presets.WorldPresets.createNormalWorldDimensions(context.datapackWorldgen());
|
||||
- } else {
|
||||
- net.minecraft.server.dedicated.DedicatedServerProperties properties = ((net.minecraft.server.dedicated.DedicatedServer) this).getProperties();
|
||||
- levelSettings = new LevelSettings(
|
||||
- properties.levelName,
|
||||
- properties.gamemode,
|
||||
- properties.hardcore,
|
||||
- properties.difficulty,
|
||||
- false,
|
||||
- new GameRules(context.dataConfiguration().enabledFeatures()),
|
||||
- context.dataConfiguration()
|
||||
- );
|
||||
- worldOptions = this.options.has("bonusChest") ? properties.worldOptions.withBonusChest(true) : properties.worldOptions; // CraftBukkit
|
||||
- worldDimensions = properties.createDimensions(context.datapackWorldgen());
|
||||
- }
|
||||
+ // Plazma start - Remove demo feature
|
||||
+ net.minecraft.server.dedicated.DedicatedServerProperties properties = ((net.minecraft.server.dedicated.DedicatedServer) this).getProperties();
|
||||
+ levelSettings = new LevelSettings(
|
||||
+ properties.levelName,
|
||||
+ properties.gamemode,
|
||||
+ properties.hardcore,
|
||||
+ properties.difficulty,
|
||||
+ false,
|
||||
+ new GameRules(context.dataConfiguration().enabledFeatures()),
|
||||
+ context.dataConfiguration()
|
||||
+ );
|
||||
+ worldOptions = this.options.has("bonusChest") ? properties.worldOptions.withBonusChest(true) : properties.worldOptions; // CraftBukkit
|
||||
+ worldDimensions = properties.createDimensions(context.datapackWorldgen());
|
||||
+ // Plazma end - Remove demo feature
|
||||
|
||||
net.minecraft.world.level.levelgen.WorldDimensions.Complete complete = worldDimensions.bake(contextLevelStemRegistry);
|
||||
com.mojang.serialization.Lifecycle lifecycle = complete.lifecycle().add(context.datapackWorldgen().allRegistriesLifecycle());
|
||||
@@ -1958,14 +1954,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.worldData.getDifficulty() != Difficulty.PEACEFUL;
|
||||
}
|
||||
|
||||
- public boolean isDemo() {
|
||||
- return this.isDemo;
|
||||
- }
|
||||
-
|
||||
- public void setDemo(boolean demo) {
|
||||
- this.isDemo = demo;
|
||||
- }
|
||||
-
|
||||
public Optional<MinecraftServer.ServerResourcePackInfo> getServerResourcePack() {
|
||||
return Optional.empty();
|
||||
}
|
||||
@@ -2674,7 +2662,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public ServerPlayerGameMode createGameModeForPlayer(ServerPlayer player) {
|
||||
- return (ServerPlayerGameMode)(this.isDemo() ? new DemoMode(player) : new ServerPlayerGameMode(player));
|
||||
+ return new ServerPlayerGameMode(player); // Plazma - Remove demo feature
|
||||
}
|
||||
|
||||
@Nullable
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
--- a/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterFlattenEntity.java
|
||||
+++ b/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterFlattenEntity.java
|
||||
@@ -339,7 +_,7 @@
|
||||
|
||||
public static int getBlockId(final String block) {
|
||||
final Integer ret = BLOCK_NAME_TO_ID.get(block);
|
||||
- return ret == null ? 0 : ret.intValue();
|
||||
+ return ret == null ? 0 : ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,84 @@
|
||||
--- a/ca/spottedleaf/dataconverter/types/ListType.java
|
||||
+++ b/ca/spottedleaf/dataconverter/types/ListType.java
|
||||
@@ -25,17 +_,17 @@
|
||||
case NONE:
|
||||
throw new IllegalStateException("List is empty and has no type");
|
||||
case BYTE:
|
||||
- return Byte.valueOf(this.getByte(index));
|
||||
+ return this.getByte(index);
|
||||
case SHORT:
|
||||
- return Short.valueOf(this.getShort(index));
|
||||
+ return this.getShort(index);
|
||||
case INT:
|
||||
- return Integer.valueOf(this.getInt(index));
|
||||
+ return this.getInt(index);
|
||||
case LONG:
|
||||
- return Long.valueOf(this.getLong(index));
|
||||
+ return this.getLong(index);
|
||||
case FLOAT:
|
||||
- return Float.valueOf(this.getFloat(index));
|
||||
+ return this.getFloat(index);
|
||||
case DOUBLE:
|
||||
- return Double.valueOf(this.getDouble(index));
|
||||
+ return this.getDouble(index);
|
||||
case NUMBER:
|
||||
return this.getNumber(index);
|
||||
case BYTE_ARRAY:
|
||||
@@ -60,22 +_,22 @@
|
||||
public default void setGeneric(final int index, final Object to) {
|
||||
if (to instanceof Number) {
|
||||
if (to instanceof Byte) {
|
||||
- this.setByte(index, ((Byte)to).byteValue());
|
||||
+ this.setByte(index, (Byte) to);
|
||||
return;
|
||||
} else if (to instanceof Short) {
|
||||
- this.setShort(index, ((Short)to).shortValue());
|
||||
+ this.setShort(index, (Short) to);
|
||||
return;
|
||||
} else if (to instanceof Integer) {
|
||||
- this.setInt(index, ((Integer)to).intValue());
|
||||
+ this.setInt(index, (Integer) to);
|
||||
return;
|
||||
} else if (to instanceof Long) {
|
||||
- this.setLong(index, ((Long)to).longValue());
|
||||
+ this.setLong(index, (Long) to);
|
||||
return;
|
||||
} else if (to instanceof Float) {
|
||||
- this.setFloat(index, ((Float)to).floatValue());
|
||||
+ this.setFloat(index, (Float) to);
|
||||
return;
|
||||
} else if (to instanceof Double) {
|
||||
- this.setDouble(index, ((Double)to).doubleValue());
|
||||
+ this.setDouble(index, (Double) to);
|
||||
return;
|
||||
} // else fall through to throw
|
||||
} else if (to instanceof MapType) {
|
||||
@@ -171,22 +_,22 @@
|
||||
public default void addGeneric(final Object to) {
|
||||
if (to instanceof Number) {
|
||||
if (to instanceof Byte) {
|
||||
- this.addByte(((Byte)to).byteValue());
|
||||
+ this.addByte((Byte) to);
|
||||
return;
|
||||
} else if (to instanceof Short) {
|
||||
- this.addShort(((Short)to).shortValue());
|
||||
+ this.addShort((Short) to);
|
||||
return;
|
||||
} else if (to instanceof Integer) {
|
||||
- this.addInt(((Integer)to).intValue());
|
||||
+ this.addInt((Integer) to);
|
||||
return;
|
||||
} else if (to instanceof Long) {
|
||||
- this.addLong(((Long)to).longValue());
|
||||
+ this.addLong((Long) to);
|
||||
return;
|
||||
} else if (to instanceof Float) {
|
||||
- this.addFloat(((Float)to).floatValue());
|
||||
+ this.addFloat((Float) to);
|
||||
return;
|
||||
} else if (to instanceof Double) {
|
||||
- this.addDouble(((Double)to).doubleValue());
|
||||
+ this.addDouble((Double) to);
|
||||
return;
|
||||
} // else fall through to throw
|
||||
} else if (to instanceof MapType) {
|
||||
@@ -0,0 +1,35 @@
|
||||
--- a/ca/spottedleaf/dataconverter/types/MapType.java
|
||||
+++ b/ca/spottedleaf/dataconverter/types/MapType.java
|
||||
@@ -172,25 +_,25 @@
|
||||
|
||||
public default void setGeneric(final K key, final Object value) {
|
||||
if (value instanceof Boolean) {
|
||||
- this.setBoolean(key, ((Boolean)value).booleanValue());
|
||||
+ this.setBoolean(key, (Boolean) value);
|
||||
} else if (value instanceof Number) {
|
||||
if (value instanceof Byte) {
|
||||
- this.setByte(key, ((Byte)value).byteValue());
|
||||
+ this.setByte(key, (Byte) value);
|
||||
return;
|
||||
} else if (value instanceof Short) {
|
||||
- this.setShort(key, ((Short)value).shortValue());
|
||||
+ this.setShort(key, (Short) value);
|
||||
return;
|
||||
} else if (value instanceof Integer) {
|
||||
- this.setInt(key, ((Integer)value).intValue());
|
||||
+ this.setInt(key, (Integer) value);
|
||||
return;
|
||||
} else if (value instanceof Long) {
|
||||
- this.setLong(key, ((Long)value).longValue());
|
||||
+ this.setLong(key, (Long) value);
|
||||
return;
|
||||
} else if (value instanceof Float) {
|
||||
- this.setFloat(key, ((Float)value).floatValue());
|
||||
+ this.setFloat(key, (Float) value);
|
||||
return;
|
||||
} else if (value instanceof Double) {
|
||||
- this.setDouble(key, ((Double)value).doubleValue());
|
||||
+ this.setDouble(key, (Double) value);
|
||||
return;
|
||||
} // else fall through to throw
|
||||
} else if (value instanceof MapType) {
|
||||
@@ -0,0 +1,119 @@
|
||||
--- a/ca/spottedleaf/dataconverter/types/json/JsonListType.java
|
||||
+++ b/ca/spottedleaf/dataconverter/types/json/JsonListType.java
|
||||
@@ -91,7 +_,7 @@
|
||||
return primitive.getAsBoolean() ? Byte.valueOf((byte)1) : Byte.valueOf((byte)0);
|
||||
} else if (this.compressed && primitive.isString()) {
|
||||
try {
|
||||
- return Integer.valueOf(Integer.parseInt(primitive.getAsString()));
|
||||
+ return Integer.parseInt(primitive.getAsString());
|
||||
} catch (final NumberFormatException ex) {
|
||||
return null;
|
||||
}
|
||||
@@ -110,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void setByte(final int index, final byte to) {
|
||||
- this.array.set(index, new JsonPrimitive(Byte.valueOf(to)));
|
||||
+ this.array.set(index, new JsonPrimitive(to));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -122,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void setShort(final int index, final short to) {
|
||||
- this.array.set(index, new JsonPrimitive(Short.valueOf(to)));
|
||||
+ this.array.set(index, new JsonPrimitive(to));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -134,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void setInt(final int index, final int to) {
|
||||
- this.array.set(index, new JsonPrimitive(Integer.valueOf(to)));
|
||||
+ this.array.set(index, new JsonPrimitive(to));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -146,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void setLong(final int index, final long to) {
|
||||
- this.array.set(index, new JsonPrimitive(Long.valueOf(to)));
|
||||
+ this.array.set(index, new JsonPrimitive(to));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -158,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void setFloat(final int index, final float to) {
|
||||
- this.array.set(index, new JsonPrimitive(Float.valueOf(to)));
|
||||
+ this.array.set(index, new JsonPrimitive(to));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -170,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void setDouble(final int index, final double to) {
|
||||
- this.array.set(index, new JsonPrimitive(Double.valueOf(to)));
|
||||
+ this.array.set(index, new JsonPrimitive(to));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -268,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void addByte(final byte b) {
|
||||
- this.array.add(Byte.valueOf(b));
|
||||
+ this.array.add(b);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -279,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void addShort(final short s) {
|
||||
- this.array.add(Short.valueOf(s));
|
||||
+ this.array.add(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -290,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void addInt(final int i) {
|
||||
- this.array.add(Integer.valueOf(i));
|
||||
+ this.array.add(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -301,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void addLong(final long l) {
|
||||
- this.array.add(Long.valueOf(l));
|
||||
+ this.array.add(l);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -312,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void addFloat(final float f) {
|
||||
- this.array.add(Float.valueOf(f));
|
||||
+ this.array.add(f);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -323,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void addDouble(final double d) {
|
||||
- this.array.add(Double.valueOf(d));
|
||||
+ this.array.add(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,129 @@
|
||||
--- a/ca/spottedleaf/dataconverter/types/json/JsonMapType.java
|
||||
+++ b/ca/spottedleaf/dataconverter/types/json/JsonMapType.java
|
||||
@@ -15,8 +_,8 @@
|
||||
|
||||
public final class JsonMapType implements MapType<String> {
|
||||
|
||||
- protected final JsonObject map;
|
||||
- protected final boolean compressed;
|
||||
+ final JsonObject map; // Plazma - AT (protected -> package-private)
|
||||
+ final boolean compressed; // Plazma - AT (protected -> package-private)
|
||||
|
||||
public JsonMapType(final boolean compressed) {
|
||||
this.map = new JsonObject();
|
||||
@@ -124,23 +_,18 @@
|
||||
return type == ObjectType.STRING || (this.compressed && type == ObjectType.NUMBER);
|
||||
} else if (primitive.isBoolean()) {
|
||||
return type.isNumber();
|
||||
- } else {
|
||||
- // is number
|
||||
- final Number number = primitive.getAsNumber();
|
||||
- if (number instanceof Byte) {
|
||||
- return type == ObjectType.BYTE || (this.compressed && type == ObjectType.STRING);
|
||||
- } else if (number instanceof Short) {
|
||||
- return type == ObjectType.SHORT || (this.compressed && type == ObjectType.STRING);
|
||||
- } else if (number instanceof Integer) {
|
||||
- return type == ObjectType.INT || (this.compressed && type == ObjectType.STRING);
|
||||
- } else if (number instanceof Long) {
|
||||
- return type == ObjectType.LONG || (this.compressed && type == ObjectType.STRING);
|
||||
- } else if (number instanceof Float) {
|
||||
- return type == ObjectType.FLOAT || (this.compressed && type == ObjectType.STRING);
|
||||
- } else {
|
||||
- return type == ObjectType.DOUBLE || (this.compressed && type == ObjectType.STRING);
|
||||
- }
|
||||
}
|
||||
+
|
||||
+ // Plazma start - Remove unnecessary boxing
|
||||
+ return switch (primitive.getAsNumber()) {
|
||||
+ case Byte ignored -> type == ObjectType.BYTE || (this.compressed && type == ObjectType.STRING);
|
||||
+ case Short ignored -> type == ObjectType.SHORT || (this.compressed && type == ObjectType.STRING);
|
||||
+ case Integer ignored -> type == ObjectType.INT || (this.compressed && type == ObjectType.STRING);
|
||||
+ case Long ignored -> type == ObjectType.LONG || (this.compressed && type == ObjectType.STRING);
|
||||
+ case Float ignored -> type == ObjectType.FLOAT || (this.compressed && type == ObjectType.STRING);
|
||||
+ case null, default -> type == ObjectType.DOUBLE || (this.compressed && type == ObjectType.STRING);
|
||||
+ };
|
||||
+ // Plazma end - Remove unnecessary boxing
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -165,7 +_,7 @@
|
||||
} else if (primitive.isString()) {
|
||||
return primitive.getAsString();
|
||||
} else if (primitive.isBoolean()) {
|
||||
- return Boolean.valueOf(primitive.getAsBoolean());
|
||||
+ return primitive.getAsBoolean();
|
||||
} else {
|
||||
throw new IllegalStateException("Unknown json object " + element);
|
||||
}
|
||||
@@ -188,7 +_,7 @@
|
||||
return primitive.getAsBoolean() ? Byte.valueOf((byte)1) : Byte.valueOf((byte)0);
|
||||
} else if (this.compressed && primitive.isString()) {
|
||||
try {
|
||||
- return Integer.valueOf(Integer.parseInt(primitive.getAsString()));
|
||||
+ return Integer.parseInt(primitive.getAsString());
|
||||
} catch (final NumberFormatException ex) {
|
||||
return null;
|
||||
}
|
||||
@@ -220,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void setBoolean(final String key, final boolean val) {
|
||||
- this.map.addProperty(key, Boolean.valueOf(val));
|
||||
+ this.map.addProperty(key, val);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -236,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void setByte(final String key, final byte val) {
|
||||
- this.map.addProperty(key, Byte.valueOf(val));
|
||||
+ this.map.addProperty(key, val);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -252,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void setShort(final String key, final short val) {
|
||||
- this.map.addProperty(key, Short.valueOf(val));
|
||||
+ this.map.addProperty(key, val);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -268,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void setInt(final String key, final int val) {
|
||||
- this.map.addProperty(key, Integer.valueOf(val));
|
||||
+ this.map.addProperty(key, val);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -284,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void setLong(final String key, final long val) {
|
||||
- this.map.addProperty(key, Long.valueOf(val));
|
||||
+ this.map.addProperty(key, val);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -300,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void setFloat(final String key, final float val) {
|
||||
- this.map.addProperty(key, Float.valueOf(val));
|
||||
+ this.map.addProperty(key, val);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -316,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public void setDouble(final String key, final double val) {
|
||||
- this.map.addProperty(key, Double.valueOf(val));
|
||||
+ this.map.addProperty(key, val);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java
|
||||
@@ -319,7 +_,7 @@
|
||||
|
||||
private static final AtomicLong ID_GENERATOR = new AtomicLong();
|
||||
private final long id = ID_GENERATOR.incrementAndGet();
|
||||
- private final Long idBoxed = Long.valueOf(this.id);
|
||||
+ private final Long idBoxed = this.id;
|
||||
|
||||
private static final long MAX_RATE = 10_000L;
|
||||
|
||||
@@ -516,7 +_,7 @@
|
||||
|
||||
private static int getClientViewDistance(final ServerPlayer player) {
|
||||
final Integer vd = player.requestedViewDistance();
|
||||
- return vd == null ? -1 : Math.max(0, vd.intValue());
|
||||
+ return vd == null ? -1 : Math.max(0, vd);
|
||||
}
|
||||
|
||||
private static int getTickDistance(final int playerTickViewDistance, final int worldTickViewDistance,
|
||||
@@ -0,0 +1,13 @@
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/queue/ChunkUnloadQueue.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/queue/ChunkUnloadQueue.java
|
||||
@@ -123,8 +_,8 @@
|
||||
final JsonObject coordinateJson = new JsonObject();
|
||||
coordinates.add(coordinateJson);
|
||||
|
||||
- coordinateJson.addProperty("chunkX", Integer.valueOf(CoordinateUtils.getChunkX(coordinate)));
|
||||
- coordinateJson.addProperty("chunkZ", Integer.valueOf(CoordinateUtils.getChunkZ(coordinate)));
|
||||
+ coordinateJson.addProperty("chunkX", CoordinateUtils.getChunkX(coordinate));
|
||||
+ coordinateJson.addProperty("chunkZ", CoordinateUtils.getChunkZ(coordinate));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java
|
||||
@@ -1059,7 +_,7 @@
|
||||
public void processUnloads() {
|
||||
TickThread.ensureTickThread("Cannot unload chunks off-main");
|
||||
|
||||
- if (BLOCK_TICKET_UPDATES.get() == Boolean.TRUE) {
|
||||
+ if (BLOCK_TICKET_UPDATES.get() == true) {
|
||||
throw new IllegalStateException("Cannot unload chunks recursively");
|
||||
}
|
||||
final int sectionShift = this.unloadQueue.coordinateShift; // sectionShift <= lock shift
|
||||
@@ -1306,12 +_,12 @@
|
||||
}
|
||||
|
||||
private final ThreadLocal<Boolean> BLOCK_TICKET_UPDATES = ThreadLocal.withInitial(() -> {
|
||||
- return Boolean.FALSE;
|
||||
+ return false;
|
||||
});
|
||||
|
||||
public Boolean blockTicketUpdates() {
|
||||
final Boolean ret = BLOCK_TICKET_UPDATES.get();
|
||||
- BLOCK_TICKET_UPDATES.set(Boolean.TRUE);
|
||||
+ BLOCK_TICKET_UPDATES.set(true);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1330,7 +_,7 @@
|
||||
}
|
||||
|
||||
private boolean processTicketUpdates(final boolean processFullUpdates, List<ChunkProgressionTask> scheduledTasks) {
|
||||
- if (BLOCK_TICKET_UPDATES.get() == Boolean.TRUE) {
|
||||
+ if (BLOCK_TICKET_UPDATES.get() == true) {
|
||||
throw new IllegalStateException("Cannot update ticket level while unloading chunks or updating entity manager");
|
||||
}
|
||||
if (!PlatformHooks.get().allowAsyncTicketUpdates() && !TickThread.isTickThread()) {
|
||||
@@ -1358,7 +_,7 @@
|
||||
scheduledTasks, changedFullStatus
|
||||
);
|
||||
} finally {
|
||||
- this.unblockTicketUpdates(Boolean.FALSE);
|
||||
+ this.unblockTicketUpdates(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1426,8 +_,8 @@
|
||||
final JsonObject coordinateJson = new JsonObject();
|
||||
allTicketsJson.add(coordinateJson);
|
||||
|
||||
- coordinateJson.addProperty("chunkX", Long.valueOf(CoordinateUtils.getChunkX(coordinate)));
|
||||
- coordinateJson.addProperty("chunkZ", Long.valueOf(CoordinateUtils.getChunkZ(coordinate)));
|
||||
+ coordinateJson.addProperty("chunkX", (long) CoordinateUtils.getChunkX(coordinate));
|
||||
+ coordinateJson.addProperty("chunkZ", (long) CoordinateUtils.getChunkZ(coordinate));
|
||||
|
||||
final JsonArray ticketsSerialized = new JsonArray();
|
||||
coordinateJson.add("tickets", ticketsSerialized);
|
||||
@@ -1445,9 +_,9 @@
|
||||
ticketsSerialized.add(ticketSerialized);
|
||||
|
||||
ticketSerialized.addProperty("type", ticket.getType().toString());
|
||||
- ticketSerialized.addProperty("level", Integer.valueOf(ticket.getTicketLevel()));
|
||||
+ ticketSerialized.addProperty("level", ticket.getTicketLevel());
|
||||
ticketSerialized.addProperty("identifier", Objects.toString(ticket.key));
|
||||
- ticketSerialized.addProperty("remove_tick", Long.valueOf(((ChunkSystemTicket<?>)(Object)ticket).moonrise$getRemoveDelay()));
|
||||
+ ticketSerialized.addProperty("remove_tick", ((ChunkSystemTicket<?>) (Object) ticket).moonrise$getRemoveDelay());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkTaskScheduler.java
|
||||
@@ -77,35 +_,35 @@
|
||||
private static final AtomicLong CHUNK_LOAD_IDS = new AtomicLong();
|
||||
|
||||
public static Long getNextChunkLoadId() {
|
||||
- return Long.valueOf(CHUNK_LOAD_IDS.getAndIncrement());
|
||||
+ return CHUNK_LOAD_IDS.getAndIncrement();
|
||||
}
|
||||
|
||||
public static final TicketType<Long> NON_FULL_CHUNK_LOAD = TicketType.create("chunk_system:non_full_load", Long::compareTo);
|
||||
private static final AtomicLong NON_FULL_CHUNK_LOAD_IDS = new AtomicLong();
|
||||
|
||||
public static Long getNextNonFullLoadId() {
|
||||
- return Long.valueOf(NON_FULL_CHUNK_LOAD_IDS.getAndIncrement());
|
||||
+ return NON_FULL_CHUNK_LOAD_IDS.getAndIncrement();
|
||||
}
|
||||
|
||||
public static final TicketType<Long> ENTITY_LOAD = TicketType.create("chunk_system:entity_load", Long::compareTo);
|
||||
private static final AtomicLong ENTITY_LOAD_IDS = new AtomicLong();
|
||||
|
||||
public static Long getNextEntityLoadId() {
|
||||
- return Long.valueOf(ENTITY_LOAD_IDS.getAndIncrement());
|
||||
+ return ENTITY_LOAD_IDS.getAndIncrement();
|
||||
}
|
||||
|
||||
public static final TicketType<Long> POI_LOAD = TicketType.create("chunk_system:poi_load", Long::compareTo);
|
||||
private static final AtomicLong POI_LOAD_IDS = new AtomicLong();
|
||||
|
||||
public static Long getNextPoiLoadId() {
|
||||
- return Long.valueOf(POI_LOAD_IDS.getAndIncrement());
|
||||
+ return POI_LOAD_IDS.getAndIncrement();
|
||||
}
|
||||
|
||||
public static final TicketType<Long> CHUNK_RELIGHT = TicketType.create("starlight:chunk_relight", Long::compareTo);
|
||||
private static final AtomicLong CHUNK_RELIGHT_IDS = new AtomicLong();
|
||||
|
||||
public static Long getNextChunkRelightId() {
|
||||
- return Long.valueOf(CHUNK_RELIGHT_IDS.getAndIncrement());
|
||||
+ return CHUNK_RELIGHT_IDS.getAndIncrement();
|
||||
}
|
||||
|
||||
|
||||
@@ -913,8 +_,8 @@
|
||||
public JsonObject toJson() {
|
||||
final JsonObject ret = new JsonObject();
|
||||
|
||||
- ret.addProperty("chunk-x", Integer.valueOf(this.chunkX));
|
||||
- ret.addProperty("chunk-z", Integer.valueOf(this.chunkZ));
|
||||
+ ret.addProperty("chunk-x", this.chunkX);
|
||||
+ ret.addProperty("chunk-z", this.chunkZ);
|
||||
ret.addProperty("world-name", WorldUtil.getWorldName(this.world));
|
||||
|
||||
return ret;
|
||||
@@ -973,9 +_,9 @@
|
||||
public JsonObject getDebugJson() {
|
||||
final JsonObject ret = new JsonObject();
|
||||
|
||||
- ret.addProperty("lock_shift", Integer.valueOf(this.getChunkSystemLockShift()));
|
||||
- ret.addProperty("ticket_shift", Integer.valueOf(ThreadedTicketLevelPropagator.SECTION_SHIFT));
|
||||
- ret.addProperty("region_shift", Integer.valueOf(((ChunkSystemServerLevel)this.world).moonrise$getRegionChunkShift()));
|
||||
+ ret.addProperty("lock_shift", this.getChunkSystemLockShift());
|
||||
+ ret.addProperty("ticket_shift", ThreadedTicketLevelPropagator.SECTION_SHIFT);
|
||||
+ ret.addProperty("region_shift", ((ChunkSystemServerLevel) this.world).moonrise$getRegionChunkShift());
|
||||
|
||||
ret.addProperty("name", WorldUtil.getWorldName(this.world));
|
||||
ret.addProperty("view-distance", ((ChunkSystemServerLevel)this.world).moonrise$getPlayerChunkLoader().getAPIViewDistance());
|
||||
@@ -0,0 +1,89 @@
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
||||
@@ -1893,10 +_,10 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
- ret.addProperty("valid", Boolean.TRUE);
|
||||
+ ret.addProperty("valid", true);
|
||||
|
||||
final boolean isCompleted = completable.isCompleted();
|
||||
- ret.addProperty("completed", Boolean.valueOf(isCompleted));
|
||||
+ ret.addProperty("completed", isCompleted);
|
||||
|
||||
if (isCompleted) {
|
||||
final Throwable throwable = completable.getThrowable();
|
||||
@@ -1924,8 +_,8 @@
|
||||
final ChunkEntitySlices slices = this.entityChunk;
|
||||
final PoiChunk poiChunk = this.poiChunk;
|
||||
|
||||
- ret.addProperty("chunkX", Integer.valueOf(this.chunkX));
|
||||
- ret.addProperty("chunkZ", Integer.valueOf(this.chunkZ));
|
||||
+ ret.addProperty("chunkX", this.chunkX);
|
||||
+ ret.addProperty("chunkZ", this.chunkZ);
|
||||
ret.addProperty("entity_chunk", slices == null ? "null" : "transient=" + slices.isTransient());
|
||||
ret.addProperty("poi_chunk", "null=" + (poiChunk == null));
|
||||
ret.addProperty("completed_chunk_class", lastCompletion == null ? "null" : lastCompletion.chunk().getClass().getName());
|
||||
@@ -1934,9 +_,9 @@
|
||||
ret.addProperty("neighbour_requested_priority", Objects.toString(this.neighbourRequestedPriority));
|
||||
ret.addProperty("generation_task", Objects.toString(this.generationTask));
|
||||
ret.addProperty("is_safe_unload", Objects.toString(this.isSafeToUnload()));
|
||||
- ret.addProperty("old_ticket_level", Integer.valueOf(this.oldTicketLevel));
|
||||
- ret.addProperty("current_ticket_level", Integer.valueOf(this.currentTicketLevel));
|
||||
- ret.addProperty("neighbours_using_chunk", Integer.valueOf(this.totalNeighboursUsingThisChunk));
|
||||
+ ret.addProperty("old_ticket_level", this.oldTicketLevel);
|
||||
+ ret.addProperty("current_ticket_level", this.currentTicketLevel);
|
||||
+ ret.addProperty("neighbours_using_chunk", this.totalNeighboursUsingThisChunk);
|
||||
|
||||
final JsonObject neighbourWaitState = new JsonObject();
|
||||
ret.add("neighbour_state", neighbourWaitState);
|
||||
@@ -1947,8 +_,8 @@
|
||||
final JsonObject neighbour = new JsonObject();
|
||||
blockingGenNeighbours.add(neighbour);
|
||||
|
||||
- neighbour.addProperty("chunkX", Integer.valueOf(blockingGenNeighbour.chunkX));
|
||||
- neighbour.addProperty("chunkZ", Integer.valueOf(blockingGenNeighbour.chunkZ));
|
||||
+ neighbour.addProperty("chunkX", blockingGenNeighbour.chunkX);
|
||||
+ neighbour.addProperty("chunkZ", blockingGenNeighbour.chunkZ);
|
||||
}
|
||||
|
||||
final JsonArray neighboursWaitingForUs = new JsonArray();
|
||||
@@ -1961,8 +_,8 @@
|
||||
neighboursWaitingForUs.add(neighbour);
|
||||
|
||||
|
||||
- neighbour.addProperty("chunkX", Integer.valueOf(holder.chunkX));
|
||||
- neighbour.addProperty("chunkZ", Integer.valueOf(holder.chunkZ));
|
||||
+ neighbour.addProperty("chunkX", holder.chunkX);
|
||||
+ neighbour.addProperty("chunkZ", holder.chunkZ);
|
||||
neighbour.addProperty("waiting_for", Objects.toString(status));
|
||||
}
|
||||
|
||||
@@ -1970,8 +_,8 @@
|
||||
ret.addProperty("current_chunk_full_status", Objects.toString(this.currentFullChunkStatus));
|
||||
ret.addProperty("generation_task", Objects.toString(this.generationTask));
|
||||
ret.addProperty("requested_generation", Objects.toString(this.requestedGenStatus));
|
||||
- ret.addProperty("has_entity_load_task", Boolean.valueOf(this.entityDataLoadTask != null));
|
||||
- ret.addProperty("has_poi_load_task", Boolean.valueOf(this.poiDataLoadTask != null));
|
||||
+ ret.addProperty("has_entity_load_task", this.entityDataLoadTask != null);
|
||||
+ ret.addProperty("has_poi_load_task", this.poiDataLoadTask != null);
|
||||
|
||||
final UnloadTask entityDataUnload = this.entityDataUnload;
|
||||
final UnloadTask poiDataUnload = this.poiDataUnload;
|
||||
@@ -1984,13 +_,13 @@
|
||||
final PrioritisedExecutor.PrioritisedTask unloadTask = chunkDataUnload == null ? null : chunkDataUnload.task();
|
||||
if (unloadTask == null) {
|
||||
ret.addProperty("unload_task_priority", "null");
|
||||
- ret.addProperty("unload_task_suborder", Long.valueOf(0L));
|
||||
+ ret.addProperty("unload_task_suborder", 0L);
|
||||
} else {
|
||||
ret.addProperty("unload_task_priority", Objects.toString(unloadTask.getPriority()));
|
||||
- ret.addProperty("unload_task_suborder", Long.valueOf(unloadTask.getSubOrder()));
|
||||
+ ret.addProperty("unload_task_suborder", unloadTask.getSubOrder());
|
||||
}
|
||||
|
||||
- ret.addProperty("killed", Boolean.valueOf(this.unloaded));
|
||||
+ ret.addProperty("killed", this.unloaded);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
--- a/ca/spottedleaf/moonrise/patches/starlight/light/StarLightEngine.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/starlight/light/StarLightEngine.java
|
||||
@@ -676,9 +_,9 @@
|
||||
|
||||
for (int i = 0; i < sections.length; ++i) {
|
||||
if (sections[i] == null || sections[i].hasOnlyAir()) {
|
||||
- ret[i] = Boolean.TRUE;
|
||||
+ ret[i] = true;
|
||||
} else {
|
||||
- ret[i] = Boolean.FALSE;
|
||||
+ ret[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -754,9 +_,9 @@
|
||||
continue;
|
||||
}
|
||||
final LevelChunkSection section = this.getChunkSection(chunkX, sectionIndex + this.minSection, chunkZ);
|
||||
- emptinessChanges[sectionIndex] = valueBoxed = section == null || section.hasOnlyAir() ? Boolean.TRUE : Boolean.FALSE;
|
||||
+ emptinessChanges[sectionIndex] = valueBoxed = section == null || section.hasOnlyAir() ? true : false;
|
||||
}
|
||||
- chunkEmptinessMap[sectionIndex] = valueBoxed.booleanValue();
|
||||
+ chunkEmptinessMap[sectionIndex] = valueBoxed;
|
||||
}
|
||||
|
||||
// now init neighbour nibbles
|
||||
@@ -767,7 +_,7 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
- final boolean empty = valueBoxed.booleanValue();
|
||||
+ final boolean empty = valueBoxed;
|
||||
|
||||
if (empty) {
|
||||
continue;
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/ca/spottedleaf/moonrise/patches/starlight/light/StarLightInterface.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/starlight/light/StarLightInterface.java
|
||||
@@ -688,7 +_,7 @@
|
||||
public synchronized ClientChunkTasks queueSectionChange(final SectionPos pos, final boolean newEmptyValue) {
|
||||
final ClientChunkTasks tasks = this.getOrCreate(CoordinateUtils.getChunkKey(pos));
|
||||
|
||||
- tasks.setChangedSection(pos.getY(), Boolean.valueOf(newEmptyValue));
|
||||
+ tasks.setChangedSection(pos.getY(), newEmptyValue);
|
||||
|
||||
return tasks;
|
||||
}
|
||||
@@ -807,7 +_,7 @@
|
||||
);
|
||||
}
|
||||
|
||||
- valueInMap.setChangedSection(pos.getY(), Boolean.valueOf(newEmptyValue));
|
||||
+ valueInMap.setChangedSection(pos.getY(), newEmptyValue);
|
||||
|
||||
return valueInMap;
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/io/papermc/paper/redstone/RedstoneWireTurbo.java
|
||||
+++ b/io/papermc/paper/redstone/RedstoneWireTurbo.java
|
||||
@@ -904,7 +_,7 @@
|
||||
// need to be known by some nearby non-redstone-wire block.
|
||||
BlockPos pos = new BlockPos(upd.self.getX(), upd.self.getY(), upd.self.getZ());
|
||||
if (wire.canSurvive(null, worldIn, pos)) {
|
||||
- state = state.setValue(RedStoneWireBlock.POWER, Integer.valueOf(j));
|
||||
+ state = state.setValue(RedStoneWireBlock.POWER, j);
|
||||
// [Space Walker] suppress shape updates and emit those manually to
|
||||
// bypass the new neighbor update stack.
|
||||
if (worldIn.setBlock(upd.self, state, Block.UPDATE_KNOWN_SHAPE | Block.UPDATE_CLIENTS))
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/advancements/Advancement.java
|
||||
+++ b/net/minecraft/advancements/Advancement.java
|
||||
@@ -42,7 +_,7 @@
|
||||
AdvancementRewards.CODEC.optionalFieldOf("rewards", AdvancementRewards.EMPTY).forGetter(Advancement::rewards),
|
||||
CRITERIA_CODEC.fieldOf("criteria").forGetter(Advancement::criteria),
|
||||
AdvancementRequirements.CODEC.optionalFieldOf("requirements").forGetter(advancement -> Optional.of(advancement.requirements())),
|
||||
- Codec.BOOL.optionalFieldOf("sends_telemetry_event", Boolean.valueOf(false)).forGetter(Advancement::sendsTelemetryEvent)
|
||||
+ Codec.BOOL.optionalFieldOf("sends_telemetry_event", false).forGetter(Advancement::sendsTelemetryEvent)
|
||||
)
|
||||
.apply(instance, (parent, displayInfo, rewards, criteria, requirements, sendsTelemetryEvent) -> {
|
||||
AdvancementRequirements advancementRequirements = requirements.orElseGet(() -> AdvancementRequirements.allOf(criteria.keySet()));
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/advancements/AdvancementRewards.java
|
||||
+++ b/net/minecraft/advancements/AdvancementRewards.java
|
||||
@@ -26,7 +_,7 @@
|
||||
public record AdvancementRewards(int experience, List<ResourceKey<LootTable>> loot, List<ResourceKey<Recipe<?>>> recipes, Optional<CacheableFunction> function) {
|
||||
public static final Codec<AdvancementRewards> CODEC = RecordCodecBuilder.create(
|
||||
instance -> instance.group(
|
||||
- Codec.INT.optionalFieldOf("experience", Integer.valueOf(0)).forGetter(AdvancementRewards::experience),
|
||||
+ Codec.INT.optionalFieldOf("experience", 0).forGetter(AdvancementRewards::experience),
|
||||
ResourceKey.codec(Registries.LOOT_TABLE).listOf().optionalFieldOf("loot", List.of()).forGetter(AdvancementRewards::loot),
|
||||
ResourceKey.codec(Registries.RECIPE).listOf().optionalFieldOf("recipes", List.of()).forGetter(AdvancementRewards::recipes),
|
||||
CacheableFunction.CODEC.optionalFieldOf("function").forGetter(AdvancementRewards::function)
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/advancements/DisplayInfo.java
|
||||
+++ b/net/minecraft/advancements/DisplayInfo.java
|
||||
@@ -18,9 +_,9 @@
|
||||
ComponentSerialization.CODEC.fieldOf("description").forGetter(DisplayInfo::getDescription),
|
||||
ResourceLocation.CODEC.optionalFieldOf("background").forGetter(DisplayInfo::getBackground),
|
||||
AdvancementType.CODEC.optionalFieldOf("frame", AdvancementType.TASK).forGetter(DisplayInfo::getType),
|
||||
- Codec.BOOL.optionalFieldOf("show_toast", Boolean.valueOf(true)).forGetter(DisplayInfo::shouldShowToast),
|
||||
- Codec.BOOL.optionalFieldOf("announce_to_chat", Boolean.valueOf(true)).forGetter(DisplayInfo::shouldAnnounceChat),
|
||||
- Codec.BOOL.optionalFieldOf("hidden", Boolean.valueOf(false)).forGetter(DisplayInfo::isHidden)
|
||||
+ Codec.BOOL.optionalFieldOf("show_toast", true).forGetter(DisplayInfo::shouldShowToast),
|
||||
+ Codec.BOOL.optionalFieldOf("announce_to_chat", true).forGetter(DisplayInfo::shouldAnnounceChat),
|
||||
+ Codec.BOOL.optionalFieldOf("hidden", false).forGetter(DisplayInfo::isHidden)
|
||||
)
|
||||
.apply(instance, DisplayInfo::new)
|
||||
);
|
||||
@@ -0,0 +1,13 @@
|
||||
--- a/net/minecraft/advancements/critereon/RaiderPredicate.java
|
||||
+++ b/net/minecraft/advancements/critereon/RaiderPredicate.java
|
||||
@@ -12,8 +_,8 @@
|
||||
public record RaiderPredicate(boolean hasRaid, boolean isCaptain) implements EntitySubPredicate {
|
||||
public static final MapCodec<RaiderPredicate> CODEC = RecordCodecBuilder.mapCodec(
|
||||
instance -> instance.group(
|
||||
- Codec.BOOL.optionalFieldOf("has_raid", Boolean.valueOf(false)).forGetter(RaiderPredicate::hasRaid),
|
||||
- Codec.BOOL.optionalFieldOf("is_captain", Boolean.valueOf(false)).forGetter(RaiderPredicate::isCaptain)
|
||||
+ Codec.BOOL.optionalFieldOf("has_raid", false).forGetter(RaiderPredicate::hasRaid),
|
||||
+ Codec.BOOL.optionalFieldOf("is_captain", false).forGetter(RaiderPredicate::isCaptain)
|
||||
)
|
||||
.apply(instance, RaiderPredicate::new)
|
||||
);
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/core/cauldron/CauldronInteraction.java
|
||||
+++ b/net/minecraft/core/cauldron/CauldronInteraction.java
|
||||
@@ -298,7 +_,7 @@
|
||||
player,
|
||||
hand,
|
||||
filledStack,
|
||||
- Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, Integer.valueOf(3)),
|
||||
+ Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, 3),
|
||||
SoundEvents.BUCKET_EMPTY, hitDirection // Paper - add hitDirection
|
||||
);
|
||||
}
|
||||
@@ -322,7 +_,7 @@
|
||||
player,
|
||||
hand,
|
||||
filledStack,
|
||||
- Blocks.POWDER_SNOW_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, Integer.valueOf(3)),
|
||||
+ Blocks.POWDER_SNOW_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, 3),
|
||||
SoundEvents.BUCKET_EMPTY_POWDER_SNOW, hitDirection // Paper - add hitDirection
|
||||
));
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
+++ b/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
@@ -455,7 +_,7 @@
|
||||
}
|
||||
// CraftBukkit end
|
||||
} else if (CampfireBlock.canLight(blockState) || CandleBlock.canLight(blockState) || CandleCakeBlock.canLight(blockState)) {
|
||||
- serverLevel.setBlockAndUpdate(blockPos, blockState.setValue(BlockStateProperties.LIT, Boolean.valueOf(true)));
|
||||
+ serverLevel.setBlockAndUpdate(blockPos, blockState.setValue(BlockStateProperties.LIT, true));
|
||||
serverLevel.gameEvent(null, GameEvent.BLOCK_CHANGE, blockPos);
|
||||
} else if (blockState.getBlock() instanceof TntBlock && org.bukkit.craftbukkit.event.CraftEventFactory.callTNTPrimeEvent(serverLevel, blockPos, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.DISPENSER, null, blockSource.pos())) { // CraftBukkit - TNTPrimeEvent
|
||||
TntBlock.explode(serverLevel, blockPos);
|
||||
@@ -614,7 +_,7 @@
|
||||
blockPos,
|
||||
Blocks.WITHER_SKELETON_SKULL
|
||||
.defaultBlockState()
|
||||
- .setValue(SkullBlock.ROTATION, Integer.valueOf(RotationSegment.convertToSegment(direction))),
|
||||
+ .setValue(SkullBlock.ROTATION, RotationSegment.convertToSegment(direction)),
|
||||
3
|
||||
);
|
||||
level.gameEvent(null, GameEvent.BLOCK_PLACE, blockPos);
|
||||
@@ -0,0 +1,39 @@
|
||||
--- a/net/minecraft/data/loot/BlockLootSubProvider.java
|
||||
+++ b/net/minecraft/data/loot/BlockLootSubProvider.java
|
||||
@@ -423,7 +_,7 @@
|
||||
age -> SetItemCountFunction.setCount(BinomialDistributionGenerator.binomial(3, (age + 1) / 15.0F))
|
||||
.when(
|
||||
LootItemBlockStatePropertyCondition.hasBlockStateProperties(block)
|
||||
- .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(StemBlock.AGE, age.intValue()))
|
||||
+ .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(StemBlock.AGE, age))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -657,11 +_,11 @@
|
||||
LootItem.lootTableItem(candleBlock)
|
||||
.apply(
|
||||
List.of(2, 3, 4),
|
||||
- candles -> SetItemCountFunction.setCount(ConstantValue.exactly(candles.intValue()))
|
||||
+ candles -> SetItemCountFunction.setCount(ConstantValue.exactly(candles))
|
||||
.when(
|
||||
LootItemBlockStatePropertyCondition.hasBlockStateProperties(candleBlock)
|
||||
.setProperties(
|
||||
- StatePropertiesPredicate.Builder.properties().hasProperty(CandleBlock.CANDLES, candles.intValue())
|
||||
+ StatePropertiesPredicate.Builder.properties().hasProperty(CandleBlock.CANDLES, candles)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -681,11 +_,11 @@
|
||||
LootItem.lootTableItem(petalBlock)
|
||||
.apply(
|
||||
IntStream.rangeClosed(1, 4).boxed().toList(),
|
||||
- amount -> SetItemCountFunction.setCount(ConstantValue.exactly(amount.intValue()))
|
||||
+ amount -> SetItemCountFunction.setCount(ConstantValue.exactly(amount))
|
||||
.when(
|
||||
LootItemBlockStatePropertyCondition.hasBlockStateProperties(petalBlock)
|
||||
.setProperties(
|
||||
- StatePropertiesPredicate.Builder.properties().hasProperty(PinkPetalsBlock.AMOUNT, amount.intValue())
|
||||
+ StatePropertiesPredicate.Builder.properties().hasProperty(PinkPetalsBlock.AMOUNT, amount)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,52 @@
|
||||
--- a/net/minecraft/data/loot/packs/VanillaBlockLoot.java
|
||||
+++ b/net/minecraft/data/loot/packs/VanillaBlockLoot.java
|
||||
@@ -914,11 +_,11 @@
|
||||
LootItem.lootTableItem(block)
|
||||
.apply(
|
||||
List.of(2, 3, 4),
|
||||
- integer -> SetItemCountFunction.setCount(ConstantValue.exactly(integer.intValue()))
|
||||
+ integer -> SetItemCountFunction.setCount(ConstantValue.exactly(integer))
|
||||
.when(
|
||||
LootItemBlockStatePropertyCondition.hasBlockStateProperties(block)
|
||||
.setProperties(
|
||||
- StatePropertiesPredicate.Builder.properties().hasProperty(SeaPickleBlock.PICKLES, integer.intValue())
|
||||
+ StatePropertiesPredicate.Builder.properties().hasProperty(SeaPickleBlock.PICKLES, integer)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1324,10 +_,10 @@
|
||||
.when(
|
||||
LootItemBlockStatePropertyCondition.hasBlockStateProperties(block)
|
||||
.setProperties(
|
||||
- StatePropertiesPredicate.Builder.properties().hasProperty(SnowLayerBlock.LAYERS, integer.intValue())
|
||||
+ StatePropertiesPredicate.Builder.properties().hasProperty(SnowLayerBlock.LAYERS, integer)
|
||||
)
|
||||
)
|
||||
- .apply(SetItemCountFunction.setCount(ConstantValue.exactly(integer.intValue())))
|
||||
+ .apply(SetItemCountFunction.setCount(ConstantValue.exactly(integer)))
|
||||
)
|
||||
.when(this.doesNotHaveSilkTouch()),
|
||||
AlternativesEntry.alternatives(
|
||||
@@ -1335,11 +_,11 @@
|
||||
integer -> integer == 8
|
||||
? LootItem.lootTableItem(Blocks.SNOW_BLOCK)
|
||||
: LootItem.lootTableItem(Blocks.SNOW)
|
||||
- .apply(SetItemCountFunction.setCount(ConstantValue.exactly(integer.intValue())))
|
||||
+ .apply(SetItemCountFunction.setCount(ConstantValue.exactly(integer)))
|
||||
.when(
|
||||
LootItemBlockStatePropertyCondition.hasBlockStateProperties(block)
|
||||
.setProperties(
|
||||
- StatePropertiesPredicate.Builder.properties().hasProperty(SnowLayerBlock.LAYERS, integer.intValue())
|
||||
+ StatePropertiesPredicate.Builder.properties().hasProperty(SnowLayerBlock.LAYERS, integer)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1548,7 +_,7 @@
|
||||
LootItemBlockStatePropertyCondition.Builder builder1 = LootItemBlockStatePropertyCondition.hasBlockStateProperties(
|
||||
Blocks.PITCHER_CROP
|
||||
)
|
||||
- .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(PitcherCropBlock.AGE, integer.intValue()));
|
||||
+ .setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(PitcherCropBlock.AGE, integer));
|
||||
return integer == 4
|
||||
? LootItem.lootTableItem(Items.PITCHER_PLANT)
|
||||
.when(builder1)
|
||||
@@ -0,0 +1,176 @@
|
||||
--- a/net/minecraft/data/worldgen/ProcessorLists.java
|
||||
+++ b/net/minecraft/data/worldgen/ProcessorLists.java
|
||||
@@ -115,27 +_,27 @@
|
||||
new BlockStateMatchTest(
|
||||
Blocks.GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.NORTH, true)
|
||||
+ .setValue(IronBarsBlock.SOUTH, true)
|
||||
),
|
||||
AlwaysTrueTest.INSTANCE,
|
||||
Blocks.BROWN_STAINED_GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.NORTH, true)
|
||||
+ .setValue(IronBarsBlock.SOUTH, true)
|
||||
),
|
||||
new ProcessorRule(
|
||||
new BlockStateMatchTest(
|
||||
Blocks.GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.EAST, true)
|
||||
+ .setValue(IronBarsBlock.WEST, true)
|
||||
),
|
||||
AlwaysTrueTest.INSTANCE,
|
||||
Blocks.BROWN_STAINED_GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.EAST, true)
|
||||
+ .setValue(IronBarsBlock.WEST, true)
|
||||
),
|
||||
new ProcessorRule(new RandomBlockMatchTest(Blocks.WHEAT, 0.3F), AlwaysTrueTest.INSTANCE, Blocks.CARROTS.defaultBlockState()),
|
||||
new ProcessorRule(new RandomBlockMatchTest(Blocks.WHEAT, 0.2F), AlwaysTrueTest.INSTANCE, Blocks.POTATOES.defaultBlockState()),
|
||||
@@ -165,27 +_,27 @@
|
||||
new BlockStateMatchTest(
|
||||
Blocks.GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.NORTH, true)
|
||||
+ .setValue(IronBarsBlock.SOUTH, true)
|
||||
),
|
||||
AlwaysTrueTest.INSTANCE,
|
||||
Blocks.BROWN_STAINED_GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.NORTH, true)
|
||||
+ .setValue(IronBarsBlock.SOUTH, true)
|
||||
),
|
||||
new ProcessorRule(
|
||||
new BlockStateMatchTest(
|
||||
Blocks.GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.EAST, true)
|
||||
+ .setValue(IronBarsBlock.WEST, true)
|
||||
),
|
||||
AlwaysTrueTest.INSTANCE,
|
||||
Blocks.BROWN_STAINED_GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.EAST, true)
|
||||
+ .setValue(IronBarsBlock.WEST, true)
|
||||
),
|
||||
new ProcessorRule(new RandomBlockMatchTest(Blocks.WHEAT, 0.1F), AlwaysTrueTest.INSTANCE, Blocks.MELON_STEM.defaultBlockState())
|
||||
)
|
||||
@@ -215,27 +_,27 @@
|
||||
new BlockStateMatchTest(
|
||||
Blocks.GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.NORTH, true)
|
||||
+ .setValue(IronBarsBlock.SOUTH, true)
|
||||
),
|
||||
AlwaysTrueTest.INSTANCE,
|
||||
Blocks.BROWN_STAINED_GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.NORTH, true)
|
||||
+ .setValue(IronBarsBlock.SOUTH, true)
|
||||
),
|
||||
new ProcessorRule(
|
||||
new BlockStateMatchTest(
|
||||
Blocks.GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.EAST, true)
|
||||
+ .setValue(IronBarsBlock.WEST, true)
|
||||
),
|
||||
AlwaysTrueTest.INSTANCE,
|
||||
Blocks.BROWN_STAINED_GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.EAST, true)
|
||||
+ .setValue(IronBarsBlock.WEST, true)
|
||||
),
|
||||
new ProcessorRule(new RandomBlockMatchTest(Blocks.WHEAT, 0.1F), AlwaysTrueTest.INSTANCE, Blocks.CARROTS.defaultBlockState()),
|
||||
new ProcessorRule(new RandomBlockMatchTest(Blocks.WHEAT, 0.8F), AlwaysTrueTest.INSTANCE, Blocks.POTATOES.defaultBlockState())
|
||||
@@ -258,7 +_,7 @@
|
||||
new ProcessorRule(
|
||||
new BlockMatchTest(Blocks.CAMPFIRE),
|
||||
AlwaysTrueTest.INSTANCE,
|
||||
- Blocks.CAMPFIRE.defaultBlockState().setValue(CampfireBlock.LIT, Boolean.valueOf(false))
|
||||
+ Blocks.CAMPFIRE.defaultBlockState().setValue(CampfireBlock.LIT, false)
|
||||
),
|
||||
new ProcessorRule(new RandomBlockMatchTest(Blocks.COBBLESTONE, 0.08F), AlwaysTrueTest.INSTANCE, Blocks.COBWEB.defaultBlockState()),
|
||||
new ProcessorRule(new RandomBlockMatchTest(Blocks.SPRUCE_LOG, 0.08F), AlwaysTrueTest.INSTANCE, Blocks.COBWEB.defaultBlockState()),
|
||||
@@ -267,27 +_,27 @@
|
||||
new BlockStateMatchTest(
|
||||
Blocks.GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.NORTH, true)
|
||||
+ .setValue(IronBarsBlock.SOUTH, true)
|
||||
),
|
||||
AlwaysTrueTest.INSTANCE,
|
||||
Blocks.BROWN_STAINED_GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.NORTH, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.SOUTH, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.NORTH, true)
|
||||
+ .setValue(IronBarsBlock.SOUTH, true)
|
||||
),
|
||||
new ProcessorRule(
|
||||
new BlockStateMatchTest(
|
||||
Blocks.GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.EAST, true)
|
||||
+ .setValue(IronBarsBlock.WEST, true)
|
||||
),
|
||||
AlwaysTrueTest.INSTANCE,
|
||||
Blocks.BROWN_STAINED_GLASS_PANE
|
||||
.defaultBlockState()
|
||||
- .setValue(IronBarsBlock.EAST, Boolean.valueOf(true))
|
||||
- .setValue(IronBarsBlock.WEST, Boolean.valueOf(true))
|
||||
+ .setValue(IronBarsBlock.EAST, true)
|
||||
+ .setValue(IronBarsBlock.WEST, true)
|
||||
),
|
||||
new ProcessorRule(new RandomBlockMatchTest(Blocks.WHEAT, 0.3F), AlwaysTrueTest.INSTANCE, Blocks.PUMPKIN_STEM.defaultBlockState()),
|
||||
new ProcessorRule(new RandomBlockMatchTest(Blocks.WHEAT, 0.2F), AlwaysTrueTest.INSTANCE, Blocks.POTATOES.defaultBlockState())
|
||||
@@ -834,17 +_,17 @@
|
||||
new ProcessorRule(
|
||||
new RandomBlockMatchTest(Blocks.WAXED_COPPER_BULB, 0.1F),
|
||||
AlwaysTrueTest.INSTANCE,
|
||||
- Blocks.WAXED_OXIDIZED_COPPER_BULB.defaultBlockState().setValue(CopperBulbBlock.LIT, Boolean.valueOf(true))
|
||||
+ Blocks.WAXED_OXIDIZED_COPPER_BULB.defaultBlockState().setValue(CopperBulbBlock.LIT, true)
|
||||
),
|
||||
new ProcessorRule(
|
||||
new RandomBlockMatchTest(Blocks.WAXED_COPPER_BULB, 0.33333334F),
|
||||
AlwaysTrueTest.INSTANCE,
|
||||
- Blocks.WAXED_WEATHERED_COPPER_BULB.defaultBlockState().setValue(CopperBulbBlock.LIT, Boolean.valueOf(true))
|
||||
+ Blocks.WAXED_WEATHERED_COPPER_BULB.defaultBlockState().setValue(CopperBulbBlock.LIT, true)
|
||||
),
|
||||
new ProcessorRule(
|
||||
new RandomBlockMatchTest(Blocks.WAXED_COPPER_BULB, 0.5F),
|
||||
AlwaysTrueTest.INSTANCE,
|
||||
- Blocks.WAXED_EXPOSED_COPPER_BULB.defaultBlockState().setValue(CopperBulbBlock.LIT, Boolean.valueOf(true))
|
||||
+ Blocks.WAXED_EXPOSED_COPPER_BULB.defaultBlockState().setValue(CopperBulbBlock.LIT, true)
|
||||
)
|
||||
)
|
||||
),
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/net/minecraft/data/worldgen/features/CaveFeatures.java
|
||||
+++ b/net/minecraft/data/worldgen/features/CaveFeatures.java
|
||||
@@ -264,13 +_,13 @@
|
||||
WeightedStateProvider weightedStateProvider = new WeightedStateProvider(
|
||||
SimpleWeightedRandomList.<BlockState>builder()
|
||||
.add(Blocks.CAVE_VINES_PLANT.defaultBlockState(), 4)
|
||||
- .add(Blocks.CAVE_VINES_PLANT.defaultBlockState().setValue(CaveVines.BERRIES, Boolean.valueOf(true)), 1)
|
||||
+ .add(Blocks.CAVE_VINES_PLANT.defaultBlockState().setValue(CaveVines.BERRIES, true), 1)
|
||||
);
|
||||
RandomizedIntStateProvider randomizedIntStateProvider = new RandomizedIntStateProvider(
|
||||
new WeightedStateProvider(
|
||||
SimpleWeightedRandomList.<BlockState>builder()
|
||||
.add(Blocks.CAVE_VINES.defaultBlockState(), 4)
|
||||
- .add(Blocks.CAVE_VINES.defaultBlockState().setValue(CaveVines.BERRIES, Boolean.valueOf(true)), 1)
|
||||
+ .add(Blocks.CAVE_VINES.defaultBlockState().setValue(CaveVines.BERRIES, true), 1)
|
||||
),
|
||||
CaveVinesBlock.AGE,
|
||||
UniformInt.of(23, 25)
|
||||
@@ -0,0 +1,55 @@
|
||||
--- a/net/minecraft/data/worldgen/features/TreeFeatures.java
|
||||
+++ b/net/minecraft/data/worldgen/features/TreeFeatures.java
|
||||
@@ -288,14 +_,14 @@
|
||||
BlockStateProvider.simple(
|
||||
Blocks.BROWN_MUSHROOM_BLOCK
|
||||
.defaultBlockState()
|
||||
- .setValue(HugeMushroomBlock.UP, Boolean.valueOf(true))
|
||||
- .setValue(HugeMushroomBlock.DOWN, Boolean.valueOf(false))
|
||||
+ .setValue(HugeMushroomBlock.UP, true)
|
||||
+ .setValue(HugeMushroomBlock.DOWN, false)
|
||||
),
|
||||
BlockStateProvider.simple(
|
||||
Blocks.MUSHROOM_STEM
|
||||
.defaultBlockState()
|
||||
- .setValue(HugeMushroomBlock.UP, Boolean.valueOf(false))
|
||||
- .setValue(HugeMushroomBlock.DOWN, Boolean.valueOf(false))
|
||||
+ .setValue(HugeMushroomBlock.UP, false)
|
||||
+ .setValue(HugeMushroomBlock.DOWN, false)
|
||||
),
|
||||
3
|
||||
)
|
||||
@@ -305,12 +_,12 @@
|
||||
HUGE_RED_MUSHROOM,
|
||||
Feature.HUGE_RED_MUSHROOM,
|
||||
new HugeMushroomFeatureConfiguration(
|
||||
- BlockStateProvider.simple(Blocks.RED_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, Boolean.valueOf(false))),
|
||||
+ BlockStateProvider.simple(Blocks.RED_MUSHROOM_BLOCK.defaultBlockState().setValue(HugeMushroomBlock.DOWN, false)),
|
||||
BlockStateProvider.simple(
|
||||
Blocks.MUSHROOM_STEM
|
||||
.defaultBlockState()
|
||||
- .setValue(HugeMushroomBlock.UP, Boolean.valueOf(false))
|
||||
- .setValue(HugeMushroomBlock.DOWN, Boolean.valueOf(false))
|
||||
+ .setValue(HugeMushroomBlock.UP, false)
|
||||
+ .setValue(HugeMushroomBlock.DOWN, false)
|
||||
),
|
||||
2
|
||||
)
|
||||
@@ -554,7 +_,7 @@
|
||||
0,
|
||||
new RandomizedIntStateProvider(
|
||||
BlockStateProvider.simple(
|
||||
- Blocks.MANGROVE_PROPAGULE.defaultBlockState().setValue(MangrovePropaguleBlock.HANGING, Boolean.valueOf(true))
|
||||
+ Blocks.MANGROVE_PROPAGULE.defaultBlockState().setValue(MangrovePropaguleBlock.HANGING, true)
|
||||
),
|
||||
MangrovePropaguleBlock.AGE,
|
||||
UniformInt.of(0, 4)
|
||||
@@ -605,7 +_,7 @@
|
||||
0,
|
||||
new RandomizedIntStateProvider(
|
||||
BlockStateProvider.simple(
|
||||
- Blocks.MANGROVE_PROPAGULE.defaultBlockState().setValue(MangrovePropaguleBlock.HANGING, Boolean.valueOf(true))
|
||||
+ Blocks.MANGROVE_PROPAGULE.defaultBlockState().setValue(MangrovePropaguleBlock.HANGING, true)
|
||||
),
|
||||
MangrovePropaguleBlock.AGE,
|
||||
UniformInt.of(0, 4)
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/data/worldgen/features/VegetationFeatures.java
|
||||
+++ b/net/minecraft/data/worldgen/features/VegetationFeatures.java
|
||||
@@ -173,7 +_,7 @@
|
||||
FeatureUtils.simplePatchConfiguration(
|
||||
Feature.SIMPLE_BLOCK,
|
||||
new SimpleBlockConfiguration(
|
||||
- BlockStateProvider.simple(Blocks.SWEET_BERRY_BUSH.defaultBlockState().setValue(SweetBerryBushBlock.AGE, Integer.valueOf(3)))
|
||||
+ BlockStateProvider.simple(Blocks.SWEET_BERRY_BUSH.defaultBlockState().setValue(SweetBerryBushBlock.AGE, 3))
|
||||
),
|
||||
List.of(Blocks.GRASS_BLOCK)
|
||||
)
|
||||
@@ -425,7 +_,7 @@
|
||||
for (int i = 1; i <= 4; i++) {
|
||||
for (Direction direction : Direction.Plane.HORIZONTAL) {
|
||||
builder.add(
|
||||
- Blocks.PINK_PETALS.defaultBlockState().setValue(PinkPetalsBlock.AMOUNT, Integer.valueOf(i)).setValue(PinkPetalsBlock.FACING, direction), 1
|
||||
+ Blocks.PINK_PETALS.defaultBlockState().setValue(PinkPetalsBlock.AMOUNT, i).setValue(PinkPetalsBlock.FACING, direction), 1
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
--- a/net/minecraft/network/chat/Style.java
|
||||
+++ b/net/minecraft/network/chat/Style.java
|
||||
@@ -105,23 +_,23 @@
|
||||
}
|
||||
|
||||
public boolean isBold() {
|
||||
- return this.bold == Boolean.TRUE;
|
||||
+ return this.bold == true;
|
||||
}
|
||||
|
||||
public boolean isItalic() {
|
||||
- return this.italic == Boolean.TRUE;
|
||||
+ return this.italic == true;
|
||||
}
|
||||
|
||||
public boolean isStrikethrough() {
|
||||
- return this.strikethrough == Boolean.TRUE;
|
||||
+ return this.strikethrough == true;
|
||||
}
|
||||
|
||||
public boolean isUnderlined() {
|
||||
- return this.underlined == Boolean.TRUE;
|
||||
+ return this.underlined == true;
|
||||
}
|
||||
|
||||
public boolean isObfuscated() {
|
||||
- return this.obfuscated == Boolean.TRUE;
|
||||
+ return this.obfuscated == true;
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/network/chat/contents/NbtContents.java
|
||||
+++ b/net/minecraft/network/chat/contents/NbtContents.java
|
||||
@@ -27,7 +_,7 @@
|
||||
public static final MapCodec<NbtContents> CODEC = RecordCodecBuilder.mapCodec(
|
||||
instance -> instance.group(
|
||||
Codec.STRING.fieldOf("nbt").forGetter(NbtContents::getNbtPath),
|
||||
- Codec.BOOL.lenientOptionalFieldOf("interpret", Boolean.valueOf(false)).forGetter(NbtContents::isInterpreting),
|
||||
+ Codec.BOOL.lenientOptionalFieldOf("interpret", false).forGetter(NbtContents::isInterpreting),
|
||||
ComponentSerialization.CODEC.lenientOptionalFieldOf("separator").forGetter(NbtContents::getSeparator),
|
||||
DataSource.CODEC.forGetter(NbtContents::getDataSource)
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/network/protocol/status/ServerStatus.java
|
||||
+++ b/net/minecraft/network/protocol/status/ServerStatus.java
|
||||
@@ -28,7 +_,7 @@
|
||||
ServerStatus.Players.CODEC.lenientOptionalFieldOf("players").forGetter(ServerStatus::players),
|
||||
ServerStatus.Version.CODEC.lenientOptionalFieldOf("version").forGetter(ServerStatus::version),
|
||||
ServerStatus.Favicon.CODEC.lenientOptionalFieldOf("favicon").forGetter(ServerStatus::favicon),
|
||||
- Codec.BOOL.lenientOptionalFieldOf("enforcesSecureChat", Boolean.valueOf(false)).forGetter(ServerStatus::enforcesSecureChat)
|
||||
+ Codec.BOOL.lenientOptionalFieldOf("enforcesSecureChat", false).forGetter(ServerStatus::enforcesSecureChat)
|
||||
)
|
||||
.apply(instance, ServerStatus::new)
|
||||
);
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/Main.java
|
||||
+++ b/net/minecraft/server/Main.java
|
||||
@@ -63,40 +_,24 @@
|
||||
@@ -63,40 +_,37 @@
|
||||
public class Main {
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
|
||||
@@ -37,19 +37,31 @@
|
||||
- if (optionSet.has(optionSpec8)) {
|
||||
- optionParser.printHelpOn(System.err);
|
||||
- return;
|
||||
- }
|
||||
- */ // CraftBukkit end
|
||||
- try {
|
||||
+ // Plazma start - Branding
|
||||
+ System.out.println("""
|
||||
+ \\033[38;2;215;23;133m█\\033[38;2;212;24;134m█\\033[38;2;209;26;134m█\\033[38;2;205;27;135m█\\033[38;2;202;28;136m█\\033[38;2;199;30;136m█\\033[38;2;196;31;137m╗\\033[38;2;193;33;138m \\033[38;2;190;34;138m█\\033[38;2;186;35;139m█\\033[38;2;183;37;140m╗\\033[38;2;180;38;140m \\033[38;2;177;39;141m \\033[38;2;174;41;142m \\033[38;2;170;42;142m \\033[38;2;167;43;143m \\033[38;2;164;45;144m \\033[38;2;161;46;144m█\\033[38;2;158;47;145m█\\033[38;2;155;49;146m█\\033[38;2;151;50;146m█\\033[38;2;148;52;147m█\\033[38;2;145;53;148m╗\\033[38;2;142;54;148m \\033[38;2;139;56;149m█\\033[38;2;135;57;149m█\\033[38;2;132;58;150m█\\033[38;2;129;60;151m█\\033[38;2;126;61;151m█\\033[38;2;123;62;152m█\\033[38;2;120;64;153m█\\033[38;2;116;65;153m╗ \\033[38;2;113;67;154m█\\033[38;2;110;68;155m█\\033[38;2;107;69;155m█\\033[38;2;104;71;156m╗\\033[38;2;101;72;157m \\033[38;2;97;73;157m \\033[38;2;94;75;158m \\033[38;2;91;76;159m█\\033[38;2;88;77;159m█\\033[38;2;85;79;160m█\\033[38;2;81;80;161m╗ \\033[38;2;78;81;161m \\033[38;2;75;83;162m█\\033[38;2;72;84;163m█\\033[38;2;69;86;163m█\\033[38;2;66;87;164m█\\033[38;2;62;88;165m█\\033[38;2;59;90;165m╗\\033[38;2;56;91;166m\\s
|
||||
+ \\033[38;2;215;23;133m█\\033[38;2;212;24;134m█\\033[38;2;209;26;134m╔\\033[38;2;205;27;135m═\\033[38;2;202;28;136m═\\033[38;2;199;30;136m█\\033[38;2;196;31;137m█\\033[38;2;193;33;138m╗ \\033[38;2;190;34;138m█\\033[38;2;186;35;139m█\\033[38;2;183;37;140m║\\033[38;2;180;38;140m \\033[38;2;177;39;141m \\033[38;2;174;41;142m \\033[38;2;170;42;142m \\033[38;2;167;43;143m \\033[38;2;164;45;144m█\\033[38;2;161;46;144m█\\033[38;2;158;47;145m╔\\033[38;2;155;49;146m═\\033[38;2;151;50;146m═\\033[38;2;148;52;147m█\\033[38;2;145;53;148m█\\033[38;2;142;54;148m╗ \\033[38;2;139;56;149m╚\\033[38;2;135;57;149m═\\033[38;2;132;58;150m═\\033[38;2;129;60;151m█\\033[38;2;126;61;151m█\\033[38;2;123;62;152m█\\033[38;2;120;64;153m╔\\033[38;2;116;65;153m╝ \\033[38;2;113;67;154m█\\033[38;2;110;68;155m█\\033[38;2;107;69;155m█\\033[38;2;104;71;156m█\\033[38;2;101;72;157m╗\\033[38;2;97;73;157m \\033[38;2;94;75;158m█\\033[38;2;91;76;159m█\\033[38;2;88;77;159m█\\033[38;2;85;79;160m█\\033[38;2;81;80;161m║ \\033[38;2;78;81;161m█\\033[38;2;75;83;162m█\\033[38;2;72;84;163m╔\\033[38;2;69;86;163m═\\033[38;2;66;87;164m═\\033[38;2;62;88;165m█\\033[38;2;59;90;165m█\\033[38;2;56;91;166m╗
|
||||
+ \\033[38;2;215;23;133m█\\033[38;2;212;24;134m█\\033[38;2;209;26;134m█\\033[38;2;205;27;135m█\\033[38;2;202;28;136m█\\033[38;2;199;30;136m█\\033[38;2;196;31;137m╔\\033[38;2;193;33;138m╝ \\033[38;2;190;34;138m█\\033[38;2;186;35;139m█\\033[38;2;183;37;140m║\\033[38;2;180;38;140m \\033[38;2;177;39;141m \\033[38;2;174;41;142m \\033[38;2;170;42;142m \\033[38;2;167;43;143m \\033[38;2;164;45;144m█\\033[38;2;161;46;144m█\\033[38;2;158;47;145m█\\033[38;2;155;49;146m█\\033[38;2;151;50;146m█\\033[38;2;148;52;147m█\\033[38;2;145;53;148m█\\033[38;2;142;54;148m║ \\033[38;2;139;56;149m \\033[38;2;135;57;149m \\033[38;2;132;58;150m█\\033[38;2;129;60;151m█\\033[38;2;126;61;151m█\\033[38;2;123;62;152m╔\\033[38;2;120;64;153m╝\\033[38;2;116;65;153m \\033[38;2;113;67;154m█\\033[38;2;110;68;155m█\\033[38;2;107;69;155m╔\\033[38;2;104;71;156m█\\033[38;2;101;72;157m█\\033[38;2;97;73;157m█\\033[38;2;94;75;158m█\\033[38;2;91;76;159m╔\\033[38;2;88;77;159m█\\033[38;2;85;79;160m█\\033[38;2;81;80;161m║ \\033[38;2;78;81;161m█\\033[38;2;75;83;162m█\\033[38;2;72;84;163m█\\033[38;2;69;86;163m█\\033[38;2;66;87;164m█\\033[38;2;62;88;165m█\\033[38;2;59;90;165m█\\033[38;2;56;91;166m║
|
||||
+ \\033[38;2;215;23;133m█\\033[38;2;212;24;134m█\\033[38;2;209;26;134m╔\\033[38;2;205;27;135m═\\033[38;2;202;28;136m═\\033[38;2;199;30;136m═\\033[38;2;196;31;137m╝\\033[38;2;193;33;138m \\033[38;2;190;34;138m█\\033[38;2;186;35;139m█\\033[38;2;183;37;140m║\\033[38;2;180;38;140m \\033[38;2;177;39;141m \\033[38;2;174;41;142m \\033[38;2;170;42;142m \\033[38;2;167;43;143m \\033[38;2;164;45;144m█\\033[38;2;161;46;144m█\\033[38;2;158;47;145m╔\\033[38;2;155;49;146m═\\033[38;2;151;50;146m═\\033[38;2;148;52;147m█\\033[38;2;145;53;148m█\\033[38;2;142;54;148m║ \\033[38;2;139;56;149m \\033[38;2;135;57;149m█\\033[38;2;132;58;150m█\\033[38;2;129;60;151m█\\033[38;2;126;61;151m╔\\033[38;2;123;62;152m╝\\033[38;2;120;64;153m \\033[38;2;116;65;153m \\033[38;2;113;67;154m█\\033[38;2;110;68;155m█\\033[38;2;107;69;155m║\\033[38;2;104;71;156m╚\\033[38;2;101;72;157m█\\033[38;2;97;73;157m█\\033[38;2;94;75;158m╔\\033[38;2;91;76;159m╝\\033[38;2;88;77;159m█\\033[38;2;85;79;160m█\\033[38;2;81;80;161m║ \\033[38;2;78;81;161m█\\033[38;2;75;83;162m█\\033[38;2;72;84;163m╔\\033[38;2;69;86;163m═\\033[38;2;66;87;164m═\\033[38;2;62;88;165m█\\033[38;2;59;90;165m█\\033[38;2;56;91;166m║
|
||||
+ \\033[38;2;215;23;133m█\\033[38;2;212;24;134m█\\033[38;2;209;26;134m║\\033[38;2;205;27;135m \\033[38;2;202;28;136m \\033[38;2;199;30;136m \\033[38;2;196;31;137m \\033[38;2;193;33;138m \\033[38;2;190;34;138m█\\033[38;2;186;35;139m█\\033[38;2;183;37;140m█\\033[38;2;180;38;140m█\\033[38;2;177;39;141m█\\033[38;2;174;41;142m█\\033[38;2;170;42;142m█\\033[38;2;167;43;143m╗ \\033[38;2;164;45;144m█\\033[38;2;161;46;144m█\\033[38;2;158;47;145m║\\033[38;2;155;49;146m \\033[38;2;151;50;146m \\033[38;2;148;52;147m█\\033[38;2;145;53;148m█\\033[38;2;142;54;148m║ \\033[38;2;139;56;149m█\\033[38;2;135;57;149m█\\033[38;2;132;58;150m█\\033[38;2;129;60;151m█\\033[38;2;126;61;151m█\\033[38;2;123;62;152m█\\033[38;2;120;64;153m█\\033[38;2;116;65;153m╗ \\033[38;2;113;67;154m█\\033[38;2;110;68;155m█\\033[38;2;107;69;155m║\\033[38;2;104;71;156m \\033[38;2;101;72;157m╚\\033[38;2;97;73;157m═\\033[38;2;94;75;158m╝\\033[38;2;91;76;159m \\033[38;2;88;77;159m█\\033[38;2;85;79;160m█\\033[38;2;81;80;161m║ \\033[38;2;78;81;161m█\\033[38;2;75;83;162m█\\033[38;2;72;84;163m║\\033[38;2;69;86;163m \\033[38;2;66;87;164m \\033[38;2;62;88;165m█\\033[38;2;59;90;165m█\\033[38;2;56;91;166m║
|
||||
+ \\033[38;2;215;23;133m╚\\033[38;2;212;24;134m═\\033[38;2;209;26;134m╝\\033[38;2;205;27;135m \\033[38;2;202;28;136m \\033[38;2;199;30;136m \\033[38;2;196;31;137m \\033[38;2;193;33;138m \\033[38;2;190;34;138m╚\\033[38;2;186;35;139m═\\033[38;2;183;37;140m═\\033[38;2;180;38;140m═\\033[38;2;177;39;141m═\\033[38;2;174;41;142m═\\033[38;2;170;42;142m═\\033[38;2;167;43;143m╝ \\033[38;2;164;45;144m╚\\033[38;2;161;46;144m═\\033[38;2;158;47;145m╝\\033[38;2;155;49;146m \\033[38;2;151;50;146m \\033[38;2;148;52;147m╚\\033[38;2;145;53;148m═\\033[38;2;142;54;148m╝ \\033[38;2;139;56;149m╚\\033[38;2;135;57;149m═\\033[38;2;132;58;150m═\\033[38;2;129;60;151m═\\033[38;2;126;61;151m═\\033[38;2;123;62;152m═\\033[38;2;120;64;153m═\\033[38;2;116;65;153m╝ \\033[38;2;113;67;154m╚\\033[38;2;110;68;155m═\\033[38;2;107;69;155m╝\\033[38;2;104;71;156m \\033[38;2;101;72;157m \\033[38;2;97;73;157m \\033[38;2;94;75;158m \\033[38;2;91;76;159m \\033[38;2;88;77;159m╚\\033[38;2;85;79;160m═\\033[38;2;81;80;161m╝ \\033[38;2;78;81;161m╚\\033[38;2;75;83;162m═\\033[38;2;72;84;163m╝\\033[38;2;69;86;163m \\033[38;2;66;87;164m \\033[38;2;62;88;165m╚\\033[38;2;59;90;165m═\\033[38;2;56;91;166m╝\\033[0m
|
||||
+ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m█\033[38;2;205;27;135m█\033[38;2;202;28;136m█\033[38;2;199;30;136m█\033[38;2;196;31;137m╗\033[38;2;193;33;138m \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m╗\033[38;2;180;38;140m \033[38;2;177;39;141m \033[38;2;174;41;142m \033[38;2;170;42;142m \033[38;2;167;43;143m \033[38;2;164;45;144m \033[38;2;161;46;144m█\033[38;2;158;47;145m█\033[38;2;155;49;146m█\033[38;2;151;50;146m█\033[38;2;148;52;147m█\033[38;2;145;53;148m╗\033[38;2;142;54;148m \033[38;2;139;56;149m█\033[38;2;135;57;149m█\033[38;2;132;58;150m█\033[38;2;129;60;151m█\033[38;2;126;61;151m█\033[38;2;123;62;152m█\033[38;2;120;64;153m█\033[38;2;116;65;153m╗ \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m█\033[38;2;104;71;156m╗\033[38;2;101;72;157m \033[38;2;97;73;157m \033[38;2;94;75;158m \033[38;2;91;76;159m█\033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m╗ \033[38;2;78;81;161m \033[38;2;75;83;162m█\033[38;2;72;84;163m█\033[38;2;69;86;163m█\033[38;2;66;87;164m█\033[38;2;62;88;165m█\033[38;2;59;90;165m╗\033[38;2;56;91;166m\\s
|
||||
+ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m╔\033[38;2;205;27;135m═\033[38;2;202;28;136m═\033[38;2;199;30;136m█\033[38;2;196;31;137m█\033[38;2;193;33;138m╗ \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m║\033[38;2;180;38;140m \033[38;2;177;39;141m \033[38;2;174;41;142m \033[38;2;170;42;142m \033[38;2;167;43;143m \033[38;2;164;45;144m█\033[38;2;161;46;144m█\033[38;2;158;47;145m╔\033[38;2;155;49;146m═\033[38;2;151;50;146m═\033[38;2;148;52;147m█\033[38;2;145;53;148m█\033[38;2;142;54;148m╗ \033[38;2;139;56;149m╚\033[38;2;135;57;149m═\033[38;2;132;58;150m═\033[38;2;129;60;151m█\033[38;2;126;61;151m█\033[38;2;123;62;152m█\033[38;2;120;64;153m╔\033[38;2;116;65;153m╝ \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m█\033[38;2;104;71;156m█\033[38;2;101;72;157m╗\033[38;2;97;73;157m \033[38;2;94;75;158m█\033[38;2;91;76;159m█\033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m║ \033[38;2;78;81;161m█\033[38;2;75;83;162m█\033[38;2;72;84;163m╔\033[38;2;69;86;163m═\033[38;2;66;87;164m═\033[38;2;62;88;165m█\033[38;2;59;90;165m█\033[38;2;56;91;166m╗
|
||||
+ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m█\033[38;2;205;27;135m█\033[38;2;202;28;136m█\033[38;2;199;30;136m█\033[38;2;196;31;137m╔\033[38;2;193;33;138m╝ \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m║\033[38;2;180;38;140m \033[38;2;177;39;141m \033[38;2;174;41;142m \033[38;2;170;42;142m \033[38;2;167;43;143m \033[38;2;164;45;144m█\033[38;2;161;46;144m█\033[38;2;158;47;145m█\033[38;2;155;49;146m█\033[38;2;151;50;146m█\033[38;2;148;52;147m█\033[38;2;145;53;148m█\033[38;2;142;54;148m║ \033[38;2;139;56;149m \033[38;2;135;57;149m \033[38;2;132;58;150m█\033[38;2;129;60;151m█\033[38;2;126;61;151m█\033[38;2;123;62;152m╔\033[38;2;120;64;153m╝\033[38;2;116;65;153m \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m╔\033[38;2;104;71;156m█\033[38;2;101;72;157m█\033[38;2;97;73;157m█\033[38;2;94;75;158m█\033[38;2;91;76;159m╔\033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m║ \033[38;2;78;81;161m█\033[38;2;75;83;162m█\033[38;2;72;84;163m█\033[38;2;69;86;163m█\033[38;2;66;87;164m█\033[38;2;62;88;165m█\033[38;2;59;90;165m█\033[38;2;56;91;166m║
|
||||
+ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m╔\033[38;2;205;27;135m═\033[38;2;202;28;136m═\033[38;2;199;30;136m═\033[38;2;196;31;137m╝\033[38;2;193;33;138m \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m║\033[38;2;180;38;140m \033[38;2;177;39;141m \033[38;2;174;41;142m \033[38;2;170;42;142m \033[38;2;167;43;143m \033[38;2;164;45;144m█\033[38;2;161;46;144m█\033[38;2;158;47;145m╔\033[38;2;155;49;146m═\033[38;2;151;50;146m═\033[38;2;148;52;147m█\033[38;2;145;53;148m█\033[38;2;142;54;148m║ \033[38;2;139;56;149m \033[38;2;135;57;149m█\033[38;2;132;58;150m█\033[38;2;129;60;151m█\033[38;2;126;61;151m╔\033[38;2;123;62;152m╝\033[38;2;120;64;153m \033[38;2;116;65;153m \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m║\033[38;2;104;71;156m╚\033[38;2;101;72;157m█\033[38;2;97;73;157m█\033[38;2;94;75;158m╔\033[38;2;91;76;159m╝\033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m║ \033[38;2;78;81;161m█\033[38;2;75;83;162m█\033[38;2;72;84;163m╔\033[38;2;69;86;163m═\033[38;2;66;87;164m═\033[38;2;62;88;165m█\033[38;2;59;90;165m█\033[38;2;56;91;166m║
|
||||
+ \033[38;2;215;23;133m█\033[38;2;212;24;134m█\033[38;2;209;26;134m║\033[38;2;205;27;135m \033[38;2;202;28;136m \033[38;2;199;30;136m \033[38;2;196;31;137m \033[38;2;193;33;138m \033[38;2;190;34;138m█\033[38;2;186;35;139m█\033[38;2;183;37;140m█\033[38;2;180;38;140m█\033[38;2;177;39;141m█\033[38;2;174;41;142m█\033[38;2;170;42;142m█\033[38;2;167;43;143m╗ \033[38;2;164;45;144m█\033[38;2;161;46;144m█\033[38;2;158;47;145m║\033[38;2;155;49;146m \033[38;2;151;50;146m \033[38;2;148;52;147m█\033[38;2;145;53;148m█\033[38;2;142;54;148m║ \033[38;2;139;56;149m█\033[38;2;135;57;149m█\033[38;2;132;58;150m█\033[38;2;129;60;151m█\033[38;2;126;61;151m█\033[38;2;123;62;152m█\033[38;2;120;64;153m█\033[38;2;116;65;153m╗ \033[38;2;113;67;154m█\033[38;2;110;68;155m█\033[38;2;107;69;155m║\033[38;2;104;71;156m \033[38;2;101;72;157m╚\033[38;2;97;73;157m═\033[38;2;94;75;158m╝\033[38;2;91;76;159m \033[38;2;88;77;159m█\033[38;2;85;79;160m█\033[38;2;81;80;161m║ \033[38;2;78;81;161m█\033[38;2;75;83;162m█\033[38;2;72;84;163m║\033[38;2;69;86;163m \033[38;2;66;87;164m \033[38;2;62;88;165m█\033[38;2;59;90;165m█\033[38;2;56;91;166m║
|
||||
+ \033[38;2;215;23;133m╚\033[38;2;212;24;134m═\033[38;2;209;26;134m╝\033[38;2;205;27;135m \033[38;2;202;28;136m \033[38;2;199;30;136m \033[38;2;196;31;137m \033[38;2;193;33;138m \033[38;2;190;34;138m╚\033[38;2;186;35;139m═\033[38;2;183;37;140m═\033[38;2;180;38;140m═\033[38;2;177;39;141m═\033[38;2;174;41;142m═\033[38;2;170;42;142m═\033[38;2;167;43;143m╝ \033[38;2;164;45;144m╚\033[38;2;161;46;144m═\033[38;2;158;47;145m╝\033[38;2;155;49;146m \033[38;2;151;50;146m \033[38;2;148;52;147m╚\033[38;2;145;53;148m═\033[38;2;142;54;148m╝ \033[38;2;139;56;149m╚\033[38;2;135;57;149m═\033[38;2;132;58;150m═\033[38;2;129;60;151m═\033[38;2;126;61;151m═\033[38;2;123;62;152m═\033[38;2;120;64;153m═\033[38;2;116;65;153m╝ \033[38;2;113;67;154m╚\033[38;2;110;68;155m═\033[38;2;107;69;155m╝\033[38;2;104;71;156m \033[38;2;101;72;157m \033[38;2;97;73;157m \033[38;2;94;75;158m \033[38;2;91;76;159m \033[38;2;88;77;159m╚\033[38;2;85;79;160m═\033[38;2;81;80;161m╝ \033[38;2;78;81;161m╚\033[38;2;75;83;162m═\033[38;2;72;84;163m╝\033[38;2;69;86;163m \033[38;2;66;87;164m \033[38;2;62;88;165m╚\033[38;2;59;90;165m═\033[38;2;56;91;166m╝\033[0m
|
||||
+ """);
|
||||
+ // Plazma end - Branding
|
||||
+
|
||||
+ // Plazma start - Warn on startup
|
||||
+ if (!org.plazmamc.plazma.Options.NO_WARN) {
|
||||
+ LOGGER.warn("WARNING! Plazma may cause unexpected problems, so be sure to test it thoroughly before using it on a public server.");
|
||||
+ if (!org.plazmamc.plazma.Options.NO_WARN_DEV) {
|
||||
+ LOGGER.error("*********************** CAUTION ***********************");
|
||||
+ LOGGER.error("This version is a development version of Plazma.");
|
||||
+ LOGGER.error("Nobody knows what kind of problem you're going to have, and there's always the possibility of unexpected problems.");
|
||||
+ LOGGER.error("Never use this version on a public server, and after you've tested it enough before using it!");
|
||||
+ LOGGER.error("*******************************************************");
|
||||
+ }
|
||||
}
|
||||
- */ // CraftBukkit end
|
||||
- try {
|
||||
+ // Plazma end - Warn on startup
|
||||
|
||||
Path path = (Path) optionSet.valueOf("pidFile"); // CraftBukkit
|
||||
if (path != null) {
|
||||
@@ -72,15 +84,108 @@
|
||||
} catch (java.io.IOException ex) {
|
||||
throw new RuntimeException("Could not initialize Bukkit datapack", ex);
|
||||
}
|
||||
@@ -309,24 +_,11 @@
|
||||
)
|
||||
)
|
||||
.get();
|
||||
@@ -258,75 +_,53 @@
|
||||
WorldStem worldStem;
|
||||
try {
|
||||
WorldLoader.InitConfig initConfig = loadOrCreateConfig(dedicatedServerSettings.getProperties(), dynamic, hasOptionSpec, packRepository);
|
||||
- worldStem = Util.<WorldStem>blockUntilDone(
|
||||
- executor -> WorldLoader.load(
|
||||
- initConfig,
|
||||
- context -> {
|
||||
- worldLoader.set(context); // CraftBukkit
|
||||
- Registry<LevelStem> registry = context.datapackDimensions().lookupOrThrow(Registries.LEVEL_STEM);
|
||||
- if (dynamic != null) {
|
||||
- LevelDataAndDimensions levelDataAndDimensions = LevelStorageSource.getLevelDataAndDimensions(
|
||||
- dynamic, context.dataConfiguration(), registry, context.datapackWorldgen()
|
||||
- );
|
||||
- return new WorldLoader.DataLoadOutput<>(
|
||||
- levelDataAndDimensions.worldData(), levelDataAndDimensions.dimensions().dimensionsRegistryAccess()
|
||||
- );
|
||||
- } else {
|
||||
- LOGGER.info("No existing world data, creating new world");
|
||||
- LevelSettings levelSettings;
|
||||
- WorldOptions worldOptions;
|
||||
- WorldDimensions worldDimensions;
|
||||
- if (optionSet.has("demo")) { // CraftBukkit
|
||||
- levelSettings = MinecraftServer.DEMO_SETTINGS;
|
||||
- worldOptions = WorldOptions.DEMO_OPTIONS;
|
||||
- worldDimensions = WorldPresets.createNormalWorldDimensions(context.datapackWorldgen());
|
||||
- } else {
|
||||
- DedicatedServerProperties properties = dedicatedServerSettings.getProperties();
|
||||
- levelSettings = new LevelSettings(
|
||||
- properties.levelName,
|
||||
- properties.gamemode,
|
||||
- properties.hardcore,
|
||||
- properties.difficulty,
|
||||
- false,
|
||||
- new GameRules(context.dataConfiguration().enabledFeatures()),
|
||||
- context.dataConfiguration()
|
||||
- );
|
||||
- worldOptions = optionSet.has("bonusChest") ? properties.worldOptions.withBonusChest(true) : properties.worldOptions; // CraftBukkit
|
||||
- worldDimensions = properties.createDimensions(context.datapackWorldgen());
|
||||
- }
|
||||
-
|
||||
- WorldDimensions.Complete complete = worldDimensions.bake(registry);
|
||||
- Lifecycle lifecycle = complete.lifecycle().add(context.datapackWorldgen().allRegistriesLifecycle());
|
||||
- return new WorldLoader.DataLoadOutput<>(
|
||||
- new PrimaryLevelData(levelSettings, worldOptions, complete.specialWorldProperty(), lifecycle),
|
||||
- complete.dimensionsRegistryAccess()
|
||||
- );
|
||||
- }
|
||||
- },
|
||||
- WorldStem::new,
|
||||
- Util.backgroundExecutor(),
|
||||
- executor
|
||||
- )
|
||||
- )
|
||||
- .get();
|
||||
- } catch (Exception var39) {
|
||||
- LOGGER.warn(
|
||||
- "Failed to load datapacks, can't proceed with server load. You can either fix your datapacks or reset to vanilla with --safeMode",
|
||||
- (Throwable)var39
|
||||
- );
|
||||
+ worldStem = Util.blockUntilDone((executor) -> WorldLoader.load(initConfig, (context) -> {
|
||||
+ worldLoader.set(context); // CraftBukkit
|
||||
+ Registry<LevelStem> registry = context.datapackDimensions().lookupOrThrow(Registries.LEVEL_STEM);
|
||||
+ if (dynamic != null) {
|
||||
+ LevelDataAndDimensions levelDataAndDimensions = LevelStorageSource.getLevelDataAndDimensions(
|
||||
+ dynamic, context.dataConfiguration(), registry, context.datapackWorldgen()
|
||||
+ );
|
||||
+ return new WorldLoader.DataLoadOutput<>(
|
||||
+ levelDataAndDimensions.worldData(), levelDataAndDimensions.dimensions().dimensionsRegistryAccess()
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ LOGGER.info("No existing world data, creating new world");
|
||||
+ LevelSettings levelSettings;
|
||||
+ WorldOptions worldOptions;
|
||||
+ WorldDimensions worldDimensions;
|
||||
+ if (optionSet.has("demo")) { // CraftBukkit
|
||||
+ levelSettings = MinecraftServer.DEMO_SETTINGS;
|
||||
+ worldOptions = WorldOptions.DEMO_OPTIONS;
|
||||
+ worldDimensions = WorldPresets.createNormalWorldDimensions(context.datapackWorldgen());
|
||||
+ } else {
|
||||
+ DedicatedServerProperties properties = dedicatedServerSettings.getProperties();
|
||||
+ levelSettings = new LevelSettings(
|
||||
+ properties.levelName,
|
||||
+ properties.gamemode,
|
||||
+ properties.hardcore,
|
||||
+ properties.difficulty,
|
||||
+ false,
|
||||
+ new GameRules(context.dataConfiguration().enabledFeatures()),
|
||||
+ context.dataConfiguration()
|
||||
+ );
|
||||
+ worldOptions = optionSet.has("bonusChest") ? properties.worldOptions.withBonusChest(true) : properties.worldOptions; // CraftBukkit
|
||||
+ worldDimensions = properties.createDimensions(context.datapackWorldgen());
|
||||
+ }
|
||||
+
|
||||
+ WorldDimensions.Complete complete = worldDimensions.bake(registry);
|
||||
+ Lifecycle lifecycle = complete.lifecycle().add(context.datapackWorldgen().allRegistriesLifecycle());
|
||||
+ return new WorldLoader.DataLoadOutput<>(
|
||||
+ new PrimaryLevelData(levelSettings, worldOptions, complete.specialWorldProperty(), lifecycle),
|
||||
+ complete.dimensionsRegistryAccess()
|
||||
+ );
|
||||
+ }, WorldStem::new, Util.backgroundExecutor(), executor)).get();
|
||||
+ } catch (final Exception e) { // Plazma
|
||||
+ LOGGER.warn("Failed to load datapacks, can't proceed with server load. You can either fix your datapacks or reset to vanilla with --safeMode", e); // Plazma
|
||||
return;
|
||||
|
||||
@@ -676,6 +676,15 @@
|
||||
}
|
||||
|
||||
public CustomBossEvents getCustomBossEvents() {
|
||||
@@ -2549,7 +_,7 @@
|
||||
this.dumpServerProperties(path.resolve("server.properties.txt"));
|
||||
this.dumpNativeModules(path.resolve("modules.txt"));
|
||||
} catch (IOException var7) {
|
||||
- LOGGER.warn("Failed to save debug report", (Throwable)var7);
|
||||
+ LOGGER.warn("Failed to save debug report", var7); // Plazma - Remove unnecessary type casting
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2582,9 +_,8 @@
|
||||
private void dumpClasspath(Path path) throws IOException {
|
||||
try (Writer bufferedWriter = Files.newBufferedWriter(path)) {
|
||||
@@ -687,12 +696,3 @@
|
||||
bufferedWriter.write(string);
|
||||
bufferedWriter.write("\n");
|
||||
}
|
||||
@@ -2636,7 +_,7 @@
|
||||
}
|
||||
|
||||
public static MinecraftServer getServer() {
|
||||
- return SERVER; // Paper
|
||||
+ return Objects.requireNonNull(SERVER); // Paper
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/server/dedicated/Settings.java
|
||||
+++ b/net/minecraft/server/dedicated/Settings.java
|
||||
@@ -216,7 +_,7 @@
|
||||
}
|
||||
|
||||
protected int get(String key, int defaultValue) {
|
||||
- return this.get(key, wrapNumberDeserializer(Integer::parseInt), Integer.valueOf(defaultValue));
|
||||
+ return this.get(key, wrapNumberDeserializer(Integer::parseInt), defaultValue);
|
||||
}
|
||||
|
||||
protected Settings<T>.MutableValue<Integer> getMutable(String key, int defaultValue) {
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1361,7 +_,7 @@
|
||||
if (block instanceof RespawnAnchorBlock && (forced || blockState.getValue(RespawnAnchorBlock.CHARGE) > 0) && RespawnAnchorBlock.canSetSpawn(level)) {
|
||||
Optional<Vec3> optional = RespawnAnchorBlock.findStandUpPosition(EntityType.PLAYER, level, pos);
|
||||
if (!forced && useCharge && optional.isPresent()) {
|
||||
- level.setBlock(pos, blockState.setValue(RespawnAnchorBlock.CHARGE, Integer.valueOf(blockState.getValue(RespawnAnchorBlock.CHARGE) - 1)), 3);
|
||||
+ level.setBlock(pos, blockState.setValue(RespawnAnchorBlock.CHARGE, blockState.getValue(RespawnAnchorBlock.CHARGE) - 1), 3);
|
||||
}
|
||||
|
||||
return optional.map(vec3 -> ServerPlayer.RespawnPosAngle.of(vec3, pos, false, true)); // CraftBukkit
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/server/level/ThreadedLevelLightEngine.java
|
||||
+++ b/net/minecraft/server/level/ThreadedLevelLightEngine.java
|
||||
@@ -55,7 +_,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- final Long ticketId = Long.valueOf(this.chunkWorkCounter.getAndIncrement());
|
||||
+ final Long ticketId = this.chunkWorkCounter.getAndIncrement();
|
||||
final ChunkPos pos = new ChunkPos(chunkX, chunkZ);
|
||||
world.getChunkSource().addRegionTicket(ca.spottedleaf.moonrise.patches.starlight.light.StarLightInterface.CHUNK_WORK_TICKET, pos, ca.spottedleaf.moonrise.patches.starlight.light.StarLightInterface.REGION_LIGHT_TICKET_LEVEL, ticketId);
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -937,7 +_,7 @@
|
||||
default -> Blocks.COMMAND_BLOCK.defaultBlockState();
|
||||
};
|
||||
BlockState blockState2 = blockState1.setValue(CommandBlock.FACING, direction)
|
||||
- .setValue(CommandBlock.CONDITIONAL, Boolean.valueOf(packet.isConditional()));
|
||||
+ .setValue(CommandBlock.CONDITIONAL, packet.isConditional());
|
||||
if (blockState2 != blockState) {
|
||||
this.player.level().setBlock(pos, blockState2, 2);
|
||||
blockEntity.setBlockState(blockState2);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/util/FormattedCharSequence.java
|
||||
+++ b/net/minecraft/util/FormattedCharSequence.java
|
||||
@@ -32,7 +_,7 @@
|
||||
}
|
||||
|
||||
static FormattedCharSink decorateOutput(FormattedCharSink sink, Int2IntFunction codePointMapper) {
|
||||
- return (index, style, codePoint) -> sink.accept(index, style, codePointMapper.apply(Integer.valueOf(codePoint)));
|
||||
+ return (index, style, codePoint) -> sink.accept(index, style, codePointMapper.apply(codePoint));
|
||||
}
|
||||
|
||||
static FormattedCharSequence composite() {
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/util/datafix/fixes/CustomModelDataExpandFix.java
|
||||
+++ b/net/minecraft/util/datafix/fixes/CustomModelDataExpandFix.java
|
||||
@@ -20,7 +_,7 @@
|
||||
"Custom Model Data expansion",
|
||||
type,
|
||||
typed -> typed.update(DSL.remainderFinder(), dynamic -> dynamic.update("minecraft:custom_model_data", dynamic1 -> {
|
||||
- float f = dynamic1.asNumber(Float.valueOf(0.0F)).floatValue();
|
||||
+ float f = dynamic1.asNumber(0.0F).floatValue();
|
||||
return dynamic1.createMap(Map.of(dynamic1.createString("floats"), dynamic1.createList(Stream.of(dynamic1.createFloat(f)))));
|
||||
}))
|
||||
);
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/world/effect/MobEffectInstance.java
|
||||
+++ b/net/minecraft/world/effect/MobEffectInstance.java
|
||||
@@ -400,9 +_,9 @@
|
||||
codec -> RecordCodecBuilder.mapCodec(
|
||||
instance -> instance.group(
|
||||
ExtraCodecs.UNSIGNED_BYTE.optionalFieldOf("amplifier", 0).forGetter(MobEffectInstance.Details::amplifier),
|
||||
- Codec.INT.optionalFieldOf("duration", Integer.valueOf(0)).forGetter(MobEffectInstance.Details::duration),
|
||||
- Codec.BOOL.optionalFieldOf("ambient", Boolean.valueOf(false)).forGetter(MobEffectInstance.Details::ambient),
|
||||
- Codec.BOOL.optionalFieldOf("show_particles", Boolean.valueOf(true)).forGetter(MobEffectInstance.Details::showParticles),
|
||||
+ Codec.INT.optionalFieldOf("duration", 0).forGetter(MobEffectInstance.Details::duration),
|
||||
+ Codec.BOOL.optionalFieldOf("ambient", false).forGetter(MobEffectInstance.Details::ambient),
|
||||
+ Codec.BOOL.optionalFieldOf("show_particles", true).forGetter(MobEffectInstance.Details::showParticles),
|
||||
Codec.BOOL.optionalFieldOf("show_icon").forGetter(details -> Optional.of(details.showIcon())),
|
||||
codec.optionalFieldOf("hidden_effect").forGetter(MobEffectInstance.Details::hiddenEffect)
|
||||
)
|
||||
@@ -0,0 +1,46 @@
|
||||
--- a/net/minecraft/world/entity/EntitySelector.java
|
||||
+++ b/net/minecraft/world/entity/EntitySelector.java
|
||||
@@ -52,27 +_,26 @@
|
||||
// Paper end - Climbing should not bypass cramming gamerule
|
||||
Team team = entity.getTeam();
|
||||
Team.CollisionRule collisionRule = team == null ? Team.CollisionRule.ALWAYS : team.getCollisionRule();
|
||||
- return (Predicate<Entity>)(collisionRule == Team.CollisionRule.NEVER
|
||||
- ? Predicates.alwaysFalse()
|
||||
- : NO_SPECTATORS.and(
|
||||
- pushedEntity -> {
|
||||
- if (!pushedEntity.isCollidable(ignoreClimbing) || !pushedEntity.canCollideWithBukkit(entity) || !entity.canCollideWithBukkit(pushedEntity)) { // CraftBukkit - collidable API // Paper - Climbing should not bypass cramming gamerule
|
||||
+ // Plazma start - Remove dangerous, unnecessary type casting
|
||||
+ return collisionRule == Team.CollisionRule.NEVER ? Predicates.alwaysFalse() : NO_SPECTATORS.and(pushedEntity -> {
|
||||
+ if (!pushedEntity.isCollidable(ignoreClimbing) || !pushedEntity.canCollideWithBukkit(entity) || !entity.canCollideWithBukkit(pushedEntity)) { // CraftBukkit - collidable API // Paper - Climbing should not bypass cramming gamerule
|
||||
+ return false;
|
||||
+ } else if (!entity.level().isClientSide || pushedEntity instanceof Player && ((Player)pushedEntity).isLocalPlayer()) {
|
||||
+ Team team1 = pushedEntity.getTeam();
|
||||
+ Team.CollisionRule collisionRule1 = team1 == null ? Team.CollisionRule.ALWAYS : team1.getCollisionRule();
|
||||
+ if (collisionRule1 == Team.CollisionRule.NEVER || (pushedEntity instanceof Player && !io.papermc.paper.configuration.GlobalConfiguration.get().collisions.enablePlayerCollisions)) { // Paper - Configurable player collision
|
||||
return false;
|
||||
- } else if (!entity.level().isClientSide || pushedEntity instanceof Player && ((Player)pushedEntity).isLocalPlayer()) {
|
||||
- Team team1 = pushedEntity.getTeam();
|
||||
- Team.CollisionRule collisionRule1 = team1 == null ? Team.CollisionRule.ALWAYS : team1.getCollisionRule();
|
||||
- if (collisionRule1 == Team.CollisionRule.NEVER || (pushedEntity instanceof Player && !io.papermc.paper.configuration.GlobalConfiguration.get().collisions.enablePlayerCollisions)) { // Paper - Configurable player collision
|
||||
- return false;
|
||||
- } else {
|
||||
- boolean flag = team != null && team.isAlliedTo(team1);
|
||||
- return (collisionRule != Team.CollisionRule.PUSH_OWN_TEAM && collisionRule1 != Team.CollisionRule.PUSH_OWN_TEAM || !flag)
|
||||
- && (collisionRule != Team.CollisionRule.PUSH_OTHER_TEAMS && collisionRule1 != Team.CollisionRule.PUSH_OTHER_TEAMS || flag);
|
||||
- }
|
||||
} else {
|
||||
- return false;
|
||||
+ boolean flag = team != null && team.isAlliedTo(team1);
|
||||
+ return (collisionRule != Team.CollisionRule.PUSH_OWN_TEAM && collisionRule1 != Team.CollisionRule.PUSH_OWN_TEAM || !flag)
|
||||
+ && (collisionRule != Team.CollisionRule.PUSH_OTHER_TEAMS && collisionRule1 != Team.CollisionRule.PUSH_OTHER_TEAMS || flag);
|
||||
}
|
||||
+ } else {
|
||||
+ return false;
|
||||
}
|
||||
- ));
|
||||
+
|
||||
+ });
|
||||
+ // Plazma end
|
||||
}
|
||||
|
||||
public static Predicate<Entity> notRiding(Entity entity) {
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -4421,7 +_,7 @@
|
||||
|
||||
BlockState blockState = this.level().getBlockState(pos);
|
||||
if (blockState.getBlock() instanceof BedBlock) {
|
||||
- this.level().setBlock(pos, blockState.setValue(BedBlock.OCCUPIED, Boolean.valueOf(true)), 3);
|
||||
+ this.level().setBlock(pos, blockState.setValue(BedBlock.OCCUPIED, true), 3);
|
||||
}
|
||||
|
||||
this.setPose(Pose.SLEEPING);
|
||||
@@ -4444,7 +_,7 @@
|
||||
BlockState blockState = this.level().getBlockState(blockPos);
|
||||
if (blockState.getBlock() instanceof BedBlock) {
|
||||
Direction direction = blockState.getValue(BedBlock.FACING);
|
||||
- this.level().setBlock(blockPos, blockState.setValue(BedBlock.OCCUPIED, Boolean.valueOf(false)), 3);
|
||||
+ this.level().setBlock(blockPos, blockState.setValue(BedBlock.OCCUPIED, false), 3);
|
||||
Vec3 vec31 = BedBlock.findStandUpPosition(this.getType(), this.level(), blockPos, direction, this.getYRot()).orElseGet(() -> {
|
||||
BlockPos blockPos1 = blockPos.above();
|
||||
return new Vec3(blockPos1.getX() + 0.5, blockPos1.getY() + 0.1, blockPos1.getZ() + 0.5);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/entity/ai/village/poi/PoiSection.java
|
||||
+++ b/net/minecraft/world/entity/ai/village/poi/PoiSection.java
|
||||
@@ -158,7 +_,7 @@
|
||||
public record Packed(boolean isValid, List<PoiRecord.Packed> records) {
|
||||
public static final Codec<PoiSection.Packed> CODEC = RecordCodecBuilder.create(
|
||||
instance -> instance.group(
|
||||
- Codec.BOOL.lenientOptionalFieldOf("Valid", Boolean.valueOf(false)).forGetter(PoiSection.Packed::isValid),
|
||||
+ Codec.BOOL.lenientOptionalFieldOf("Valid", false).forGetter(PoiSection.Packed::isValid),
|
||||
PoiRecord.Packed.CODEC.listOf().fieldOf("Records").forGetter(PoiSection.Packed::records)
|
||||
)
|
||||
.apply(instance, PoiSection.Packed::new)
|
||||
@@ -0,0 +1,26 @@
|
||||
--- a/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -784,7 +_,7 @@
|
||||
|
||||
public static boolean attractsBees(BlockState state) {
|
||||
return state.is(BlockTags.BEE_ATTRACTIVE)
|
||||
- && !state.getValueOrElse(BlockStateProperties.WATERLOGGED, Boolean.valueOf(false))
|
||||
+ && !state.getValueOrElse(BlockStateProperties.WATERLOGGED, false)
|
||||
&& (!state.is(Blocks.SUNFLOWER) || state.getValue(DoublePlantBlock.HALF) == DoubleBlockHalf.UPPER);
|
||||
}
|
||||
|
||||
@@ -1080,12 +_,12 @@
|
||||
} else if (block instanceof StemBlock) {
|
||||
int ageValue = blockState.getValue(StemBlock.AGE);
|
||||
if (ageValue < 7) {
|
||||
- blockState1 = blockState.setValue(StemBlock.AGE, Integer.valueOf(ageValue + 1));
|
||||
+ blockState1 = blockState.setValue(StemBlock.AGE, ageValue + 1);
|
||||
}
|
||||
} else if (blockState.is(Blocks.SWEET_BERRY_BUSH)) {
|
||||
int ageValue = blockState.getValue(SweetBerryBushBlock.AGE);
|
||||
if (ageValue < 3) {
|
||||
- blockState1 = blockState.setValue(SweetBerryBushBlock.AGE, Integer.valueOf(ageValue + 1));
|
||||
+ blockState1 = blockState.setValue(SweetBerryBushBlock.AGE, ageValue + 1);
|
||||
}
|
||||
} else if (blockState.is(Blocks.CAVE_VINES) || blockState.is(Blocks.CAVE_VINES_PLANT)) {
|
||||
BonemealableBlock bonemealableBlock = (BonemealableBlock)blockState.getBlock();
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/world/entity/animal/Fox.java
|
||||
+++ b/net/minecraft/world/entity/animal/Fox.java
|
||||
@@ -1068,7 +_,7 @@
|
||||
|
||||
private void pickSweetBerries(BlockState state) {
|
||||
int ageValue = state.getValue(SweetBerryBushBlock.AGE);
|
||||
- state.setValue(SweetBerryBushBlock.AGE, Integer.valueOf(1));
|
||||
+ state.setValue(SweetBerryBushBlock.AGE, 1);
|
||||
if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(Fox.this, this.blockPos, state.setValue(SweetBerryBushBlock.AGE, 1))) return; // CraftBukkit - call EntityChangeBlockEvent
|
||||
int i = 1 + Fox.this.level().random.nextInt(2) + (ageValue == 3 ? 1 : 0);
|
||||
ItemStack itemBySlot = Fox.this.getItemBySlot(EquipmentSlot.MAINHAND);
|
||||
@@ -1082,7 +_,7 @@
|
||||
}
|
||||
|
||||
Fox.this.playSound(SoundEvents.SWEET_BERRY_BUSH_PICK_BERRIES, 1.0F, 1.0F);
|
||||
- Fox.this.level().setBlock(this.blockPos, state.setValue(SweetBerryBushBlock.AGE, Integer.valueOf(1)), 2);
|
||||
+ Fox.this.level().setBlock(this.blockPos, state.setValue(SweetBerryBushBlock.AGE, 1), 2);
|
||||
Fox.this.level().gameEvent(GameEvent.BLOCK_CHANGE, this.blockPos, GameEvent.Context.of(Fox.this));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/entity/animal/Rabbit.java
|
||||
+++ b/net/minecraft/world/entity/animal/Rabbit.java
|
||||
@@ -669,7 +_,7 @@
|
||||
level.destroyBlock(blockPos, true, this.rabbit);
|
||||
} else {
|
||||
if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.rabbit, blockPos, blockState.setValue(CarrotBlock.AGE, ageValue - 1))) return; // CraftBukkit // Paper - fix wrong block state
|
||||
- level.setBlock(blockPos, blockState.setValue(CarrotBlock.AGE, Integer.valueOf(ageValue - 1)), 2);
|
||||
+ level.setBlock(blockPos, blockState.setValue(CarrotBlock.AGE, ageValue - 1), 2);
|
||||
level.gameEvent(GameEvent.BLOCK_CHANGE, blockPos, GameEvent.Context.of(this.rabbit));
|
||||
level.levelEvent(2001, blockPos, Block.getId(blockState));
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -92,7 +_,7 @@
|
||||
pos.getY(),
|
||||
pos.getZ() + 0.5,
|
||||
blockState.hasProperty(BlockStateProperties.WATERLOGGED)
|
||||
- ? blockState.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(false))
|
||||
+ ? blockState.setValue(BlockStateProperties.WATERLOGGED, false)
|
||||
: blockState
|
||||
);
|
||||
if (!CraftEventFactory.callEntityChangeBlockEvent(fallingBlockEntity, pos, blockState.getFluidState().createLegacyBlock())) return fallingBlockEntity; // CraftBukkit
|
||||
@@ -202,7 +_,7 @@
|
||||
if (canBeReplaced && flag3) {
|
||||
if (this.blockState.hasProperty(BlockStateProperties.WATERLOGGED)
|
||||
&& this.level().getFluidState(blockPos).getType() == Fluids.WATER) {
|
||||
- this.blockState = this.blockState.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(true));
|
||||
+ this.blockState = this.blockState.setValue(BlockStateProperties.WATERLOGGED, true);
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/entity/monster/creaking/Creaking.java
|
||||
+++ b/net/minecraft/world/entity/monster/creaking/Creaking.java
|
||||
@@ -334,7 +_,7 @@
|
||||
);
|
||||
serverLevel.sendParticles(
|
||||
new BlockParticleOption(
|
||||
- ParticleTypes.BLOCK_CRUMBLE, Blocks.CREAKING_HEART.defaultBlockState().setValue(CreakingHeartBlock.ACTIVE, Boolean.valueOf(true))
|
||||
+ ParticleTypes.BLOCK_CRUMBLE, Blocks.CREAKING_HEART.defaultBlockState().setValue(CreakingHeartBlock.ACTIVE, true)
|
||||
),
|
||||
center.x,
|
||||
center.y,
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/world/entity/vehicle/MinecartFurnace.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/MinecartFurnace.java
|
||||
@@ -144,6 +_,6 @@
|
||||
|
||||
@Override
|
||||
public BlockState getDefaultDisplayBlockState() {
|
||||
- return Blocks.FURNACE.defaultBlockState().setValue(FurnaceBlock.FACING, Direction.NORTH).setValue(FurnaceBlock.LIT, Boolean.valueOf(this.hasFuel()));
|
||||
+ return Blocks.FURNACE.defaultBlockState().setValue(FurnaceBlock.FACING, Direction.NORTH).setValue(FurnaceBlock.LIT, this.hasFuel());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/food/FoodProperties.java
|
||||
+++ b/net/minecraft/world/food/FoodProperties.java
|
||||
@@ -22,7 +_,7 @@
|
||||
instance -> instance.group(
|
||||
ExtraCodecs.NON_NEGATIVE_INT.fieldOf("nutrition").forGetter(FoodProperties::nutrition),
|
||||
Codec.FLOAT.fieldOf("saturation").forGetter(FoodProperties::saturation),
|
||||
- Codec.BOOL.optionalFieldOf("can_always_eat", Boolean.valueOf(false)).forGetter(FoodProperties::canAlwaysEat)
|
||||
+ Codec.BOOL.optionalFieldOf("can_always_eat", false).forGetter(FoodProperties::canAlwaysEat)
|
||||
)
|
||||
.apply(instance, FoodProperties::new)
|
||||
);
|
||||
@@ -0,0 +1,25 @@
|
||||
--- a/net/minecraft/world/inventory/AnvilMenu.java
|
||||
+++ b/net/minecraft/world/inventory/AnvilMenu.java
|
||||
@@ -157,8 +_,7 @@
|
||||
ItemStack itemStack = item.copy();
|
||||
ItemStack item1 = this.inputSlots.getItem(1);
|
||||
ItemEnchantments.Mutable mutable = new ItemEnchantments.Mutable(EnchantmentHelper.getEnchantmentsForCrafting(itemStack));
|
||||
- l += (long)item.getOrDefault(DataComponents.REPAIR_COST, Integer.valueOf(0)).intValue()
|
||||
- + item1.getOrDefault(DataComponents.REPAIR_COST, Integer.valueOf(0)).intValue();
|
||||
+ l += (long) item.getOrDefault(DataComponents.REPAIR_COST, 0) + item1.getOrDefault(DataComponents.REPAIR_COST, 0);
|
||||
this.repairItemCountCost = 0;
|
||||
if (!item1.isEmpty()) {
|
||||
boolean hasStoredEnchantments = item1.has(DataComponents.STORED_ENCHANTMENTS);
|
||||
@@ -351,9 +_,9 @@
|
||||
}
|
||||
|
||||
if (!itemStack.isEmpty()) {
|
||||
- int minxx = itemStack.getOrDefault(DataComponents.REPAIR_COST, Integer.valueOf(0));
|
||||
- if (minxx < item1.getOrDefault(DataComponents.REPAIR_COST, Integer.valueOf(0))) {
|
||||
- minxx = item1.getOrDefault(DataComponents.REPAIR_COST, Integer.valueOf(0));
|
||||
+ int minxx = itemStack.getOrDefault(DataComponents.REPAIR_COST, 0);
|
||||
+ if (minxx < item1.getOrDefault(DataComponents.REPAIR_COST, 0)) {
|
||||
+ minxx = item1.getOrDefault(DataComponents.REPAIR_COST, 0);
|
||||
}
|
||||
|
||||
if (i1 != i || i1 == 0) {
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/AdventureModePredicate.java
|
||||
+++ b/net/minecraft/world/item/AdventureModePredicate.java
|
||||
@@ -27,7 +_,7 @@
|
||||
ExtraCodecs.nonEmptyList(BlockPredicate.CODEC.listOf())
|
||||
.fieldOf("predicates")
|
||||
.forGetter(adventureModePredicate -> adventureModePredicate.predicates),
|
||||
- Codec.BOOL.optionalFieldOf("show_in_tooltip", Boolean.valueOf(true)).forGetter(AdventureModePredicate::showInTooltip)
|
||||
+ Codec.BOOL.optionalFieldOf("show_in_tooltip", true).forGetter(AdventureModePredicate::showInTooltip)
|
||||
)
|
||||
.apply(instance, AdventureModePredicate::new)
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/EnderEyeItem.java
|
||||
+++ b/net/minecraft/world/item/EnderEyeItem.java
|
||||
@@ -41,7 +_,7 @@
|
||||
} else if (level.isClientSide) {
|
||||
return InteractionResult.SUCCESS;
|
||||
} else {
|
||||
- BlockState blockState1 = blockState.setValue(EndPortalFrameBlock.HAS_EYE, Boolean.valueOf(true));
|
||||
+ BlockState blockState1 = blockState.setValue(EndPortalFrameBlock.HAS_EYE, true);
|
||||
// Paper start
|
||||
if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(context.getPlayer(), clickedPos, blockState1)) {
|
||||
return InteractionResult.PASS;
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/FireChargeItem.java
|
||||
+++ b/net/minecraft/world/item/FireChargeItem.java
|
||||
@@ -58,7 +_,7 @@
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.playSound(level, clickedPos);
|
||||
- level.setBlockAndUpdate(clickedPos, blockState.setValue(BlockStateProperties.LIT, Boolean.valueOf(true)));
|
||||
+ level.setBlockAndUpdate(clickedPos, blockState.setValue(BlockStateProperties.LIT, true));
|
||||
level.gameEvent(context.getPlayer(), GameEvent.BLOCK_CHANGE, clickedPos);
|
||||
flag = true;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/FlintAndSteelItem.java
|
||||
+++ b/net/minecraft/world/item/FlintAndSteelItem.java
|
||||
@@ -60,7 +_,7 @@
|
||||
}
|
||||
// CraftBukkit end
|
||||
level.playSound(player, clickedPos, SoundEvents.FLINTANDSTEEL_USE, SoundSource.BLOCKS, 1.0F, level.getRandom().nextFloat() * 0.4F + 0.8F);
|
||||
- level.setBlock(clickedPos, blockState.setValue(BlockStateProperties.LIT, Boolean.valueOf(true)), 11);
|
||||
+ level.setBlock(clickedPos, blockState.setValue(BlockStateProperties.LIT, true), 11);
|
||||
level.gameEvent(player, GameEvent.BLOCK_CHANGE, clickedPos);
|
||||
if (player != null) {
|
||||
context.getItemInHand().hurtAndBreak(1, player, LivingEntity.getSlotForHand(context.getHand()));
|
||||
@@ -0,0 +1,29 @@
|
||||
--- a/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/net/minecraft/world/item/ItemStack.java
|
||||
@@ -614,7 +_,7 @@
|
||||
}
|
||||
|
||||
public int getMaxStackSize() {
|
||||
- return this.getOrDefault(DataComponents.MAX_STACK_SIZE, Integer.valueOf(1));
|
||||
+ return this.getOrDefault(DataComponents.MAX_STACK_SIZE, 1);
|
||||
}
|
||||
|
||||
public boolean isStackable() {
|
||||
@@ -650,7 +_,7 @@
|
||||
// Purpur end - Add option to mend the most damaged equipment first
|
||||
|
||||
public int getDamageValue() {
|
||||
- return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, Integer.valueOf(0)), 0, this.getMaxDamage());
|
||||
+ return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage());
|
||||
}
|
||||
|
||||
public void setDamageValue(int damage) {
|
||||
@@ -658,7 +_,7 @@
|
||||
}
|
||||
|
||||
public int getMaxDamage() {
|
||||
- return this.getOrDefault(DataComponents.MAX_DAMAGE, Integer.valueOf(0));
|
||||
+ return this.getOrDefault(DataComponents.MAX_DAMAGE, 0);
|
||||
}
|
||||
|
||||
public boolean isBroken() {
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/JukeboxPlayable.java
|
||||
+++ b/net/minecraft/world/item/JukeboxPlayable.java
|
||||
@@ -30,7 +_,7 @@
|
||||
public static final Codec<JukeboxPlayable> CODEC = RecordCodecBuilder.create(
|
||||
instance -> instance.group(
|
||||
EitherHolder.codec(Registries.JUKEBOX_SONG, JukeboxSong.CODEC).fieldOf("song").forGetter(JukeboxPlayable::song),
|
||||
- Codec.BOOL.optionalFieldOf("show_in_tooltip", Boolean.valueOf(true)).forGetter(JukeboxPlayable::showInTooltip)
|
||||
+ Codec.BOOL.optionalFieldOf("show_in_tooltip", true).forGetter(JukeboxPlayable::showInTooltip)
|
||||
)
|
||||
.apply(instance, JukeboxPlayable::new)
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/ShovelItem.java
|
||||
+++ b/net/minecraft/world/item/ShovelItem.java
|
||||
@@ -61,7 +_,7 @@
|
||||
|
||||
CampfireBlock.dowse(context.getPlayer(), level, clickedPos, blockState);
|
||||
}; // Paper
|
||||
- blockState2 = blockState.setValue(CampfireBlock.LIT, Boolean.valueOf(false));
|
||||
+ blockState2 = blockState.setValue(CampfireBlock.LIT, false);
|
||||
}
|
||||
|
||||
if (blockState2 != null) {
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/component/Consumable.java
|
||||
+++ b/net/minecraft/world/item/component/Consumable.java
|
||||
@@ -40,7 +_,7 @@
|
||||
ExtraCodecs.NON_NEGATIVE_FLOAT.optionalFieldOf("consume_seconds", 1.6F).forGetter(Consumable::consumeSeconds),
|
||||
ItemUseAnimation.CODEC.optionalFieldOf("animation", ItemUseAnimation.EAT).forGetter(Consumable::animation),
|
||||
SoundEvent.CODEC.optionalFieldOf("sound", SoundEvents.GENERIC_EAT).forGetter(Consumable::sound),
|
||||
- Codec.BOOL.optionalFieldOf("has_consume_particles", Boolean.valueOf(true)).forGetter(Consumable::hasConsumeParticles),
|
||||
+ Codec.BOOL.optionalFieldOf("has_consume_particles", true).forGetter(Consumable::hasConsumeParticles),
|
||||
ConsumeEffect.CODEC.listOf().optionalFieldOf("on_consume_effects", List.of()).forGetter(Consumable::onConsumeEffects)
|
||||
)
|
||||
.apply(instance, Consumable::new)
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/component/DyedItemColor.java
|
||||
+++ b/net/minecraft/world/item/component/DyedItemColor.java
|
||||
@@ -22,7 +_,7 @@
|
||||
private static final Codec<DyedItemColor> FULL_CODEC = RecordCodecBuilder.create(
|
||||
instance -> instance.group(
|
||||
Codec.INT.fieldOf("rgb").forGetter(DyedItemColor::rgb),
|
||||
- Codec.BOOL.optionalFieldOf("show_in_tooltip", Boolean.valueOf(true)).forGetter(DyedItemColor::showInTooltip)
|
||||
+ Codec.BOOL.optionalFieldOf("show_in_tooltip", true).forGetter(DyedItemColor::showInTooltip)
|
||||
)
|
||||
.apply(instance, DyedItemColor::new)
|
||||
);
|
||||
@@ -0,0 +1,13 @@
|
||||
--- a/net/minecraft/world/item/component/FireworkExplosion.java
|
||||
+++ b/net/minecraft/world/item/component/FireworkExplosion.java
|
||||
@@ -29,8 +_,8 @@
|
||||
FireworkExplosion.Shape.CODEC.fieldOf("shape").forGetter(FireworkExplosion::shape),
|
||||
COLOR_LIST_CODEC.optionalFieldOf("colors", IntList.of()).forGetter(FireworkExplosion::colors),
|
||||
COLOR_LIST_CODEC.optionalFieldOf("fade_colors", IntList.of()).forGetter(FireworkExplosion::fadeColors),
|
||||
- Codec.BOOL.optionalFieldOf("has_trail", Boolean.valueOf(false)).forGetter(FireworkExplosion::hasTrail),
|
||||
- Codec.BOOL.optionalFieldOf("has_twinkle", Boolean.valueOf(false)).forGetter(FireworkExplosion::hasTwinkle)
|
||||
+ Codec.BOOL.optionalFieldOf("has_trail", false).forGetter(FireworkExplosion::hasTrail),
|
||||
+ Codec.BOOL.optionalFieldOf("has_twinkle", false).forGetter(FireworkExplosion::hasTwinkle)
|
||||
)
|
||||
.apply(instance, FireworkExplosion::new)
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/component/ItemAttributeModifiers.java
|
||||
+++ b/net/minecraft/world/item/component/ItemAttributeModifiers.java
|
||||
@@ -24,7 +_,7 @@
|
||||
private static final Codec<ItemAttributeModifiers> FULL_CODEC = RecordCodecBuilder.create(
|
||||
instance -> instance.group(
|
||||
ItemAttributeModifiers.Entry.CODEC.listOf().fieldOf("modifiers").forGetter(ItemAttributeModifiers::modifiers),
|
||||
- Codec.BOOL.optionalFieldOf("show_in_tooltip", Boolean.valueOf(true)).forGetter(ItemAttributeModifiers::showInTooltip)
|
||||
+ Codec.BOOL.optionalFieldOf("show_in_tooltip", true).forGetter(ItemAttributeModifiers::showInTooltip)
|
||||
)
|
||||
.apply(instance, ItemAttributeModifiers::new)
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/component/LodestoneTracker.java
|
||||
+++ b/net/minecraft/world/item/component/LodestoneTracker.java
|
||||
@@ -15,7 +_,7 @@
|
||||
public static final Codec<LodestoneTracker> CODEC = RecordCodecBuilder.create(
|
||||
instance -> instance.group(
|
||||
GlobalPos.CODEC.optionalFieldOf("target").forGetter(LodestoneTracker::target),
|
||||
- Codec.BOOL.optionalFieldOf("tracked", Boolean.valueOf(true)).forGetter(LodestoneTracker::tracked)
|
||||
+ Codec.BOOL.optionalFieldOf("tracked", true).forGetter(LodestoneTracker::tracked)
|
||||
)
|
||||
.apply(instance, LodestoneTracker::new)
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/component/SeededContainerLoot.java
|
||||
+++ b/net/minecraft/world/item/component/SeededContainerLoot.java
|
||||
@@ -10,7 +_,7 @@
|
||||
public static final Codec<SeededContainerLoot> CODEC = RecordCodecBuilder.create(
|
||||
instance -> instance.group(
|
||||
ResourceKey.codec(Registries.LOOT_TABLE).fieldOf("loot_table").forGetter(SeededContainerLoot::lootTable),
|
||||
- Codec.LONG.optionalFieldOf("seed", Long.valueOf(0L)).forGetter(SeededContainerLoot::seed)
|
||||
+ Codec.LONG.optionalFieldOf("seed", 0L).forGetter(SeededContainerLoot::seed)
|
||||
)
|
||||
.apply(instance, SeededContainerLoot::new)
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/component/SuspiciousStewEffects.java
|
||||
+++ b/net/minecraft/world/item/component/SuspiciousStewEffects.java
|
||||
@@ -67,7 +_,7 @@
|
||||
public static final Codec<SuspiciousStewEffects.Entry> CODEC = RecordCodecBuilder.create(
|
||||
instance -> instance.group(
|
||||
MobEffect.CODEC.fieldOf("id").forGetter(SuspiciousStewEffects.Entry::effect),
|
||||
- Codec.INT.lenientOptionalFieldOf("duration", Integer.valueOf(160)).forGetter(SuspiciousStewEffects.Entry::duration)
|
||||
+ Codec.INT.lenientOptionalFieldOf("duration", 160).forGetter(SuspiciousStewEffects.Entry::duration)
|
||||
)
|
||||
.apply(instance, SuspiciousStewEffects.Entry::new)
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/component/Tool.java
|
||||
+++ b/net/minecraft/world/item/component/Tool.java
|
||||
@@ -18,7 +_,7 @@
|
||||
public static final Codec<Tool> CODEC = RecordCodecBuilder.create(
|
||||
instance -> instance.group(
|
||||
Tool.Rule.CODEC.listOf().fieldOf("rules").forGetter(Tool::rules),
|
||||
- Codec.FLOAT.optionalFieldOf("default_mining_speed", Float.valueOf(1.0F)).forGetter(Tool::defaultMiningSpeed),
|
||||
+ Codec.FLOAT.optionalFieldOf("default_mining_speed", 1.0F).forGetter(Tool::defaultMiningSpeed),
|
||||
ExtraCodecs.NON_NEGATIVE_INT.optionalFieldOf("damage_per_block", 1).forGetter(Tool::damagePerBlock)
|
||||
)
|
||||
.apply(instance, Tool::new)
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/component/Unbreakable.java
|
||||
+++ b/net/minecraft/world/item/component/Unbreakable.java
|
||||
@@ -13,7 +_,7 @@
|
||||
|
||||
public record Unbreakable(boolean showInTooltip) implements TooltipProvider {
|
||||
public static final Codec<Unbreakable> CODEC = RecordCodecBuilder.create(
|
||||
- instance -> instance.group(Codec.BOOL.optionalFieldOf("show_in_tooltip", Boolean.valueOf(true)).forGetter(Unbreakable::showInTooltip))
|
||||
+ instance -> instance.group(Codec.BOOL.optionalFieldOf("show_in_tooltip", true).forGetter(Unbreakable::showInTooltip))
|
||||
.apply(instance, Unbreakable::new)
|
||||
);
|
||||
public static final StreamCodec<ByteBuf, Unbreakable> STREAM_CODEC = ByteBufCodecs.BOOL.map(Unbreakable::new, Unbreakable::showInTooltip);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/component/WrittenBookContent.java
|
||||
+++ b/net/minecraft/world/item/component/WrittenBookContent.java
|
||||
@@ -36,7 +_,7 @@
|
||||
Codec.STRING.fieldOf("author").forGetter(WrittenBookContent::author),
|
||||
ExtraCodecs.intRange(0, 3).optionalFieldOf("generation", 0).forGetter(WrittenBookContent::generation),
|
||||
PAGES_CODEC.optionalFieldOf("pages", List.of()).forGetter(WrittenBookContent::pages),
|
||||
- Codec.BOOL.optionalFieldOf("resolved", Boolean.valueOf(false)).forGetter(WrittenBookContent::resolved)
|
||||
+ Codec.BOOL.optionalFieldOf("resolved", false).forGetter(WrittenBookContent::resolved)
|
||||
)
|
||||
.apply(instance, WrittenBookContent::new)
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/crafting/ShapedRecipe.java
|
||||
+++ b/net/minecraft/world/item/crafting/ShapedRecipe.java
|
||||
@@ -172,7 +_,7 @@
|
||||
CraftingBookCategory.CODEC.fieldOf("category").orElse(CraftingBookCategory.MISC).forGetter(shapedRecipe -> shapedRecipe.category),
|
||||
ShapedRecipePattern.MAP_CODEC.forGetter(shapedRecipe -> shapedRecipe.pattern),
|
||||
ItemStack.STRICT_CODEC.fieldOf("result").forGetter(shapedRecipe -> shapedRecipe.result),
|
||||
- Codec.BOOL.optionalFieldOf("show_notification", Boolean.valueOf(true)).forGetter(shapedRecipe -> shapedRecipe.showNotification)
|
||||
+ Codec.BOOL.optionalFieldOf("show_notification", true).forGetter(shapedRecipe -> shapedRecipe.showNotification)
|
||||
)
|
||||
.apply(instance, ShapedRecipe::new)
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/enchantment/ItemEnchantments.java
|
||||
+++ b/net/minecraft/world/item/enchantment/ItemEnchantments.java
|
||||
@@ -44,7 +_,7 @@
|
||||
private static final Codec<ItemEnchantments> FULL_CODEC = RecordCodecBuilder.create(
|
||||
instance -> instance.group(
|
||||
LEVELS_CODEC.fieldOf("levels").forGetter(itemEnchantments -> itemEnchantments.enchantments),
|
||||
- Codec.BOOL.optionalFieldOf("show_in_tooltip", Boolean.valueOf(true)).forGetter(itemEnchantments -> itemEnchantments.showInTooltip)
|
||||
+ Codec.BOOL.optionalFieldOf("show_in_tooltip", true).forGetter(itemEnchantments -> itemEnchantments.showInTooltip)
|
||||
)
|
||||
.apply(instance, ItemEnchantments::new)
|
||||
);
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/net/minecraft/world/item/enchantment/effects/ExplodeEffect.java
|
||||
+++ b/net/minecraft/world/item/enchantment/effects/ExplodeEffect.java
|
||||
@@ -38,13 +_,13 @@
|
||||
) implements EnchantmentEntityEffect {
|
||||
public static final MapCodec<ExplodeEffect> CODEC = RecordCodecBuilder.mapCodec(
|
||||
instance -> instance.group(
|
||||
- Codec.BOOL.optionalFieldOf("attribute_to_user", Boolean.valueOf(false)).forGetter(ExplodeEffect::attributeToUser),
|
||||
+ Codec.BOOL.optionalFieldOf("attribute_to_user", false).forGetter(ExplodeEffect::attributeToUser),
|
||||
DamageType.CODEC.optionalFieldOf("damage_type").forGetter(ExplodeEffect::damageType),
|
||||
LevelBasedValue.CODEC.optionalFieldOf("knockback_multiplier").forGetter(ExplodeEffect::knockbackMultiplier),
|
||||
RegistryCodecs.homogeneousList(Registries.BLOCK).optionalFieldOf("immune_blocks").forGetter(ExplodeEffect::immuneBlocks),
|
||||
Vec3.CODEC.optionalFieldOf("offset", Vec3.ZERO).forGetter(ExplodeEffect::offset),
|
||||
LevelBasedValue.CODEC.fieldOf("radius").forGetter(ExplodeEffect::radius),
|
||||
- Codec.BOOL.optionalFieldOf("create_fire", Boolean.valueOf(false)).forGetter(ExplodeEffect::createFire),
|
||||
+ Codec.BOOL.optionalFieldOf("create_fire", false).forGetter(ExplodeEffect::createFire),
|
||||
Level.ExplosionInteraction.CODEC.fieldOf("block_interaction").forGetter(ExplodeEffect::blockInteraction),
|
||||
ParticleTypes.CODEC.fieldOf("small_particle").forGetter(ExplodeEffect::smallParticle),
|
||||
ParticleTypes.CODEC.fieldOf("large_particle").forGetter(ExplodeEffect::largeParticle),
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/world/item/enchantment/effects/SpawnParticlesEffect.java
|
||||
+++ b/net/minecraft/world/item/enchantment/effects/SpawnParticlesEffect.java
|
||||
@@ -80,7 +_,7 @@
|
||||
public static final MapCodec<SpawnParticlesEffect.PositionSource> CODEC = RecordCodecBuilder.<SpawnParticlesEffect.PositionSource>mapCodec(
|
||||
instance -> instance.group(
|
||||
SpawnParticlesEffect.PositionSourceType.CODEC.fieldOf("type").forGetter(SpawnParticlesEffect.PositionSource::type),
|
||||
- Codec.FLOAT.optionalFieldOf("offset", Float.valueOf(0.0F)).forGetter(SpawnParticlesEffect.PositionSource::offset),
|
||||
+ Codec.FLOAT.optionalFieldOf("offset", 0.0F).forGetter(SpawnParticlesEffect.PositionSource::offset),
|
||||
ExtraCodecs.POSITIVE_FLOAT.optionalFieldOf("scale", 1.0F).forGetter(SpawnParticlesEffect.PositionSource::scale)
|
||||
)
|
||||
.apply(instance, SpawnParticlesEffect.PositionSource::new)
|
||||
@@ -127,7 +_,7 @@
|
||||
public record VelocitySource(float movementScale, FloatProvider base) {
|
||||
public static final MapCodec<SpawnParticlesEffect.VelocitySource> CODEC = RecordCodecBuilder.mapCodec(
|
||||
instance -> instance.group(
|
||||
- Codec.FLOAT.optionalFieldOf("movement_scale", Float.valueOf(0.0F)).forGetter(SpawnParticlesEffect.VelocitySource::movementScale),
|
||||
+ Codec.FLOAT.optionalFieldOf("movement_scale", 0.0F).forGetter(SpawnParticlesEffect.VelocitySource::movementScale),
|
||||
FloatProvider.CODEC.optionalFieldOf("base", ConstantFloat.ZERO).forGetter(SpawnParticlesEffect.VelocitySource::base)
|
||||
)
|
||||
.apply(instance, SpawnParticlesEffect.VelocitySource::new)
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
|
||||
+++ b/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
|
||||
@@ -23,7 +_,7 @@
|
||||
public static final MapCodec<SummonEntityEffect> CODEC = RecordCodecBuilder.mapCodec(
|
||||
instance -> instance.group(
|
||||
RegistryCodecs.homogeneousList(Registries.ENTITY_TYPE).fieldOf("entity").forGetter(SummonEntityEffect::entityTypes),
|
||||
- Codec.BOOL.optionalFieldOf("join_team", Boolean.valueOf(false)).forGetter(SummonEntityEffect::joinTeam)
|
||||
+ Codec.BOOL.optionalFieldOf("join_team", false).forGetter(SummonEntityEffect::joinTeam)
|
||||
)
|
||||
.apply(instance, SummonEntityEffect::new)
|
||||
);
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/world/item/equipment/Equippable.java
|
||||
+++ b/net/minecraft/world/item/equipment/Equippable.java
|
||||
@@ -41,9 +_,9 @@
|
||||
ResourceKey.codec(EquipmentAssets.ROOT_ID).optionalFieldOf("asset_id").forGetter(Equippable::assetId),
|
||||
ResourceLocation.CODEC.optionalFieldOf("camera_overlay").forGetter(Equippable::cameraOverlay),
|
||||
RegistryCodecs.homogeneousList(Registries.ENTITY_TYPE).optionalFieldOf("allowed_entities").forGetter(Equippable::allowedEntities),
|
||||
- Codec.BOOL.optionalFieldOf("dispensable", Boolean.valueOf(true)).forGetter(Equippable::dispensable),
|
||||
- Codec.BOOL.optionalFieldOf("swappable", Boolean.valueOf(true)).forGetter(Equippable::swappable),
|
||||
- Codec.BOOL.optionalFieldOf("damage_on_hurt", Boolean.valueOf(true)).forGetter(Equippable::damageOnHurt)
|
||||
+ Codec.BOOL.optionalFieldOf("dispensable", true).forGetter(Equippable::dispensable),
|
||||
+ Codec.BOOL.optionalFieldOf("swappable", true).forGetter(Equippable::swappable),
|
||||
+ Codec.BOOL.optionalFieldOf("damage_on_hurt", true).forGetter(Equippable::damageOnHurt)
|
||||
)
|
||||
.apply(instance, Equippable::new)
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/item/equipment/trim/ArmorTrim.java
|
||||
+++ b/net/minecraft/world/item/equipment/trim/ArmorTrim.java
|
||||
@@ -21,7 +_,7 @@
|
||||
instance -> instance.group(
|
||||
TrimMaterial.CODEC.fieldOf("material").forGetter(ArmorTrim::material),
|
||||
TrimPattern.CODEC.fieldOf("pattern").forGetter(ArmorTrim::pattern),
|
||||
- Codec.BOOL.optionalFieldOf("show_in_tooltip", Boolean.valueOf(true)).forGetter(trim -> trim.showInTooltip)
|
||||
+ Codec.BOOL.optionalFieldOf("show_in_tooltip", true).forGetter(trim -> trim.showInTooltip)
|
||||
)
|
||||
.apply(instance, ArmorTrim::new)
|
||||
);
|
||||
@@ -0,0 +1,23 @@
|
||||
--- a/net/minecraft/world/item/trading/MerchantOffer.java
|
||||
+++ b/net/minecraft/world/item/trading/MerchantOffer.java
|
||||
@@ -14,13 +_,13 @@
|
||||
ItemCost.CODEC.fieldOf("buy").forGetter(merchantOffer -> merchantOffer.baseCostA),
|
||||
ItemCost.CODEC.lenientOptionalFieldOf("buyB").forGetter(merchantOffer -> merchantOffer.costB),
|
||||
ItemStack.CODEC.fieldOf("sell").forGetter(merchantOffer -> merchantOffer.result),
|
||||
- Codec.INT.lenientOptionalFieldOf("uses", Integer.valueOf(0)).forGetter(merchantOffer -> merchantOffer.uses),
|
||||
- Codec.INT.lenientOptionalFieldOf("maxUses", Integer.valueOf(4)).forGetter(merchantOffer -> merchantOffer.maxUses),
|
||||
- Codec.BOOL.lenientOptionalFieldOf("rewardExp", Boolean.valueOf(true)).forGetter(merchantOffer -> merchantOffer.rewardExp),
|
||||
- Codec.INT.lenientOptionalFieldOf("specialPrice", Integer.valueOf(0)).forGetter(merchantOffer -> merchantOffer.specialPriceDiff),
|
||||
- Codec.INT.lenientOptionalFieldOf("demand", Integer.valueOf(0)).forGetter(merchantOffer -> merchantOffer.demand),
|
||||
- Codec.FLOAT.lenientOptionalFieldOf("priceMultiplier", Float.valueOf(0.0F)).forGetter(merchantOffer -> merchantOffer.priceMultiplier),
|
||||
- Codec.INT.lenientOptionalFieldOf("xp", Integer.valueOf(1)).forGetter(merchantOffer -> merchantOffer.xp)
|
||||
+ Codec.INT.lenientOptionalFieldOf("uses", 0).forGetter(merchantOffer -> merchantOffer.uses),
|
||||
+ Codec.INT.lenientOptionalFieldOf("maxUses", 4).forGetter(merchantOffer -> merchantOffer.maxUses),
|
||||
+ Codec.BOOL.lenientOptionalFieldOf("rewardExp", true).forGetter(merchantOffer -> merchantOffer.rewardExp),
|
||||
+ Codec.INT.lenientOptionalFieldOf("specialPrice", 0).forGetter(merchantOffer -> merchantOffer.specialPriceDiff),
|
||||
+ Codec.INT.lenientOptionalFieldOf("demand", 0).forGetter(merchantOffer -> merchantOffer.demand),
|
||||
+ Codec.FLOAT.lenientOptionalFieldOf("priceMultiplier", 0.0F).forGetter(merchantOffer -> merchantOffer.priceMultiplier),
|
||||
+ Codec.INT.lenientOptionalFieldOf("xp", 1).forGetter(merchantOffer -> merchantOffer.xp)
|
||||
, Codec.BOOL.lenientOptionalFieldOf("Paper.IgnoreDiscounts", false).forGetter(merchantOffer -> merchantOffer.ignoreDiscounts) // Paper
|
||||
)
|
||||
.apply(instance, MerchantOffer::new)
|
||||
@@ -1,5 +1,32 @@
|
||||
--- a/net/minecraft/world/level/ServerExplosion.java
|
||||
+++ b/net/minecraft/world/level/ServerExplosion.java
|
||||
@@ -101,7 +_,7 @@
|
||||
|
||||
// resistance = (res + 0.3F) * 0.3F;
|
||||
// so for resistance = 0, we need res = -0.3F
|
||||
- private static final Float ZERO_RESISTANCE = Float.valueOf(-0.3f);
|
||||
+ private static final Float ZERO_RESISTANCE = -0.3f;
|
||||
private it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<ca.spottedleaf.moonrise.patches.collisions.ExplosionBlockCache> blockCache = null;
|
||||
private long[] chunkPosCache = null;
|
||||
private net.minecraft.world.level.chunk.LevelChunk[] chunkCache = null;
|
||||
@@ -137,7 +_,7 @@
|
||||
|
||||
ret = new ca.spottedleaf.moonrise.patches.collisions.ExplosionBlockCache(
|
||||
key, pos, blockState, fluidState,
|
||||
- (resistance.orElse(ZERO_RESISTANCE).floatValue() + 0.3f) * 0.3f,
|
||||
+ (resistance.orElse(ZERO_RESISTANCE) + 0.3f) * 0.3f,
|
||||
false
|
||||
);
|
||||
}
|
||||
@@ -446,7 +_,7 @@
|
||||
// note: we expect shouldBlockExplode to be pure with respect to power, as Vanilla currently is.
|
||||
// basically, it is unused, which allows us to cache the result
|
||||
final boolean shouldExplode = iblockdata.isDestroyable() && this.damageCalculator.shouldBlockExplode((Explosion)(Object)this, this.level, cachedBlock.immutablePos, cachedBlock.blockState, power); // Paper - Protect Bedrock and End Portal/Frames from being destroyed
|
||||
- cachedBlock.shouldExplode = shouldExplode ? Boolean.TRUE : Boolean.FALSE;
|
||||
+ cachedBlock.shouldExplode = shouldExplode ? true : false;
|
||||
if (shouldExplode) {
|
||||
if (this.fire || !cachedBlock.blockState.isAir()) {
|
||||
ret.add(cachedBlock.immutablePos);
|
||||
@@ -791,10 +_,10 @@
|
||||
return this.getSeenFraction(vec3d, entity, this.directMappedBlockCache, this.mutablePos); // Paper - collision optimisations
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/level/block/AbstractCandleBlock.java
|
||||
+++ b/net/minecraft/world/level/block/AbstractCandleBlock.java
|
||||
@@ -100,7 +_,7 @@
|
||||
}
|
||||
|
||||
private static void setLit(LevelAccessor level, BlockState state, BlockPos pos, boolean lit) {
|
||||
- level.setBlock(pos, state.setValue(LIT, Boolean.valueOf(lit)), 11);
|
||||
+ level.setBlock(pos, state.setValue(LIT, lit), 11);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/level/block/AbstractFurnaceBlock.java
|
||||
+++ b/net/minecraft/world/level/block/AbstractFurnaceBlock.java
|
||||
@@ -30,7 +_,7 @@
|
||||
|
||||
protected AbstractFurnaceBlock(BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(LIT, Boolean.valueOf(false)));
|
||||
+ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(LIT, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,29 @@
|
||||
--- a/net/minecraft/world/level/block/AbstractSkullBlock.java
|
||||
+++ b/net/minecraft/world/level/block/AbstractSkullBlock.java
|
||||
@@ -24,7 +_,7 @@
|
||||
public AbstractSkullBlock(SkullBlock.Type type, BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
this.type = type;
|
||||
- this.registerDefaultState(this.stateDefinition.any().setValue(POWERED, Boolean.valueOf(false)));
|
||||
+ this.registerDefaultState(this.stateDefinition.any().setValue(POWERED, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -67,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||
- return this.defaultBlockState().setValue(POWERED, Boolean.valueOf(context.getLevel().hasNeighborSignal(context.getClickedPos())));
|
||||
+ return this.defaultBlockState().setValue(POWERED, context.getLevel().hasNeighborSignal(context.getClickedPos()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -75,7 +_,7 @@
|
||||
if (!level.isClientSide) {
|
||||
boolean hasNeighborSignal = level.hasNeighborSignal(pos);
|
||||
if (hasNeighborSignal != state.getValue(POWERED)) {
|
||||
- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(hasNeighborSignal)), 2);
|
||||
+ level.setBlock(pos, state.setValue(POWERED, hasNeighborSignal), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/world/level/block/AmethystClusterBlock.java
|
||||
+++ b/net/minecraft/world/level/block/AmethystClusterBlock.java
|
||||
@@ -50,7 +_,7 @@
|
||||
|
||||
public AmethystClusterBlock(float height, float aabbOffset, BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
- this.registerDefaultState(this.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(false)).setValue(FACING, Direction.UP));
|
||||
+ this.registerDefaultState(this.defaultBlockState().setValue(WATERLOGGED, false).setValue(FACING, Direction.UP));
|
||||
this.upAabb = Block.box(aabbOffset, 0.0, aabbOffset, 16.0F - aabbOffset, height, 16.0F - aabbOffset);
|
||||
this.downAabb = Block.box(aabbOffset, 16.0F - height, aabbOffset, 16.0F - aabbOffset, 16.0, 16.0F - aabbOffset);
|
||||
this.northAabb = Block.box(aabbOffset, aabbOffset, 16.0F - height, 16.0F - aabbOffset, 16.0F - aabbOffset, 16.0);
|
||||
@@ -114,7 +_,7 @@
|
||||
LevelAccessor level = context.getLevel();
|
||||
BlockPos clickedPos = context.getClickedPos();
|
||||
return this.defaultBlockState()
|
||||
- .setValue(WATERLOGGED, Boolean.valueOf(level.getFluidState(clickedPos).getType() == Fluids.WATER))
|
||||
+ .setValue(WATERLOGGED, level.getFluidState(clickedPos).getType() == Fluids.WATER)
|
||||
.setValue(FACING, context.getClickedFace());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/level/block/AttachedStemBlock.java
|
||||
+++ b/net/minecraft/world/level/block/AttachedStemBlock.java
|
||||
@@ -84,7 +_,7 @@
|
||||
if (!neighborState.is(this.fruit) && direction == state.getValue(FACING)) {
|
||||
Optional<Block> optional = level.registryAccess().lookupOrThrow(Registries.BLOCK).getOptional(this.stem);
|
||||
if (optional.isPresent()) {
|
||||
- return optional.get().defaultBlockState().trySetValue(StemBlock.AGE, Integer.valueOf(7));
|
||||
+ return optional.get().defaultBlockState().trySetValue(StemBlock.AGE, 7);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
--- a/net/minecraft/world/level/block/BambooStalkBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BambooStalkBlock.java
|
||||
@@ -52,7 +_,7 @@
|
||||
public BambooStalkBlock(BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
this.registerDefaultState(
|
||||
- this.stateDefinition.any().setValue(AGE, Integer.valueOf(0)).setValue(LEAVES, BambooLeaves.NONE).setValue(STAGE, Integer.valueOf(0))
|
||||
+ this.stateDefinition.any().setValue(AGE, 0).setValue(LEAVES, BambooLeaves.NONE).setValue(STAGE, 0)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -99,10 +_,10 @@
|
||||
BlockState blockState = context.getLevel().getBlockState(context.getClickedPos().below());
|
||||
if (blockState.is(BlockTags.BAMBOO_PLANTABLE_ON)) {
|
||||
if (blockState.is(Blocks.BAMBOO_SAPLING)) {
|
||||
- return this.defaultBlockState().setValue(AGE, Integer.valueOf(0));
|
||||
+ return this.defaultBlockState().setValue(AGE, 0);
|
||||
} else if (blockState.is(Blocks.BAMBOO)) {
|
||||
int i = blockState.getValue(AGE) > 0 ? 1 : 0;
|
||||
- return this.defaultBlockState().setValue(AGE, Integer.valueOf(i));
|
||||
+ return this.defaultBlockState().setValue(AGE, i);
|
||||
} else {
|
||||
BlockState blockState1 = context.getLevel().getBlockState(context.getClickedPos().above());
|
||||
return blockState1.is(Blocks.BAMBOO)
|
||||
@@ -0,0 +1,35 @@
|
||||
--- a/net/minecraft/world/level/block/BannerBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BannerBlock.java
|
||||
@@ -37,7 +_,7 @@
|
||||
|
||||
public BannerBlock(DyeColor color, BlockBehaviour.Properties properties) {
|
||||
super(color, properties);
|
||||
- this.registerDefaultState(this.stateDefinition.any().setValue(ROTATION, Integer.valueOf(0)));
|
||||
+ this.registerDefaultState(this.stateDefinition.any().setValue(ROTATION, 0));
|
||||
BY_COLOR.put(color, this);
|
||||
}
|
||||
|
||||
@@ -53,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||
- return this.defaultBlockState().setValue(ROTATION, Integer.valueOf(RotationSegment.convertToSegment(context.getRotation() + 180.0F)));
|
||||
+ return this.defaultBlockState().setValue(ROTATION, RotationSegment.convertToSegment(context.getRotation() + 180.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -74,12 +_,12 @@
|
||||
|
||||
@Override
|
||||
protected BlockState rotate(BlockState state, Rotation rotation) {
|
||||
- return state.setValue(ROTATION, Integer.valueOf(rotation.rotate(state.getValue(ROTATION), 16)));
|
||||
+ return state.setValue(ROTATION, rotation.rotate(state.getValue(ROTATION), 16));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState mirror(BlockState state, Mirror mirror) {
|
||||
- return state.setValue(ROTATION, Integer.valueOf(mirror.mirror(state.getValue(ROTATION), 16)));
|
||||
+ return state.setValue(ROTATION, mirror.mirror(state.getValue(ROTATION), 16));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/level/block/BarrelBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BarrelBlock.java
|
||||
@@ -36,7 +_,7 @@
|
||||
|
||||
public BarrelBlock(BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(OPEN, Boolean.valueOf(false)));
|
||||
+ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(OPEN, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/world/level/block/BarrierBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BarrierBlock.java
|
||||
@@ -32,7 +_,7 @@
|
||||
|
||||
protected BarrierBlock(BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
- this.registerDefaultState(this.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(false)));
|
||||
+ this.registerDefaultState(this.defaultBlockState().setValue(WATERLOGGED, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -77,7 +_,7 @@
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||
return this.defaultBlockState()
|
||||
- .setValue(WATERLOGGED, Boolean.valueOf(context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER));
|
||||
+ .setValue(WATERLOGGED, context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java
|
||||
@@ -26,7 +_,7 @@
|
||||
|
||||
protected BaseCoralPlantTypeBlock(BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
- this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, Boolean.valueOf(true)));
|
||||
+ this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -57,7 +_,7 @@
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||
FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos());
|
||||
- return this.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(fluidState.is(FluidTags.WATER) && fluidState.getAmount() == 8));
|
||||
+ return this.defaultBlockState().setValue(WATERLOGGED, fluidState.is(FluidTags.WATER) && fluidState.getAmount() == 8);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/level/block/BaseCoralWallFanBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BaseCoralWallFanBlock.java
|
||||
@@ -43,7 +_,7 @@
|
||||
|
||||
protected BaseCoralWallFanBlock(BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
- this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, Boolean.valueOf(true)));
|
||||
+ this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/level/block/BaseRailBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BaseRailBlock.java
|
||||
@@ -143,7 +_,7 @@
|
||||
BlockState blockState = super.defaultBlockState();
|
||||
Direction horizontalDirection = context.getHorizontalDirection();
|
||||
boolean flag1 = horizontalDirection == Direction.EAST || horizontalDirection == Direction.WEST;
|
||||
- return blockState.setValue(this.getShapeProperty(), flag1 ? RailShape.EAST_WEST : RailShape.NORTH_SOUTH).setValue(WATERLOGGED, Boolean.valueOf(flag));
|
||||
+ return blockState.setValue(this.getShapeProperty(), flag1 ? RailShape.EAST_WEST : RailShape.NORTH_SOUTH).setValue(WATERLOGGED, flag);
|
||||
}
|
||||
|
||||
public abstract Property<RailShape> getShapeProperty();
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/level/block/BedBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BedBlock.java
|
||||
@@ -70,7 +_,7 @@
|
||||
public BedBlock(DyeColor color, BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
this.color = color;
|
||||
- this.registerDefaultState(this.stateDefinition.any().setValue(PART, BedPart.FOOT).setValue(OCCUPIED, Boolean.valueOf(false)));
|
||||
+ this.registerDefaultState(this.stateDefinition.any().setValue(PART, BedPart.FOOT).setValue(OCCUPIED, false));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
@@ -77,7 +_,7 @@
|
||||
|
||||
public BeehiveBlock(BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
- this.registerDefaultState(this.stateDefinition.any().setValue(HONEY_LEVEL, Integer.valueOf(0)).setValue(FACING, Direction.NORTH));
|
||||
+ this.registerDefaultState(this.stateDefinition.any().setValue(HONEY_LEVEL, 0).setValue(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -206,7 +_,7 @@
|
||||
}
|
||||
|
||||
public void resetHoneyLevel(Level level, BlockState state, BlockPos pos) {
|
||||
- level.setBlock(pos, state.setValue(HONEY_LEVEL, Integer.valueOf(0)), 3);
|
||||
+ level.setBlock(pos, state.setValue(HONEY_LEVEL, 0), 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/world/level/block/BellBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BellBlock.java
|
||||
@@ -67,7 +_,7 @@
|
||||
public BellBlock(BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
this.registerDefaultState(
|
||||
- this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(ATTACHMENT, BellAttachType.FLOOR).setValue(POWERED, Boolean.valueOf(false))
|
||||
+ this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(ATTACHMENT, BellAttachType.FLOOR).setValue(POWERED, false)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -79,7 +_,7 @@
|
||||
this.attemptToRing(level, pos, null);
|
||||
}
|
||||
|
||||
- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(hasNeighborSignal)), 3);
|
||||
+ level.setBlock(pos, state.setValue(POWERED, hasNeighborSignal), 3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
--- a/net/minecraft/world/level/block/BigDripleafBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BigDripleafBlock.java
|
||||
@@ -88,7 +_,7 @@
|
||||
protected BigDripleafBlock(BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
this.registerDefaultState(
|
||||
- this.stateDefinition.any().setValue(WATERLOGGED, Boolean.valueOf(false)).setValue(FACING, Direction.NORTH).setValue(TILT, Tilt.NONE)
|
||||
+ this.stateDefinition.any().setValue(WATERLOGGED, false).setValue(FACING, Direction.NORTH).setValue(TILT, Tilt.NONE)
|
||||
);
|
||||
this.shapesCache = this.getShapeForEachState(BigDripleafBlock::calculateShape);
|
||||
}
|
||||
@@ -129,7 +_,7 @@
|
||||
protected static boolean place(LevelAccessor level, BlockPos pos, FluidState fluidState, Direction direction) {
|
||||
BlockState blockState = Blocks.BIG_DRIPLEAF
|
||||
.defaultBlockState()
|
||||
- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.isSourceOfType(Fluids.WATER)))
|
||||
+ .setValue(WATERLOGGED, fluidState.isSourceOfType(Fluids.WATER))
|
||||
.setValue(FACING, direction);
|
||||
return level.setBlock(pos, blockState, 3);
|
||||
}
|
||||
@@ -306,7 +_,7 @@
|
||||
FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos());
|
||||
boolean flag = blockState.is(Blocks.BIG_DRIPLEAF) || blockState.is(Blocks.BIG_DRIPLEAF_STEM);
|
||||
return this.defaultBlockState()
|
||||
- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.isSourceOfType(Fluids.WATER)))
|
||||
+ .setValue(WATERLOGGED, fluidState.isSourceOfType(Fluids.WATER))
|
||||
.setValue(FACING, flag ? blockState.getValue(FACING) : context.getHorizontalDirection().getOpposite());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/world/level/block/BigDripleafStemBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BigDripleafStemBlock.java
|
||||
@@ -40,7 +_,7 @@
|
||||
|
||||
protected BigDripleafStemBlock(BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
- this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, Boolean.valueOf(false)).setValue(FACING, Direction.NORTH));
|
||||
+ this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, false).setValue(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -79,7 +_,7 @@
|
||||
protected static boolean place(LevelAccessor level, BlockPos pos, FluidState fluidState, Direction direction) {
|
||||
BlockState blockState = Blocks.BIG_DRIPLEAF_STEM
|
||||
.defaultBlockState()
|
||||
- .setValue(WATERLOGGED, Boolean.valueOf(fluidState.isSourceOfType(Fluids.WATER)))
|
||||
+ .setValue(WATERLOGGED, fluidState.isSourceOfType(Fluids.WATER))
|
||||
.setValue(FACING, direction);
|
||||
return level.setBlock(pos, blockState, 3);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/world/level/block/BrewingStandBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BrewingStandBlock.java
|
||||
@@ -44,9 +_,9 @@
|
||||
this.registerDefaultState(
|
||||
this.stateDefinition
|
||||
.any()
|
||||
- .setValue(HAS_BOTTLE[0], Boolean.valueOf(false))
|
||||
- .setValue(HAS_BOTTLE[1], Boolean.valueOf(false))
|
||||
- .setValue(HAS_BOTTLE[2], Boolean.valueOf(false))
|
||||
+ .setValue(HAS_BOTTLE[0], false)
|
||||
+ .setValue(HAS_BOTTLE[1], false)
|
||||
+ .setValue(HAS_BOTTLE[2], false)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/level/block/BrushableBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BrushableBlock.java
|
||||
@@ -51,7 +_,7 @@
|
||||
this.turnsInto = turnsInto;
|
||||
this.brushSound = brushSound;
|
||||
this.brushCompletedSound = brushCompletedSound;
|
||||
- this.registerDefaultState(this.stateDefinition.any().setValue(DUSTED, Integer.valueOf(0)));
|
||||
+ this.registerDefaultState(this.stateDefinition.any().setValue(DUSTED, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,24 @@
|
||||
--- a/net/minecraft/world/level/block/BubbleColumnBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BubbleColumnBlock.java
|
||||
@@ -43,7 +_,7 @@
|
||||
|
||||
public BubbleColumnBlock(BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
- this.registerDefaultState(this.stateDefinition.any().setValue(DRAG_DOWN, Boolean.valueOf(true)));
|
||||
+ this.registerDefaultState(this.stateDefinition.any().setValue(DRAG_DOWN, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -124,10 +_,10 @@
|
||||
if (blockState.is(Blocks.BUBBLE_COLUMN)) {
|
||||
return blockState;
|
||||
} else if (blockState.is(Blocks.SOUL_SAND)) {
|
||||
- return Blocks.BUBBLE_COLUMN.defaultBlockState().setValue(DRAG_DOWN, Boolean.valueOf(org.purpurmc.purpur.PurpurConfig.soulSandBlockReverseBubbleColumnFlow)); // Purpur - Config to reverse bubble column flow
|
||||
+ return Blocks.BUBBLE_COLUMN.defaultBlockState().setValue(DRAG_DOWN, org.purpurmc.purpur.PurpurConfig.soulSandBlockReverseBubbleColumnFlow); // Purpur - Config to reverse bubble column flow
|
||||
} else {
|
||||
return blockState.is(Blocks.MAGMA_BLOCK)
|
||||
- ? Blocks.BUBBLE_COLUMN.defaultBlockState().setValue(DRAG_DOWN, Boolean.valueOf(!org.purpurmc.purpur.PurpurConfig.magmaBlockReverseBubbleColumnFlow)) // Purpur - Config to reverse bubble column flow
|
||||
+ ? Blocks.BUBBLE_COLUMN.defaultBlockState().setValue(DRAG_DOWN, !org.purpurmc.purpur.PurpurConfig.magmaBlockReverseBubbleColumnFlow) // Purpur - Config to reverse bubble column flow
|
||||
: Blocks.WATER.defaultBlockState();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/level/block/BuddingAmethystBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BuddingAmethystBlock.java
|
||||
@@ -43,7 +_,7 @@
|
||||
if (block != null) {
|
||||
BlockState blockState1 = block.defaultBlockState()
|
||||
.setValue(AmethystClusterBlock.FACING, direction)
|
||||
- .setValue(AmethystClusterBlock.WATERLOGGED, Boolean.valueOf(blockState.getFluidState().getType() == Fluids.WATER));
|
||||
+ .setValue(AmethystClusterBlock.WATERLOGGED, blockState.getFluidState().getType() == Fluids.WATER);
|
||||
// Paper start - Have Amethyst throw both spread and grow events
|
||||
if (block == Blocks.SMALL_AMETHYST_BUD) {
|
||||
org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, pos, blockPos, blockState1, 3); // CraftBukkit
|
||||
@@ -0,0 +1,29 @@
|
||||
--- a/net/minecraft/world/level/block/ButtonBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ButtonBlock.java
|
||||
@@ -76,7 +_,7 @@
|
||||
super(properties.sound(type.soundType()));
|
||||
this.type = type;
|
||||
this.registerDefaultState(
|
||||
- this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(POWERED, Boolean.valueOf(false)).setValue(FACE, AttachFace.WALL)
|
||||
+ this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(POWERED, false).setValue(FACE, AttachFace.WALL)
|
||||
);
|
||||
this.ticksToStayPressed = ticksToStayPressed;
|
||||
}
|
||||
@@ -142,7 +_,7 @@
|
||||
}
|
||||
|
||||
public void press(BlockState state, Level level, BlockPos pos, @Nullable Player player) {
|
||||
- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(true)), 3);
|
||||
+ level.setBlock(pos, state.setValue(POWERED, true), 3);
|
||||
this.updateNeighbours(state, level, pos);
|
||||
level.scheduleTick(pos, this, this.ticksToStayPressed);
|
||||
this.playSound(player, level, pos, true);
|
||||
@@ -229,7 +_,7 @@
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
- level.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(flag)), 3);
|
||||
+ level.setBlock(pos, state.setValue(POWERED, flag), 3);
|
||||
this.updateNeighbours(state, level, pos);
|
||||
this.playSound(null, level, pos, flag);
|
||||
level.gameEvent(abstractArrow, flag ? GameEvent.BLOCK_ACTIVATE : GameEvent.BLOCK_DEACTIVATE, pos);
|
||||
@@ -0,0 +1,25 @@
|
||||
--- a/net/minecraft/world/level/block/CactusBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CactusBlock.java
|
||||
@@ -36,7 +_,7 @@
|
||||
|
||||
protected CactusBlock(BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
- this.registerDefaultState(this.stateDefinition.any().setValue(AGE, Integer.valueOf(0)));
|
||||
+ this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,11 +_,11 @@
|
||||
int modifier = level.spigotConfig.cactusModifier; // Spigot - SPIGOT-7159: Better modifier resolution
|
||||
if (ageValue >= 15 || (modifier != 100 && random.nextFloat() < (modifier / (100.0f * 16)))) { // Spigot - SPIGOT-7159: Better modifier
|
||||
org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, blockPos, this.defaultBlockState()); // CraftBukkit
|
||||
- BlockState blockState = state.setValue(AGE, Integer.valueOf(0));
|
||||
+ BlockState blockState = state.setValue(AGE, 0);
|
||||
level.setBlock(pos, blockState, 4);
|
||||
level.neighborChanged(blockState, blockPos, this, null, false);
|
||||
} else if (modifier == 100 || random.nextFloat() < (modifier / (100.0f * 16))) { // Spigot - SPIGOT-7159: Better modifier resolution
|
||||
- level.setBlock(pos, state.setValue(AGE, Integer.valueOf(ageValue + 1)), 4);
|
||||
+ level.setBlock(pos, state.setValue(AGE, ageValue + 1), 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user