2019-04-25 06:53:51 +00:00
|
|
|
From 4718559989fd4efabfb66513b7755d6f262bee1b Mon Sep 17 00:00:00 2001
|
2016-03-31 00:50:23 +00:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Wed, 30 Mar 2016 19:36:20 -0400
|
|
|
|
Subject: [PATCH] MC Dev fixes
|
|
|
|
|
|
|
|
|
2019-01-01 03:15:55 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
|
2019-04-25 06:53:51 +00:00
|
|
|
index 26fa6e7b64..9a839d6540 100644
|
2019-01-01 03:15:55 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/BiomeBase.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
|
2019-04-23 04:47:07 +00:00
|
|
|
@@ -42,7 +42,7 @@ public abstract class BiomeBase {
|
2019-01-01 03:15:55 +00:00
|
|
|
|
|
|
|
@Nullable
|
|
|
|
public static BiomeBase a(BiomeBase biomebase) {
|
2019-04-23 04:47:07 +00:00
|
|
|
- return (BiomeBase) BiomeBase.c.fromId(IRegistry.BIOME.a((Object) biomebase));
|
|
|
|
+ return (BiomeBase) BiomeBase.c.fromId(IRegistry.BIOME.a(biomebase)); // Paper - decompile fix
|
2018-08-26 18:11:49 +00:00
|
|
|
}
|
|
|
|
|
2019-04-23 04:47:07 +00:00
|
|
|
public static <C extends WorldGenCarverConfiguration> WorldGenCarverWrapper<C> a(WorldGenCarverAbstract<C> worldgencarverabstract, C c0) {
|
|
|
|
@@ -202,7 +202,7 @@ public abstract class BiomeBase {
|
|
|
|
|
|
|
|
@Nullable
|
|
|
|
public <C extends WorldGenFeatureConfiguration> C b(StructureGenerator<C> structuregenerator) {
|
|
|
|
- return (WorldGenFeatureConfiguration) this.t.get(structuregenerator);
|
|
|
|
+ return (C) this.t.get(structuregenerator); // Paper - decompile fix
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<WorldGenFeatureConfigured<?>> e() {
|
2018-07-19 17:50:34 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
2019-04-25 06:53:51 +00:00
|
|
|
index f0ff70980d..dd47e9cbe4 100644
|
2018-07-19 17:50:34 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
2019-04-23 04:47:07 +00:00
|
|
|
@@ -57,12 +57,12 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
|
|
|
OfInt ofint = dynamic.asIntStream().spliterator();
|
|
|
|
int[] aint = new int[3];
|
|
|
|
|
|
|
|
- if (ofint.tryAdvance((i) -> {
|
|
|
|
+ if (ofint.tryAdvance((Consumer<? super Integer>) (i) -> { // Paper - decomile fix
|
|
|
|
aint[0] = i;
|
|
|
|
- }) && ofint.tryAdvance((i) -> {
|
|
|
|
+ }) && ofint.tryAdvance((Consumer<? super Integer>) (i) -> { // Paper - decompile fix
|
|
|
|
aint[1] = i;
|
|
|
|
})) {
|
|
|
|
- ofint.tryAdvance((i) -> {
|
|
|
|
+ ofint.tryAdvance((Consumer<? super Integer>) (i) -> { // Paper - decompile fix
|
|
|
|
aint[2] = i;
|
|
|
|
});
|
|
|
|
}
|
2019-01-01 03:15:55 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java
|
2019-04-23 04:47:07 +00:00
|
|
|
index b4c8722f04..59d86fc66e 100644
|
2019-01-01 03:15:55 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/BlockStateEnum.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BlockStateEnum.java
|
|
|
|
@@ -20,10 +20,10 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends BlockState<T>
|
|
|
|
protected BlockStateEnum(String s, Class<T> oclass, Collection<T> collection) {
|
|
|
|
super(s, oclass);
|
|
|
|
this.a = ImmutableSet.copyOf(collection);
|
|
|
|
- Iterator iterator = collection.iterator();
|
|
|
|
+ Iterator<T> iterator = collection.iterator(); // Paper - decompile fix
|
|
|
|
|
|
|
|
while (iterator.hasNext()) {
|
|
|
|
- T t0 = (Enum) iterator.next();
|
|
|
|
+ T t0 = iterator.next(); // Paper - Decompile fix
|
|
|
|
String s1 = ((INamable) t0).getName();
|
|
|
|
|
|
|
|
if (this.b.containsKey(s1)) {
|
2019-04-05 01:13:49 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/GameRules.java b/src/main/java/net/minecraft/server/GameRules.java
|
2019-04-23 04:47:07 +00:00
|
|
|
index d8d2267084..3de9d264db 100644
|
2019-04-05 01:13:49 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/GameRules.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/GameRules.java
|
|
|
|
@@ -17,7 +17,7 @@ import javax.annotation.Nullable;
|
|
|
|
|
|
|
|
public class GameRules {
|
|
|
|
|
|
|
|
- private static final TreeMap<String, GameRules.GameRuleDefinition> a = (TreeMap) SystemUtils.a((Object) (new TreeMap()), (treemap) -> {
|
|
|
|
+ private static final TreeMap<String, GameRules.GameRuleDefinition> a = SystemUtils.a(new TreeMap(), (treemap) -> { // Paper - decompile fix
|
|
|
|
treemap.put("doFireTick", new GameRules.GameRuleDefinition("true", GameRules.EnumGameRuleType.BOOLEAN_VALUE));
|
|
|
|
treemap.put("mobGriefing", new GameRules.GameRuleDefinition("true", GameRules.EnumGameRuleType.BOOLEAN_VALUE));
|
|
|
|
treemap.put("keepInventory", new GameRules.GameRuleDefinition("false", GameRules.EnumGameRuleType.BOOLEAN_VALUE));
|
|
|
|
@@ -133,7 +133,7 @@ public class GameRules {
|
|
|
|
private final Supplier<ArgumentType<?>> d;
|
|
|
|
private final BiFunction<CommandContext<CommandListenerWrapper>, String, String> e;
|
|
|
|
|
|
|
|
- private EnumGameRuleType(Supplier supplier, BiFunction bifunction) {
|
|
|
|
+ private EnumGameRuleType(Supplier supplier, BiFunction<CommandContext<CommandListenerWrapper>, String, String> bifunction) { // Paper - decompile fix
|
|
|
|
this.d = supplier;
|
|
|
|
this.e = bifunction;
|
|
|
|
}
|
2018-08-26 18:11:49 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
|
2019-04-23 04:47:07 +00:00
|
|
|
index cb0c08a144..9aabcb630f 100644
|
2018-08-26 18:11:49 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/NBTBase.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/NBTBase.java
|
2019-01-01 03:15:55 +00:00
|
|
|
@@ -88,7 +88,7 @@ public interface NBTBase {
|
2018-08-26 18:11:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-31 22:56:57 +00:00
|
|
|
- NBTBase clone();
|
|
|
|
+ public NBTBase clone(); // Paper - decompile fix
|
|
|
|
|
2018-12-08 10:09:55 +00:00
|
|
|
default String asString() {
|
2018-08-31 22:56:57 +00:00
|
|
|
return this.toString();
|
2018-08-26 18:11:49 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
2019-04-23 04:47:07 +00:00
|
|
|
index 7f89562e90..4efcb8b595 100644
|
2018-08-26 18:11:49 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
2019-01-01 03:15:55 +00:00
|
|
|
@@ -27,7 +27,7 @@ public class RegistryBlockID<T> implements Registry<T> {
|
|
|
|
this.b.put(t0, i);
|
2018-08-26 18:11:49 +00:00
|
|
|
|
2019-01-01 03:15:55 +00:00
|
|
|
while (this.c.size() <= i) {
|
|
|
|
- this.c.add((Object) null);
|
2018-08-26 18:11:49 +00:00
|
|
|
+ this.c.add(null); // Paper - decompile fix
|
|
|
|
}
|
|
|
|
|
2019-01-01 03:15:55 +00:00
|
|
|
this.c.set(i, t0);
|
2018-07-23 17:10:06 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java
|
2019-04-23 04:47:07 +00:00
|
|
|
index 4cb78c6a3f..e15d286710 100644
|
2018-07-23 17:10:06 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/RegistryID.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/RegistryID.java
|
2019-01-01 03:15:55 +00:00
|
|
|
@@ -17,9 +17,9 @@ public class RegistryID<K> implements Registry<K> {
|
2018-07-23 17:10:06 +00:00
|
|
|
|
2019-01-01 03:15:55 +00:00
|
|
|
public RegistryID(int i) {
|
|
|
|
i = (int) ((float) i / 0.8F);
|
|
|
|
- this.b = (Object[]) (new Object[i]);
|
|
|
|
+ this.b = (K[]) (new Object[i]); // Paper - decompile fix
|
2018-07-23 17:10:06 +00:00
|
|
|
this.c = new int[i];
|
2019-01-01 03:15:55 +00:00
|
|
|
- this.d = (Object[]) (new Object[i]);
|
|
|
|
+ this.d = (K[]) (new Object[i]); // Paper - decompile fix
|
2018-08-26 18:11:49 +00:00
|
|
|
}
|
|
|
|
|
2019-01-01 03:15:55 +00:00
|
|
|
public int getId(@Nullable K k0) {
|
2019-04-23 04:47:07 +00:00
|
|
|
@@ -55,9 +55,9 @@ public class RegistryID<K> implements Registry<K> {
|
2019-01-01 03:15:55 +00:00
|
|
|
K[] ak = this.b;
|
|
|
|
int[] aint = this.c;
|
2018-08-01 01:13:40 +00:00
|
|
|
|
2019-01-01 03:15:55 +00:00
|
|
|
- this.b = (Object[]) (new Object[i]);
|
|
|
|
+ this.b = (K[]) (new Object[i]); // Paper - decompile fix
|
|
|
|
this.c = new int[i];
|
|
|
|
- this.d = (Object[]) (new Object[i]);
|
|
|
|
+ this.d = (K[]) (new Object[i]); // Paper - decompile fix
|
|
|
|
this.e = 0;
|
|
|
|
this.f = 0;
|
2018-12-17 05:18:06 +00:00
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
|
2019-04-25 06:53:51 +00:00
|
|
|
index b251a1d7d9..3c5b3fe101 100644
|
2018-12-17 05:18:06 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
|
2019-04-23 04:47:07 +00:00
|
|
|
@@ -37,7 +37,7 @@ public class WorldPersistentData {
|
|
|
|
if (t0 != null) {
|
|
|
|
return t0;
|
|
|
|
} else {
|
|
|
|
- T t1 = (PersistentBase) supplier.get();
|
|
|
|
+ T t1 = supplier.get(); // Paper - decompile fix
|
|
|
|
|
|
|
|
this.a(t1);
|
|
|
|
return t1;
|
|
|
|
@@ -64,7 +64,7 @@ public class WorldPersistentData {
|
|
|
|
}
|
|
|
|
}
|
2019-01-01 03:15:55 +00:00
|
|
|
|
2019-04-23 04:47:07 +00:00
|
|
|
- return persistentbase;
|
|
|
|
+ return (T) persistentbase; // Paper - decompile fix
|
|
|
|
}
|
2019-01-01 03:15:55 +00:00
|
|
|
|
2019-04-23 04:47:07 +00:00
|
|
|
public void a(PersistentBase persistentbase) {
|
2016-03-31 00:50:23 +00:00
|
|
|
--
|
2019-04-05 01:13:49 +00:00
|
|
|
2.21.0
|
2016-03-31 00:50:23 +00:00
|
|
|
|