diff --git a/src/main/java/com/minelittlepony/unicopia/entity/mob/AirBalloonEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/mob/AirBalloonEntity.java index fcb658aa..a606fc4a 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/mob/AirBalloonEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/mob/AirBalloonEntity.java @@ -1,5 +1,6 @@ package com.minelittlepony.unicopia.entity.mob; +import net.fabricmc.fabric.api.tag.convention.v1.ConventionalItemTags; import net.minecraft.block.BlockState; import net.minecraft.block.ShapeContext; import net.minecraft.entity.*; @@ -47,6 +48,7 @@ import com.minelittlepony.unicopia.entity.collision.MultiBox; import com.minelittlepony.unicopia.entity.duck.EntityDuck; import com.minelittlepony.unicopia.item.BasketItem; import com.minelittlepony.unicopia.item.HotAirBalloonItem; +import com.minelittlepony.unicopia.item.UItems; import com.minelittlepony.unicopia.server.world.WeatherConditions; import com.terraformersmc.terraform.boat.api.TerraformBoatType; @@ -336,7 +338,7 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp if (isAscending()) { playSound(USounds.ENTITY_HOT_AIR_BALLOON_BOOST, 1, 1); } - stack.damage(1, player, p -> p.sendEquipmentBreakStatus(hand == Hand.MAIN_HAND ? EquipmentSlot.MAINHAND : EquipmentSlot.OFFHAND)); + stack.damage(1, player, p -> p.sendToolBreakStatus(hand)); playSound(USounds.Vanilla.ITEM_FLINTANDSTEEL_USE, 1, 1); getWorld().emitGameEvent(this, GameEvent.ENTITY_INTERACT, getBlockPos()); return ActionResult.SUCCESS; @@ -372,6 +374,17 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp return ActionResult.SUCCESS; } + if (stack.isIn(ConventionalItemTags.SHEARS) && hasBalloon()) { + if (!player.getAbilities().creativeMode) { + stack.damage(1, player, p -> p.sendToolBreakStatus(hand)); + } + setDesign(BalloonDesign.NONE); + dropItem(UItems.GIANT_BALLOON); + playSound(USounds.ENTITY_HOT_AIR_BALLOON_EQUIP_CANOPY, 1, 1); + getWorld().emitGameEvent(this, GameEvent.ENTITY_INTERACT, getBlockPos()); + return ActionResult.SUCCESS; + } + if ((stack.isOf(Items.LANTERN) || stack.isOf(Items.SOUL_LANTERN)) && !hasBurner()) { setStackInHand(Hand.MAIN_HAND, stack.copyWithCount(1)); if (!player.getAbilities().creativeMode) { @@ -532,9 +545,13 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp @SuppressWarnings("deprecation") public enum BalloonDesign implements StringIdentifiable { NONE, - LUNA; + LUNA, + DAWN, + EQUALITY, + STORM, + TALE; - public static final StringIdentifiable.Codec CODEC = StringIdentifiable.createCodec(BalloonDesign::values); + public static final Codec CODEC = StringIdentifiable.createCodec(BalloonDesign::values); private static final IntFunction BY_ID = ValueLists.createIdToValueFunction(Enum::ordinal, values(), ValueLists.OutOfBoundsHandling.ZERO); private final String name = name().toLowerCase(Locale.ROOT); diff --git a/src/main/resources/assets/unicopia/textures/entity/air_balloon/canopy/dawn.png b/src/main/resources/assets/unicopia/textures/entity/air_balloon/canopy/dawn.png new file mode 100644 index 00000000..0a17fef9 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/entity/air_balloon/canopy/dawn.png differ diff --git a/src/main/resources/assets/unicopia/textures/entity/air_balloon/canopy/equality.png b/src/main/resources/assets/unicopia/textures/entity/air_balloon/canopy/equality.png new file mode 100644 index 00000000..c87606b9 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/entity/air_balloon/canopy/equality.png differ diff --git a/src/main/resources/assets/unicopia/textures/entity/air_balloon/canopy/storm.png b/src/main/resources/assets/unicopia/textures/entity/air_balloon/canopy/storm.png new file mode 100644 index 00000000..65f049a5 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/entity/air_balloon/canopy/storm.png differ diff --git a/src/main/resources/assets/unicopia/textures/entity/air_balloon/canopy/tale.png b/src/main/resources/assets/unicopia/textures/entity/air_balloon/canopy/tale.png new file mode 100644 index 00000000..6f074e82 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/entity/air_balloon/canopy/tale.png differ