@@ -6,12 +6,12 @@
|
||||
|
||||
- private default <T> NextTickListEntry<T> createTick(BlockPosition blockposition, T t0, int i, TickListPriority ticklistpriority) {
|
||||
+ default <T> NextTickListEntry<T> createTick(BlockPosition blockposition, T t0, int i, TickListPriority ticklistpriority) { // CraftBukkit - decompile error
|
||||
return new NextTickListEntry(t0, blockposition, this.getLevelData().getGameTime() + (long) i, ticklistpriority, this.nextSubTickCount());
|
||||
return new NextTickListEntry<>(t0, blockposition, this.getLevelData().getGameTime() + (long) i, ticklistpriority, this.nextSubTickCount());
|
||||
}
|
||||
|
||||
- private default <T> NextTickListEntry<T> createTick(BlockPosition blockposition, T t0, int i) {
|
||||
+ default <T> NextTickListEntry<T> createTick(BlockPosition blockposition, T t0, int i) { // CraftBukkit - decompile error
|
||||
return new NextTickListEntry(t0, blockposition, this.getLevelData().getGameTime() + (long) i, this.nextSubTickCount());
|
||||
return new NextTickListEntry<>(t0, blockposition, this.getLevelData().getGameTime() + (long) i, this.nextSubTickCount());
|
||||
}
|
||||
|
||||
@@ -102,4 +102,6 @@
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
return nbttagcompound;
|
||||
}
|
||||
|
||||
@@ -201,4 +225,15 @@
|
||||
@@ -202,4 +226,15 @@
|
||||
public void setBlockState(IBlockData iblockdata) {
|
||||
this.blockState = iblockdata;
|
||||
}
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
--- a/net/minecraft/world/level/block/state/properties/IBlockState.java
|
||||
+++ b/net/minecraft/world/level/block/state/properties/IBlockState.java
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
protected IBlockState(String s, Class<T> oclass) {
|
||||
this.codec = Codec.STRING.comapFlatMap((s1) -> {
|
||||
- return (DataResult) this.getValue(s1).map(DataResult::success).orElseGet(() -> {
|
||||
+ return this.getValue(s1).map(DataResult::success).orElseGet(() -> { // CraftBukkit - decompile error
|
||||
return DataResult.error("Unable to read property: " + this + " with value: " + s1);
|
||||
});
|
||||
}, this::getName);
|
||||
@@ -96,23 +96,27 @@
|
||||
DataResult<T> dataresult = this.codec.parse(dynamicops, u0);
|
||||
|
||||
return dataresult.map((comparable) -> {
|
||||
- return (IBlockDataHolder) s0.setValue(this, comparable);
|
||||
+ return s0.setValue(this, comparable); // CraftBukkit - decompile error
|
||||
}).setPartial(s0);
|
||||
}
|
||||
|
||||
- public static final class a extends Record {
|
||||
+ // CraftBukkit start
|
||||
+ public static final record a<T extends Comparable<T>>(IBlockState<T> property, T value) {
|
||||
|
||||
+ /*
|
||||
private final IBlockState<T> property;
|
||||
private final T value;
|
||||
+ */
|
||||
|
||||
- public a(IBlockState<T> iblockstate, T t0) {
|
||||
- if (!iblockstate.getPossibleValues().contains(t0)) {
|
||||
- throw new IllegalArgumentException("Value " + t0 + " does not belong to property " + iblockstate);
|
||||
+ public a(IBlockState<T> property, T value) {
|
||||
+ if (!property.getPossibleValues().contains(value)) {
|
||||
+ throw new IllegalArgumentException("Value " + value + " does not belong to property " + property);
|
||||
} else {
|
||||
- this.property = iblockstate;
|
||||
- this.value = t0;
|
||||
+ this.property = property;
|
||||
+ this.value = value;
|
||||
}
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
|
||||
public String toString() {
|
||||
String s = this.property.getName();
|
||||
@@ -120,6 +124,8 @@
|
||||
return s + "=" + this.property.getName(this.value);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ /*
|
||||
public final int hashCode() {
|
||||
return this.hashCode < invokedynamic > (this);
|
||||
}
|
||||
@@ -135,5 +141,7 @@
|
||||
public T value() {
|
||||
return this.value;
|
||||
}
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
}
|
||||
@@ -76,7 +76,7 @@
|
||||
iblockdata.onPlace(this.level, blockposition, iblockdata1, flag);
|
||||
}
|
||||
|
||||
@@ -323,7 +346,12 @@
|
||||
@@ -324,7 +347,12 @@
|
||||
|
||||
@Nullable
|
||||
public TileEntity getBlockEntity(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
if (tileentity == null) {
|
||||
NBTTagCompound nbttagcompound = (NBTTagCompound) this.pendingBlockEntities.remove(blockposition);
|
||||
@@ -394,6 +422,13 @@
|
||||
@@ -395,6 +423,13 @@
|
||||
tileentity1.setRemoved();
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -423,6 +458,12 @@
|
||||
@@ -424,6 +459,12 @@
|
||||
if (this.isInLevel()) {
|
||||
TileEntity tileentity = (TileEntity) this.blockEntities.remove(blockposition);
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
if (tileentity != null) {
|
||||
this.removeGameEventListener(tileentity);
|
||||
tileentity.setRemoved();
|
||||
@@ -470,6 +511,55 @@
|
||||
@@ -471,6 +512,55 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
public boolean isEmpty() {
|
||||
return false;
|
||||
}
|
||||
@@ -658,7 +748,7 @@
|
||||
@@ -659,7 +749,7 @@
|
||||
|
||||
private <T extends TileEntity> void updateBlockEntityTicker(T t0) {
|
||||
IBlockData iblockdata = t0.getBlockState();
|
||||
@@ -182,7 +182,7 @@
|
||||
|
||||
if (blockentityticker == null) {
|
||||
this.removeBlockEntityTicker(t0.getBlockPos());
|
||||
@@ -751,7 +841,7 @@
|
||||
@@ -752,7 +842,7 @@
|
||||
private boolean loggedInvalidBlockState;
|
||||
|
||||
a(TileEntity tileentity, BlockEntityTicker blockentityticker) {
|
||||
@@ -191,7 +191,7 @@
|
||||
this.ticker = blockentityticker;
|
||||
}
|
||||
|
||||
@@ -774,7 +864,7 @@
|
||||
@@ -775,7 +865,7 @@
|
||||
this.loggedInvalidBlockState = true;
|
||||
Chunk.LOGGER.warn("Block entity {} @ {} state {} invalid for ticking:", new org.apache.logging.log4j.util.Supplier[]{this::getType, this::getPos, () -> {
|
||||
return iblockdata;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
Optional optional = iregistry1.getResourceKey(structuregenerator).map(Object::toString);
|
||||
|
||||
Objects.requireNonNull(structuregenerator);
|
||||
@@ -364,6 +364,33 @@
|
||||
@@ -363,6 +363,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
+ int x = ichunkaccess.getPos().x;
|
||||
+ int z = ichunkaccess.getPos().z;
|
||||
+ for (org.bukkit.generator.BlockPopulator populator : world.getPopulators()) {
|
||||
+ SeededRandom seededrandom = new SeededRandom(new LegacyRandomSource(generatoraccessseed.getSeed()));
|
||||
+ SeededRandom seededrandom = new SeededRandom(new net.minecraft.world.level.levelgen.LegacyRandomSource(generatoraccessseed.getSeed()));
|
||||
+ seededrandom.setDecorationSeed(generatoraccessseed.getSeed(), x, z);
|
||||
+ populator.populate(world, seededrandom, x, z, limitedRegion);
|
||||
+ }
|
||||
@@ -61,7 +61,7 @@
|
||||
private static StructureBoundingBox getWritableArea(IChunkAccess ichunkaccess) {
|
||||
ChunkCoordIntPair chunkcoordintpair = ichunkaccess.getPos();
|
||||
int i = chunkcoordintpair.getMinBlockX();
|
||||
@@ -439,7 +466,7 @@
|
||||
@@ -438,7 +465,7 @@
|
||||
|
||||
Entry<StructureFeature<?, ?>, Collection<ResourceKey<BiomeBase>>> entry = (Entry) unmodifiableiterator.next();
|
||||
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
--- a/net/minecraft/world/level/chunk/DataPaletteBlock.java
|
||||
+++ b/net/minecraft/world/level/chunk/DataPaletteBlock.java
|
||||
@@ -54,7 +54,7 @@
|
||||
}
|
||||
|
||||
public static <T> Codec<DataPaletteBlock<T>> codec(Registry<T> registry, Codec<T> codec, DataPaletteBlock.e datapaletteblock_e, T t0) {
|
||||
- return RecordCodecBuilder.create((instance) -> {
|
||||
+ return RecordCodecBuilder.<DataPaletteBlock.d<T>>create((instance) -> { // CraftBukkit - decompile error
|
||||
return instance.group(codec.mapResult(ExtraCodecs.orElsePartial(t0)).listOf().fieldOf("palette").forGetter(DataPaletteBlock.d::paletteEntries), Codec.LONG_STREAM.optionalFieldOf("data").forGetter(DataPaletteBlock.d::storage)).apply(instance, DataPaletteBlock.d::new);
|
||||
}).comapFlatMap((datapaletteblock_d) -> {
|
||||
return read(registry, datapaletteblock_e, datapaletteblock_d);
|
||||
@@ -97,7 +97,7 @@
|
||||
public T getAndSet(int i, int j, int k, T t0) {
|
||||
this.acquire();
|
||||
|
||||
- Object object;
|
||||
+ T object; // CraftBukkit - decompile error
|
||||
|
||||
try {
|
||||
object = this.getAndSet(this.strategy.getIndex(i, j, k), t0);
|
||||
@@ -309,19 +309,19 @@
|
||||
|
||||
switch (i) {
|
||||
case 0:
|
||||
- datapaletteblock_a = new DataPaletteBlock.a<>(null.SINGLE_VALUE_PALETTE_FACTORY, i);
|
||||
+ datapaletteblock_a = new DataPaletteBlock.a<>(SINGLE_VALUE_PALETTE_FACTORY, i); // CraftBukkit - decompile error
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
- datapaletteblock_a = new DataPaletteBlock.a<>(null.LINEAR_PALETTE_FACTORY, 4);
|
||||
+ datapaletteblock_a = new DataPaletteBlock.a<>(LINEAR_PALETTE_FACTORY, 4); // CraftBukkit - decompile error
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
- datapaletteblock_a = new DataPaletteBlock.a<>(null.HASHMAP_PALETTE_FACTORY, i);
|
||||
+ datapaletteblock_a = new DataPaletteBlock.a<>(HASHMAP_PALETTE_FACTORY, i); // CraftBukkit - decompile error
|
||||
break;
|
||||
default:
|
||||
datapaletteblock_a = new DataPaletteBlock.a<>(DataPaletteBlock.e.GLOBAL_PALETTE_FACTORY, MathHelper.ceillog2(registry.size()));
|
||||
@@ -337,12 +337,12 @@
|
||||
|
||||
switch (i) {
|
||||
case 0:
|
||||
- datapaletteblock_a = new DataPaletteBlock.a<>(null.SINGLE_VALUE_PALETTE_FACTORY, i);
|
||||
+ datapaletteblock_a = new DataPaletteBlock.a<>(SINGLE_VALUE_PALETTE_FACTORY, i); // CraftBukkit - decompile error
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
- datapaletteblock_a = new DataPaletteBlock.a<>(null.LINEAR_PALETTE_FACTORY, i);
|
||||
+ datapaletteblock_a = new DataPaletteBlock.a<>(LINEAR_PALETTE_FACTORY, i); // CraftBukkit - decompile error
|
||||
break;
|
||||
default:
|
||||
datapaletteblock_a = new DataPaletteBlock.a<>(DataPaletteBlock.e.GLOBAL_PALETTE_FACTORY, MathHelper.ceillog2(registry.size()));
|
||||
@@ -375,8 +375,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
- private static final class a<T> extends Record {
|
||||
+ // CraftBukkit start
|
||||
+ private static final record a<T>(DataPalette.a factory, int bits) {
|
||||
|
||||
+ /*
|
||||
private final DataPalette.a factory;
|
||||
private final int bits;
|
||||
|
||||
@@ -384,6 +386,8 @@
|
||||
this.factory = datapalette_a;
|
||||
this.bits = i;
|
||||
}
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
|
||||
public DataPaletteBlock.c<T> createData(Registry<T> registry, DataPaletteExpandable<T> datapaletteexpandable, int i) {
|
||||
Object object = this.bits == 0 ? new ZeroBitStorage(i) : new SimpleBitStorage(this.bits, i);
|
||||
@@ -392,6 +396,8 @@
|
||||
return new DataPaletteBlock.c(this, (DataBits) object, datapalette);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ /*
|
||||
public final String toString() {
|
||||
return this.toString < invokedynamic > (this);
|
||||
}
|
||||
@@ -403,6 +409,8 @@
|
||||
public final boolean equals(Object object) {
|
||||
return this.equals<invokedynamic>(this, object);
|
||||
}
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
|
||||
public DataPalette.a factory() {
|
||||
return this.factory;
|
||||
@@ -413,8 +421,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
- private static final class c extends Record {
|
||||
+ // CraftBukkit start
|
||||
+ private static final record c<T>(DataPaletteBlock.a<T> configuration, DataBits storage, DataPalette<T> palette) {
|
||||
|
||||
+ /*
|
||||
private final DataPaletteBlock.a<T> configuration;
|
||||
final DataBits storage;
|
||||
final DataPalette<T> palette;
|
||||
@@ -424,6 +434,8 @@
|
||||
this.storage = databits;
|
||||
this.palette = datapalette;
|
||||
}
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
|
||||
public void copyFrom(DataPalette<T> datapalette, DataBits databits) {
|
||||
for (int i = 0; i < databits.getSize(); ++i) {
|
||||
@@ -444,6 +456,8 @@
|
||||
packetdataserializer.writeLongArray(this.storage.getRaw());
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ /*
|
||||
public final String toString() {
|
||||
return this.toString < invokedynamic > (this);
|
||||
}
|
||||
@@ -467,10 +481,14 @@
|
||||
public DataPalette<T> palette() {
|
||||
return this.palette;
|
||||
}
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
- private static final class d extends Record {
|
||||
+ // CraftBukkit start
|
||||
+ private static final record d<T>(List<T> paletteEntries, Optional<LongStream> storage) {
|
||||
|
||||
+ /*
|
||||
private final List<T> paletteEntries;
|
||||
private final Optional<LongStream> storage;
|
||||
|
||||
@@ -498,6 +516,8 @@
|
||||
public Optional<LongStream> storage() {
|
||||
return this.storage;
|
||||
}
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/chunk/IChunkAccess.java
|
||||
+++ b/net/minecraft/world/level/chunk/IChunkAccess.java
|
||||
@@ -93,7 +93,11 @@
|
||||
@@ -94,7 +94,11 @@
|
||||
}
|
||||
|
||||
replaceMissingSections(levelheightaccessor, iregistry, this.sections);
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
private static void replaceMissingSections(LevelHeightAccessor levelheightaccessor, IRegistry<BiomeBase> iregistry, ChunkSection[] achunksection) {
|
||||
for (int i = 0; i < achunksection.length; ++i) {
|
||||
@@ -392,6 +396,27 @@
|
||||
@@ -394,6 +398,27 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,24 +40,23 @@
|
||||
public void fillBiomesFromNoise(BiomeResolver biomeresolver, Climate.Sampler climate_sampler) {
|
||||
ChunkCoordIntPair chunkcoordintpair = this.getPos();
|
||||
int i = QuartPos.fromBlock(chunkcoordintpair.getMinBlockX());
|
||||
@@ -423,8 +448,10 @@
|
||||
@@ -425,8 +450,10 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
- public static final class a extends Record {
|
||||
+ // CraftBukkit start
|
||||
+ public static final record a(SerializableTickContainer<Block> blocks, SerializableTickContainer<FluidType> fluids) {
|
||||
- public static record a(SerializableTickContainer<Block> a, SerializableTickContainer<FluidType> b) {
|
||||
+ // CraftBukkit start - decompile error
|
||||
+ public static record a(SerializableTickContainer<Block> blocks, SerializableTickContainer<FluidType> fluids) {
|
||||
|
||||
+ /*
|
||||
private final SerializableTickContainer<Block> blocks;
|
||||
private final SerializableTickContainer<FluidType> fluids;
|
||||
|
||||
@@ -444,6 +471,8 @@
|
||||
public final boolean equals(Object object) {
|
||||
return this.equals<invokedynamic>(this, object);
|
||||
@@ -442,5 +469,7 @@
|
||||
public SerializableTickContainer<FluidType> fluids() {
|
||||
return this.fluids;
|
||||
}
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
|
||||
public SerializableTickContainer<Block> blocks() {
|
||||
return this.blocks;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,7 +251,7 @@
|
||||
@@ -256,7 +261,7 @@
|
||||
switch (b0) {
|
||||
case 0:
|
||||
JsonObject jsonobject = !s.isEmpty() ? ChatDeserializer.parse(s) : new JsonObject();
|
||||
|
||||
Reference in New Issue
Block a user