mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-04 10:11:29 +01:00
d10ea572de
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers CraftBukkit Changes:1cf8b5dc
SPIGOT-4400: Populators running on existing chunks116cb9a1
SPIGOT-4399: Add attribute modifier equality test5ee1c18a
SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
68 lines
No EOL
2.8 KiB
Diff
68 lines
No EOL
2.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Fri, 13 May 2016 01:38:06 -0400
|
|
Subject: [PATCH] Optimize EAR
|
|
|
|
|
|
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
|
index f52de10238..12040596df 100644
|
|
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
|
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
|
@@ -0,0 +0,0 @@ package org.spigotmc;
|
|
|
|
import java.util.List;
|
|
import java.util.Set;
|
|
+
|
|
+import co.aikar.timings.MinecraftTimings;
|
|
import net.minecraft.server.AxisAlignedBB;
|
|
import net.minecraft.server.Chunk;
|
|
import net.minecraft.server.Entity;
|
|
@@ -0,0 +0,0 @@ import net.minecraft.server.EntityCreature;
|
|
import net.minecraft.server.EntityCreeper;
|
|
import net.minecraft.server.EntityEnderCrystal;
|
|
import net.minecraft.server.EntityEnderDragon;
|
|
-import net.minecraft.server.EntityFallingBlock; // Paper
|
|
+import net.minecraft.server.EntityFallingBlock;
|
|
import net.minecraft.server.EntityFireball;
|
|
import net.minecraft.server.EntityFireworks;
|
|
import net.minecraft.server.EntityHuman;
|
|
@@ -0,0 +0,0 @@ import net.minecraft.server.EntityLiving;
|
|
import net.minecraft.server.EntityMonster;
|
|
import net.minecraft.server.EntityProjectile;
|
|
import net.minecraft.server.EntitySheep;
|
|
-import net.minecraft.server.EntitySlice;
|
|
import net.minecraft.server.EntitySlime;
|
|
import net.minecraft.server.EntityTNTPrimed;
|
|
import net.minecraft.server.EntityThrownTrident;
|
|
import net.minecraft.server.EntityVillager;
|
|
import net.minecraft.server.EntityWeather;
|
|
import net.minecraft.server.EntityWither;
|
|
+import net.minecraft.server.MCUtil;
|
|
import net.minecraft.server.MathHelper;
|
|
import net.minecraft.server.MinecraftServer;
|
|
import net.minecraft.server.World;
|
|
-import co.aikar.timings.MinecraftTimings;
|
|
|
|
public class ActivationRange
|
|
{
|
|
@@ -0,0 +0,0 @@ public class ActivationRange
|
|
maxRange = Math.max( maxRange, miscActivationRange );
|
|
//maxRange = Math.min( ( world.spigotConfig.viewDistance << 4 ) - 8, maxRange ); Paper - Use player view distance API below instead
|
|
|
|
+ Chunk chunk; // Paper
|
|
for ( EntityHuman player : world.players )
|
|
{
|
|
int playerMaxRange = maxRange = Math.min( ( player.getViewDistance() << 4 ) - 8, maxRange ); // Paper - Use player view distance API
|
|
@@ -0,0 +0,0 @@ public class ActivationRange
|
|
{
|
|
for ( int j1 = k; j1 <= l; ++j1 )
|
|
{
|
|
- if ( world.getWorld().isChunkLoaded( i1, j1 ) )
|
|
+ if ( (chunk = MCUtil.getLoadedChunkWithoutMarkingActive(world, i1, j1 )) != null ) // Paper
|
|
{
|
|
- activateChunkEntities( world.getChunkAt( i1, j1 ) );
|
|
+ activateChunkEntities( chunk ); // Paper
|
|
}
|
|
}
|
|
}
|
|
--
|