mirror of
https://github.com/PurpurMC/Purpur.git
synced 2025-02-23 13:09:31 +08:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@e4f5e1c Bump netty Pufferfish Changes: pufferfish-gg/Pufferfish@a8543a4 #33 Fix anti-xray related crash bug pufferfish-gg/Pufferfish@aefcb1a Updated Upstream (Paper)
50 lines
3.2 KiB
Diff
50 lines
3.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Mon, 10 Aug 2020 21:46:22 -0500
|
|
Subject: [PATCH] Short enderman height
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
|
index 2c3c3071a3987b2175f26e08714e47bf13f20345..86fa3f03e72b0c656ed86cae9ee64feb3f77fb3d 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
|
@@ -291,7 +291,8 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
|
private Component description;
|
|
@Nullable
|
|
private ResourceLocation lootTable;
|
|
- private final EntityDimensions dimensions;
|
|
+ private EntityDimensions dimensions; // Purpur - remove final
|
|
+ public void setDimensions(EntityDimensions dimensions) { this.dimensions = dimensions; } // Purpur
|
|
|
|
private static <T extends Entity> EntityType<T> register(String id, EntityType.Builder type) { // CraftBukkit - decompile error
|
|
return (EntityType) Registry.register(Registry.ENTITY_TYPE, id, (EntityType<T>) type.build(id)); // CraftBukkit - decompile error
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
|
index ad47267eb6797e1591841cb7a576fb65f6e81382..9458cab33d4ff468d3d009cc1c3b3736f21f649b 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
|
@@ -413,6 +413,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
|
if (this.isInvulnerableTo(source)) {
|
|
return false;
|
|
} else if (getRider() != null && this.isControllable()) { return super.hurt(source, amount); // Purpur - no teleporting on damage
|
|
+ } else if (org.purpurmc.purpur.PurpurConfig.endermanShortHeight && source == DamageSource.IN_WALL) { return false; // Purpur - no suffocation damage if short height
|
|
} else if (source instanceof IndirectEntityDamageSource) {
|
|
Entity entity = source.getDirectEntity();
|
|
boolean flag;
|
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
index 190e738ad33ca98aebda0d7b43dfdef8d7bea0cc..9dcc7247cf6a8b1bab66db0c80384f99d13aa669 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
@@ -237,6 +237,12 @@ public class PurpurConfig {
|
|
enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
|
|
}
|
|
|
|
+ public static boolean endermanShortHeight = false;
|
|
+ private static void entitySettings() {
|
|
+ endermanShortHeight = getBoolean("settings.entity.enderman.short-height", endermanShortHeight);
|
|
+ if (endermanShortHeight) EntityType.ENDERMAN.setDimensions(EntityDimensions.scalable(0.6F, 1.9F));
|
|
+ }
|
|
+
|
|
public static boolean allowWaterPlacementInTheEnd = true;
|
|
private static void allowWaterPlacementInEnd() {
|
|
allowWaterPlacementInTheEnd = getBoolean("settings.allow-water-placement-in-the-end", allowWaterPlacementInTheEnd);
|