more progress
This commit is contained in:
@@ -16,28 +16,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- private static final Map<IBlockAccess, List<BlockRedstoneTorch.RedstoneUpdateInfo>> b = new WeakHashMap();
|
||||
+ // Paper - Move the mapped list to World
|
||||
|
||||
protected BlockRedstoneTorch(Block.Info block_info) {
|
||||
super(block_info);
|
||||
protected BlockRedstoneTorch(BlockBase.Info blockbase_info) {
|
||||
super(blockbase_info, ParticleParamRedstone.a);
|
||||
@@ -0,0 +0,0 @@ public class BlockRedstoneTorch extends BlockTorch {
|
||||
}
|
||||
|
||||
public static void a(IBlockData iblockdata, World world, BlockPosition blockposition, Random random, boolean flag) {
|
||||
- List list = (List) BlockRedstoneTorch.b.get(world);
|
||||
+ // Paper start
|
||||
+ java.util.ArrayDeque<BlockRedstoneTorch.RedstoneUpdateInfo> redstoneUpdateInfos = world.redstoneUpdateInfos;
|
||||
|
||||
- while (list != null && !list.isEmpty() && world.getTime() - ((BlockRedstoneTorch.RedstoneUpdateInfo) list.get(0)).b > 60L) {
|
||||
@Override
|
||||
public void tickAlways(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||
boolean flag = this.a((World) worldserver, blockposition, iblockdata);
|
||||
- List list = (List) BlockRedstoneTorch.b.get(worldserver);
|
||||
-
|
||||
- while (list != null && !list.isEmpty() && worldserver.getTime() - ((BlockRedstoneTorch.RedstoneUpdateInfo) list.get(0)).b > 60L) {
|
||||
- list.remove(0);
|
||||
+ // Paper start
|
||||
+ java.util.ArrayDeque<BlockRedstoneTorch.RedstoneUpdateInfo> redstoneUpdateInfos = worldserver.redstoneUpdateInfos;
|
||||
+ if (redstoneUpdateInfos != null) {
|
||||
+ BlockRedstoneTorch.RedstoneUpdateInfo curr;
|
||||
+ while ((curr = redstoneUpdateInfos.peek()) != null && world.getTime() - curr.getTime() > 60L) {
|
||||
+ while ((curr = redstoneUpdateInfos.peek()) != null && worldserver.getTime() - curr.getTime() > 60L) {
|
||||
+ redstoneUpdateInfos.poll();
|
||||
+ }
|
||||
}
|
||||
+ // Paper end
|
||||
|
||||
// CraftBukkit start
|
||||
org.bukkit.plugin.PluginManager manager = world.getServer().getPluginManager();
|
||||
org.bukkit.plugin.PluginManager manager = worldserver.getServer().getPluginManager();
|
||||
@@ -0,0 +0,0 @@ public class BlockRedstoneTorch extends BlockTorch {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user