diff --git a/src/main/java/io/github/maloryware/backstreet_gardener/item/custom/BongItem.java b/src/main/java/io/github/maloryware/backstreet_gardener/item/custom/BongItem.java index a404410..eb75922 100644 --- a/src/main/java/io/github/maloryware/backstreet_gardener/item/custom/BongItem.java +++ b/src/main/java/io/github/maloryware/backstreet_gardener/item/custom/BongItem.java @@ -4,7 +4,6 @@ import io.github.maloryware.backstreet_gardener.component.BongComponent; import io.github.maloryware.backstreet_gardener.screen.handler.BongScreenHandler; import io.github.maloryware.backstreet_gardener.sound.BSGSounds; -import io.github.maloryware.backstreet_gardener.sound.BSGSoundsClient; import io.github.maloryware.backstreet_gardener.utils.PacketUtils; import io.wispforest.owo.particles.ClientParticles; import io.wispforest.owo.ui.core.PositionedRectangle; @@ -115,6 +114,7 @@ public TypedActionResult use(World world, PlayerEntity user, Hand han } + else if(user.isSneaking()){ if(!world.isClient()) { stack.set(BSGComponents.BONG_COMPONENT, BongComponent.of(false, 0, temp.resourceQuantity())); @@ -205,6 +205,11 @@ public static NamedScreenHandlerFactory createScreenHandlerFactory(World world, ), stack.getName()); } + @Override + public ItemStack finishUsing(ItemStack stack, World world, LivingEntity user) { + if(!world.isClient) PacketUtils.playSoundInstance(PacketUtils.Sounds.BLOWING_SMOKE, (PlayerEntity) user); + return super.finishUsing(stack, world, user); + } } // the following code was based off of WispForest's OutTheDoor mod // special thanks to Glisco for providing me with this! diff --git a/src/main/java/io/github/maloryware/backstreet_gardener/utils/OwoScreenExtras.java b/src/main/java/io/github/maloryware/backstreet_gardener/utils/OwoScreenExtras.java index 9e4ba1c..f791313 100644 --- a/src/main/java/io/github/maloryware/backstreet_gardener/utils/OwoScreenExtras.java +++ b/src/main/java/io/github/maloryware/backstreet_gardener/utils/OwoScreenExtras.java @@ -38,6 +38,7 @@ public static int fitTo(int ref, int boxSize, int maxValue){ } + // todo: change this to something actually fucking usable holy shit it's BAD public static class AdvancedTextureComponent extends TextureComponent{ private Color COLOR_GRADIENT_FADE_START;