Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mcVersion=26.2
apiVersion=26.2
version=26.2

purpurRef=ed29e9980557c6f252ccbfbc50dced007b6c05f7
purpurRef=6726940fb140e916e93fe6ecd67f051168ec3a29

org.gradle.configuration-cache=true
org.gradle.caching=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@
}

// Paper start - optimise random ticking
@@ -1199,7 +_,7 @@
@@ -1198,7 +_,7 @@
}

public boolean isHandlingTick() {
Expand All @@ -422,7 +422,7 @@
}

public boolean canSleepThroughNights() {
@@ -1420,27 +_,29 @@
@@ -1419,27 +_,29 @@
this.emptyTime = 0;
}

Expand Down Expand Up @@ -456,7 +456,7 @@
((ca.spottedleaf.moonrise.patches.chunk_system.server.ChunkSystemMinecraftServer)this.server).moonrise$executeMidTickTasks();
}
// Paper end - rewrite chunk system
@@ -1495,7 +_,7 @@
@@ -1494,7 +_,7 @@
private void tickPassenger(final Entity vehicle, final Entity entity, final boolean isActive) { // Paper - EAR 2
if (entity.isRemoved() || entity.getVehicle() != vehicle) {
entity.stopRiding();
Expand All @@ -465,7 +465,7 @@
entity.setOldPosAndRot();
entity.tickCount++;
entity.totalEntityAge++; // Paper - age-like counter for all entities
@@ -1719,8 +_,8 @@
@@ -1718,8 +_,8 @@
} else {
if (entity instanceof net.minecraft.world.entity.item.ItemEntity item && item.getItem().isEmpty()) return false; // Paper - Prevent empty items from being added
// Paper start - capture all item additions to the world
Expand All @@ -476,7 +476,7 @@
return true;
}
// Paper end - capture all item additions to the world
@@ -1806,7 +_,9 @@
@@ -1805,7 +_,9 @@
.callEvent();
}
// Paper end - Add BlockBreakProgressUpdateEvent
Expand All @@ -487,7 +487,7 @@
if (player.level() == this && player.getId() != id) {
double xd = blockPos.getX() - player.getX();
double yd = blockPos.getY() - player.getY();
@@ -1817,7 +_,7 @@
@@ -1816,7 +_,7 @@
continue;
}
// CraftBukkit end
Expand All @@ -496,7 +496,7 @@
}
}
}
@@ -1926,7 +_,7 @@
@@ -1925,7 +_,7 @@

@Override
public void sendBlockUpdated(final BlockPos pos, final BlockState old, final BlockState current, final @Block.UpdateFlags int updateFlags) {
Expand All @@ -505,7 +505,7 @@
String message = "recursive call to sendBlockUpdated";
Util.logAndPauseIfInIde("recursive call to sendBlockUpdated", new IllegalStateException("recursive call to sendBlockUpdated"));
}
@@ -1940,7 +_,7 @@
@@ -1939,7 +_,7 @@
List<PathNavigation> navigationsToUpdate = new ObjectArrayList<>();

try { // Paper - catch CME see below why
Expand All @@ -514,7 +514,7 @@
PathNavigation pathNavigation = navigatingMob.getNavigation();
if (pathNavigation.shouldRecomputePath(pos)) {
navigationsToUpdate.add(pathNavigation);
@@ -1957,13 +_,13 @@
@@ -1956,13 +_,13 @@
// Paper end - catch CME see below why

try {
Expand All @@ -530,7 +530,7 @@
}
}
} // Paper - option to disable pathfinding updates
@@ -1972,17 +_,17 @@
@@ -1971,17 +_,17 @@
@Override
public void updateNeighborsAt(final BlockPos pos, final Block sourceBlock) {
// CraftBukkit start
Expand All @@ -551,7 +551,7 @@
this.neighborUpdater.updateNeighborsAtExceptFromFacing(pos, sourceBlock, null, orientation);
}

@@ -2111,14 +_,15 @@
@@ -2110,14 +_,15 @@

@Override
public void blockEvent(final BlockPos pos, final Block block, final int b0, final int b1) {
Expand All @@ -572,7 +572,7 @@
if (this.shouldTickBlocksAt(eventData.pos())) {
if (this.doBlockEvent(eventData)) {
this.server
@@ -2134,11 +_,11 @@
@@ -2133,11 +_,11 @@
);
}
} else {
Expand All @@ -586,7 +586,7 @@
}

