@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -78,7 +78,7 @@
|
||||
@@ -79,7 +79,7 @@
|
||||
};
|
||||
private final Map<BlockPosition, Chunk.d> tickersInLevel;
|
||||
public boolean loaded;
|
||||
@@ -9,7 +9,7 @@
|
||||
@Nullable
|
||||
private Supplier<FullChunkStatus> fullStatus;
|
||||
@Nullable
|
||||
@@ -97,7 +97,7 @@
|
||||
@@ -98,7 +98,7 @@
|
||||
this.tickersInLevel = Maps.newHashMap();
|
||||
this.unsavedListener = (chunkcoordintpair1) -> {
|
||||
};
|
||||
@@ -18,7 +18,7 @@
|
||||
this.gameEventListenerRegistrySections = new Int2ObjectOpenHashMap();
|
||||
HeightMap.Type[] aheightmap_type = HeightMap.Type.values();
|
||||
int j = aheightmap_type.length;
|
||||
@@ -115,6 +115,11 @@
|
||||
@@ -116,6 +116,11 @@
|
||||
this.fluidTicks = levelchunkticks1;
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
+
|
||||
public Chunk(WorldServer worldserver, ProtoChunk protochunk, @Nullable Chunk.c chunk_c) {
|
||||
this(worldserver, protochunk.getPos(), protochunk.getUpgradeData(), protochunk.unpackBlockTicks(), protochunk.unpackFluidTicks(), protochunk.getInhabitedTime(), protochunk.getSections(), chunk_c, protochunk.getBlendingData());
|
||||
Iterator iterator = protochunk.getBlockEntities().values().iterator();
|
||||
@@ -146,6 +151,10 @@
|
||||
if (!Collections.disjoint(protochunk.pendingBlockEntities.keySet(), protochunk.blockEntities.keySet())) {
|
||||
@@ -151,6 +156,10 @@
|
||||
this.skyLightSources = protochunk.skyLightSources;
|
||||
this.setLightCorrect(protochunk.isLightCorrect());
|
||||
this.markUnsaved();
|
||||
@@ -41,7 +41,7 @@
|
||||
}
|
||||
|
||||
public void setUnsavedListener(Chunk.e chunk_e) {
|
||||
@@ -267,9 +276,16 @@
|
||||
@@ -272,9 +281,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
int i = blockposition.getY();
|
||||
ChunkSection chunksection = this.getSection(this.getSectionIndex(i));
|
||||
boolean flag1 = chunksection.hasOnlyAir();
|
||||
@@ -319,7 +335,8 @@
|
||||
@@ -324,7 +340,8 @@
|
||||
if (!chunksection.getBlockState(j, k, l).is(block)) {
|
||||
return null;
|
||||
} else {
|
||||
@@ -68,7 +68,7 @@
|
||||
iblockdata.onPlace(this.level, blockposition, iblockdata1, flag);
|
||||
}
|
||||
|
||||
@@ -370,7 +387,12 @@
|
||||
@@ -375,7 +392,12 @@
|
||||
|
||||
@Nullable
|
||||
public TileEntity getBlockEntity(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
if (tileentity == null) {
|
||||
NBTTagCompound nbttagcompound = (NBTTagCompound) this.pendingBlockEntities.remove(blockposition);
|
||||
@@ -442,6 +464,7 @@
|
||||
@@ -447,6 +469,7 @@
|
||||
|
||||
if (!iblockdata.hasBlockEntity()) {
|
||||
Chunk.LOGGER.warn("Trying to set block entity {} at position {}, but state {} does not allow it", new Object[]{tileentity, blockposition, iblockdata});
|
||||
@@ -90,7 +90,7 @@
|
||||
} else {
|
||||
IBlockData iblockdata1 = tileentity.getBlockState();
|
||||
|
||||
@@ -495,6 +518,12 @@
|
||||
@@ -500,6 +523,12 @@
|
||||
if (this.isInLevel()) {
|
||||
TileEntity tileentity = (TileEntity) this.blockEntities.remove(blockposition);
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
if (tileentity != null) {
|
||||
World world = this.level;
|
||||
|
||||
@@ -548,6 +577,57 @@
|
||||
@@ -553,6 +582,57 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
public boolean isEmpty() {
|
||||
return false;
|
||||
}
|
||||
@@ -745,7 +825,7 @@
|
||||
@@ -750,7 +830,7 @@
|
||||
|
||||
private <T extends TileEntity> void updateBlockEntityTicker(T t0) {
|
||||
IBlockData iblockdata = t0.getBlockState();
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
if (blockentityticker == null) {
|
||||
this.removeBlockEntityTicker(t0.getBlockPos());
|
||||
@@ -836,7 +916,7 @@
|
||||
@@ -841,7 +921,7 @@
|
||||
private boolean loggedInvalidBlockState;
|
||||
|
||||
a(final TileEntity tileentity, final BlockEntityTicker blockentityticker) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
+++ b/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
@@ -311,7 +311,7 @@
|
||||
@@ -312,7 +312,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
ChunkCoordIntPair chunkcoordintpair = ichunkaccess.getPos();
|
||||
|
||||
if (!SharedConstants.debugVoidTerrain(chunkcoordintpair)) {
|
||||
@@ -333,7 +333,7 @@
|
||||
@@ -334,7 +334,7 @@
|
||||
|
||||
for (int k = 0; k < j; ++k) {
|
||||
ChunkSection chunksection = achunksection[k];
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
Objects.requireNonNull(set);
|
||||
palettedcontainerro.getAll(set::add);
|
||||
@@ -444,6 +444,33 @@
|
||||
@@ -445,6 +445,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
private static StructureBoundingBox getWritableArea(IChunkAccess ichunkaccess) {
|
||||
ChunkCoordIntPair chunkcoordintpair = ichunkaccess.getPos();
|
||||
int i = chunkcoordintpair.getMinBlockX();
|
||||
@@ -581,6 +608,14 @@
|
||||
StructureStart structurestart = structure.generate(iregistrycustom, this, this.biomeSource, randomstate, structuretemplatemanager, i, chunkcoordintpair, j, ichunkaccess, predicate);
|
||||
@@ -582,6 +609,14 @@
|
||||
StructureStart structurestart = structure.generate(structureset_a.structure(), resourcekey, iregistrycustom, this, this.biomeSource, randomstate, structuretemplatemanager, i, chunkcoordintpair, j, ichunkaccess, predicate);
|
||||
|
||||
if (structurestart.isValid()) {
|
||||
+ // CraftBukkit start
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
}
|
||||
|
||||
public abstract ChunkStatus getPersistedStatus();
|
||||
@@ -458,6 +468,27 @@
|
||||
@@ -463,6 +473,27 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
- if (worldserver.getServer().getWorldData().worldGenOptions().generateStructures()) {
|
||||
+ if (worldserver.serverLevelData.worldGenOptions().generateStructures()) { // CraftBukkit
|
||||
worldgencontext.generator().createStructures(worldserver.registryAccess(), worldserver.getChunkSource().getGeneratorState(), worldserver.structureManager(), ichunkaccess, worldgencontext.structureManager());
|
||||
worldgencontext.generator().createStructures(worldserver.registryAccess(), worldserver.getChunkSource().getGeneratorState(), worldserver.structureManager(), ichunkaccess, worldgencontext.structureManager(), worldserver.dimension());
|
||||
}
|
||||
|
||||
@@ -170,7 +170,17 @@
|
||||
|
||||
Reference in New Issue
Block a user