aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/1009-Custom-table-implementation-for-blockstate-state-loo.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/1009-Custom-table-implementation-for-blockstate-state-loo.patch')
-rw-r--r--patches/server/1009-Custom-table-implementation-for-blockstate-state-loo.patch26
1 files changed, 13 insertions, 13 deletions
diff --git a/patches/server/1009-Custom-table-implementation-for-blockstate-state-loo.patch b/patches/server/1009-Custom-table-implementation-for-blockstate-state-loo.patch
index 52bdb3212c..66c7db3ba9 100644
--- a/patches/server/1009-Custom-table-implementation-for-blockstate-state-loo.patch
+++ b/patches/server/1009-Custom-table-implementation-for-blockstate-state-loo.patch
@@ -173,10 +173,10 @@ index 0000000000000000000000000000000000000000..57d0cd3ad6f972e986c72a57f1a6e360
+ }
+}
diff --git a/src/main/java/net/minecraft/world/level/block/state/StateHolder.java b/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
-index 89ba12d44865ecddebabbc39c769af4cd8c82702..5f285d190186a2ff5a61d05070593e1d633dd79a 100644
+index 23155d3181f78b5eec1412828441c54826ea8ca5..32df70def3551adc759aec22803fb4195d48c843 100644
--- a/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
+++ b/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
-@@ -39,11 +39,13 @@ public abstract class StateHolder<O, S> {
+@@ -42,11 +42,13 @@ public abstract class StateHolder<O, S> {
private final ImmutableMap<Property<?>, Comparable<?>> values;
private Table<Property<?>, Comparable<?>, S> neighbours;
protected final MapCodec<S> propertiesCodec;
@@ -190,7 +190,7 @@ index 89ba12d44865ecddebabbc39c769af4cd8c82702..5f285d190186a2ff5a61d05070593e1d
}
public <T extends Comparable<T>> S cycle(Property<T> property) {
-@@ -84,11 +86,11 @@ public abstract class StateHolder<O, S> {
+@@ -87,11 +89,11 @@ public abstract class StateHolder<O, S> {
}
public <T extends Comparable<T>> boolean hasProperty(Property<T> property) {
@@ -204,7 +204,7 @@ index 89ba12d44865ecddebabbc39c769af4cd8c82702..5f285d190186a2ff5a61d05070593e1d
if (comparable == null) {
throw new IllegalArgumentException("Cannot get property " + property + " as it does not exist in " + this.owner);
} else {
-@@ -97,24 +99,18 @@ public abstract class StateHolder<O, S> {
+@@ -100,24 +102,18 @@ public abstract class StateHolder<O, S> {
}
public <T extends Comparable<T>> Optional<T> getOptionalValue(Property<T> property) {
@@ -236,7 +236,7 @@ index 89ba12d44865ecddebabbc39c769af4cd8c82702..5f285d190186a2ff5a61d05070593e1d
}
public <T extends Comparable<T>, V extends T> S trySetValue(Property<T> property, V value) {
-@@ -147,7 +143,7 @@ public abstract class StateHolder<O, S> {
+@@ -150,7 +146,7 @@ public abstract class StateHolder<O, S> {
}
}
@@ -246,7 +246,7 @@ index 89ba12d44865ecddebabbc39c769af4cd8c82702..5f285d190186a2ff5a61d05070593e1d
}
diff --git a/src/main/java/net/minecraft/world/level/block/state/properties/BooleanProperty.java b/src/main/java/net/minecraft/world/level/block/state/properties/BooleanProperty.java
-index 8da64429eaf083578c672cd34f52dd42389ff396..bdd7d9c80eda872496272e46d8772634e44e622a 100644
+index b63116b333b6e06494091a82588acfb639bddb71..ff5fd91257c4554c523682009efe1db83f53fd5b 100644
--- a/src/main/java/net/minecraft/world/level/block/state/properties/BooleanProperty.java
+++ b/src/main/java/net/minecraft/world/level/block/state/properties/BooleanProperty.java
@@ -7,6 +7,13 @@ import java.util.Optional;
@@ -264,7 +264,7 @@ index 8da64429eaf083578c672cd34f52dd42389ff396..bdd7d9c80eda872496272e46d8772634
super(name, Boolean.class);
}
diff --git a/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java b/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java
-index 0a7a6c0e7635d0ada101074d4229df7edc6dd31b..e658d0b1a025192b48090e865b082ac4d99088d4 100644
+index cd7efe4a09e114ab68a90365a6f5363a5c4c17a2..19337b8adefdec32626f5ed788a714a24f39dc35 100644
--- a/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java
+++ b/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java
@@ -15,6 +15,15 @@ public class EnumProperty<T extends Enum<T> & StringRepresentable> extends Prope
@@ -283,23 +283,23 @@ index 0a7a6c0e7635d0ada101074d4229df7edc6dd31b..e658d0b1a025192b48090e865b082ac4
protected EnumProperty(String name, Class<T> type, Collection<T> values) {
super(name, type);
this.values = ImmutableSet.copyOf(values);
-@@ -28,6 +37,14 @@ public class EnumProperty<T extends Enum<T> & StringRepresentable> extends Prope
+@@ -27,6 +36,14 @@ public class EnumProperty<T extends Enum<T> & StringRepresentable> extends Prope
+
this.names.put(string, enum_);
}
-
-+ // Paper start - optimise iblockdata state lookup
++ // Paper start - optimise BlockState lookup
+ int id = 0;
+ this.idLookupTable = new int[type.getEnumConstants().length];
+ java.util.Arrays.fill(this.idLookupTable, -1);
+ for (final T value : this.getPossibleValues()) {
+ this.idLookupTable[value.ordinal()] = id++;
+ }
-+ // Paper end - optimise iblockdata state lookup
++ // Paper end - optimise BlockState lookup
}
@Override
diff --git a/src/main/java/net/minecraft/world/level/block/state/properties/IntegerProperty.java b/src/main/java/net/minecraft/world/level/block/state/properties/IntegerProperty.java
-index cbe6e4579cc55a427dd8f8fe403478faf6d35b8f..765b1092d50608d479bbbe09c457999790ecf42c 100644
+index 3a850321a4bcc68058483b5fd53e829c425a68af..977504f2641d0133a572b0d5de85d058609343bb 100644
--- a/src/main/java/net/minecraft/world/level/block/state/properties/IntegerProperty.java
+++ b/src/main/java/net/minecraft/world/level/block/state/properties/IntegerProperty.java
@@ -11,6 +11,16 @@ public class IntegerProperty extends Property<Integer> {
@@ -320,7 +320,7 @@ index cbe6e4579cc55a427dd8f8fe403478faf6d35b8f..765b1092d50608d479bbbe09c4579997
super(name, Integer.class);
if (min < 0) {
diff --git a/src/main/java/net/minecraft/world/level/block/state/properties/Property.java b/src/main/java/net/minecraft/world/level/block/state/properties/Property.java
-index 08c2e4ba9147fbea41e0fce26ad20586832a525b..1d8c3f2e57aa9b0830cf7cfb6354fcf636e9c74b 100644
+index bad6c58b0adc1ca630d3e943a86a2bc66dd94c9f..129bac4e41a6d50532709fadd3b0d1db8aa85e4d 100644
--- a/src/main/java/net/minecraft/world/level/block/state/properties/Property.java
+++ b/src/main/java/net/minecraft/world/level/block/state/properties/Property.java
@@ -24,6 +24,17 @@ public abstract class Property<T extends Comparable<T>> {