private boolean doBlockEvent(final BlockEventData eventData) {
@@ -2388,7 +_,7 @@
@@ -2387,7 +_,7 @@
final MapItemSavedData mapData = storage.get(MapItemSavedData.type(id)); // get populates the cache
if (mapData != null) { // map was read, init it and return
mapData.id = id;
Expand All @@ -595,7 +595,7 @@
return mapData;
}

@@ -2407,8 +_,7 @@
@@ -2406,8 +_,7 @@
public void setMapData(final MapId id, final MapItemSavedData data) {
// CraftBukkit start
data.id = id;
Expand All @@ -605,7 +605,7 @@
// CraftBukkit end
this.getServer().getDataStorage().set(MapItemSavedData.type(id), data);
}
@@ -2464,11 +_,11 @@
@@ -2463,11 +_,11 @@
Optional<Holder<PoiType>> newType = PoiTypes.forState(newState);
if (!Objects.equals(oldType, newType)) {
BlockPos immutable = pos.immutable();
Expand All @@ -619,7 +619,7 @@
// Paper start - Remove stale POIs
if (oldType.isEmpty() && this.getPoiManager().exists(immutable, _ -> true)) {
this.getPoiManager().remove(immutable);
@@ -2531,7 +_,7 @@
@@ -2530,7 +_,7 @@
}

output.write(String.format(Locale.ROOT, "entities: %s\n", this.moonrise$getEntityLookup().getDebugInfo())); // Paper - rewrite chunk system
Expand All @@ -628,7 +628,7 @@
output.write(String.format(Locale.ROOT, "block_ticks: %d\n", this.getBlockTicks().count()));
output.write(String.format(Locale.ROOT, "fluid_ticks: %d\n", this.getFluidTicks().count()));
output.write("distance_manager: " + chunkMap.getDistanceManager().getDebugStatus() + "\n");
@@ -2599,17 +_,25 @@
@@ -2598,17 +_,25 @@
}

private void dumpBlockEntityTickers(final Writer output) throws IOException {
Expand Down Expand Up @@ -661,7 +661,7 @@
}

public Iterable<Entity> getAllEntities() {
@@ -2651,8 +_,8 @@
@@ -2650,8 +_,8 @@
this.players.size(),
this.moonrise$getEntityLookup().getDebugInfo(), // Paper - rewrite chunk system
getTypeCount(this.moonrise$getEntityLookup().getAll(), e -> e.typeHolder().getRegisteredName()), // Paper - rewrite chunk system
Expand All @@ -672,7 +672,7 @@
this.getBlockTicks().count(),
this.getFluidTicks().count(),
this.gatherChunkSourceStats()
@@ -2682,7 +_,7 @@
@@ -2681,7 +_,7 @@

@Override
public LevelEntityGetter<Entity> getEntities() {
Expand All @@ -681,7 +681,7 @@
return this.moonrise$getEntityLookup(); // Paper - rewrite chunk system
}

@@ -2870,7 +_,7 @@
@@ -2869,7 +_,7 @@
// Paper start - optimize redstone (Alternate Current)
@Override
public alternate.current.wire.WireHandler getWireHandler() {
Expand All @@ -690,7 +690,7 @@
}
// Paper end - optimize redstone (Alternate Current)

@@ -2911,12 +_,12 @@
@@ -2910,12 +_,12 @@
@Override
public void onTickingStart(final Entity entity) {
if (entity instanceof net.minecraft.world.entity.Marker && !paperConfig().entities.markers.tick) return; // Paper - Configurable marker ticking
Expand All @@ -705,7 +705,7 @@
// Paper start - Reset pearls when they stop being ticked
if (ServerLevel.this.paperConfig().fixes.disableUnloadedChunkEnderpearlExploit && ServerLevel.this.paperConfig().misc.legacyEnderPearlBehavior && entity instanceof net.minecraft.world.entity.projectile.throwableitemprojectile.ThrownEnderpearl pearl) {
pearl.setOwner(null);
@@ -2926,10 +_,11 @@
@@ -2925,10 +_,11 @@

@Override
public void onTrackingStart(final Entity entity) {
Expand All @@ -718,7 +718,7 @@
if (player.isReceivingWaypoints()) {
ServerLevel.this.getWaypointManager().addPlayer(player);
}
@@ -2942,14 +_,14 @@
@@ -2941,14 +_,14 @@
}

if (entity instanceof Mob mob) {
Expand All @@ -735,7 +735,7 @@
}

if (entity instanceof EnderDragon dragon) {
@@ -2976,7 +_,7 @@
@@ -2975,7 +_,7 @@

@Override
public void onTrackingEnd(final Entity entity) {
Expand All @@ -744,7 +744,7 @@
// Spigot start // TODO I don't think this is needed anymore
if (entity instanceof Player player) {
for (final ServerLevel level : ServerLevel.this.getServer().getAllLevels()) {
@@ -2985,10 +_,12 @@
@@ -2984,10 +_,12 @@
continue;
}

Expand All @@ -757,7 +757,7 @@
}
}
}
@@ -3007,20 +_,21 @@
@@ -3006,20 +_,21 @@
// Spigot end
ServerLevel.this.getChunkSource().removeEntity(entity);
if (entity instanceof ServerPlayer player) {
Expand All @@ -781,7 +781,7 @@
}

if (entity instanceof EnderDragon dragon) {
@@ -3045,6 +_,9 @@
@@ -3044,6 +_,9 @@
@Override
public void onSectionChange(final Entity entity) {
entity.updateDynamicGameEventListener(DynamicGameEventListener::move);
Expand Down