9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-23 00:39:16 +00:00

Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@b0a7353 Updated Upstream (Paper)
This commit is contained in:
NONPLAYT
2023-09-18 00:39:43 +03:00
parent fa302f379a
commit 2a8361f565
22 changed files with 321 additions and 298 deletions

View File

@@ -7,16 +7,16 @@ Original project: Bloom-host/Petal
Link: https://github.com/Bloom-host/Petal
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index ed5d5c86368de7885c57ebc8bc69e3fa9123b768..4b531ed118912b207391d66d1c028a3eb7b3f81f 100644
index 49906b4dc8392eee592215d0b4cba85267a875fc..e8cf6062fa427a2efdaca1e354805aa4cd58a2e0 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1037,20 +1037,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
if (entity != null) {
- ItemStack itemstack = this.getItemBySlot(EquipmentSlot.HEAD);
EntityType<?> entitytypes = entity.getType();
}
if (entity != null) {
- ItemStack itemstack = this.getItemBySlot(EquipmentSlot.HEAD);
EntityType<?> entitytypes = entity.getType();
// Purpur start
- if (entitytypes == EntityType.SKELETON && itemstack.is(Items.SKELETON_SKULL)) {
+ if (entitytypes == EntityType.SKELETON && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.SKELETON_SKULL)) { // DivineMC - Reduce sensor work
@@ -29,7 +29,7 @@ index ed5d5c86368de7885c57ebc8bc69e3fa9123b768..4b531ed118912b207391d66d1c028a3e
- else if (entitytypes == EntityType.CREEPER && itemstack.is(Items.CREEPER_HEAD)) {
+ else if (entitytypes == EntityType.CREEPER && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.CREEPER_HEAD)) { // DivineMC - Reduce sensor work
d0 *= entity.level().purpurConfig.creeperHeadVisibilityPercent;
}
}
- else if ((entitytypes == EntityType.PIGLIN || entitytypes == EntityType.PIGLIN_BRUTE) && itemstack.is(Items.PIGLIN_HEAD)) {
+ else if ((entitytypes == EntityType.PIGLIN || entitytypes == EntityType.PIGLIN_BRUTE) && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.PIGLIN_HEAD)) { // DivineMC - Reduce sensor work
d0 *= entity.level().purpurConfig.piglinHeadVisibilityPercent;