Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Updated Upstream (Paper, Pufferfish, Purpur)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaKR93 committed Nov 19, 2022
1 parent 198770d commit 20d9554
Show file tree
Hide file tree
Showing 19 changed files with 160 additions and 261 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
group = net.prismarineteam.prismarine
version = 1.19.2-R0.1-SNAPSHOT

paperCommit = 215111213b878f2d837032632c83fabe09000bc2
paperCommit = b4c1ae645fc476c41e8ef69b66050f1f184e4d97

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
2 changes: 1 addition & 1 deletion patches/api/0001-Pufferfish-API-Changes.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <alphakr93@outlook.com>
Date: Sun, 30 Oct 2022 18:24:59 +0000
Date: Fri, 18 Nov 2022 15:46:16 +0000
Subject: [PATCH] Pufferfish API Changes

Original by Kevin Raneri <kevin.raneri@gmail.com>
Expand Down
13 changes: 6 additions & 7 deletions patches/api/0002-Purpur-API-Changes.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <alphakr93@outlook.com>
Date: Sun, 30 Oct 2022 06:00:46 +0000
Date: Fri, 18 Nov 2022 15:54:55 +0000
Subject: [PATCH] Purpur API Changes

Copyright (C) 2022 PurpurMC LLC
Expand All @@ -12,16 +12,16 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

diff --git a/build.gradle.kts b/build.gradle.kts
index 780c9b40f69c247592c1fe469c05fd12e984b633..8e64ccdb928bc38cb703e60c8ec31339a6f6d894 100644
Expand Down Expand Up @@ -3344,7 +3344,7 @@ index 0000000000000000000000000000000000000000..c66eb163877e872f234d86dc244cab7e
+}
diff --git a/src/main/java/org/purpurmc/purpur/event/entity/GoatRamEntityEvent.java b/src/main/java/org/purpurmc/purpur/event/entity/GoatRamEntityEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..a07084a72340a4fc12d161e4df8a34c2835e2cfc
index 0000000000000000000000000000000000000000..f62c14f3d4999e9112c1c73642aa337d97b94b5a
--- /dev/null
+++ b/src/main/java/org/purpurmc/purpur/event/entity/GoatRamEntityEvent.java
@@ -0,0 +1,59 @@
Expand Down Expand Up @@ -3407,7 +3407,6 @@ index 0000000000000000000000000000000000000000..a07084a72340a4fc12d161e4df8a34c2
+ this.cancelled = cancel;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/org/purpurmc/purpur/event/entity/LlamaJoinCaravanEvent.java b/src/main/java/org/purpurmc/purpur/event/entity/LlamaJoinCaravanEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..8849bb0becb16db907fa648cca2e98ab9d957c75
Expand Down
23 changes: 13 additions & 10 deletions patches/server/0001-Pufferfish-Server-Changes.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <alphakr93@outlook.com>
Date: Sun, 30 Oct 2022 18:24:59 +0000
Date: Fri, 18 Nov 2022 15:46:16 +0000
Subject: [PATCH] Pufferfish Server Changes

