3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00

Rebuild and simplify map call

Dieser Commit ist enthalten in:
Zach Brown 2018-08-25 22:48:24 -04:00
Ursprung 081b7b00f8
Commit c1c1ac6f8b
6 geänderte Dateien mit 21 neuen und 23 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From 44f0044a3ab0ace432654c49ba5ba0be97e2e8fa Mon Sep 17 00:00:00 2001
From 74f68b921eaba613b8368d573d6cc02e80d0a2c1 Mon Sep 17 00:00:00 2001
From: miclebrick <miclebrick@outlook.com>
Date: Thu, 23 Aug 2018 11:45:32 -0400
Subject: [PATCH] Optimize CraftBlockData Creation
@ -7,7 +7,7 @@ Avoids a hashmap lookup by cacheing a reference to the CraftBlockData
and cloning it when one is needed.
diff --git a/src/main/java/net/minecraft/server/BlockData.java b/src/main/java/net/minecraft/server/BlockData.java
index 4dd6c3276..1b226a77e 100644
index 4dd6c32761..1b226a77e0 100644
--- a/src/main/java/net/minecraft/server/BlockData.java
+++ b/src/main/java/net/minecraft/server/BlockData.java
@@ -1,6 +1,7 @@
@ -34,7 +34,7 @@ index 4dd6c3276..1b226a77e 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java
index b57f6efb3..7b1d750f3 100644
index b57f6efb3a..7b1d750f3a 100644
--- a/src/main/java/net/minecraft/server/IBlockData.java
+++ b/src/main/java/net/minecraft/server/IBlockData.java
@@ -28,6 +28,8 @@ public interface IBlockData extends IBlockDataHolder<IBlockData> {
@ -47,7 +47,7 @@ index b57f6efb3..7b1d750f3 100644
return this.getBlock().n(this);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index a4f3dd1b0..baaace693 100644
index a4f3dd1b03..baaace6937 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -494,7 +494,17 @@ public class CraftBlockData implements BlockData {

Datei anzeigen

@ -1,4 +1,4 @@
From 4e20dcaec791a7eede2ce8958f731790b36de1eb Mon Sep 17 00:00:00 2001
From 8035824774474a755f5d868bf3fdea79940db2df Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Thu, 23 Aug 2018 09:25:30 -0500
Subject: [PATCH] Fix MC-124320

Datei anzeigen

@ -1,11 +1,11 @@
From faf531d9b164f4b99b13d13bb0ca72f26f80ceed Mon Sep 17 00:00:00 2001
From f61af69c38c8da6ea99150bcdb063c12cf6491e2 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 24 Aug 2018 08:18:42 -0500
Subject: [PATCH] Slime Pathfinder Events
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
index eeaf98e82..8752c62b0 100644
index eeaf98e8..8752c62b 100644
--- a/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/src/main/java/net/minecraft/server/EntitySlime.java
@@ -57,6 +57,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@ -115,7 +115,7 @@ index eeaf98e82..8752c62b0 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
index 18e7ef80a..8403c1e01 100644
index 18e7ef80..8403c1e0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
@@ -33,4 +33,14 @@ public class CraftSlime extends CraftMob implements Slime {

Datei anzeigen

@ -1,4 +1,4 @@
From f503290e3d8ddca727fd3adab58eaf77e759bf62 Mon Sep 17 00:00:00 2001
From cca0a12cca8a970b2a885d93e976d9159b2072ad Mon Sep 17 00:00:00 2001
From: cswhite2000 <18whitechristop@gmail.com>
Date: Tue, 21 Aug 2018 19:44:10 -0700
Subject: [PATCH] isChunkGenerated API

Datei anzeigen

@ -1,14 +1,14 @@
From 25f86ec550e8fd1c17f3df8d5413bf3ba6eba39f Mon Sep 17 00:00:00 2001
From 33452d6bc4fe6ab71a2340e3d370af273de30a33 Mon Sep 17 00:00:00 2001
From: Sotr <i@omc.hk>
Date: Thu, 23 Aug 2018 16:14:12 +0800
Subject: [PATCH] Add source block to BlockPhysicsEvent
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 2f85a0fa0..7b694efb6 100644
index 16d0c0d45..a4d9f0d5f 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -608,7 +608,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -603,7 +603,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
// CraftBukkit start
CraftWorld world = ((WorldServer) this).getWorld();
if (world != null && !((WorldServer)this).stopPhysicsEvent) { // Paper

Datei anzeigen

@ -1,4 +1,4 @@
From af00f9dcbb93cca7e2f193107d3feb7082b4657d Mon Sep 17 00:00:00 2001
From fa8181ae204e0f66de22dcec2ff7cb737d10f0cb Mon Sep 17 00:00:00 2001
From: stonar96 <minecraft.stonar96@gmail.com>
Date: Mon, 20 Aug 2018 03:03:58 +0200
Subject: [PATCH] Anti-Xray
@ -100,10 +100,10 @@ index 000000000..1ba8477bf
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
new file mode 100644
index 000000000..f44eaaccc
index 000000000..ed21f8515
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
@@ -0,0 +1,670 @@
@@ -0,0 +1,668 @@
+package com.destroystokyo.paper.antixray;
+
+import java.util.HashSet;
@ -700,12 +700,10 @@ index 000000000..f44eaaccc
+ }
+
+ private void updateBlock(World world, BlockPosition blockPosition) {
+ if (world.isLoaded(blockPosition)) {
+ IBlockData blockData = world.getType(blockPosition);
+ IBlockData blockData = world.getTypeIfLoaded(blockPosition);
+
+ if (obfuscateGlobal[ChunkSection.GLOBAL_PALETTE.getDataBits(blockData)]) {
+ world.notify(blockPosition, blockData, blockData, 3);
+ }
+ if (blockData != null && obfuscateGlobal[ChunkSection.GLOBAL_PALETTE.getDataBits(blockData)]) {
+ world.notify(blockPosition, blockData, blockData, 3);
+ }
+ }
+
@ -1114,7 +1112,7 @@ index 233cbb6d6..8c116b74c 100644
if (flag) {
this.skyLight = new NibbleArray();
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
index 668829c5b..7c414ed8a 100644
index ed20454d0..2b14e0051 100644
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
@@ -43,7 +43,7 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
@ -1515,7 +1513,7 @@ index 584a86c11..62a7d3c23 100644
if (enumskyblock == EnumSkyBlock.SKY) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 16d0c0d45..2f85a0fa0 100644
index a4d9f0d5f..7b694efb6 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1,6 +1,8 @@
@ -1577,5 +1575,5 @@ index c26f0ed16..f6915d32a 100644
return section;
}
--
2.18.0.windows.1
2.17.1