9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-29 03:49:19 +00:00

fix: balloons with head models pitch being affected by player

This commit is contained in:
LoJoSho
2024-01-28 10:56:49 -06:00
parent ce7dc03350
commit 60b91df843
3 changed files with 8 additions and 0 deletions

View File

@@ -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<String> disabledGamemodes;
@Getter
private static List<String> 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);

View File

@@ -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<Player> viewer = HMCCPacketManager.getViewers(entity.getLocation());