9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-22 08:19:19 +00:00

Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@617240e Updated Upstream (Paper)
This commit is contained in:
NONPLAYT
2023-09-06 13:33:21 +03:00
parent ab6af15f10
commit d82e710ae4
16 changed files with 266 additions and 259 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 0b08cf7b26731ffd6f3909342f4e3a92fe0c813e..c99ee6cd14b2d83ed1106d199b7f1a68a5165c8d 100644
index ed5d5c86368de7885c57ebc8bc69e3fa9123b768..4b531ed118912b207391d66d1c028a3eb7b3f81f 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 0b08cf7b26731ffd6f3909342f4e3a92fe0c813e..c99ee6cd14b2d83ed1106d199b7f1a68
- 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;