mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-22 02:25:51 +01:00
Updated Upstream and Sidestream(s) (Airplane) (#407)
Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Airplane Changes: 8703980 Modify mutable block position
This commit is contained in:
parent
16e2fd38b6
commit
dede8ef2f5
@ -5,7 +5,7 @@ Subject: [PATCH] Reduce memory allocations
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
||||
index 7b29d47dfdef7611db58068af285f76d92a9f12a..7009586430649a87722f6c73cd5a311d7c977196 100644
|
||||
index 7b29d47dfdef7611db58068af285f76d92a9f12a..6c5d96853d47850b81ce85e56a516c554819ef25 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
||||
@@ -43,8 +43,14 @@ public abstract class BlockDirtSnowSpreadable extends BlockDirtSnow {
|
||||
@ -15,7 +15,7 @@ index 7b29d47dfdef7611db58068af285f76d92a9f12a..7009586430649a87722f6c73cd5a311d
|
||||
+ // Airplane start - use mutable position
|
||||
+ BlockPosition.MutableBlockPosition blockposition1 = new BlockPosition.MutableBlockPosition();
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
+ blockposition1.setValues(blockposition).add(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1);
|
||||
+ blockposition1.setValues(blockposition).addValues(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1);
|
||||
+ /*
|
||||
BlockPosition blockposition1 = blockposition.b(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1);
|
||||
+ */
|
||||
@ -23,6 +23,25 @@ index 7b29d47dfdef7611db58068af285f76d92a9f12a..7009586430649a87722f6c73cd5a311d
|
||||
|
||||
if (worldserver.getType(blockposition1).a(Blocks.DIRT) && c(iblockdata1, (IWorldReader) worldserver, blockposition1)) {
|
||||
org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, (IBlockData) iblockdata1.set(BlockDirtSnowSpreadable.a, worldserver.getType(blockposition1.up()).a(Blocks.SNOW))); // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index bc61aaff65a7dc1e7534452b285953b83adb7000..f38382cc681f03d9a6a0efa85f045e3770398739 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -438,6 +438,14 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
public BlockPosition b(int i, int j, int k) {
|
||||
return super.b(i, j, k).immutableCopy();
|
||||
}
|
||||
+ // Airplane start - version of b that doesn't copy
|
||||
+ public BlockPosition addValues(int x, int y, int z) {
|
||||
+ ((BaseBlockPosition)this).a += x;
|
||||
+ ((BaseBlockPosition)this).b += y;
|
||||
+ ((BaseBlockPosition)this).e += z;
|
||||
+ return this;
|
||||
+ }
|
||||
+ // Airplane end
|
||||
|
||||
@Override
|
||||
public BlockPosition shift(EnumDirection enumdirection, int i) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index 631eb682e81e30d2a937fd1eafccd8a9ab82d21e..dc07376845f84ea949a2153cb75d2cd9d46a419e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
|
@ -67,7 +67,7 @@ index 0000000000000000000000000000000000000000..e647624f4c9afe8bc603792ad88c807e
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index bc61aaff65a7dc1e7534452b285953b83adb7000..7fddef0afbcf1f9f391c540b8fce1bebf8faa452 100644
|
||||
index f38382cc681f03d9a6a0efa85f045e3770398739..97b0aee82e080a1225454317cbf0191ef8b14fca 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -341,6 +341,16 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
|
@ -17,7 +17,7 @@ index 8724ad342bec7c733b3c825bd62dbfa5c28c06dd..9907047028b754fe0e314a7d5c5238ce
|
||||
return this.getBlock().a(tag);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index 7fddef0afbcf1f9f391c540b8fce1bebf8faa452..f13b4e6ec815792c2f2b49193707da94df427424 100644
|
||||
index 97b0aee82e080a1225454317cbf0191ef8b14fca..c4dd89d9bae1960d25b64e2a715a83adde65719a 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -318,7 +318,15 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit e71967b87c76de81d85dd9750719f3110669d52f
|
||||
Subproject commit 8703980b48dc20f7266c77bcbdf51f376eed6204
|
@ -1 +1 @@
|
||||
e71967b87c76de81d85dd9750719f3110669d52f
|
||||
8703980b48dc20f7266c77bcbdf51f376eed6204
|
Loading…
Reference in New Issue
Block a user