From 4c09e501b4281c12af0e710956b75c3566b88f8f Mon Sep 17 00:00:00 2001 From: sophie Date: Thu, 19 Sep 2024 02:56:19 +0300 Subject: [PATCH] updateesss --- src/main/java/ovh/sad/animalrp/AnimalRP.java | 10 ++++++++++ src/main/java/ovh/sad/animalrp/commands/TfCommand.java | 2 -- src/main/java/ovh/sad/animalrp/util/Emote.java | 9 +++------ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/main/java/ovh/sad/animalrp/AnimalRP.java b/src/main/java/ovh/sad/animalrp/AnimalRP.java index 7c68590..26bb806 100644 --- a/src/main/java/ovh/sad/animalrp/AnimalRP.java +++ b/src/main/java/ovh/sad/animalrp/AnimalRP.java @@ -42,6 +42,16 @@ public class AnimalRP implements ModInitializer { @Override public void onInitialize() { + + String catAscii = """ + |\\ _,,,---,,_ +ZZZzz /,`.-'`' -. ;-;;,_ + |,4- ) )-,_. ,\\ ( `'-' + '---''(_/--' `-'\\_) + """; + LOGGER.info(catAscii); + LOGGER.info("furry animal mod for fabric"); + LOGGER.info("by @fucksophie - est. Sept 2024"); animals.put("cat", new Cat()); animals.put("dog", new Dog()); animals.put("fox", new Fox()); diff --git a/src/main/java/ovh/sad/animalrp/commands/TfCommand.java b/src/main/java/ovh/sad/animalrp/commands/TfCommand.java index 981b7f0..0a80723 100644 --- a/src/main/java/ovh/sad/animalrp/commands/TfCommand.java +++ b/src/main/java/ovh/sad/animalrp/commands/TfCommand.java @@ -24,8 +24,6 @@ public class TfCommand { .executes(context -> { final Entity entity = context.getSource().getEntity(); final String animalString = StringArgumentType.getString(context, "animal"); - System.out.println(animalString); - System.out.println(animalString.length()); Animal animal = AnimalRP.animals.get(animalString); diff --git a/src/main/java/ovh/sad/animalrp/util/Emote.java b/src/main/java/ovh/sad/animalrp/util/Emote.java index a69bfd5..511bcf2 100644 --- a/src/main/java/ovh/sad/animalrp/util/Emote.java +++ b/src/main/java/ovh/sad/animalrp/util/Emote.java @@ -97,11 +97,8 @@ public class Emote { List locs = getEmoteLocs(player.getPos().subtract(0, player.isSneaking() ? .5 : 0, 0), emotes.get(emote), player.getRotationVector()); for (Vec3d loc : locs) { - for (int i = 0; i < 15; i++) { - player.getWorld().addParticle(new DustParticleEffect(Vec3d.unpackRgb(16777215).toVector3f(), 0.5f), - loc.x, - loc.y, loc.z, 0, 0, 0); - } + player.getServerWorld().spawnParticles(new DustParticleEffect(Vec3d.unpackRgb(16777215).toVector3f(), 0.5f), + loc.x, loc.y, loc.z, 15, 0, 0, 0, 0); } } @@ -116,7 +113,7 @@ public class Emote { float y2 = (float) y / ((float) distance / 2); float side = (((float) emoteTextLine.get(x) / distance) - ((float) ttEmote[0].length()) / 2 / distance); Vec3d idfk = rotationLoc.normalize(); - Vec3d rotation = new Vec3d(idfk.x, 0, idfk.y); + Vec3d rotation = new Vec3d(idfk.x, 0, idfk.z); Vec3d rot = rotation.crossProduct(new Vec3d(0, side, 0)); Vec3d addLoc = loc.add(rot); Vec3d newAloc = new Vec3d(addLoc.x, loc.getY() + ((float) ttEmote.length / distance - y2 + 2.25),