From 2c2e7033463a094ed2d8e2cd0dfc77ae940b1ba0 Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Sun, 27 Feb 2022 17:24:56 +0100
Subject: [PATCH 01/22] remove unneeded boat interaction event
---
NachoSpigot-Server/pom.xml | 2 +-
.../src/main/java/net/minecraft/server/ItemBoat.java | 11 ++++++-----
pom.xml | 2 +-
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/NachoSpigot-Server/pom.xml b/NachoSpigot-Server/pom.xml
index 4e5161035..1aa181b4f 100644
--- a/NachoSpigot-Server/pom.xml
+++ b/NachoSpigot-Server/pom.xml
@@ -312,7 +312,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.8.1
+ 3.10.0
org.apache.maven.plugins
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java
index eb62bbb68..72eff0955 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java
@@ -25,9 +25,9 @@ public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) {
float f8 = f3 * f5;
double d3 = 5.0D;
Vec3D vec3d1 = vec3d.add((double) f7 * d3, (double) f6 * d3, (double) f8 * d3);
- MovingObjectPosition movingobjectposition = world.rayTrace(vec3d, vec3d1, true);
+ MovingObjectPosition movingobjectpositionblock = world.rayTrace(vec3d, vec3d1, true);
- if (movingobjectposition == null) {
+ if (movingobjectpositionblock == null) {
return itemstack;
} else {
Vec3D vec3d2 = entityhuman.d(f);
@@ -51,9 +51,10 @@ public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) {
if (flag) {
return itemstack;
} else {
- if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK) {
- BlockPosition blockposition = movingobjectposition.a();
+ if (movingobjectpositionblock.type == MovingObjectPosition.EnumMovingObjectType.BLOCK) {
+ BlockPosition blockposition = movingobjectpositionblock.a();
+ /* Paper - Remove unneeded interaction event trigger
// CraftBukkit start - Boat placement
org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(entityhuman, org.bukkit.event.block.Action.RIGHT_CLICK_BLOCK, blockposition, movingobjectposition.direction, itemstack);
@@ -61,13 +62,13 @@ public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) {
return itemstack;
}
// CraftBukkit end
+ */ // Paper - Remove unneeded interaction event trigger
if (world.getType(blockposition).getBlock() == Blocks.SNOW_LAYER) {
blockposition = blockposition.down();
}
EntityBoat entityboat = new EntityBoat(world, (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 1.0F), (double) ((float) blockposition.getZ() + 0.5F));
-
entityboat.yaw = (float) (((MathHelper.floor((double) (entityhuman.yaw * 4.0F / 360.0F) + 0.5D) & 3) - 1) * 90);
if (!world.getCubes(entityboat, entityboat.getBoundingBox().grow(-0.1D, -0.1D, -0.1D)).isEmpty()) {
return itemstack;
diff --git a/pom.xml b/pom.xml
index 84f6e9492..00b2191a8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.sonatype.oss
oss-parent
- 7
+ 9
dev.cobblesword.nachospigot
From 36fb0aea0d3cd68c2b2e1e583c2d36389a4d6660 Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Mon, 28 Feb 2022 12:49:07 +0100
Subject: [PATCH 02/22] Use Vanilla Minecart Speeds + comment fixes
---
.../net/minecraft/server/BlockStateEnum.java | 3 +--
.../minecraft/server/ChunkProviderServer.java | 4 ++++
.../net/minecraft/server/DataWatcher.java | 22 +++++++++----------
.../server/EntityMinecartAbstract.java | 6 ++---
.../minecraft/server/PlayerConnection.java | 2 +-
.../net/minecraft/server/TileEntitySign.java | 6 ++++-
6 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/BlockStateEnum.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/BlockStateEnum.java
index ca38c5959..a768d23be 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/BlockStateEnum.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/BlockStateEnum.java
@@ -42,8 +42,7 @@ public String a(T t0) {
// TacoSpigot start
@Override
- public int
-getValueId(T value) {
+ public int getValueId(T value) {
return value.ordinal();
}
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderServer.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderServer.java
index a5c45537c..f61c79ada 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -39,6 +39,10 @@ public ChunkProviderServer(WorldServer worldserver, IChunkLoader ichunkloader, I
this.chunkProvider = ichunkprovider;
}
+ final Long2ObjectOpenHashMap loadedChunkMap = new Long2ObjectOpenHashMap<>(8192, 0.5f);
+
+ private final Chunk[] lastLoadedChunks = new Chunk[4 * 4];
+
public boolean isChunkLoaded(int i, int j) {
return this.chunks.containsKey(LongHash.toLong(i, j)); // CraftBukkit
}
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/DataWatcher.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/DataWatcher.java
index 42b431d07..1e4c84a3e 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/DataWatcher.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/DataWatcher.java
@@ -30,7 +30,7 @@ public class DataWatcher {
// TacoSpigot end
// Spigot End
private boolean e;
-// private ReadWriteLock f = new ReentrantReadWriteLock(); // Spigot - Remove DataWatcher Locking
+ //private ReadWriteLock f = new ReentrantReadWriteLock(); // Spigot - Remove DataWatcher Locking
boolean registrationLocked; // Spigot
public DataWatcher(Entity entity) {
@@ -50,9 +50,9 @@ public void a(int i, T t0) {
} else {
DataWatcher.WatchableObject datawatcher_watchableobject = new DataWatcher.WatchableObject(integer, i, t0); // Spigot
-// this.f.writeLock().lock(); // Spigot - not required
+ //this.f.writeLock().lock(); // Spigot - not required
this.dataValues.put(i, datawatcher_watchableobject); // Spigot
-// this.f.writeLock().unlock(); // Spigot - not required
+ //this.f.writeLock().unlock(); // Spigot - not required
this.b = false;
}
}
@@ -109,8 +109,8 @@ private DataWatcher.WatchableObject j(int i) {
this.f.readLock().unlock();
return datawatcher_watchableobject;
+ */
- */
return (WatchableObject) this.dataValues.get(i);
}
@@ -157,7 +157,7 @@ public List b() {
ArrayList arraylist = null;
if (this.e) {
-// this.f.readLock().lock(); // Spigot - not required
+ //this.f.readLock().lock(); // Spigot - not required
Iterator iterator = this.dataValues.values().iterator(); // Spigot // TacoSpigot
while (iterator.hasNext()) {
@@ -169,7 +169,7 @@ public List b() {
arraylist = Lists.newArrayList();
}
- // Spigot start - copy ItemStacks to prevent ConcurrentModificationExceptions
+ // Spigot start - copy ItemStacks to prevent ConcurrentModificationExceptions
if ( datawatcher_watchableobject.b() instanceof ItemStack )
{
datawatcher_watchableobject = new WatchableObject(
@@ -184,7 +184,7 @@ public List b() {
}
}
-// this.f.readLock().unlock(); // Spigot - not required
+ //this.f.readLock().unlock(); // Spigot - not required
}
this.e = false;
@@ -192,7 +192,7 @@ public List b() {
}
public void a(PacketDataSerializer serializer) throws IOException {
-// this.f.readLock().lock(); // Spigot - not required
+ //this.f.readLock().lock(); // Spigot - not required
Iterator iterator = this.dataValues.values().iterator(); // Spigot // TacoSpigot
while (iterator.hasNext()) {
@@ -201,14 +201,14 @@ public void a(PacketDataSerializer serializer) throws IOException {
a(serializer, datawatcher_watchableobject);
}
-// this.f.readLock().unlock(); // Spigot - not required
+ //this.f.readLock().unlock(); // Spigot - not required
serializer.writeByte(127);
}
public List c() {
ArrayList arraylist = Lists.newArrayList(); // Spigot
-// this.f.readLock().lock(); // Spigot - not required
+ //this.f.readLock().lock(); // Spigot - not required
arraylist.addAll(this.dataValues.values()); // Spigot // TacoSpigot
// Spigot start - copy ItemStacks to prevent ConcurrentModificationExceptions
@@ -227,7 +227,7 @@ public List c() {
}
// Spigot end
-// this.f.readLock().unlock(); // Spigot - not required
+ //this.f.readLock().unlock(); // Spigot - not required
return arraylist;
}
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
index 18f7fdded..70882e82a 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
@@ -30,9 +30,9 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
private double derailedX = 0.5;
private double derailedY = 0.5;
private double derailedZ = 0.5;
- private double flyingX = 0.95;
- private double flyingY = 0.95;
- private double flyingZ = 0.95;
+ private double flyingX = 0.949999988079071D; // Paper - restore vanilla precision
+ private double flyingY = 0.949999988079071D; // Paper - restore vanilla precision
+ private double flyingZ = 0.949999988079071D; // Paper - restore vanilla precision
public double maxSpeed = 0.4D;
// CraftBukkit end
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/PlayerConnection.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/PlayerConnection.java
index bb30814de..f01cb2283 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2074,7 +2074,7 @@ public void a(PacketPlayInUpdateSign packetplayinupdatesign) {
TileEntitySign tileentitysign = (TileEntitySign) tileentity;
- if (!tileentitysign.b() || tileentitysign.c() != this.player) {
+ if (!tileentitysign.b() || tileentitysign.signEditor == null || !tileentitysign.signEditor.equals(this.player.getUniqueID())) { // Paper
this.minecraftServer.warning("Player " + this.player.getName() + " just tried to change non-editable sign");
this.sendPacket(new PacketPlayOutUpdateSign(tileentity.world, packetplayinupdatesign.a(), tileentitysign.lines)); // CraftBukkit
return;
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
index e927fd237..a21b8718b 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -9,6 +9,7 @@ public class TileEntitySign extends TileEntity {
public boolean isEditable = true;
private EntityHuman h;
private final CommandObjectiveExecutor i = new CommandObjectiveExecutor();
+ public java.util.UUID signEditor;
public TileEntitySign() {}
@@ -121,7 +122,10 @@ public boolean b() {
}
public void a(EntityHuman entityhuman) {
- this.h = entityhuman;
+ // Paper start
+ //this.h = entityhuman;
+ signEditor = entityhuman != null ? entityhuman.getUniqueID() : null;
+ // Paper end
}
public EntityHuman c() {
From beb221cc46d40b9b0c091e71e6f75e2ec2c30940 Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Mon, 28 Feb 2022 17:00:01 +0100
Subject: [PATCH 03/22] few things
---
NachoSpigot-API/pom.xml | 5 +--
NachoSpigot-Server/pom.xml | 39 ++++++-------------
.../net/minecraft/server/MinecraftServer.java | 21 ++++++++++
.../minecraft/server/TileEntityHopper.java | 2 +-
.../net/minecraft/server/TileEntitySign.java | 2 +-
.../craftbukkit/block/CraftBlockState.java | 9 +++--
README.md | 4 +-
7 files changed, 44 insertions(+), 38 deletions(-)
diff --git a/NachoSpigot-API/pom.xml b/NachoSpigot-API/pom.xml
index 60f3ebe07..28d8e2754 100644
--- a/NachoSpigot-API/pom.xml
+++ b/NachoSpigot-API/pom.xml
@@ -54,7 +54,7 @@
com.google.code.gson
gson
- 2.8.9
+ 2.9.0
org.avaje
@@ -83,7 +83,7 @@
org.checkerframework
checker-qual
- 3.21.0
+ 3.21.2
@@ -92,7 +92,6 @@
adventure-key
4.9.3
-
junit
diff --git a/NachoSpigot-Server/pom.xml b/NachoSpigot-Server/pom.xml
index 1aa181b4f..e530eb1b1 100644
--- a/NachoSpigot-Server/pom.xml
+++ b/NachoSpigot-Server/pom.xml
@@ -59,7 +59,7 @@
it.unimi.dsi
fastutil
- 8.5.6
+ 8.5.8
net.jafama
@@ -69,7 +69,7 @@
net.sf.jopt-simple
jopt-simple
- 3.2
+ 5.0.4
jar
compile
@@ -100,23 +100,6 @@
log4j-core
2.17.1
compile
-
-
- org.apache.logging.log4j
- log4j-api
- 2.17.1
- compile
-
-
- org.apache.logging.log4j
- log4j-slf4j-impl
- 2.17.1
- compile
-
-
- org.apache.logging.log4j
- log4j-iostreams
- 2.17.1
org.slf4j
@@ -151,7 +134,7 @@
com.velocitypowered
velocity-native
- 1.1.0-SNAPSHOT
+ 3.1.0
@@ -169,8 +152,8 @@
https://maven.elmakers.com/repository/
- velocity-repo
- https://repo.velocitypowered.com/snapshots/
+ velocity
+ https://nexus.velocitypowered.com/repository/maven-public/
@@ -180,18 +163,18 @@
install
- com.lukegb.mojo
- gitdescribe-maven-plugin
- 1.3
+ net.md-5
+ scriptus
+ 0.4
git-NachoSpigot-
..
- compile
+ initialize
- gitdescribe
+ describe
@@ -199,7 +182,7 @@
org.apache.maven.plugins
maven-jar-plugin
- 2.5
+ 3.2.2
NachoSpigot
true
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java
index d83d94023..c10f4b3cf 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -811,6 +811,8 @@ public void B() {
// Paper start - optimize time updates
int i;
+ // Paper start - optimize time updates
+ /*
if ((this.ticks % 20) == 0)
{
for (i = 0; i < this.worlds.size(); ++i) {
@@ -834,7 +836,26 @@ public void B() {
}
}
}
+ } */
+ for (i = 0; i < this.worlds.size(); ++i) { // Nacho
+ final WorldServer world = this.worlds.get(i); // Nacho
+ final boolean doDaylight = world.getGameRules().getBoolean("doDaylightCycle");
+ final long dayTime = world.getDayTime();
+ long worldTime = world.getTime();
+ final PacketPlayOutUpdateTime worldPacket = new PacketPlayOutUpdateTime(worldTime, dayTime, doDaylight);
+ for (EntityHuman entityhuman : world.players) {
+ if (!(entityhuman instanceof EntityPlayer) || (ticks + entityhuman.getId()) % 20 != 0) {
+ continue;
+ }
+ EntityPlayer entityplayer = (EntityPlayer) entityhuman;
+ long playerTime = entityplayer.getPlayerTime();
+ PacketPlayOutUpdateTime packet = (playerTime == dayTime) ? worldPacket :
+ new PacketPlayOutUpdateTime(worldTime, playerTime, doDaylight);
+ entityplayer.playerConnection.sendPacket(packet); // Add support for per player time
+ }
}
+ // Paper end
+
SpigotTimings.timeUpdateTimer.stopTiming(); // Spigot
for (i = 0; i < this.worlds.size(); ++i) {
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntityHopper.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntityHopper.java
index 460a43705..72b8b264a 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -569,7 +569,7 @@ private static ItemStack c(IInventory iinventory, ItemStack itemstack, int i, En
tileentityhopper.d(tileentityhopper.world.spigotConfig.hopperTransfer); // Spigot
}
-// iinventory.update(); // Paper
+ //iinventory.update(); // Paper
}
iinventory.update();
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
index a21b8718b..14fecb817 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -9,7 +9,7 @@ public class TileEntitySign extends TileEntity {
public boolean isEditable = true;
private EntityHuman h;
private final CommandObjectiveExecutor i = new CommandObjectiveExecutor();
- public java.util.UUID signEditor;
+ public java.util.UUID signEditor;
public TileEntitySign() {}
diff --git a/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
index 4a8c8141b..e6d3eb1e1 100644
--- a/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
+++ b/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
@@ -25,7 +25,7 @@ public class CraftBlockState implements BlockState {
protected int type;
protected MaterialData data;
protected int flag;
- protected final byte light;
+ //protected final byte light; // CraftBukkit - SPIGOT-2286
public CraftBlockState(final Block block) {
this.world = (CraftWorld) block.getWorld();
@@ -33,7 +33,7 @@ public CraftBlockState(final Block block) {
this.y = block.getY();
this.z = block.getZ();
this.type = block.getTypeId();
- this.light = block.getLightLevel();
+ //this.light = block.getLightLevel(); // CraftBukkit - SPIGOT-2286
this.chunk = (CraftChunk) block.getChunk();
this.flag = 3;
@@ -48,7 +48,7 @@ public CraftBlockState(final Block block, int flag) {
public CraftBlockState(Material material) {
world = null;
type = material.getId();
- light = 0;
+ // light = 0; // CraftBukkit - SPIGOT-2286
chunk = null;
x = y = z = 0;
}
@@ -132,7 +132,8 @@ public int getTypeId() {
}
public byte getLightLevel() {
- return light;
+ //return light; // CraftBukkit - SPIGOT-2286
+ return getBlock().getLightLevel(); // CraftBukkit - SPIGOT-2286
}
public Block getBlock() {
diff --git a/README.md b/README.md
index c5c3812ab..d89a8d1ac 100644
--- a/README.md
+++ b/README.md
@@ -83,8 +83,10 @@ See: [Contributors Page](https://github.com/CobbleSword/NachoSpigot/graphs/contr
[Paper-0352] Optimize BlockPosition helper methods by Spottedleaf
[Paper-0353] Send nearby packets from world player list not server list by Mystiflow
[Paper-0389] performance improvement for Chunk.getEntities by wea_ondara
-[Paper-0539] Optimize NetworkManager Exception Handling by Andrew Steinborn
+[Paper-0404] Optimize World Time Updates
[Paper-0451] Reduce memory footprint of NBTTagCompound by spottedleaf
+[Paper-0539] Optimize NetworkManager Exception Handling by Andrew Steinborn
+[Paper-0730] Remove interact event from boat
[Paper-0797] Use Velocity compression and cipher natives
[Paper-????] Cleanup allocated favicon ByteBuf by Shane Freeder
From c6d2600d42f342b7728d3c147df1c74cc5e83277 Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Tue, 1 Mar 2022 00:31:04 +0100
Subject: [PATCH 04/22] Update
NachoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java
Co-authored-by: Elier <71361901+Elierrr@users.noreply.github.com>
---
.../src/main/java/net/minecraft/server/MinecraftServer.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java
index c10f4b3cf..ed44a2c99 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -808,7 +808,6 @@ public void B() {
SpigotTimings.timeUpdateTimer.startTiming(); // Spigot
// Send time updates to everyone, it will get the right time from the world the player is in.
- // Paper start - optimize time updates
int i;
// Paper start - optimize time updates
From 636e7b6c94b9f9fa46c90ce9f5dfff10f14e4bab Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Tue, 1 Mar 2022 00:35:33 +0100
Subject: [PATCH 05/22] Update NachoSpigot-Server/pom.xml
Co-authored-by: Elier <71361901+Elierrr@users.noreply.github.com>
---
NachoSpigot-Server/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/NachoSpigot-Server/pom.xml b/NachoSpigot-Server/pom.xml
index e530eb1b1..83eadb0d2 100644
--- a/NachoSpigot-Server/pom.xml
+++ b/NachoSpigot-Server/pom.xml
@@ -134,7 +134,7 @@
com.velocitypowered
velocity-native
- 3.1.0
+ 1.1.0-SNAPSHOT
From dc6731b99c6dfdca879c16f5d3a76933871ebbfe Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Tue, 1 Mar 2022 00:35:56 +0100
Subject: [PATCH 06/22] Update
NachoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderServer.java
Co-authored-by: Elier <71361901+Elierrr@users.noreply.github.com>
---
.../main/java/net/minecraft/server/ChunkProviderServer.java | 4 ----
1 file changed, 4 deletions(-)
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderServer.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderServer.java
index f61c79ada..a5c45537c 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -39,10 +39,6 @@ public ChunkProviderServer(WorldServer worldserver, IChunkLoader ichunkloader, I
this.chunkProvider = ichunkprovider;
}
- final Long2ObjectOpenHashMap loadedChunkMap = new Long2ObjectOpenHashMap<>(8192, 0.5f);
-
- private final Chunk[] lastLoadedChunks = new Chunk[4 * 4];
-
public boolean isChunkLoaded(int i, int j) {
return this.chunks.containsKey(LongHash.toLong(i, j)); // CraftBukkit
}
From 4ff464438ff87c6d31b59a631dee2d06c1e5615a Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Tue, 1 Mar 2022 00:36:51 +0100
Subject: [PATCH 07/22] Update
NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
Co-authored-by: Elier <71361901+Elierrr@users.noreply.github.com>
---
.../src/main/java/net/minecraft/server/TileEntitySign.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
index 14fecb817..4b38af4a4 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -7,9 +7,9 @@ public class TileEntitySign extends TileEntity {
public final IChatBaseComponent[] lines = new IChatBaseComponent[] { new ChatComponentText(""), new ChatComponentText(""), new ChatComponentText(""), new ChatComponentText("")};
public int f = -1;
public boolean isEditable = true;
- private EntityHuman h;
+ //private EntityHuman h; // Paper
private final CommandObjectiveExecutor i = new CommandObjectiveExecutor();
- public java.util.UUID signEditor;
+ public java.util.UUID signEditor; // Paper
public TileEntitySign() {}
From 4f0f4af09ec2c94f96c348428a68437ee1a44a7b Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Tue, 1 Mar 2022 00:38:10 +0100
Subject: [PATCH 08/22] Update pom.xml
Co-authored-by: Elier <71361901+Elierrr@users.noreply.github.com>
---
pom.xml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index 00b2191a8..699e412c9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,9 +2,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
- org.sonatype.oss
- oss-parent
9
From 961820db418b460ed9fb112210fe62366d9a0779 Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Tue, 1 Mar 2022 00:38:16 +0100
Subject: [PATCH 09/22] Update pom.xml
Co-authored-by: Elier <71361901+Elierrr@users.noreply.github.com>
---
pom.xml | 2 --
1 file changed, 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 699e412c9..d97141dbe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,8 +2,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- 9
-
dev.cobblesword.nachospigot
parent
From 38cbe6e5f6139c7ce0f4b251ce8a7a69faba929b Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Tue, 1 Mar 2022 00:38:34 +0100
Subject: [PATCH 10/22] Update
NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
Co-authored-by: Elier <71361901+Elierrr@users.noreply.github.com>
---
.../main/java/org/bukkit/craftbukkit/block/CraftBlockState.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
index e6d3eb1e1..f95d2e379 100644
--- a/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
+++ b/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
@@ -25,7 +25,6 @@ public class CraftBlockState implements BlockState {
protected int type;
protected MaterialData data;
protected int flag;
- //protected final byte light; // CraftBukkit - SPIGOT-2286
public CraftBlockState(final Block block) {
this.world = (CraftWorld) block.getWorld();
From e2cda97576149a6cfcfa6f6739eb36a8ddb77a84 Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Tue, 1 Mar 2022 00:38:41 +0100
Subject: [PATCH 11/22] Update
NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
Co-authored-by: Elier <71361901+Elierrr@users.noreply.github.com>
---
.../main/java/org/bukkit/craftbukkit/block/CraftBlockState.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
index f95d2e379..20b648da4 100644
--- a/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
+++ b/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
@@ -32,7 +32,6 @@ public CraftBlockState(final Block block) {
this.y = block.getY();
this.z = block.getZ();
this.type = block.getTypeId();
- //this.light = block.getLightLevel(); // CraftBukkit - SPIGOT-2286
this.chunk = (CraftChunk) block.getChunk();
this.flag = 3;
From 392058df87095128b8fe18ef6a2e9a5756bed847 Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Tue, 1 Mar 2022 00:38:48 +0100
Subject: [PATCH 12/22] Update
NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
Co-authored-by: Elier <71361901+Elierrr@users.noreply.github.com>
---
.../java/org/bukkit/craftbukkit/block/CraftBlockState.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
index 20b648da4..03be7e25b 100644
--- a/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
+++ b/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
@@ -130,8 +130,7 @@ public int getTypeId() {
}
public byte getLightLevel() {
- //return light; // CraftBukkit - SPIGOT-2286
- return getBlock().getLightLevel(); // CraftBukkit - SPIGOT-2286
+ return getBlock().getLightLevel();
}
public Block getBlock() {
From c58cf1579b7459c715f263d6872ce53c985a7c9f Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Tue, 1 Mar 2022 11:03:05 +0100
Subject: [PATCH 13/22] Update
NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
Co-authored-by: Elier <71361901+Elierrr@users.noreply.github.com>
---
.../main/java/org/bukkit/craftbukkit/block/CraftBlockState.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
index 03be7e25b..58caba453 100644
--- a/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
+++ b/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
@@ -46,7 +46,6 @@ public CraftBlockState(final Block block, int flag) {
public CraftBlockState(Material material) {
world = null;
type = material.getId();
- // light = 0; // CraftBukkit - SPIGOT-2286
chunk = null;
x = y = z = 0;
}
From 7c8bf14043499a606685dc19c66ec40e8ab238f3 Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Tue, 1 Mar 2022 11:17:17 +0100
Subject: [PATCH 14/22] fix compiling
---
.../main/java/net/minecraft/server/TileEntitySign.java | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
index 4b38af4a4..75072f5c8 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -7,7 +7,6 @@ public class TileEntitySign extends TileEntity {
public final IChatBaseComponent[] lines = new IChatBaseComponent[] { new ChatComponentText(""), new ChatComponentText(""), new ChatComponentText(""), new ChatComponentText("")};
public int f = -1;
public boolean isEditable = true;
- //private EntityHuman h; // Paper
private final CommandObjectiveExecutor i = new CommandObjectiveExecutor();
public java.util.UUID signEditor; // Paper
@@ -122,14 +121,7 @@ public boolean b() {
}
public void a(EntityHuman entityhuman) {
- // Paper start
- //this.h = entityhuman;
- signEditor = entityhuman != null ? entityhuman.getUniqueID() : null;
- // Paper end
- }
-
- public EntityHuman c() {
- return this.h;
+ signEditor = entityhuman != null ? entityhuman.getUniqueID() : null; // Paper
}
public boolean b(final EntityHuman entityhuman) {
From 23c492554a87d0f681fe0777b6298fcac9f43891 Mon Sep 17 00:00:00 2001
From: Elier <71361901+Elierrr@users.noreply.github.com>
Date: Wed, 2 Mar 2022 15:06:24 -0500
Subject: [PATCH 15/22] Update pom.xml
---
NachoSpigot-Server/pom.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/NachoSpigot-Server/pom.xml b/NachoSpigot-Server/pom.xml
index 83eadb0d2..3ef097d08 100644
--- a/NachoSpigot-Server/pom.xml
+++ b/NachoSpigot-Server/pom.xml
@@ -155,6 +155,10 @@
velocity
https://nexus.velocitypowered.com/repository/maven-public/
+
+ spigotmc-public
+ https://hub.spigotmc.org/nexus/content/groups/public/
+
From 7864b34985e385a8548c230b2b8213d980a1eb8c Mon Sep 17 00:00:00 2001
From: Elier <71361901+Elierrr@users.noreply.github.com>
Date: Wed, 2 Mar 2022 15:47:46 -0500
Subject: [PATCH 16/22] Update pom.xml
---
NachoSpigot-API/pom.xml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/NachoSpigot-API/pom.xml b/NachoSpigot-API/pom.xml
index 28d8e2754..6cfc5a380 100644
--- a/NachoSpigot-API/pom.xml
+++ b/NachoSpigot-API/pom.xml
@@ -107,6 +107,13 @@
+
+
+ spigotmc-public
+ https://hub.spigotmc.org/nexus/content/groups/public/
+
+
+
NachoSpigot-API
From 1e23b179c38af0fd9c6ce212722afbcd86eb6e89 Mon Sep 17 00:00:00 2001
From: Elier <71361901+Elierrr@users.noreply.github.com>
Date: Wed, 2 Mar 2022 15:49:15 -0500
Subject: [PATCH 17/22] Update pom.xml
---
NachoSpigot-Server/pom.xml | 4 ----
1 file changed, 4 deletions(-)
diff --git a/NachoSpigot-Server/pom.xml b/NachoSpigot-Server/pom.xml
index 3ef097d08..83eadb0d2 100644
--- a/NachoSpigot-Server/pom.xml
+++ b/NachoSpigot-Server/pom.xml
@@ -155,10 +155,6 @@
velocity
https://nexus.velocitypowered.com/repository/maven-public/
-
- spigotmc-public
- https://hub.spigotmc.org/nexus/content/groups/public/
-
From 85145b4faf3227e90ce18522ef553b1c21b6cb54 Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Wed, 2 Mar 2022 22:25:31 +0100
Subject: [PATCH 18/22] revert "unneeded boat event trigger"
moving it to another PR
---
.../src/main/java/net/minecraft/server/ItemBoat.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java
index 72eff0955..463ea8ffd 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java
@@ -51,10 +51,9 @@ public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) {
if (flag) {
return itemstack;
} else {
- if (movingobjectpositionblock.type == MovingObjectPosition.EnumMovingObjectType.BLOCK) {
+ if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK) {
- BlockPosition blockposition = movingobjectpositionblock.a();
- /* Paper - Remove unneeded interaction event trigger
+ BlockPosition blockposition = movingobjectposition.a();
// CraftBukkit start - Boat placement
org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(entityhuman, org.bukkit.event.block.Action.RIGHT_CLICK_BLOCK, blockposition, movingobjectposition.direction, itemstack);
@@ -62,7 +61,6 @@ public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) {
return itemstack;
}
// CraftBukkit end
- */ // Paper - Remove unneeded interaction event trigger
if (world.getType(blockposition).getBlock() == Blocks.SNOW_LAYER) {
blockposition = blockposition.down();
From 41fdd06ce056c2055cc838d814c97ff1141db6b8 Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Wed, 2 Mar 2022 22:27:03 +0100
Subject: [PATCH 19/22] missed that
---
.../src/main/java/net/minecraft/server/ItemBoat.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java
index 463ea8ffd..0c00f07fe 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java
@@ -25,9 +25,9 @@ public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) {
float f8 = f3 * f5;
double d3 = 5.0D;
Vec3D vec3d1 = vec3d.add((double) f7 * d3, (double) f6 * d3, (double) f8 * d3);
- MovingObjectPosition movingobjectpositionblock = world.rayTrace(vec3d, vec3d1, true);
+ MovingObjectPosition movingobjectposition = world.rayTrace(vec3d, vec3d1, true);
- if (movingobjectpositionblock == null) {
+ if (movingobjectposition == null) {
return itemstack;
} else {
Vec3D vec3d2 = entityhuman.d(f);
From 209f4fd1475b57d4b4191ccbcc36dc3190a03054 Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Wed, 2 Mar 2022 22:32:20 +0100
Subject: [PATCH 20/22] Update README.md
---
README.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/README.md b/README.md
index d89a8d1ac..0e24250f1 100644
--- a/README.md
+++ b/README.md
@@ -86,7 +86,6 @@ See: [Contributors Page](https://github.com/CobbleSword/NachoSpigot/graphs/contr
[Paper-0404] Optimize World Time Updates
[Paper-0451] Reduce memory footprint of NBTTagCompound by spottedleaf
[Paper-0539] Optimize NetworkManager Exception Handling by Andrew Steinborn
-[Paper-0730] Remove interact event from boat
[Paper-0797] Use Velocity compression and cipher natives
[Paper-????] Cleanup allocated favicon ByteBuf by Shane Freeder
From b1f7f2afdcb7c2bfb43fed1355e31457c4a6d349 Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Sat, 26 Mar 2022 10:43:51 +0100
Subject: [PATCH 21/22] revert things, update things
---
NachoSpigot-API/pom.xml | 6 ++---
NachoSpigot-Server/pom.xml | 7 +++---
.../net/minecraft/server/MinecraftServer.java | 22 +------------------
.../minecraft/server/PlayerConnection.java | 2 +-
.../net/minecraft/server/TileEntitySign.java | 8 +++++--
.../craftbukkit/block/CraftBlockState.java | 5 ++++-
README.md | 1 -
pom.xml | 1 -
8 files changed, 18 insertions(+), 34 deletions(-)
diff --git a/NachoSpigot-API/pom.xml b/NachoSpigot-API/pom.xml
index 6cfc5a380..160cdf18a 100644
--- a/NachoSpigot-API/pom.xml
+++ b/NachoSpigot-API/pom.xml
@@ -48,7 +48,7 @@
com.google.guava
guava
- 31.0.1-jre
+ 31.1-jre
compile
@@ -90,7 +90,7 @@
net.kyori
adventure-key
- 4.9.3
+ 4.10.1
@@ -120,7 +120,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.1
+ 3.10.1
org.apache.maven.plugins
diff --git a/NachoSpigot-Server/pom.xml b/NachoSpigot-Server/pom.xml
index 83eadb0d2..3d6dd23ec 100644
--- a/NachoSpigot-Server/pom.xml
+++ b/NachoSpigot-Server/pom.xml
@@ -76,7 +76,7 @@
jline
jline
- 2.12.1
+ 2.14.6
jar
compile
@@ -90,7 +90,7 @@
mysql
mysql-connector-java
- 5.1.14
+ 5.1.49
jar
runtime
@@ -104,7 +104,7 @@
org.slf4j
slf4j-api
- 1.7.32
+ 1.7.36
compile
@@ -167,7 +167,6 @@
scriptus
0.4
- git-NachoSpigot-
..
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java
index ed44a2c99..d83d94023 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -808,10 +808,9 @@ public void B() {
SpigotTimings.timeUpdateTimer.startTiming(); // Spigot
// Send time updates to everyone, it will get the right time from the world the player is in.
+ // Paper start - optimize time updates
int i;
- // Paper start - optimize time updates
- /*
if ((this.ticks % 20) == 0)
{
for (i = 0; i < this.worlds.size(); ++i) {
@@ -835,26 +834,7 @@ public void B() {
}
}
}
- } */
- for (i = 0; i < this.worlds.size(); ++i) { // Nacho
- final WorldServer world = this.worlds.get(i); // Nacho
- final boolean doDaylight = world.getGameRules().getBoolean("doDaylightCycle");
- final long dayTime = world.getDayTime();
- long worldTime = world.getTime();
- final PacketPlayOutUpdateTime worldPacket = new PacketPlayOutUpdateTime(worldTime, dayTime, doDaylight);
- for (EntityHuman entityhuman : world.players) {
- if (!(entityhuman instanceof EntityPlayer) || (ticks + entityhuman.getId()) % 20 != 0) {
- continue;
- }
- EntityPlayer entityplayer = (EntityPlayer) entityhuman;
- long playerTime = entityplayer.getPlayerTime();
- PacketPlayOutUpdateTime packet = (playerTime == dayTime) ? worldPacket :
- new PacketPlayOutUpdateTime(worldTime, playerTime, doDaylight);
- entityplayer.playerConnection.sendPacket(packet); // Add support for per player time
- }
}
- // Paper end
-
SpigotTimings.timeUpdateTimer.stopTiming(); // Spigot
for (i = 0; i < this.worlds.size(); ++i) {
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/PlayerConnection.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/PlayerConnection.java
index f01cb2283..bb30814de 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2074,7 +2074,7 @@ public void a(PacketPlayInUpdateSign packetplayinupdatesign) {
TileEntitySign tileentitysign = (TileEntitySign) tileentity;
- if (!tileentitysign.b() || tileentitysign.signEditor == null || !tileentitysign.signEditor.equals(this.player.getUniqueID())) { // Paper
+ if (!tileentitysign.b() || tileentitysign.c() != this.player) {
this.minecraftServer.warning("Player " + this.player.getName() + " just tried to change non-editable sign");
this.sendPacket(new PacketPlayOutUpdateSign(tileentity.world, packetplayinupdatesign.a(), tileentitysign.lines)); // CraftBukkit
return;
diff --git a/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java b/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
index 75072f5c8..e927fd237 100644
--- a/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/NachoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -7,8 +7,8 @@ public class TileEntitySign extends TileEntity {
public final IChatBaseComponent[] lines = new IChatBaseComponent[] { new ChatComponentText(""), new ChatComponentText(""), new ChatComponentText(""), new ChatComponentText("")};
public int f = -1;
public boolean isEditable = true;
+ private EntityHuman h;
private final CommandObjectiveExecutor i = new CommandObjectiveExecutor();
- public java.util.UUID signEditor; // Paper
public TileEntitySign() {}
@@ -121,7 +121,11 @@ public boolean b() {
}
public void a(EntityHuman entityhuman) {
- signEditor = entityhuman != null ? entityhuman.getUniqueID() : null; // Paper
+ this.h = entityhuman;
+ }
+
+ public EntityHuman c() {
+ return this.h;
}
public boolean b(final EntityHuman entityhuman) {
diff --git a/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
index 58caba453..4a8c8141b 100644
--- a/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
+++ b/NachoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
@@ -25,6 +25,7 @@ public class CraftBlockState implements BlockState {
protected int type;
protected MaterialData data;
protected int flag;
+ protected final byte light;
public CraftBlockState(final Block block) {
this.world = (CraftWorld) block.getWorld();
@@ -32,6 +33,7 @@ public CraftBlockState(final Block block) {
this.y = block.getY();
this.z = block.getZ();
this.type = block.getTypeId();
+ this.light = block.getLightLevel();
this.chunk = (CraftChunk) block.getChunk();
this.flag = 3;
@@ -46,6 +48,7 @@ public CraftBlockState(final Block block, int flag) {
public CraftBlockState(Material material) {
world = null;
type = material.getId();
+ light = 0;
chunk = null;
x = y = z = 0;
}
@@ -129,7 +132,7 @@ public int getTypeId() {
}
public byte getLightLevel() {
- return getBlock().getLightLevel();
+ return light;
}
public Block getBlock() {
diff --git a/README.md b/README.md
index 0e24250f1..289a91f02 100644
--- a/README.md
+++ b/README.md
@@ -83,7 +83,6 @@ See: [Contributors Page](https://github.com/CobbleSword/NachoSpigot/graphs/contr
[Paper-0352] Optimize BlockPosition helper methods by Spottedleaf
[Paper-0353] Send nearby packets from world player list not server list by Mystiflow
[Paper-0389] performance improvement for Chunk.getEntities by wea_ondara
-[Paper-0404] Optimize World Time Updates
[Paper-0451] Reduce memory footprint of NBTTagCompound by spottedleaf
[Paper-0539] Optimize NetworkManager Exception Handling by Andrew Steinborn
[Paper-0797] Use Velocity compression and cipher natives
diff --git a/pom.xml b/pom.xml
index d97141dbe..bca7519f6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,7 +2,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
dev.cobblesword.nachospigot
parent
dev-SNAPSHOT
From 3b418fc85918f9458d085d536c1687f2c746f770 Mon Sep 17 00:00:00 2001
From: crafter23456 <64259198+crafter23456@users.noreply.github.com>
Date: Tue, 19 Apr 2022 14:24:09 +0200
Subject: [PATCH 22/22] update paper repository link
---
NachoSpigot-Server/pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/NachoSpigot-Server/pom.xml b/NachoSpigot-Server/pom.xml
index 3d6dd23ec..071485ebd 100644
--- a/NachoSpigot-Server/pom.xml
+++ b/NachoSpigot-Server/pom.xml
@@ -152,8 +152,8 @@
https://maven.elmakers.com/repository/
- velocity
- https://nexus.velocitypowered.com/repository/maven-public/
+ papermc
+ https://papermc.io/repo/repository/maven-public/