Original by Kevin Raneri <kevin.raneri@gmail.com>
Expand Down Expand Up @@ -2418,7 +2418,7 @@ index 2358bb1788cfb902bac9b3b7588954af2d2cd823..163f14b4e1ca99d75e5d8e14190f7b91
this.wasOnGround = this.entity.isOnGround();
this.teleportDelay = 0;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 8b3e703ebb497b9166bd211b4247a78891b61aeb..94f4a5bfd2af8389a99f80bab4eceac1f075512e 100644
index a8cdb261c0f8c9a377bb4a6d39afbe5ef6f0d146..aa4bd1b9c22b00d7db513d85f89734795ba6caa7 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -727,7 +727,20 @@ public class ServerLevel extends Level implements WorldGenLevel {
Expand Down Expand Up @@ -2813,7 +2813,7 @@ index 72516335570d7137a62ec8667a6e8f06f024692f..b44322c337bcded94c60e1761a389101
public final String id;

diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 0318c9483a4d96eb39ff4df9054a9e6398186bc3..26efc49b4530112c8bd3f580ce375ab4203c9609 100644
index c6cbf02c784d4b0a39c61cd65e777fe04e3c3772..88ebf53d3a5d93d6aa40152d55e83cb1f25443b3 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -142,7 +142,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
Expand Down Expand Up @@ -2871,7 +2871,7 @@ index 0318c9483a4d96eb39ff4df9054a9e6398186bc3..26efc49b4530112c8bd3f580ce375ab4
public boolean onClimbable() {
if (this.isSpectator()) {
return false;
@@ -3586,7 +3607,10 @@ public abstract class LivingEntity extends Entity {
@@ -3588,7 +3609,10 @@ public abstract class LivingEntity extends Entity {
Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ());

// Paper - diff on change - used in CraftLivingEntity#hasLineOfSight(Location) and CraftWorld#lineOfSightExists
Expand All @@ -2884,7 +2884,7 @@ index 0318c9483a4d96eb39ff4df9054a9e6398186bc3..26efc49b4530112c8bd3f580ce375ab4
}

diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index fffa6ba329b38433a1df51df339df652d3fda828..e89b88eb3d4202ea7ff043dc9e92163332cd10d3 100644
index 12fcc84e9de914657409142dc70ced7015cf5533..235db1306573c25a101265c8f88dad0fbe06ca59 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -210,14 +210,16 @@ public abstract class Mob extends LivingEntity {
Expand Down Expand Up @@ -2928,7 +2928,7 @@ index fffa6ba329b38433a1df51df339df652d3fda828..e89b88eb3d4202ea7ff043dc9e921633
this.level.getProfiler().pop();
}
diff --git a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
index 692524a69d43dcf52ae1b0f7f593fc53f3878137..511fbbe5da0b6b0c51952c0f548f5ba9f6a64349 100644
index 692524a69d43dcf52ae1b0f7f593fc53f3878137..59ca3a0a70c68263495ae9972215b76554d3fb83 100644
--- a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
+++ b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
@@ -22,9 +22,11 @@ public class AttributeMap {
Expand All @@ -2943,8 +2943,11 @@ index 692524a69d43dcf52ae1b0f7f593fc53f3878137..511fbbe5da0b6b0c51952c0f548f5ba9
}

private void onAttributeModified(AttributeInstance instance) {
@@ -46,9 +48,7 @@ public class AttributeMap {
@@ -44,11 +46,10 @@ public class AttributeMap {
}).collect(Collectors.toList());
}

+
@Nullable
public AttributeInstance getInstance(Attribute attribute) {
- return this.attributes.computeIfAbsent(attribute, (attributex) -> {
Expand Down Expand Up @@ -4143,7 +4146,7 @@ index 35f9b11a3a61976c952a2c1c64bb2a932538f54f..9e9ac64764cf0a84e25e75d8d6f516cd

public boolean hasParam(LootContextParam<?> parameter) {
diff --git a/src/main/java/net/minecraft/world/phys/shapes/EntityCollisionContext.java b/src/main/java/net/minecraft/world/phys/shapes/EntityCollisionContext.java
index ebe65474a4a05ff1637d7f37ebcfe690af59def5..dd45d6464e095dfa82c569d198f5e42d94e7d877 100644
index ebe65474a4a05ff1637d7f37ebcfe690af59def5..42142c512b12e5b269c19f1e821c50e7496a5f25 100644
--- a/src/main/java/net/minecraft/world/phys/shapes/EntityCollisionContext.java
+++ b/src/main/java/net/minecraft/world/phys/shapes/EntityCollisionContext.java
@@ -19,47 +19,66 @@ public class EntityCollisionContext implements CollisionContext {
Expand Down Expand Up @@ -4187,8 +4190,8 @@ index ebe65474a4a05ff1637d7f37ebcfe690af59def5..dd45d6464e095dfa82c569d198f5e42d
+ // this(entity.isDescending(), entity.getY(), entity instanceof LivingEntity ? ((LivingEntity)entity).getMainHandItem() : ItemStack.EMPTY, entity instanceof LivingEntity ? ((LivingEntity)entity)::canStandOnFluid : (fluidState) -> {
+ // return false;
+ // }, entity);
+ this.entity = entity;
+ // Pufferfish end
+ this.entity = entity;
}

@Override
Expand All @@ -4209,7 +4212,7 @@ index ebe65474a4a05ff1637d7f37ebcfe690af59def5..dd45d6464e095dfa82c569d198f5e42d
+ // Pufferfish start
+ Entity entity = this.entity;
+ if (entity instanceof LivingEntity livingEntity) {
+ return livingEntity.canStandOnFluid(state) && !state.getType().isSame(state.getType());
+ return livingEntity.canStandOnFluid(state) && !stateAbove.getType().isSame(state.getType());
+ }
+ return false;
+ // Pufferfish end
Expand Down
Loading

0 comments on commit 20d9554

Please sign in to comment.