9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-29 11:59:21 +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());

View File

@@ -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