Random and irrelevant changes

This commit is contained in:
Player Name 2026-06-27 18:59:20 +02:00
parent c794cb9fee
commit 97afdb4bb0
3 changed files with 14 additions and 10 deletions

View file

@ -152,7 +152,7 @@ public class ForgeRegentNPC extends Familiar {
familiar.moveStep();
GroundItemManager.destroy(ground);
player.getSkills().addExperience(Skills.FIREMAKING, log.getXp() + 10);
familiar.faceLocation(object.getFaceLocation(familiar.getLocation()));
familiar.faceLocation(object.getFaceLocation(familiar.getLocation()));
SceneryBuilder.add(object, log.getLife(), FireMakingPulse.getAsh(player, log, object));
if (player.getLocation().getRegionId() == 10806) {
player.getAchievementDiaryManager().finishTask(player, DiaryType.SEERS_VILLAGE, 1, 9);

View file

@ -81,7 +81,7 @@ public class RegionChunk {
/**
* The update flags.
*/
private List<UpdateFlag<?>> updateFlags = new ArrayList<>(20);
private final List<UpdateFlag<?>> updateFlags = new ArrayList<>(20);
/**
* The region flags.
@ -481,8 +481,8 @@ public class RegionChunk {
IoBuffer buffer = UpdateAreaPosition.getChunkUpdateBuffer(player, currentBase);
Object[] flagsArray = updateFlags.toArray();
int size = flagsArray.length;
for (Object o : flagsArray) {
UpdateFlag<?> flag = (UpdateFlag<?>) o;
for (int i = 0; i < size; i++) {
UpdateFlag<?> flag = (UpdateFlag<?>) flagsArray[i];
flag.writeDynamic(buffer, player);
}
player.getSession().write(buffer);

View file

@ -43,9 +43,12 @@ object MapChunkRenderer {
val previous = last[x][y] ?: continue
if (containsChunk(current, previous)) {
updated.add(previous)
} else if (previous.region !is DynamicRegion) { //dynamic regions do not need a clear packet and briefly flash their cached states (e.g. POH with only hotspots) if you do send one
PacketRepository.send(ClearRegionChunk::class.java, ClearChunkContext(player, previous))
continue
}
if (previous.region is DynamicRegion) {
continue //dynamic regions do not need a clear packet and briefly flash their cached states (e.g. POH with only hotspots) if you do send one
}
PacketRepository.send(ClearRegionChunk::class.java, ClearChunkContext(player, previous))
}
}
sizeX = current.size
@ -53,12 +56,13 @@ object MapChunkRenderer {
val sizeY: Int = current[x].size
for (y in 0 until sizeY) {
val chunk = current[x][y]
if (!updated.contains(chunk)) {
chunk.synchronize(player)
} else {
if (updated.contains(chunk)) {
chunk.update(player)
} else {
println("Syncing ${chunk.currentBase}")
chunk.synchronize(player)
}
last[x][y] = current[x][y]
last[x][y] = chunk
}
}
}