@@ -0,0 +1,59 @@
|
||||
--- a/net/minecraft/world/ticks/NextTickListEntry.java
|
||||
+++ b/net/minecraft/world/ticks/NextTickListEntry.java
|
||||
@@ -5,13 +5,17 @@
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.core.BlockPosition;
|
||||
|
||||
-public final class NextTickListEntry extends Record {
|
||||
+// CraftBukkit start
|
||||
+public final record NextTickListEntry<T>(T type, BlockPosition pos, long triggerTick, TickListPriority priority, long subTickOrder) {
|
||||
|
||||
+ /*
|
||||
private final T type;
|
||||
private final BlockPosition pos;
|
||||
private final long triggerTick;
|
||||
private final TickListPriority priority;
|
||||
private final long subTickOrder;
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
public static final Comparator<NextTickListEntry<?>> DRAIN_ORDER = (nextticklistentry, nextticklistentry1) -> {
|
||||
int i = Long.compare(nextticklistentry.triggerTick, nextticklistentry1.triggerTick);
|
||||
|
||||
@@ -41,19 +45,23 @@
|
||||
this(t0, blockposition, i, TickListPriority.NORMAL, j);
|
||||
}
|
||||
|
||||
- public NextTickListEntry(T t0, BlockPosition blockposition, long i, TickListPriority ticklistpriority, long j) {
|
||||
- blockposition = blockposition.immutable();
|
||||
- this.type = t0;
|
||||
- this.pos = blockposition;
|
||||
- this.triggerTick = i;
|
||||
- this.priority = ticklistpriority;
|
||||
- this.subTickOrder = j;
|
||||
+ // CraftBukkit start
|
||||
+ public NextTickListEntry(T type, BlockPosition pos, long triggerTick, TickListPriority priority, long subTickOrder) {
|
||||
+ pos = pos.immutable();
|
||||
+ this.type = type;
|
||||
+ this.pos = pos;
|
||||
+ this.triggerTick = triggerTick;
|
||||
+ this.priority = priority;
|
||||
+ this.subTickOrder = subTickOrder;
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
public static <T> NextTickListEntry<T> probe(T t0, BlockPosition blockposition) {
|
||||
return new NextTickListEntry(t0, blockposition, 0L, TickListPriority.NORMAL, 0L);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ /*
|
||||
public final String toString() {
|
||||
return this.toString < invokedynamic > (this);
|
||||
}
|
||||
@@ -85,4 +93,6 @@
|
||||
public long subTickOrder() {
|
||||
return this.subTickOrder;
|
||||
}
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
--- a/net/minecraft/world/ticks/TickListChunk.java
|
||||
+++ b/net/minecraft/world/ticks/TickListChunk.java
|
||||
@@ -10,12 +10,16 @@
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||
|
||||
-final class TickListChunk extends Record {
|
||||
+// CraftBukkit start
|
||||
+final record TickListChunk<T>(T type, BlockPosition pos, int delay, TickListPriority priority) {
|
||||
|
||||
+ /*
|
||||
private final T type;
|
||||
private final BlockPosition pos;
|
||||
private final int delay;
|
||||
private final TickListPriority priority;
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
private static final String TAG_ID = "i";
|
||||
private static final String TAG_X = "x";
|
||||
private static final String TAG_Y = "y";
|
||||
@@ -32,12 +36,16 @@
|
||||
}
|
||||
};
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ /*
|
||||
TickListChunk(T t0, BlockPosition blockposition, int i, TickListPriority ticklistpriority) {
|
||||
this.type = t0;
|
||||
this.pos = blockposition;
|
||||
this.delay = i;
|
||||
this.priority = ticklistpriority;
|
||||
}
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
|
||||
public static <T> void loadTickList(NBTTagList nbttaglist, Function<String, Optional<T>> function, ChunkCoordIntPair chunkcoordintpair, Consumer<TickListChunk<T>> consumer) {
|
||||
long i = chunkcoordintpair.toLong();
|
||||
@@ -85,6 +93,8 @@
|
||||
return new TickListChunk(t0, blockposition, 0, TickListPriority.NORMAL);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ /*
|
||||
public final String toString() {
|
||||
return this.toString < invokedynamic > (this);
|
||||
}
|
||||
@@ -112,4 +122,6 @@
|
||||
public TickListPriority priority() {
|
||||
return this.priority;
|
||||
}
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
Reference in New Issue
Block a user