diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/config/Settings.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/config/Settings.java index 3f3a0551..fb34d1dc 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/config/Settings.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/config/Settings.java @@ -53,6 +53,7 @@ public class Settings { private static final String COSMETIC_ADD_ENCHANTS_LEGGINGS_PATH = "leggings-add-enchantments"; private static final String COSMETIC_ADD_ENCHANTS_BOOTS_PATH = "boots-add-enchantments"; private static final String COSMETIC_DESTROY_LOOSE_COSMETIC_PATH = "destroy-loose-cosmetics"; + private static final String COSMETIC_BALLOON_HEAD_FORWARD_PATH = "balloon-head-forward"; private static final String MENU_SETTINGS_PATH = "menu-settings"; private static final String COSMETIC_TYPE_SETTINGS_PATH = "cosmetic-type"; private static final String EQUIP_CLICK_TYPE = "equip-click"; @@ -117,6 +118,8 @@ public class Settings { @Getter private static boolean disabledGamemodesEnabled; @Getter + private static boolean balloonHeadForward; + @Getter private static List disabledGamemodes; @Getter private static List disabledWorlds; @@ -206,6 +209,7 @@ public class Settings { emoteMoveCheck = cosmeticSettings.node(COSMETIC_EMOTE_MOVE_CHECK_PATH).getBoolean(false); packetEntityTeleportCooldown = cosmeticSettings.node(COSMETIC_PACKET_ENTITY_TELEPORT_COOLDOWN_PATH).getInt(-1); cosmeticForceOffhandCosmeticShow = cosmeticSettings.node(COSMETIC_FORCE_OFFHAND_COSMETIC_SHOW_PATH).getBoolean(false); + balloonHeadForward = cosmeticSettings.node(COSMETIC_BALLOON_HEAD_FORWARD_PATH).getBoolean(false); ConfigurationNode menuSettings = source.node(MENU_SETTINGS_PATH); diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/cosmetic/types/CosmeticBalloonType.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/cosmetic/types/CosmeticBalloonType.java index 020fba0b..4b3aa1eb 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/cosmetic/types/CosmeticBalloonType.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/cosmetic/types/CosmeticBalloonType.java @@ -68,6 +68,7 @@ public class CosmeticBalloonType extends Cosmetic { Location newLocation = entity.getLocation(); Location currentLocation = user.getBalloonManager().getLocation(); newLocation = newLocation.clone().add(getBalloonOffset()); + if (Settings.isBalloonHeadForward()) newLocation.setPitch(0); List viewer = HMCCPacketManager.getViewers(entity.getLocation()); diff --git a/common/src/main/resources/config.yml b/common/src/main/resources/config.yml index 110b8f41..2f64023d 100644 --- a/common/src/main/resources/config.yml +++ b/common/src/main/resources/config.yml @@ -67,6 +67,9 @@ cosmetic-settings: # setting this to lower than the server player view distance should fix the # bug where players see random backpacks. Put -1 to ignore and send packets to everyone. view-distance: 32 + # If the plugin should set the pitch of balloons to always be 0, to prevent players looking up affecting the balloon. + # This only applies to models that have a "head" section to them. THIS DOES NOT IMPACT THE REST OF THE ENTITY. + balloon-head-unmoving: false # how the balloon should be positioned relative to the player balloon-offset: x: 0.5