From bb347b1311b650cc66ff02f0e88377b470ef3fde Mon Sep 17 00:00:00 2001 From: XiaoMoMi Date: Tue, 1 Apr 2025 02:02:11 +0800 Subject: [PATCH] add simplified format --- .../entity/furniture/hitbox/InteractionHitBox.java | 12 ++++++++++-- gradle.properties | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/entity/furniture/hitbox/InteractionHitBox.java b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/entity/furniture/hitbox/InteractionHitBox.java index 991131b1c..047fc19c0 100644 --- a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/entity/furniture/hitbox/InteractionHitBox.java +++ b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/entity/furniture/hitbox/InteractionHitBox.java @@ -69,8 +69,16 @@ public class InteractionHitBox extends AbstractHitBox { @Override public HitBox create(Map arguments) { Vector3f position = MiscUtils.getVector3f(arguments.getOrDefault("position", "0")); - float width = MiscUtils.getAsFloat(arguments.getOrDefault("width", "1")); - float height = MiscUtils.getAsFloat(arguments.getOrDefault("height", "1")); + float width; + float height; + if (arguments.containsKey("scale")) { + String[] split = arguments.get("scale").toString().split(","); + width = Float.parseFloat(split[0]); + height = Float.parseFloat(split[1]); + } else { + width = MiscUtils.getAsFloat(arguments.getOrDefault("width", "1")); + height = MiscUtils.getAsFloat(arguments.getOrDefault("height", "1")); + } return new InteractionHitBox( HitBoxFactory.getSeats(arguments), position, diff --git a/gradle.properties b/gradle.properties index 19e531706..a3b84b597 100644 --- a/gradle.properties +++ b/gradle.properties @@ -49,7 +49,7 @@ mojang_brigadier_version=1.0.18 byte_buddy_version=1.15.11 snake_yaml_version=2.3 anti_grief_version=0.13 -nms_helper_version=0.22 +nms_helper_version=0.24 # Ignite Dependencies mixinextras_version=0.4.1 mixin_version=0.15.2+mixin.0.8.7