(feature) emotes beta (without server integration)

This commit is contained in:
kirillsaint 2024-02-04 22:03:02 +06:00
parent 31a056fcc9
commit e67b749637
73 changed files with 152986 additions and 55 deletions

BIN
libs/joml-1.10.5.jar Normal file

Binary file not shown.

View File

@ -0,0 +1,566 @@
package net.silentclient.client.emotes;
import com.google.common.collect.Maps;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EnumPlayerModelParts;
import net.minecraft.item.*;
import net.minecraft.util.ResourceLocation;
import net.silentclient.client.emotes.animation.Animation;
import net.silentclient.client.emotes.animation.AnimationMesh;
import net.silentclient.client.emotes.animation.AnimationMeshConfig;
import net.silentclient.client.emotes.animation.model.ActionPlayback;
import net.silentclient.client.emotes.animation.model.AnimatorConfig;
import net.silentclient.client.emotes.animation.model.AnimatorHeldItemConfig;
import net.silentclient.client.emotes.bobj.BOBJAction;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.bobj.BOBJBone;
import net.silentclient.client.emotes.emoticons.Emote;
import org.joml.Matrix4f;
import org.joml.Vector4f;
import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11;
import java.nio.Buffer;
import java.nio.FloatBuffer;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class AnimatorController {
public static final FloatBuffer matrix = BufferUtils.createFloatBuffer(16);
public static final float[] buffer = new float[16];
private static final Map<String, ResourceLocation> ARMOR_TEXTURE_RES_MAP = Maps.newHashMap();
private static final ResourceLocation ENCHANTED_ITEM_GLINT_RES = new ResourceLocation("textures/misc/enchanted_item_glint.png");
public Animation animation;
public ActionPlayback emote;
public Emote entry;
public List<Runnable> runnables = new ArrayList<>();
public AnimatorConfig userConfig;
public boolean resetThirdView = false;
public ItemStack itemSlot = null;
public float itemSlotScale = 0.0F;
public boolean right = true;
public RenderPlayer renderPlayer;
private final Minecraft mc;
private double prevX;
private double prevY;
private double prevZ;
private int counter = 0;
private boolean slimCheck;
private final Vector4f result = new Vector4f();
private final Matrix4f rotate = new Matrix4f();
private final EmoteAccessor accessor;
public AnimatorController(Animation animationx, AnimatorConfig animatorconfig) {
this.animation = animationx;
this.userConfig = new AnimatorConfig();
this.userConfig.copy(animatorconfig);
this.mc = Minecraft.getMinecraft();
this.accessor = new EmoteAccessor(this);
}
public Vector4f calcPosition(EntityLivingBase entitylivingbase, BOBJBone bobjbone, float f, float f1, float f2, float f3) {
float f4 = (float) Math.PI;
this.result.set(f, f1, f2, 1.0F);
bobjbone.mat.transform(this.result);
this.rotate.identity();
this.rotate.rotateY((180.0F - entitylivingbase.renderYawOffset + 180.0F) / 180.0F * (float) Math.PI);
this.rotate.transform(this.result);
this.result.mul(this.userConfig.scale);
float f5 = (float) (entitylivingbase.lastTickPosX + (entitylivingbase.posX - entitylivingbase.lastTickPosX) * (double) f3);
float f6 = (float) (entitylivingbase.lastTickPosY + (entitylivingbase.posY - entitylivingbase.lastTickPosY) * (double) f3);
float f7 = (float) (entitylivingbase.lastTickPosZ + (entitylivingbase.posZ - entitylivingbase.lastTickPosZ) * (double) f3);
this.result.x += f5;
this.result.y += f6;
this.result.z += f7;
return this.result;
}
public boolean renderHook(RenderPlayer render, AbstractClientPlayer abstractclientplayer, double d0, double d1, double d2, float f1, boolean flag) {
this.renderPlayer = render;
if (this.isEmoting()) {
AnimationMeshConfig body = this.userConfig.meshes.get("body");
if (body != null) {
ResourceLocation rs = abstractclientplayer.getLocationSkin();
AnimationMeshConfig headWear = this.userConfig.meshes.get("headwear");
AnimationMeshConfig bodyWear = this.userConfig.meshes.get("bodywear");
AnimationMeshConfig leftArmWear = this.userConfig.meshes.get("left_armwear");
AnimationMeshConfig leftLegWear = this.userConfig.meshes.get("left_legwear");
AnimationMeshConfig rightArmWear = this.userConfig.meshes.get("right_armwear");
AnimationMeshConfig rightLegWear = this.userConfig.meshes.get("right_legwear");
if (body.texture == null
|| !rs.getResourceDomain().equals(body.texture.getResourceDomain())
|| !rs.getResourcePath().equals(body.texture.getResourcePath())) {
body.texture = rs;
headWear.texture = body.texture;
bodyWear.texture = body.texture;
leftArmWear.texture = body.texture;
leftLegWear.texture = body.texture;
rightArmWear.texture = body.texture;
rightLegWear.texture = body.texture;
}
headWear.visible = abstractclientplayer.isWearing(EnumPlayerModelParts.HAT);
bodyWear.visible = abstractclientplayer.isWearing(EnumPlayerModelParts.JACKET);
leftArmWear.visible = abstractclientplayer.isWearing(EnumPlayerModelParts.LEFT_SLEEVE);
leftLegWear.visible = abstractclientplayer.isWearing(EnumPlayerModelParts.LEFT_PANTS_LEG);
rightArmWear.visible = abstractclientplayer.isWearing(EnumPlayerModelParts.RIGHT_SLEEVE);
rightLegWear.visible = abstractclientplayer.isWearing(EnumPlayerModelParts.RIGHT_PANTS_LEG);
if (!abstractclientplayer.isInvisible()) {
rightLegWear.alpha = 1.0F;
body.visible = true;
} else if (!abstractclientplayer.isInvisibleToPlayer(Minecraft.getMinecraft().thePlayer)) {
rightLegWear.alpha = 0.15F;
body.visible = true;
} else {
rightLegWear.visible = false;
}
if (!this.slimCheck && !abstractclientplayer.getSkinType().equals("default")) {
this.animation = PlayerModelManager.get().alex;
this.userConfig.copy(PlayerModelManager.get().alexConfig);
if (this.entry != null) {
this.entry.startAnimation(this.accessor);
}
this.slimCheck = true;
}
}
BOBJArmature bobjarmature = this.animation.data.armatures.get("Armature");
this.render(abstractclientplayer, bobjarmature, d0, d1, d2, f1);
if (flag) {
this.renderNameTag(abstractclientplayer, d0, d1, d2, bobjarmature);
}
}
return this.isEmoting();
}
public void renderNameTag(AbstractClientPlayer abstractclientplayer, double d0, double d1, double d2, BOBJArmature var8) {
RenderManager rendermanager = this.mc.getRenderManager();
double d3 = abstractclientplayer.getDistanceSqToEntity(rendermanager.livingPlayer);
double d4 = 64.0;
String s = abstractclientplayer.getDisplayName().getFormattedText();
if (d3 <= d4 * d4) {
FontRenderer fontrenderer = rendermanager.getFontRenderer();
float f = 1.6F;
float f1 = 0.016666668F * f;
GlStateManager.pushMatrix();
GlStateManager.translate((float) d0 + 0.0F, (float) d1 + abstractclientplayer.height + 0.5F, (float) d2);
GL11.glNormal3f(0.0F, 1.0F, 0.0F);
GlStateManager.rotate(-Minecraft.getMinecraft().getRenderManager().playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(Minecraft.getMinecraft().getRenderManager().playerViewX, 1.0F, 0.0F, 0.0F);
GlStateManager.scale(-f1, -f1, f1);
GlStateManager.disableLighting();
GlStateManager.depthMask(false);
GlStateManager.disableDepth();
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
byte b0 = 0;
if (s.equals("deadmau5")) {
b0 = -10;
}
int i = fontrenderer.getStringWidth(s) / 2;
GlStateManager.disableTexture2D();
worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR);
worldrenderer.pos(-i - 1, -1 + b0, 0.0).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex();
worldrenderer.pos(-i - 1, 8 + b0, 0.0).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex();
worldrenderer.pos(i + 1, 8 + b0, 0.0).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex();
worldrenderer.pos(i + 1, -1 + b0, 0.0).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex();
tessellator.draw();
GlStateManager.enableTexture2D();
fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, b0, 553648127);
GlStateManager.enableDepth();
GlStateManager.depthMask(true);
fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, b0, -1);
GlStateManager.enableLighting();
GlStateManager.disableBlend();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.popMatrix();
}
}
public void render(AbstractClientPlayer player, BOBJArmature armature, double d0, double d1, double d2, float f) {
if (this.animation != null && this.animation.meshes.size() > 0) {
float f1 = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * f;
float f2 = this.userConfig.scale;
GL11.glPushMatrix();
GL11.glTranslated(d0, d1, d2);
GL11.glScalef(f2, f2, f2);
GL11.glRotatef(180.0F - f1 - 180.0F, 0.0F, 1.0F, 0.0F);
this.renderAnimation(player, armature, f1, f);
if (this.entry != null && !Minecraft.getMinecraft().isGamePaused()) {
int i = (int) this.emote.getTick(0.0F);
this.entry.progressAnimation(this.accessor, armature, i, f);
}
GL11.glPopMatrix();
}
}
private void renderAnimation(AbstractClientPlayer abstractclientplayer, BOBJArmature bobjarmature, float f, float f1) {
for (BOBJArmature bobjarmature1 : this.animation.data.armatures.values()) {
if (bobjarmature1.enabled) {
BOBJBone bobjbone1 = bobjarmature1.bones.get(this.userConfig.head);
if (bobjbone1 != null) {
float f3 = abstractclientplayer.prevRotationYawHead + (abstractclientplayer.rotationYawHead - abstractclientplayer.prevRotationYawHead) * f1;
float f2 = abstractclientplayer.prevRotationPitch + (abstractclientplayer.rotationPitch - abstractclientplayer.prevRotationPitch) * f1;
f3 = (f - f3) / 180.0F * (float) Math.PI;
f2 = f2 / 180.0F * (float) Math.PI;
bobjbone1.rotateX = f2;
bobjbone1.rotateY = f3;
}
if (this.emote != null) {
this.emote.apply(bobjarmature1, f1);
}
for (BOBJBone bone : bobjarmature1.orderedBones) {
bobjarmature1.matrices[bone.index] = bone.compute();
bone.reset();
}
}
}
for (AnimationMesh animationmesh : this.animation.meshes) {
if (animationmesh.armature.enabled) {
animationmesh.update();
}
}
GL11.glEnable(32826);
this.renderMeshes(abstractclientplayer, f1);
GL11.glDisable(32826);
this.renderItems(abstractclientplayer, bobjarmature);
this.renderHead(abstractclientplayer, bobjarmature.bones.get(this.userConfig.head));
this.renderCosmetic(this.renderPlayer, abstractclientplayer, bobjarmature);
}
public void renderCosmetic(RenderPlayer renderPlayer, Entity entityIn, BOBJArmature bobjarmature) {
if (entityIn instanceof EntityPlayer) {
EntityPlayer var4 = (EntityPlayer) entityIn;
}
}
private void renderMeshes(EntityLivingBase entitylivingbase, float f) {
AnimationMeshConfig animationmeshconfig = this.userConfig.meshes.get("armor_helmet");
AnimationMeshConfig animationmeshconfig1 = this.userConfig.meshes.get("armor_chest");
AnimationMeshConfig animationmeshconfig2 = this.userConfig.meshes.get("armor_leggings");
AnimationMeshConfig animationmeshconfig3 = this.userConfig.meshes.get("armor_feet");
if (animationmeshconfig != null) {
this.updateArmorSlot(animationmeshconfig, entitylivingbase, 4);
}
if (animationmeshconfig1 != null) {
this.updateArmorSlot(animationmeshconfig1, entitylivingbase, 3);
}
if (animationmeshconfig2 != null) {
this.updateArmorSlot(animationmeshconfig2, entitylivingbase, 2);
}
if (animationmeshconfig3 != null) {
this.updateArmorSlot(animationmeshconfig3, entitylivingbase, 1);
}
for (AnimationMesh animationmesh : this.animation.meshes) {
if (animationmesh.armature.enabled) {
animationmesh.render(this.userConfig.meshes.get(animationmesh.name));
}
}
for (AnimationMesh animationmesh1 : this.animation.meshes) {
if (animationmesh1.name.startsWith("armor_")) {
ItemStack itemstack = null;
String var10 = animationmesh1.name;
switch (var10) {
case "armor_helmet":
itemstack = entitylivingbase.getEquipmentInSlot(4);
break;
case "armor_chest":
itemstack = entitylivingbase.getEquipmentInSlot(3);
break;
case "armor_leggings":
itemstack = entitylivingbase.getEquipmentInSlot(2);
break;
case "armor_feet":
itemstack = entitylivingbase.getEquipmentInSlot(1);
}
if (itemstack != null && itemstack.getItem() instanceof ItemArmor && itemstack.isItemEnchanted()) {
this.renderMeshGlint(animationmesh1, (float) entitylivingbase.ticksExisted + f);
}
}
}
}
private void renderMeshGlint(AnimationMesh animationmesh, float f) {
this.mc.getTextureManager().bindTexture(ENCHANTED_ITEM_GLINT_RES);
GlStateManager.enableBlend();
GlStateManager.depthFunc(514);
GlStateManager.depthMask(false);
for (int i = 0; i < 2; ++i) {
float f1 = 0.5F;
GlStateManager.color(f1, f1, f1, 1.0F);
GlStateManager.disableLighting();
GlStateManager.blendFunc(768, 1);
float f2 = 0.76F;
GlStateManager.color(0.5F * f2, 0.25F * f2, 0.8F * f2, 1.0F);
GlStateManager.matrixMode(5890);
GlStateManager.loadIdentity();
float f3 = 0.33333334F;
GlStateManager.scale(f3, f3, f3);
GlStateManager.rotate(30.0F - (float) i * 60.0F, 0.0F, 0.0F, 1.0F);
GlStateManager.translate(0.0F, f * (0.001F + (float) i * 0.003F) * 20.0F, 0.0F);
GlStateManager.matrixMode(5888);
animationmesh.render(null);
}
GlStateManager.matrixMode(5890);
GlStateManager.loadIdentity();
GlStateManager.matrixMode(5888);
GlStateManager.enableLighting();
GlStateManager.depthMask(true);
GlStateManager.depthFunc(515);
GlStateManager.disableBlend();
}
private void updateArmorSlot(AnimationMeshConfig animationmeshconfig, EntityLivingBase entitylivingbase, int i) {
ItemStack itemstack = entitylivingbase.getEquipmentInSlot(i);
if (itemstack != null && itemstack.getItem() instanceof ItemArmor) {
ItemArmor itemarmor = (ItemArmor) itemstack.getItem();
animationmeshconfig.visible = true;
animationmeshconfig.texture = this.getArmorResource(itemarmor, this.isLegSlot(i), null);
animationmeshconfig.color = itemarmor.getColor(itemstack);
} else {
animationmeshconfig.visible = false;
animationmeshconfig.color = -1;
}
}
private boolean isLegSlot(int i) {
return i == 2;
}
private ResourceLocation getArmorResource(ItemArmor itemarmor, boolean flag, String s) {
String s1 = String.format(
"textures/models/armor/%s_layer_%d%s.png", itemarmor.getArmorMaterial().getName(), flag ? 2 : 1, s == null ? "" : String.format("_%s", s)
);
ResourceLocation aj = ARMOR_TEXTURE_RES_MAP.get(s1);
if (aj == null) {
aj = new ResourceLocation(s1);
ARMOR_TEXTURE_RES_MAP.put(s1, aj);
}
return aj;
}
private void renderHead(EntityLivingBase entitylivingbase, BOBJBone bobjbone) {
ItemStack itemstack = entitylivingbase.getEquipmentInSlot(4);
if (itemstack != null && bobjbone != null) {
Item item = itemstack.getItem();
if (!(item instanceof ItemArmor) || ((ItemArmor) item).armorType != 4) {
GlStateManager.pushMatrix();
this.setupMatrix(bobjbone);
GlStateManager.translate(0.0F, 0.25F, 0.0F);
if (!(item instanceof ItemSkull)) {
GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
} else {
GlStateManager.translate(0.0F, 0.05F, 0.0F);
}
GlStateManager.scale(0.625F, 0.625F, 0.625F);
this.mc.getItemRenderer().renderItem(entitylivingbase, itemstack, ItemCameraTransforms.TransformType.HEAD);
GlStateManager.popMatrix();
}
}
}
private void renderItems(EntityLivingBase entitylivingbase, BOBJArmature bobjarmature) {
if (this.userConfig.renderHeldItems) {
float f = this.userConfig.scaleItems;
ItemStack itemstack = entitylivingbase.getHeldItem();
if (this.itemSlot != null) {
if (this.itemSlotScale > 0.0F) {
for (AnimatorHeldItemConfig animatorhelditemconfig : this.right ? this.userConfig.rightHands.values() : this.userConfig.leftHands.values()) {
this.renderItem(
entitylivingbase,
this.itemSlot,
bobjarmature,
animatorhelditemconfig,
animatorhelditemconfig.boneName,
ItemCameraTransforms.TransformType.THIRD_PERSON,
f * this.itemSlotScale,
this.right
);
}
}
} else if (itemstack != null && this.userConfig.rightHands != null) {
for (AnimatorHeldItemConfig animatorhelditemconfig1 : this.userConfig.rightHands.values()) {
this.renderItem(
entitylivingbase,
itemstack,
bobjarmature,
animatorhelditemconfig1,
animatorhelditemconfig1.boneName,
ItemCameraTransforms.TransformType.THIRD_PERSON,
f,
true
);
}
}
}
}
private void renderItem(
EntityLivingBase entitylivingbase,
ItemStack itemstack,
BOBJArmature bobjarmature,
AnimatorHeldItemConfig animatorhelditemconfig,
String s,
ItemCameraTransforms.TransformType itemcameratransforms$transformtype,
float f,
boolean flag
) {
Item item = itemstack.getItem();
BOBJBone bobjbone = bobjarmature.bones.get(s);
if (bobjbone != null) {
GlStateManager.pushMatrix();
this.setupMatrix(bobjbone);
if (!flag) {
GlStateManager.translate(0.0625F * (2.0F - 3.0F * (1.0F - this.itemSlotScale)), -0.125F, 0.1875F);
GlStateManager.rotate(90.0F, 0.0F, 0.0F, 1.0F);
GlStateManager.rotate(-45.0F, 0.0F, 1.0F, 0.0F);
} else {
GlStateManager.translate(0.0F, -0.0625F, 0.0625F);
}
GlStateManager.scale(f * animatorhelditemconfig.scaleX, f * animatorhelditemconfig.scaleY, f * animatorhelditemconfig.scaleZ);
if (item instanceof ItemBlock && Block.getBlockFromItem(item).getRenderType() == 2) {
GlStateManager.translate(0.0F, 0.1875F, -0.3125F);
GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.scale(-0.375F, -0.375F, 0.375F);
}
this.mc.getItemRenderer().renderItem(entitylivingbase, itemstack, itemcameratransforms$transformtype);
GlStateManager.popMatrix();
}
}
public void update(EntityLivingBase entitylivingbase) {
for (Runnable runnable : this.runnables) {
runnable.run();
}
this.runnables.clear();
if (this.emote != null && this.counter <= 0) {
this.emote.update();
double d2 = entitylivingbase.posX - this.prevX;
double d0 = entitylivingbase.posY - this.prevY;
double d1 = entitylivingbase.posZ - this.prevZ;
boolean flag = d2 * d2 + d0 * d0 + d1 * d1 > 0.0025000000000000005;
boolean flag1 = entitylivingbase.isSwingInProgress && entitylivingbase.swingProgress == 0.0F && !entitylivingbase.isPlayerSleeping();
boolean flag2 = entitylivingbase.isSneaking() || flag || flag1;
if (this.emote.isFinished() || flag2) {
this.accessor.entity = entitylivingbase;
if (flag2) {
this.resetEmote(0);
} else {
this.resetEmote();
}
}
}
if (this.counter >= 0) {
if (this.resetThirdView && this.emote == null && this.counter == 0) {
this.resetThirdView = false;
Minecraft.getMinecraft().gameSettings.thirdPersonView = 0;
}
--this.counter;
}
this.prevX = entitylivingbase.posX;
this.prevY = entitylivingbase.posY;
this.prevZ = entitylivingbase.posZ;
}
public void setupMatrix(BOBJBone bobjbone) {
Matrix4f matrix4f = bobjbone.mat;
((Buffer) matrix).clear();
matrix.put(matrix4f.get(buffer));
((Buffer) matrix).flip();
GL11.glMultMatrix(matrix);
}
public void resetEmote() {
this.resetEmote(5);
}
public void resetEmote(int i) {
if (this.entry != null) {
this.entry.stopAnimation(this.accessor);
}
this.entry = null;
this.emote = null;
this.counter = i;
}
public void setEmote(EntityLivingBase entitylivingbase, String s) {
this.setEmote(entitylivingbase, PlayerModelManager.get().getEmote(s));
}
public void setEmote(EntityLivingBase entitylivingbase, Emote emotex) {
if (emotex != null) {
BOBJAction bobjaction = this.animation.data.actions.get(emotex.getActionName());
if (bobjaction != null && emotex != null) {
ActionPlayback actionplayback = new ActionPlayback(bobjaction);
actionplayback.repeat = emotex.looping;
if (emotex.looping > 1) {
actionplayback.looping = true;
}
if (!this.isEmoting()) {
this.counter = 5;
}
this.accessor.entity = entitylivingbase;
if (this.entry != null) {
this.entry.stopAnimation(this.accessor);
}
this.emote = actionplayback;
this.entry = emotex;
this.entry.startAnimation(this.accessor);
if (this.mc.gameSettings.thirdPersonView != 2 && entitylivingbase == this.mc.thePlayer) {
this.mc.gameSettings.thirdPersonView = 2;
this.resetThirdView = true;
}
}
}
}
public boolean isEmoting() {
return this.emote != null && this.counter <= 0;
}
}

View File

@ -1,32 +0,0 @@
package net.silentclient.client.emotes;
import net.minecraft.client.model.ModelBiped;
import net.silentclient.client.emotes.animation.EmoteSimpleAnimation;
public class DabEmote {
private EmoteSimpleAnimation bipedRightArm = new EmoteSimpleAnimation();
private EmoteSimpleAnimation bipedLeftArm = new EmoteSimpleAnimation();
private EmoteSimpleAnimation bipedHead = new EmoteSimpleAnimation();
private EmoteSimpleAnimation modelRightArm = new EmoteSimpleAnimation();
private EmoteSimpleAnimation modelRightArmWear = new EmoteSimpleAnimation();
private EmoteSimpleAnimation modelLeftArm = new EmoteSimpleAnimation();
private EmoteSimpleAnimation modelLeftArmWear = new EmoteSimpleAnimation();
private EmoteSimpleAnimation modelHead = new EmoteSimpleAnimation();
private EmoteSimpleAnimation modelHeadWear = new EmoteSimpleAnimation();
public void initEmoteBiped(ModelBiped modelBiped) {
bipedHead.getX().setValue(modelBiped.bipedHead.rotateAngleX);
bipedHead.getY().setValue(modelBiped.bipedHead.rotateAngleY);
bipedHead.getZ().setValue(modelBiped.bipedHead.rotateAngleZ);
bipedRightArm.getX().setValue(modelBiped.bipedRightArm.rotateAngleX);
bipedRightArm.getY().setValue(modelBiped.bipedRightArm.rotateAngleY);
bipedRightArm.getZ().setValue(modelBiped.bipedRightArm.rotateAngleZ);
bipedLeftArm.getX().setValue(modelBiped.bipedLeftArm.rotateAngleX);
bipedLeftArm.getY().setValue(modelBiped.bipedLeftArm.rotateAngleY);
bipedLeftArm.getZ().setValue(modelBiped.bipedLeftArm.rotateAngleZ);
}
public void renderEmoteBiped(ModelBiped modelBiped) {
}
}

View File

@ -0,0 +1,142 @@
package net.silentclient.client.emotes;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BlockRendererDispatcher;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.projectile.EntitySnowball;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumParticleTypes;
import net.silentclient.client.emotes.animation.AnimationMeshConfig;
import net.silentclient.client.emotes.bobj.BOBJBone;
import net.silentclient.client.emotes.bobj.BOBJLoader;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import net.silentclient.client.emotes.particles.ParticleEndRod;
import net.silentclient.client.emotes.particles.PopcornParticle;
import net.silentclient.client.emotes.particles.SaltParticle;
import org.joml.Vector4f;
public class EmoteAccessor implements IEmoteAccessor {
public EntityLivingBase entity;
public AnimatorController controller;
public EmoteAccessor(AnimatorController animatorcontroller) {
this.controller = animatorcontroller;
}
@Override
public Vector4f calcPosition(BOBJBone bobjbone, float f, float f1, float f2, float f3) {
return this.controller.calcPosition(this.entity, bobjbone, f, f1, f2, f3);
}
@Override
public AnimationMeshConfig getConfig(String s) {
return this.controller.userConfig.meshes.get(s);
}
@Override
public BOBJLoader.BOBJData getData() {
return this.controller.animation.data;
}
@Override
public void setupMatrix(BOBJBone bobjbone) {
this.controller.setupMatrix(bobjbone);
}
@Override
public void setItem(ItemStack m) {
this.controller.itemSlot = m;
}
@Override
public void setItemScale(float f) {
this.controller.itemSlotScale = f;
}
@Override
public void setHand(boolean flag) {
this.controller.right = flag;
}
@Override
public void spawnParticle(ParticleType particletype, double d0, double d1, double d2, double d3, double d4, double d5) {
if (particletype == ParticleType.POPCORN) {
Minecraft.getMinecraft().effectRenderer.addEffect(new PopcornParticle(this.entity.worldObj, d0, d1, d2, d4));
} else if (particletype == ParticleType.SALT) {
Minecraft.getMinecraft().effectRenderer.addEffect(new SaltParticle(this.entity.worldObj, d0, d1, d2, d3, d4, d5));
} else if (particletype == ParticleType.END_ROD) {
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleEndRod(this.entity.worldObj, d0, d1, d2, d3, d4, d5));
} else {
EnumParticleTypes enumparticletypes = null;
if (particletype == ParticleType.WATER_DROP) {
enumparticletypes = EnumParticleTypes.WATER_DROP;
} else if (particletype == ParticleType.SPELL_MOB) {
enumparticletypes = EnumParticleTypes.SPELL_MOB;
} else if (particletype == ParticleType.EXPLODE) {
enumparticletypes = EnumParticleTypes.EXPLOSION_NORMAL;
} else if (particletype == ParticleType.SMOKE) {
enumparticletypes = EnumParticleTypes.SMOKE_NORMAL;
} else if (particletype == ParticleType.SNOW_PUFF) {
enumparticletypes = EnumParticleTypes.SNOWBALL;
} else if (particletype == ParticleType.FLAME) {
enumparticletypes = EnumParticleTypes.FLAME;
} else if (particletype == ParticleType.CLOUD) {
enumparticletypes = EnumParticleTypes.CLOUD;
}
if (enumparticletypes != null) {
this.entity.worldObj.spawnParticle(enumparticletypes, d0, d1, d2, d3, d4, d5);
}
}
}
@Override
public void spawnItemParticle(ItemStack m, double d0, double d1, double d2, double d3, double d4, double d5) {
if (m != null) {
Item item = m.getItem();
EnumParticleTypes enumparticletypes;
int i;
if (item instanceof ItemBlock) {
enumparticletypes = EnumParticleTypes.BLOCK_CRACK;
i = Block.getIdFromBlock(((ItemBlock) item).getBlock());
} else {
enumparticletypes = EnumParticleTypes.ITEM_CRACK;
i = Item.getIdFromItem(item);
}
this.entity.worldObj.spawnParticle(enumparticletypes, d0, d1, d2, d3, d4, d5, i, m.stackSize);
}
}
@Override
public void renderBlock(ItemStack m) {
Item item = m.getItem();
if (item instanceof ItemBlock) {
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
blockrendererdispatcher.renderBlockBrightness(((ItemBlock) item).getBlock().getDefaultState(), 1.0F);
}
}
@Override
public void throwSnowball(double d0, double d1, double d2, double d3, double d4, double d5) {
this.controller.runnables.add(() -> {
EntitySnowball entitysnowball = new EntitySnowball(this.entity.worldObj, d0, d1, d2);
entitysnowball.setThrowableHeading(d3, d4, d5, 1.0F, 0.0F);
this.entity.worldObj.spawnEntityInWorld(entitysnowball);
});
}
@Override
public void createFirework(double d0, double d1, double d2, double d3, double d4, double d5, NBTTagCompound f) {
if (f != null) {
this.entity.worldObj.makeFireworks(d0, d1, d2, d3, d4, d5, f);
}
}
}

View File

@ -0,0 +1,9 @@
package net.silentclient.client.emotes;
import net.minecraft.entity.Entity;
import java.util.HashMap;
public class EmoteControllerManager {
public static final HashMap<Entity, AnimatorController> controllers = new HashMap<Entity, AnimatorController>();
}

View File

@ -0,0 +1,13 @@
package net.silentclient.client.emotes;
import java.util.ArrayList;
import java.util.List;
public class EmoteData {
public List<String> emoteUsers = new ArrayList<>();
public String emoteName;
public EmoteData(String emoteName) {
this.emoteName = emoteName;
}
}

View File

@ -0,0 +1,24 @@
package net.silentclient.client.emotes;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.silentclient.client.emotes.emoticons.Emote;
public class EmoteManager {
public static void sendEmote(String name, int i) {
play(name, i);
}
public static void play(String name, int i) {
if (Minecraft.getMinecraft().theWorld != null) {
String s = PlayerModelManager.get().map.get(i);
EntityPlayer entityPlayer = Minecraft.getMinecraft().theWorld.getPlayerEntityByName(name);
if (entityPlayer != null && s != null) {
Emote emote = PlayerModelManager.get().registry.get(s);
if (EmoteControllerManager.controllers.get(entityPlayer) != null) {
EmoteControllerManager.controllers.get(entityPlayer).setEmote(entityPlayer, emote);
}
}
}
}
}

View File

@ -0,0 +1,17 @@
package net.silentclient.client.emotes;
import net.silentclient.client.mods.Mod;
import net.silentclient.client.mods.ModCategory;
import org.lwjgl.input.Keyboard;
public class EmotesMod extends Mod {
public EmotesMod() {
super("Emotes", ModCategory.SETTINGS, null);
}
@Override
public void setup() {
this.addBooleanSetting("Emotes", this, true);
this.addKeybindSetting("Emote Wheel Keybind", this, Keyboard.KEY_B);
}
}

View File

@ -0,0 +1,272 @@
package net.silentclient.client.emotes;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import net.minecraft.util.ResourceLocation;
import net.silentclient.client.emotes.animation.Animation;
import net.silentclient.client.emotes.animation.AnimationMeshConfig;
import net.silentclient.client.emotes.animation.json.AnimationMeshConfigAdapter;
import net.silentclient.client.emotes.animation.json.AnimatorConfigAdapter;
import net.silentclient.client.emotes.animation.json.AnimatorHeldItemConfigAdapter;
import net.silentclient.client.emotes.animation.model.AnimatorConfig;
import net.silentclient.client.emotes.animation.model.AnimatorHeldItemConfig;
import net.silentclient.client.emotes.bobj.BOBJLoader;
import net.silentclient.client.emotes.emoticons.Emote;
import net.silentclient.client.emotes.emoticons.Icon;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.christmas.IcebergEmote;
import net.silentclient.client.emotes.emoticons.christmas.PresentEmote;
import net.silentclient.client.emotes.emoticons.emoticons.CryingEmote;
import net.silentclient.client.emotes.emoticons.emoticons.DisgustedEmote;
import net.silentclient.client.emotes.emoticons.emoticons.SneezeEmote;
import net.silentclient.client.emotes.emoticons.emoticons.StarPowerEmote;
import net.silentclient.client.emotes.emoticons.halloween.RisingFromDeadEmote;
import net.silentclient.client.emotes.emoticons.halloween.TrickOrTreatEmote;
import net.silentclient.client.emotes.emoticons.newyear.ChampagneEmote;
import net.silentclient.client.emotes.emoticons.thanksgiving.PumpkinEmote;
import net.silentclient.client.emotes.emoticons.valentines.BlowKissEmote;
import org.apache.commons.io.IOUtils;
import org.apache.logging.log4j.LogManager;
import java.util.*;
public class PlayerModelManager {
public static Map<String, EmoteData> emoteData = new HashMap<>();
public Animation steve;
public Animation alex;
public AnimatorConfig steveConfig;
public AnimatorConfig alexConfig;
public List<String> emotes = new ArrayList<>();
public Map<String, Emote> registry = new HashMap<>();
public Map<Integer, String> map = new TreeMap<>();
public List<String> emotesName = new ArrayList<>();
public static PlayerModelManager instance;
public static PlayerModelManager get() {
if(instance == null) {
instance = new PlayerModelManager();
return instance;
}
return instance;
}
public PlayerModelManager() {
try {
GsonBuilder gsonbuilder = new GsonBuilder();
gsonbuilder.registerTypeAdapter(AnimationMeshConfig.class, new AnimationMeshConfigAdapter());
gsonbuilder.registerTypeAdapter(AnimatorConfig.class, new AnimatorConfigAdapter());
gsonbuilder.registerTypeAdapter(AnimatorHeldItemConfig.class, new AnimatorHeldItemConfigAdapter());
Gson gson = gsonbuilder.create();
Class<?> oclass = this.getClass();
BOBJLoader.BOBJData bobjloader$bobjdata1 = BOBJLoader.readData(oclass.getResourceAsStream("/assets/emoticons/models/armor.bobj"));
BOBJLoader.BOBJData bobjloader$bobjdata2 = BOBJLoader.readData(oclass.getResourceAsStream("/assets/emoticons/models/default.bobj"));
BOBJLoader.BOBJData bobjloader$bobjdata3 = BOBJLoader.readData(oclass.getResourceAsStream("/assets/emoticons/models/slim.bobj"));
BOBJLoader.BOBJData bobjloader$bobjdata4 = BOBJLoader.readData(oclass.getResourceAsStream("/assets/emoticons/models/actions.bobj"));
BOBJLoader.BOBJData bobjloader$bobjdata5 = BOBJLoader.readData(oclass.getResourceAsStream("/assets/emoticons/models/props.bobj"));
BOBJLoader.merge(bobjloader$bobjdata2, bobjloader$bobjdata1);
BOBJLoader.merge(bobjloader$bobjdata3, bobjloader$bobjdata1);
BOBJLoader.merge(bobjloader$bobjdata2, bobjloader$bobjdata5);
BOBJLoader.merge(bobjloader$bobjdata3, bobjloader$bobjdata5);
bobjloader$bobjdata2.actions.putAll(bobjloader$bobjdata4.actions);
bobjloader$bobjdata3.actions.putAll(bobjloader$bobjdata4.actions);
this.steve = new Animation("default", bobjloader$bobjdata2);
this.alex = new Animation("slim", bobjloader$bobjdata3);
this.steve.init();
this.alex.init();
this.steveConfig = gson.fromJson(
IOUtils.toString(Objects.requireNonNull(oclass.getResourceAsStream("/assets/emoticons/models/default.json"))), AnimatorConfig.class
);
this.alexConfig = gson.fromJson(
IOUtils.toString(Objects.requireNonNull(oclass.getResourceAsStream("/assets/emoticons/models/slim.json"))), AnimatorConfig.class
);
this.steve.data.armatures.get("Armature").enabled = true;
this.alex.data.armatures.get("Armature").enabled = true;
for (String s1 : bobjloader$bobjdata4.actions.keySet()) {
if (s1.startsWith("emote_") && !s1.endsWith("_IK")) {
String s = s1.substring(6);
int i = s.indexOf(":");
if (i != -1) {
s = s.substring(0, i);
}
if (!this.emotes.contains(s)) {
this.emotes.add(s);
}
}
}
this.registerEmote("best_mates", "Best Mates", 999);
this.registerEmote("boneless", "Boneless", 2);
this.registerEmote("bow", "Bow");
this.registerEmote("boy", "Boyyy");
this.registerEmote("calculated", "Calculated");
this.registerEmote("chicken", "Chicken", 4);
this.registerEmote("clapping", "Clapping", 3);
this.registerEmote("confused", "Confused");
this.registerEmote(new CryingEmote("crying", "Crying").looping(3));
this.registerEmote("dab", "Dab");
this.registerEmote("default", "Dance moves");
this.registerEmote("disco_fever", "Disco Fever", 2);
this.registerEmote("electro_shuffle", "Electro Shuffle", 2);
this.registerEmote("facepalm", "Facepalm");
this.registerEmote("fist", "Fist");
this.registerEmote("floss", "Floss", 3);
this.registerEmote("free_flow", "Free Flow");
this.registerEmote("fresh", "Fresh", 2);
this.registerEmote("gangnam_style", "Gangnam", 4);
this.registerEmote("get_funky", "Get Funky", 2);
this.registerEmote("hype", "Hype", 3);
this.registerEmote("infinite_dab", "Infinite Dab", 4);
this.registerEmote("laughing", "Laughing", 2);
this.registerEmote("no", "No");
this.registerEmote("orange_justice", "Orange Justice");
this.registerEmote("pointing", "Pointing");
this.registerEmote("salute", "Salute");
this.registerEmote("shimmer", "Shimmer");
this.registerEmote("shrug", "Shrug");
this.registerEmote("skibidi", "Skibidi", 4);
this.registerEmote("squat_kick", "Squat Kick");
this.registerEmote(new StarPowerEmote("star_power", "Star Power", 1));
this.registerEmote("t_pose", "T-Pose");
this.registerEmote("take_the_l", "Take The L", 4);
this.registerEmote("thinking", "Thinking");
this.registerEmote("tidy", "Tidy");
this.registerEmote("wave", "Wave");
this.registerEmote("yes", "Yes");
this.registerEmote(new RisingFromDeadEmote("rising_from_dead", "Dead Rising"));
this.registerEmote(new PumpkinEmote("pumpkin", "Pumpkin"));
this.registerEmote(new TrickOrTreatEmote("trick_or_treat", "Trick or Treat"));
this.registerEmote(new BlowKissEmote("blow_kiss", "Blow Kiss"));
this.registerEmote("twerk", "Twerking", 8);
this.registerEmote("club", "Clubbing", 4);
this.registerEmote(new SneezeEmote("sneeze", "Sneeze"));
this.registerEmote("punch", "Punch!");
this.registerEmote("bongo_cat", "Bongo Cat");
this.registerEmote("exhausted", "Exhausted");
this.registerEmote(new DisgustedEmote("disgusted", "Disgusted"));
this.registerEmote("bitchslap", "Slap");
this.registerEmote("threatening", "Threatening");
this.registerEmote(new PropEmote("woah", "Woah!"));
this.registerEmote("breathtaking", "Breathtaking");
this.registerEmote("bunny_hop", "Bunny Hop");
this.registerEmote("chicken_dance", "Chicken Dance");
this.registerEmote(new PropEmote("broom", "Broom"));
this.registerEmote(new IcebergEmote("iceberg", "Iceberg"));
this.registerEmote(new PresentEmote("present", "Present"));
this.registerEmote(new ChampagneEmote("champagne", "Champagne"));
this.map.put(1, "best_mates");
this.map.put(2, "boneless");
this.map.put(3, "bow");
this.map.put(4, "boy");
this.map.put(5, "calculated");
this.map.put(6, "chicken");
this.map.put(7, "clapping");
this.map.put(8, "confused");
this.map.put(9, "crying");
this.map.put(10, "dab");
this.map.put(11, "default");
this.map.put(12, "disco_fever");
this.map.put(13, "electro_shuffle");
this.map.put(14, "facepalm");
this.map.put(15, "fist");
this.map.put(16, "floss");
this.map.put(17, "free_flow");
this.map.put(18, "fresh");
this.map.put(19, "gangnam_style");
this.map.put(20, "get_funky");
this.map.put(21, "hype");
this.map.put(22, "infinite_dab");
this.map.put(23, "laughing");
this.map.put(24, "no");
this.map.put(25, "orange_justice");
this.map.put(26, "pointing");
this.map.put(27, "salute");
this.map.put(28, "shimmer");
this.map.put(29, "shrug");
this.map.put(30, "skibidi");
this.map.put(31, "squat_kick");
this.map.put(32, "star_power");
this.map.put(33, "t_pose");
this.map.put(34, "take_the_l");
this.map.put(35, "thinking");
this.map.put(36, "tidy");
this.map.put(37, "wave");
this.map.put(38, "yes");
this.map.put(39, "rising_from_dead");
this.map.put(40, "pumpkin");
this.map.put(41, "trick_or_treat");
this.map.put(42, "blow_kiss");
this.map.put(43, "twerk");
this.map.put(44, "club");
this.map.put(45, "sneeze");
this.map.put(46, "punch");
this.map.put(47, "bongo_cat");
this.map.put(48, "exhausted");
this.map.put(49, "disgusted");
this.map.put(50, "bitchslap");
this.map.put(51, "threatening");
this.map.put(52, "woah");
this.map.put(53, "breathtaking");
this.map.put(54, "bunny_hop");
this.map.put(55, "chicken_dance");
this.map.put(56, "broom");
this.map.put(57, "iceberg");
this.map.put(58, "present");
this.map.put(59, "champagne");
for (String value : this.map.values()) {
emoteData.put(value, new EmoteData(value));
}
} catch (Exception var13) {
LogManager.getLogger().info("Error registering emotes: " + var13.getMessage());
LogManager.getLogger().catching(var13);
var13.printStackTrace();
}
}
private void registerEmote(String s, String s1) {
this.registerEmote(s, s1, 1);
}
private void registerEmote(String s, String s1, int i) {
this.registerEmote(new Emote(s, s1).looping(i));
}
private void registerEmote(Emote emote) {
if (this.emotes.contains(emote.id)) {
this.registry.put(emote.id, emote);
this.emotesName.add(emote.title);
this.setEmoteIcon(emote.id);
} else {
LogManager.getLogger().info("No emote registered for '" + emote.id + "' !");
}
}
private void setEmoteIcon(String s) {
this.setEmoteIcon(s, 100, 100);
}
private void setEmoteIcon(String s, int i, int j) {
Emote emote = this.registry.get(s);
if (emote != null) {
emote.icon = new Icon(new ResourceLocation("silentclient/emotes/icons/" + s + ".png"), i, j);
}
}
public String getKey(String s) {
Emote emote = this.registry.get(s);
return emote == null ? s : emote.title;
}
public Emote getEmote(String s) {
String s1 = s.contains(":") ? s.split(":")[0] : s;
Emote emote = this.registry.get(s1);
if (s.contains(":")) {
emote = emote.getDynamicEmote(s.split(":")[1]);
}
return emote;
}
}

View File

@ -0,0 +1,47 @@
package net.silentclient.client.emotes.animation;
import net.silentclient.client.emotes.bobj.BOBJLoader;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
public class Animation {
public String name;
public BOBJLoader.BOBJData data;
public List<AnimationMesh> meshes;
public Animation(String string, BOBJLoader.BOBJData data) {
this.name = string;
this.data = data;
this.meshes = new ArrayList<>();
}
public void reload(BOBJLoader.BOBJData bOBJData) {
this.data = bOBJData;
this.delete();
this.init();
}
public void init() {
Map<String, BOBJLoader.CompiledData> map = BOBJLoader.loadMeshes(this.data);
for (Entry<String, BOBJLoader.CompiledData> entry : map.entrySet()) {
BOBJLoader.CompiledData bobjloader$compileddata = entry.getValue();
AnimationMesh animationmesh = new AnimationMesh(this, entry.getKey(), bobjloader$compileddata);
this.meshes.add(animationmesh);
this.meshes
.sort((animationmesh1, animationmesh2) -> animationmesh1.name.startsWith("prop_") ? (animationmesh2.name.startsWith("prop_") ? 0 : 1) : -1);
this.data.release();
}
}
public void delete() {
for (AnimationMesh animationMesh : this.meshes) {
animationMesh.delete();
}
this.meshes.clear();
}
}

View File

@ -0,0 +1,150 @@
package net.silentclient.client.emotes.animation;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.bobj.BOBJLoader;
import org.joml.Matrix4f;
import org.joml.Vector4f;
import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL15;
import java.nio.Buffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
public class AnimationMesh {
public Animation owner;
public String name;
public BOBJLoader.CompiledData data;
public BOBJArmature armature;
public FloatBuffer vertices;
public FloatBuffer normals;
public FloatBuffer textcoords;
public IntBuffer indices;
public int vertexBuffer;
public int normalBuffer;
public int upNormalBuffer;
public int texcoordBuffer;
public int indexBuffer;
public AnimationMesh(Animation owner, String name, BOBJLoader.CompiledData data) {
this.owner = owner;
this.name = name;
this.data = data;
(this.armature = this.data.mesh.armature).initArmature();
this.init();
}
private void init() {
this.vertices = BufferUtils.createFloatBuffer(this.data.posData.length);
((Buffer) this.vertices.put(this.data.posData)).flip();
this.normals = BufferUtils.createFloatBuffer(this.data.normData.length);
((Buffer) this.normals.put(this.data.normData)).flip();
this.textcoords = BufferUtils.createFloatBuffer(this.data.texData.length);
((Buffer) this.textcoords.put(this.data.texData)).flip();
this.indices = BufferUtils.createIntBuffer(this.data.indexData.length);
((Buffer) this.indices.put(this.data.indexData)).flip();
float[] array = new float[this.data.normData.length];
for (int i = 0; i < this.data.normData.length / 3; ++i) {
array[i * 3] = 0.0F;
array[i * 3 + 1] = 1.0F;
array[i * 3 + 2] = 0.0F;
}
FloatBuffer buffer = BufferUtils.createFloatBuffer(this.data.normData.length);
((Buffer) buffer.put(array)).flip();
GL15.glBindBuffer(34962, this.vertexBuffer = GL15.glGenBuffers());
GL15.glBufferData(34962, this.vertices, 35048);
GL15.glBindBuffer(34962, this.normalBuffer = GL15.glGenBuffers());
GL15.glBufferData(34962, this.normals, 35044);
GL15.glBindBuffer(34962, this.upNormalBuffer = GL15.glGenBuffers());
GL15.glBufferData(34962, buffer, 35044);
GL15.glBindBuffer(34962, this.texcoordBuffer = GL15.glGenBuffers());
GL15.glBufferData(34962, this.textcoords, 35044);
GL15.glBindBuffer(34963, this.indexBuffer = GL15.glGenBuffers());
GL15.glBufferData(34963, this.indices, 35044);
GL15.glBindBuffer(34962, 0);
GL15.glBindBuffer(34963, 0);
}
public void delete() {
GL15.glDeleteBuffers(this.vertexBuffer);
GL15.glDeleteBuffers(this.normalBuffer);
GL15.glDeleteBuffers(this.upNormalBuffer);
GL15.glDeleteBuffers(this.texcoordBuffer);
GL15.glDeleteBuffers(this.indexBuffer);
this.vertices = null;
this.normals = null;
this.textcoords = null;
this.indices = null;
}
public float[] mesh() {
Vector4f vector = new Vector4f();
Vector4f vector1 = new Vector4f(0.0F, 0.0F, 0.0F, 0.0F);
float[] posData = this.data.posData;
float[] array = new float[posData.length];
Matrix4f[] matrices = this.armature.matrices;
for (int i = 0; i < array.length / 4; ++i) {
int n = 0;
for (int j = 0; j < 4; ++j) {
float n2 = this.data.weightData[i * 4 + j];
if (n2 > 0.0F) {
int n3 = this.data.boneIndexData[i * 4 + j];
vector.set(posData[i * 4], posData[i * 4 + 1], posData[i * 4 + 2], 1.0F);
matrices[n3].transform(vector);
vector1.add(vector.mul(n2));
++n;
}
}
if (n == 0) {
vector1.set(posData[i * 4], posData[i * 4 + 1], posData[i * 4 + 2], 1.0F);
}
array[i * 4] = vector1.x;
array[i * 4 + 1] = vector1.y;
array[i * 4 + 2] = vector1.z;
array[i * 4 + 3] = vector1.w;
vector1.set(0.0F, 0.0F, 0.0F, 0.0F);
}
return array;
}
public void update() {
((Buffer) this.vertices).clear();
((Buffer) this.vertices.put(this.mesh())).flip();
GL15.glBindBuffer(34962, this.vertexBuffer);
GL15.glBufferData(34962, this.vertices, 35048);
}
public void render(AnimationMeshConfig config) {
if (config == null || config.visible) {
if (config != null) {
config.bindTexture();
int color = config.color;
GL11.glColor4f((float) (color >> 16 & 0xFF) / 255.0F, (float) (color >> 8 & 0xFF) / 255.0F, (float) (color & 0xFF) / 255.0F, 1.0F);
}
GL15.glBindBuffer(34962, this.vertexBuffer);
GL11.glVertexPointer(4, 5126, 0, 0L);
GL15.glBindBuffer(34962, config != null && config.normals ? this.normalBuffer : this.upNormalBuffer);
GL11.glNormalPointer(5126, 0, 0L);
GL15.glBindBuffer(34962, this.texcoordBuffer);
GL11.glTexCoordPointer(2, 5126, 0, 0L);
GL11.glEnableClientState(32884);
GL11.glEnableClientState(32885);
GL11.glEnableClientState(32888);
GL15.glBindBuffer(34963, this.indexBuffer);
GL11.glDrawElements(4, this.data.indexData.length, 5125, 0L);
GL15.glBindBuffer(34962, 0);
GL11.glDisableClientState(32884);
GL11.glDisableClientState(32885);
GL11.glDisableClientState(32888);
}
}
}

View File

@ -0,0 +1,30 @@
package net.silentclient.client.emotes.animation;
import net.minecraft.client.Minecraft;
import net.minecraft.util.ResourceLocation;
public class AnimationMeshConfig {
public ResourceLocation texture;
public boolean normals = false;
public boolean visible = true;
public boolean smooth = false;
public int color = 16777215;
public float alpha = 1.0F;
public void bindTexture() {
if (this.texture != null) {
Minecraft.getMinecraft().getTextureManager().bindTexture(this.texture);
}
}
public AnimationMeshConfig clone() {
AnimationMeshConfig animationmeshconfig = new AnimationMeshConfig();
animationmeshconfig.texture = this.texture;
animationmeshconfig.normals = this.normals;
animationmeshconfig.smooth = this.smooth;
animationmeshconfig.visible = this.visible;
animationmeshconfig.color = this.color;
animationmeshconfig.alpha = this.alpha;
return animationmeshconfig;
}
}

View File

@ -1,21 +0,0 @@
package net.silentclient.client.emotes.animation;
import net.silentclient.client.gui.animation.SimpleAnimation;
public class EmoteSimpleAnimation {
private SimpleAnimation xAnimation = new SimpleAnimation(0);
private SimpleAnimation yAnimation = new SimpleAnimation(0);
private SimpleAnimation zAnimation = new SimpleAnimation(0);
public SimpleAnimation getX() {
return xAnimation;
}
public SimpleAnimation getY() {
return yAnimation;
}
public SimpleAnimation getZ() {
return zAnimation;
}
}

View File

@ -0,0 +1,38 @@
package net.silentclient.client.emotes.animation.json;
import net.silentclient.client.emotes.animation.AnimationMeshConfig;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import net.minecraft.util.ResourceLocation;
import java.lang.reflect.Type;
public class AnimationMeshConfigAdapter implements JsonDeserializer<AnimationMeshConfig> {
public AnimationMeshConfig deserialize(JsonElement jsonelement, Type var2, JsonDeserializationContext var3) {
if (!jsonelement.isJsonObject()) {
return null;
} else {
JsonObject jsonobject = jsonelement.getAsJsonObject();
AnimationMeshConfig animationmeshconfig = new AnimationMeshConfig();
if (jsonobject.has("texture")) {
animationmeshconfig.texture = new ResourceLocation(jsonobject.get("texture").getAsString());
}
if (jsonobject.has("normals")) {
animationmeshconfig.normals = jsonobject.get("normals").getAsBoolean();
}
if (jsonobject.has("visible")) {
animationmeshconfig.visible = jsonobject.get("visible").getAsBoolean();
}
if (jsonobject.has("smooth")) {
animationmeshconfig.smooth = jsonobject.get("smooth").getAsBoolean();
}
return animationmeshconfig;
}
}
}

View File

@ -0,0 +1,96 @@
package net.silentclient.client.emotes.animation.json;
import net.silentclient.client.emotes.animation.AnimationMeshConfig;
import net.silentclient.client.emotes.animation.model.AnimatorConfig;
import net.silentclient.client.emotes.animation.model.AnimatorHeldItemConfig;
import com.google.gson.*;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Map;
import java.util.Map.Entry;
public class AnimatorConfigAdapter implements JsonDeserializer<AnimatorConfig> {
public static String[] toStringArray(JsonArray jsonarray) {
ArrayList<String> arraylist = new ArrayList<>();
int i = 0;
for (int j = jsonarray.size(); i < j; ++i) {
JsonElement jsonelement = jsonarray.get(i);
if (jsonelement.isJsonPrimitive()) {
arraylist.add(jsonelement.getAsString());
}
}
return arraylist.toArray(new String[arraylist.size()]);
}
public AnimatorConfig deserialize(JsonElement jsonelement, Type var2, JsonDeserializationContext jsondeserializationcontext) {
if (!jsonelement.isJsonObject()) {
return null;
} else {
JsonObject jsonobject = jsonelement.getAsJsonObject();
AnimatorConfig animatorconfig = new AnimatorConfig();
if (jsonobject.has("name")) {
animatorconfig.name = jsonobject.get("name").getAsString();
}
if (jsonobject.has("primaryMesh")) {
animatorconfig.primaryMesh = jsonobject.get("primaryMesh").getAsString();
}
if (jsonobject.has("scale")) {
animatorconfig.scale = jsonobject.get("scale").getAsFloat();
}
if (jsonobject.has("scaleGui")) {
animatorconfig.scaleGui = jsonobject.get("scaleGui").getAsFloat();
}
if (jsonobject.has("scaleItems")) {
animatorconfig.scaleItems = jsonobject.get("scaleItems").getAsFloat();
}
if (jsonobject.has("renderHeldItems")) {
animatorconfig.renderHeldItems = jsonobject.get("renderHeldItems").getAsBoolean();
}
if (jsonobject.has("leftHands")) {
this.addHeldConfig(animatorconfig.leftHands, jsonobject.get("leftHands"), jsondeserializationcontext);
}
if (jsonobject.has("rightHands")) {
this.addHeldConfig(animatorconfig.rightHands, jsonobject.get("rightHands"), jsondeserializationcontext);
}
if (jsonobject.has("head")) {
animatorconfig.head = jsonobject.get("head").getAsString();
}
if (jsonobject.has("meshes")) {
animatorconfig.meshes = jsondeserializationcontext.deserialize(jsonobject.get("meshes"), (new TypeToken<Map<String, AnimationMeshConfig>>() {
}).getType());
}
return animatorconfig;
}
}
private void addHeldConfig(Map<String, AnimatorHeldItemConfig> map, JsonElement jsonelement, JsonDeserializationContext jsondeserializationcontext) {
map.clear();
if (jsonelement.isJsonArray()) {
for (String s : toStringArray(jsonelement.getAsJsonArray())) {
map.put(s, new AnimatorHeldItemConfig(s));
}
} else if (jsonelement.isJsonObject()) {
for (Entry entry : ((JsonObject) jsonelement).entrySet()) {
AnimatorHeldItemConfig animatorhelditemconfig = jsondeserializationcontext.deserialize(
(JsonElement) entry.getValue(), AnimatorHeldItemConfig.class
);
animatorhelditemconfig.boneName = (String) entry.getKey();
map.put(animatorhelditemconfig.boneName, animatorhelditemconfig);
}
}
}
}

View File

@ -0,0 +1,57 @@
package net.silentclient.client.emotes.animation.json;
import net.silentclient.client.emotes.animation.model.AnimatorHeldItemConfig;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import java.lang.reflect.Type;
public class AnimatorHeldItemConfigAdapter implements JsonDeserializer<AnimatorHeldItemConfig> {
public AnimatorHeldItemConfig deserialize(JsonElement jsonelement, Type var2, JsonDeserializationContext var3) {
if (!jsonelement.isJsonObject()) {
return null;
} else {
JsonObject jsonobject = (JsonObject) jsonelement;
AnimatorHeldItemConfig animatorhelditemconfig = new AnimatorHeldItemConfig("");
if (jsonobject.has("x")) {
animatorhelditemconfig.x = jsonobject.get("x").getAsFloat();
}
if (jsonobject.has("y")) {
animatorhelditemconfig.y = jsonobject.get("y").getAsFloat();
}
if (jsonobject.has("z")) {
animatorhelditemconfig.z = jsonobject.get("z").getAsFloat();
}
if (jsonobject.has("sx")) {
animatorhelditemconfig.scaleX = jsonobject.get("sx").getAsFloat();
}
if (jsonobject.has("sy")) {
animatorhelditemconfig.scaleY = jsonobject.get("sy").getAsFloat();
}
if (jsonobject.has("sz")) {
animatorhelditemconfig.scaleZ = jsonobject.get("sz").getAsFloat();
}
if (jsonobject.has("rx")) {
animatorhelditemconfig.rotateX = jsonobject.get("rx").getAsFloat();
}
if (jsonobject.has("ry")) {
animatorhelditemconfig.rotateY = jsonobject.get("ry").getAsFloat();
}
if (jsonobject.has("rz")) {
animatorhelditemconfig.rotateZ = jsonobject.get("rz").getAsFloat();
}
return animatorhelditemconfig;
}
}
}

View File

@ -0,0 +1,88 @@
package net.silentclient.client.emotes.animation.model;
import net.silentclient.client.emotes.bobj.BOBJAction;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.bobj.BOBJBone;
import net.silentclient.client.emotes.bobj.BOBJGroup;
public class ActionPlayback {
public BOBJAction action;
public float ticks;
public int duration;
public int fade;
public float speed = 1.0F;
public boolean looping = false;
public int repeat = -1;
public boolean fading = false;
public boolean playing = true;
public int priority;
public ActionPlayback(BOBJAction bobjaction) {
this(bobjaction, false);
}
public ActionPlayback(BOBJAction bobjaction, boolean flag) {
this.action = bobjaction;
this.duration = bobjaction.getDuration();
this.looping = flag;
}
public ActionPlayback(BOBJAction bobjaction, boolean flag, int i) {
this(bobjaction, flag);
this.priority = i;
}
public boolean isFinished() {
return this.looping ? this.repeat == 0 && this.repeat >= 0 : this.ticks > (float) this.duration;
}
public void update() {
if (this.playing) {
if (this.looping || !this.looping && this.duration <= this.duration) {
this.ticks += this.speed;
}
if (this.looping) {
if (this.ticks >= (float) this.duration && this.speed > 0.0F) {
this.ticks -= (float) this.duration;
if (this.repeat > 0) {
--this.repeat;
}
} else if (this.ticks < 0.0F && this.speed < 0.0F) {
this.ticks += (float) this.duration;
if (this.repeat > 0) {
--this.repeat;
}
}
}
}
}
public float getTick(float f) {
float f1 = this.ticks + f * this.speed;
if (this.looping) {
if (f1 >= (float) this.duration && this.speed > 0.0F) {
f1 -= (float) this.duration;
if (this.repeat > 0) {
--this.repeat;
}
} else if (this.ticks < 0.0F && this.speed < 0.0F) {
f1 += (float) this.duration;
if (this.repeat > 0) {
--this.repeat;
}
}
}
return f1;
}
public void apply(BOBJArmature bobjarmature, float f) {
for (BOBJGroup bobjgroup : this.action.groups.values()) {
BOBJBone bobjbone = bobjarmature.bones.get(bobjgroup.name);
if (bobjbone != null) {
bobjgroup.apply(bobjbone, this.getTick(f));
}
}
}
}

View File

@ -0,0 +1,45 @@
package net.silentclient.client.emotes.animation.model;
import net.silentclient.client.emotes.animation.AnimationMeshConfig;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
public class AnimatorConfig {
public String name = "";
public String primaryMesh = "";
public float scale = 1.0F;
public float scaleGui = 1.0F;
public float scaleItems = 1.0F;
public boolean renderHeldItems = true;
public Map<String, AnimatorHeldItemConfig> leftHands = new HashMap<>();
public Map<String, AnimatorHeldItemConfig> rightHands = new HashMap<>();
public String head = "head";
public Map<String, AnimationMeshConfig> meshes = new HashMap<>();
public void copy(AnimatorConfig animatorconfig) {
this.name = animatorconfig.name;
this.primaryMesh = animatorconfig.primaryMesh;
this.scale = animatorconfig.scale;
this.scaleGui = animatorconfig.scaleGui;
this.scaleItems = animatorconfig.scaleItems;
this.renderHeldItems = animatorconfig.renderHeldItems;
this.head = animatorconfig.head;
this.leftHands.clear();
this.rightHands.clear();
this.meshes.clear();
for (Entry<String, AnimatorHeldItemConfig> entry : animatorconfig.leftHands.entrySet()) {
this.leftHands.put(entry.getKey(), entry.getValue().clone());
}
for (Entry<String, AnimatorHeldItemConfig> entry1 : animatorconfig.rightHands.entrySet()) {
this.rightHands.put(entry1.getKey(), entry1.getValue().clone());
}
for (Entry<String, AnimationMeshConfig> entry2 : animatorconfig.meshes.entrySet()) {
this.meshes.put(entry2.getKey(), entry2.getValue().clone());
}
}
}

View File

@ -0,0 +1,32 @@
package net.silentclient.client.emotes.animation.model;
public class AnimatorHeldItemConfig {
public String boneName = "";
public float x;
public float y;
public float z;
public float scaleX = 1.0F;
public float scaleY = 1.0F;
public float scaleZ = 1.0F;
public float rotateX;
public float rotateY;
public float rotateZ;
public AnimatorHeldItemConfig(String s) {
this.boneName = s;
}
public AnimatorHeldItemConfig clone() {
AnimatorHeldItemConfig animatorhelditemconfig = new AnimatorHeldItemConfig(this.boneName);
animatorhelditemconfig.x = this.x;
animatorhelditemconfig.y = this.y;
animatorhelditemconfig.z = this.z;
animatorhelditemconfig.scaleX = this.scaleX;
animatorhelditemconfig.scaleY = this.scaleY;
animatorhelditemconfig.scaleZ = this.scaleZ;
animatorhelditemconfig.rotateX = this.rotateX;
animatorhelditemconfig.rotateY = this.rotateY;
animatorhelditemconfig.rotateZ = this.rotateZ;
return animatorhelditemconfig;
}
}

View File

@ -0,0 +1,23 @@
package net.silentclient.client.emotes.bobj;
import java.util.HashMap;
import java.util.Map;
public class BOBJAction {
public String name;
public Map<String, BOBJGroup> groups = new HashMap<>();
public BOBJAction(String s) {
this.name = s;
}
public int getDuration() {
int i = 0;
for (BOBJGroup bobjgroup : this.groups.values()) {
i = Math.max(i, bobjgroup.getDuration());
}
return i;
}
}

View File

@ -0,0 +1,47 @@
package net.silentclient.client.emotes.bobj;
import org.joml.Matrix4f;
import java.util.*;
public class BOBJArmature {
public String name;
public String action = "";
public Map<String, BOBJBone> bones = new HashMap<>();
public List<BOBJBone> orderedBones = new ArrayList<>();
public Matrix4f[] matrices;
public boolean enabled = false;
private boolean initialized;
public BOBJArmature(String s) {
this.name = s;
}
public void addBone(BOBJBone bobjbone) {
this.bones.put(bobjbone.name, bobjbone);
this.orderedBones.add(bobjbone);
}
public void initArmature() {
if (!this.initialized) {
for (BOBJBone bobjbone : this.bones.values()) {
if (!bobjbone.parent.isEmpty()) {
bobjbone.parentBone = this.bones.get(bobjbone.parent);
bobjbone.relBoneMat.set(bobjbone.parentBone.boneMat).invert().mul(bobjbone.boneMat);
} else {
bobjbone.relBoneMat.set(bobjbone.boneMat);
}
}
this.orderedBones.sort(Comparator.comparingInt(bobjbone -> bobjbone.index));
this.matrices = new Matrix4f[this.orderedBones.size()];
this.initialized = true;
}
}
public void setupMatrices() {
for (BOBJBone bobjbone : this.orderedBones) {
this.matrices[bobjbone.index] = bobjbone.compute();
}
}
}

View File

@ -0,0 +1,78 @@
package net.silentclient.client.emotes.bobj;
import org.joml.Matrix4f;
import org.joml.Vector3f;
public class BOBJBone {
public int index;
public String name;
public String parent;
public BOBJBone parentBone;
public Vector3f head;
public Vector3f tail;
public float x;
public float y;
public float z;
public float rotateX;
public float rotateY;
public float rotateZ;
public float scaleX = 1.0F;
public float scaleY = 1.0F;
public float scaleZ = 1.0F;
public Matrix4f mat = new Matrix4f();
public Matrix4f boneMat;
public Matrix4f invBoneMat = new Matrix4f();
public Matrix4f relBoneMat = new Matrix4f();
public BOBJBone(int i, String s, String s1, Vector3f vector3f, Matrix4f matrix4f) {
this.index = i;
this.name = s;
this.parent = s1;
this.boneMat = matrix4f;
this.head = new Vector3f(matrix4f.m30(), matrix4f.m31(), matrix4f.m32());
this.tail = vector3f;
this.invBoneMat.set(matrix4f).invert();
}
public Matrix4f compute() {
return this.compute(0.0F, 0.0F);
}
public Matrix4f compute(float f, float f1) {
Matrix4f matrix4f = this.computeMatrix(new Matrix4f(), f, f1);
this.mat.set(matrix4f);
matrix4f.mul(this.invBoneMat);
return matrix4f;
}
public Matrix4f computeMatrix(Matrix4f matrix4f, float f, float f1) {
this.mat.set(this.relBoneMat);
this.mat.translate(this.x, this.y, this.z);
this.mat.scale(this.scaleX, this.scaleY, this.scaleZ);
if (this.rotateZ != 0.0F) {
this.mat.rotateZ(this.rotateZ);
}
float f2 = this.rotateY + f;
float f3 = this.rotateX + f1;
if (f2 != 0.0F) {
this.mat.rotateY(f2);
}
if (f3 != 0.0F) {
this.mat.rotateX(f3);
}
if (this.parentBone != null) {
matrix4f = new Matrix4f(this.parentBone.mat);
}
return matrix4f.mul(this.mat);
}
public void reset() {
this.x = this.y = this.z = 0.0F;
this.rotateX = this.rotateY = this.rotateZ = 0.0F;
this.scaleX = this.scaleY = this.scaleZ = 1.0F;
}
}

View File

@ -0,0 +1,117 @@
package net.silentclient.client.emotes.bobj;
import java.util.ArrayList;
import java.util.List;
public class BOBJChannel {
public String path;
public int index;
public List<BOBJKeyframe> frames = new ArrayList<>();
public BOBJChannel(String s, int i) {
this.path = s;
this.index = i;
}
public float calculate(float f) {
int i = this.frames.size();
if (i <= 0) {
return 0.0F;
} else if (i == 1) {
return this.frames.get(0).value;
} else {
BOBJKeyframe bobjkeyframe = this.frames.get(0);
if ((float) bobjkeyframe.frame > f) {
return bobjkeyframe.value;
} else {
for (int j = 0; j < i; ++j) {
bobjkeyframe = this.frames.get(j);
if ((float) bobjkeyframe.frame > f && j != 0) {
BOBJKeyframe bobjkeyframe1 = this.frames.get(j - 1);
float f1 = (f - (float) bobjkeyframe1.frame) / (float) (bobjkeyframe.frame - bobjkeyframe1.frame);
return bobjkeyframe1.interpolate(f1, bobjkeyframe);
}
}
return bobjkeyframe.value;
}
}
}
public BOBJKeyframe get(float f, boolean flag) {
int i = this.frames.size();
if (i == 0) {
return null;
} else if (i == 1) {
return this.frames.get(0);
} else {
BOBJKeyframe bobjkeyframe = null;
for (int j = 0; j < i; ++j) {
bobjkeyframe = this.frames.get(j);
if ((float) bobjkeyframe.frame > f && j != 0) {
return flag ? bobjkeyframe : this.frames.get(j - 1);
}
}
return bobjkeyframe;
}
}
public void apply(BOBJBone bobjbone, float f) {
if (this.path.equals("location")) {
if (this.index == 0) {
bobjbone.x = this.calculate(f);
} else if (this.index == 1) {
bobjbone.y = this.calculate(f);
} else if (this.index == 2) {
bobjbone.z = this.calculate(f);
}
} else if (this.path.equals("rotation")) {
if (this.index == 0) {
bobjbone.rotateX = this.calculate(f);
} else if (this.index == 1) {
bobjbone.rotateY = this.calculate(f);
} else if (this.index == 2) {
bobjbone.rotateZ = this.calculate(f);
}
} else if (this.path.equals("scale")) {
if (this.index == 0) {
bobjbone.scaleX = this.calculate(f);
} else if (this.index == 1) {
bobjbone.scaleY = this.calculate(f);
} else if (this.index == 2) {
bobjbone.scaleZ = this.calculate(f);
}
}
}
public void applyInterpolate(BOBJBone bobjbone, float f, float f1) {
float f2 = this.calculate(f);
if (this.path.equals("location")) {
if (this.index == 0) {
bobjbone.x = f2 + (bobjbone.x - f2) * f1;
} else if (this.index == 1) {
bobjbone.y = f2 + (bobjbone.y - f2) * f1;
} else if (this.index == 2) {
bobjbone.z = f2 + (bobjbone.z - f2) * f1;
}
} else if (this.path.equals("rotation")) {
if (this.index == 0) {
bobjbone.rotateX = f2 + (bobjbone.rotateX - f2) * f1;
} else if (this.index == 1) {
bobjbone.rotateY = f2 + (bobjbone.rotateY - f2) * f1;
} else if (this.index == 2) {
bobjbone.rotateZ = f2 + (bobjbone.rotateZ - f2) * f1;
}
} else if (this.path.equals("scale")) {
if (this.index == 0) {
bobjbone.scaleX = f2 + (bobjbone.scaleX - f2) * f1;
} else if (this.index == 1) {
bobjbone.scaleY = f2 + (bobjbone.scaleY - f2) * f1;
} else if (this.index == 2) {
bobjbone.scaleZ = f2 + (bobjbone.scaleZ - f2) * f1;
}
}
}
}

View File

@ -0,0 +1,38 @@
package net.silentclient.client.emotes.bobj;
import java.util.ArrayList;
import java.util.List;
public class BOBJGroup {
public String name;
public List<BOBJChannel> channels = new ArrayList<>();
public BOBJGroup(String s) {
this.name = s;
}
public void apply(BOBJBone bobjbone, float f) {
for (BOBJChannel bobjchannel : this.channels) {
bobjchannel.apply(bobjbone, f);
}
}
public void applyInterpolate(BOBJBone bobjbone, float f, float f1) {
for (BOBJChannel bobjchannel : this.channels) {
bobjchannel.applyInterpolate(bobjbone, f, f1);
}
}
public int getDuration() {
int i = 0;
for (BOBJChannel bobjchannel : this.channels) {
int j = bobjchannel.frames.size();
if (j > 0) {
i = Math.max(i, bobjchannel.frames.get(j - 1).frame);
}
}
return i;
}
}

View File

@ -0,0 +1,88 @@
package net.silentclient.client.emotes.bobj;
public class BOBJKeyframe {
public int frame;
public float value;
public BOBJKeyframe.Interpolation interpolation = BOBJKeyframe.Interpolation.LINEAR;
public float leftX;
public float leftY;
public float rightX;
public float rightY;
public BOBJKeyframe(int i, float f) {
this.frame = i;
this.value = f;
}
public BOBJKeyframe(int i, float f, String s) {
this(i, f);
this.interpolation = interpolationFromString(s);
}
public BOBJKeyframe(int i, float f, String s, float f1, float f2, float f3, float f4) {
this(i, f, s);
this.leftX = f1;
this.leftY = f2;
this.rightX = f3;
this.rightY = f4;
}
public static BOBJKeyframe parse(String[] astring) {
if (astring.length == 8) {
float f = Float.parseFloat(astring[4]);
float f1 = Float.parseFloat(astring[5]);
float f2 = Float.parseFloat(astring[6]);
float f3 = Float.parseFloat(astring[7]);
return new BOBJKeyframe(Integer.parseInt(astring[1]), Float.parseFloat(astring[2]), astring[3], f, f1, f2, f3);
} else {
return astring.length == 4
? new BOBJKeyframe(Integer.parseInt(astring[1]), Float.parseFloat(astring[2]), astring[3])
: (astring.length == 3 ? new BOBJKeyframe(Integer.parseInt(astring[1]), Float.parseFloat(astring[2])) : null);
}
}
public static BOBJKeyframe.Interpolation interpolationFromString(String s) {
return s.equals("CONSTANT")
? BOBJKeyframe.Interpolation.CONSTANT
: (s.equals("BEZIER") ? BOBJKeyframe.Interpolation.BEZIER : BOBJKeyframe.Interpolation.LINEAR);
}
public static float lerp(float f, float f1, float f2) {
return f + (f1 - f) * f2;
}
public float interpolate(float f, BOBJKeyframe bobjkeyframe) {
return this.interpolation.interpolate(this, f, bobjkeyframe);
}
public enum Interpolation {
CONSTANT {
@Override
public float interpolate(BOBJKeyframe bobjkeyframe, float var2, BOBJKeyframe var3) {
return bobjkeyframe.value;
}
},
LINEAR {
@Override
public float interpolate(BOBJKeyframe bobjkeyframe, float f, BOBJKeyframe bobjkeyframe1) {
return BOBJKeyframe.lerp(bobjkeyframe.value, bobjkeyframe1.value, f);
}
},
BEZIER {
@Override
public float interpolate(BOBJKeyframe bobjkeyframe, float f, BOBJKeyframe bobjkeyframe1) {
float f1 = BOBJKeyframe.lerp(bobjkeyframe.value, bobjkeyframe.rightY, f);
float f2 = BOBJKeyframe.lerp(bobjkeyframe.rightY, bobjkeyframe1.leftY, f);
float f3 = BOBJKeyframe.lerp(bobjkeyframe1.leftY, bobjkeyframe1.value, f);
float f4 = BOBJKeyframe.lerp(f1, f2, f);
float f5 = BOBJKeyframe.lerp(f2, f3, f);
return BOBJKeyframe.lerp(f4, f5, f);
}
};
Interpolation() {
}
public abstract float interpolate(BOBJKeyframe var1, float var2, BOBJKeyframe var3);
}
}

View File

@ -0,0 +1,411 @@
package net.silentclient.client.emotes.bobj;
import org.apache.commons.lang3.ArrayUtils;
import org.joml.Matrix4f;
import org.joml.Vector2f;
import org.joml.Vector3f;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;
public class BOBJLoader {
public static List<String> readAllLines(InputStream inputStream) {
ArrayList<String> list = new ArrayList<>();
try {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
String line;
while ((line = bufferedReader.readLine()) != null) {
list.add(line);
}
bufferedReader.close();
} catch (Exception var4) {
var4.printStackTrace();
}
return list;
}
public static void merge(BOBJLoader.BOBJData bobjloader$bobjdata, BOBJLoader.BOBJData bobjloader$bobjdata1) {
int i = bobjloader$bobjdata.vertices.size();
int j = bobjloader$bobjdata.normals.size();
int k = bobjloader$bobjdata.textures.size();
bobjloader$bobjdata.vertices.addAll(bobjloader$bobjdata1.vertices);
bobjloader$bobjdata.normals.addAll(bobjloader$bobjdata1.normals);
bobjloader$bobjdata.textures.addAll(bobjloader$bobjdata1.textures);
bobjloader$bobjdata.armatures.putAll(bobjloader$bobjdata1.armatures);
for (BOBJLoader.BOBJMesh bobjloader$bobjmesh : bobjloader$bobjdata1.meshes) {
BOBJLoader.BOBJMesh bobjloader$bobjmesh1 = bobjloader$bobjmesh.add(i, j, k);
bobjloader$bobjmesh1.armature = bobjloader$bobjdata.armatures.get(bobjloader$bobjmesh1.armatureName);
bobjloader$bobjdata.meshes.add(bobjloader$bobjmesh1);
}
}
public static BOBJLoader.BOBJData readData(InputStream inputStream) {
List<String> lines = readAllLines(inputStream);
ArrayList<BOBJLoader.Vertex> list = new ArrayList<>();
ArrayList<Vector2f> list2 = new ArrayList();
ArrayList<Vector3f> list3 = new ArrayList();
ArrayList<BOBJLoader.BOBJMesh> list4 = new ArrayList<>();
HashMap<String, BOBJAction> map = new HashMap<>();
HashMap<String, BOBJArmature> map1 = new HashMap<>();
BOBJLoader.BOBJMesh bobjMesh = null;
BOBJAction bobjAction = null;
BOBJGroup bobjGroup = null;
BOBJChannel bobjChannel = null;
BOBJArmature bobjArmature = null;
BOBJLoader.Vertex vertex = null;
int n = 0;
for (String allLine : lines) {
String[] split = allLine.split("\\s");
String s = split[0];
switch (s) {
case "o":
list4.add(bobjMesh = new BOBJLoader.BOBJMesh(split[1]));
bobjArmature = null;
vertex = null;
break;
case "o_arm":
assert bobjMesh != null;
bobjMesh.armatureName = split[1];
break;
case "v":
if (vertex != null) {
vertex.eliminateTinyWeights();
}
list.add(vertex = new BOBJLoader.Vertex(Float.parseFloat(split[1]), Float.parseFloat(split[2]), Float.parseFloat(split[3])));
break;
case "vw":
float float1 = Float.parseFloat(split[2]);
if (float1 != 0.0F) {
assert vertex != null;
vertex.weights.add(new BOBJLoader.Weight(split[1], float1));
}
break;
case "vt":
list2.add(new Vector2f(Float.parseFloat(split[1]), Float.parseFloat(split[2])));
break;
case "vn":
list3.add(new Vector3f(Float.parseFloat(split[1]), Float.parseFloat(split[2]), Float.parseFloat(split[3])));
break;
case "f":
assert bobjMesh != null;
bobjMesh.faces.add(new BOBJLoader.Face(split[1], split[2], split[3]));
break;
case "arm_name":
n = 0;
bobjArmature = new BOBJArmature(split[1]);
map1.put(bobjArmature.name, bobjArmature);
break;
case "arm_action":
assert bobjArmature != null;
bobjArmature.action = split[1];
break;
case "arm_bone":
Vector3f vector3f = new Vector3f(Float.parseFloat(split[3]), Float.parseFloat(split[4]), Float.parseFloat(split[5]));
Matrix4f matrix4f = new Matrix4f();
float[] array = new float[16];
for (int i = 6; i < 22; ++i) {
array[i - 6] = Float.parseFloat(split[i]);
}
matrix4f.set(array).transpose();
assert bobjArmature != null;
bobjArmature.addBone(new BOBJBone(n++, split[1], split[2], vector3f, matrix4f));
break;
case "an":
map.put(split[1], bobjAction = new BOBJAction(split[1]));
break;
case "ao":
assert bobjAction != null;
bobjAction.groups.put(split[1], bobjGroup = new BOBJGroup(split[1]));
break;
case "ag":
assert bobjGroup != null;
bobjGroup.channels.add(bobjChannel = new BOBJChannel(split[1], Integer.parseInt(split[2])));
break;
default:
if (s.equals("kf")) {
assert bobjChannel != null;
bobjChannel.frames.add(BOBJKeyframe.parse(split));
}
}
}
return new BOBJLoader.BOBJData(list, list2, list3, list4, map, map1);
}
public static Map<String, BOBJLoader.CompiledData> loadMeshes(BOBJLoader.BOBJData data) {
HashMap<String, BOBJLoader.CompiledData> map = new HashMap<>();
for (BOBJLoader.BOBJMesh bobjMesh : data.meshes) {
ArrayList<Integer> list = new ArrayList<>();
List<BOBJLoader.Face> faces = bobjMesh.faces;
int[] array = new int[faces.size() * 3 * 4];
float[] array2 = new float[faces.size() * 3 * 4];
float[] array3 = new float[faces.size() * 3 * 4];
float[] array4 = new float[faces.size() * 3 * 2];
float[] array5 = new float[faces.size() * 3 * 3];
Arrays.fill(array, -1);
Arrays.fill(array2, -1.0F);
int n = 0;
for (BOBJLoader.Face face : faces) {
BOBJLoader.IndexGroup[] idxGroups = face.idxGroups;
int length = idxGroups.length;
for (int i = 0; i < length; ++i) {
processFaceVertex(n, idxGroups[i], bobjMesh, data, list, array3, array4, array5, array2, array);
++n;
}
}
map.put(
bobjMesh.name, new BOBJLoader.CompiledData(array3, array4, array5, array2, array, ArrayUtils.toPrimitive(list.toArray(new Integer[0])), bobjMesh)
);
}
return map;
}
private static void processFaceVertex(
int n,
BOBJLoader.IndexGroup group,
BOBJLoader.BOBJMesh mesh,
BOBJLoader.BOBJData data,
List<Integer> list,
float[] array,
float[] array2,
float[] array3,
float[] array4,
int[] array5
) {
list.add(n);
if (group.idxPos >= 0) {
BOBJLoader.Vertex vertex = data.vertices.get(group.idxPos);
array[n * 4] = vertex.x;
array[n * 4 + 1] = vertex.y;
array[n * 4 + 2] = vertex.z;
array[n * 4 + 3] = 1.0F;
if (mesh != null) {
for (int i = 0; i < Math.min(vertex.weights.size(), 4); ++i) {
BOBJLoader.Weight weight = vertex.weights.get(i);
BOBJBone bobjBone = mesh.armature.bones.get(weight.name);
array4[n * 4 + i] = weight.factor;
array5[n * 4 + i] = bobjBone.index;
}
}
}
if (group.idxTextCoord >= 0) {
Vector2f vector2f = data.textures.get(group.idxTextCoord);
array2[n * 2] = vector2f.x;
array2[n * 2 + 1] = 1.0F - vector2f.y;
}
if (group.idxVecNormal >= 0) {
Vector3f vector3f = data.normals.get(group.idxVecNormal);
array3[n * 3] = vector3f.x;
array3[n * 3 + 1] = vector3f.y;
array3[n * 3 + 2] = vector3f.z;
}
}
public static class BOBJData {
public List<BOBJLoader.Vertex> vertices;
public List<Vector2f> textures;
public List<Vector3f> normals;
public List<BOBJLoader.BOBJMesh> meshes;
public Map<String, BOBJAction> actions;
public Map<String, BOBJArmature> armatures;
public BOBJData(
List<BOBJLoader.Vertex> vertices,
List<Vector2f> textures,
List<Vector3f> normals,
List<BOBJLoader.BOBJMesh> meshes,
Map<String, BOBJAction> actions,
Map<String, BOBJArmature> armatures
) {
this.vertices = vertices;
this.textures = textures;
this.normals = normals;
this.meshes = meshes;
this.actions = actions;
this.armatures = armatures;
for (BOBJLoader.BOBJMesh mesh : meshes) {
mesh.armature = armatures.get(mesh.armatureName);
}
}
public void release() {
this.vertices.clear();
this.textures.clear();
this.normals.clear();
this.meshes.clear();
}
}
public static class BOBJMesh {
public String name;
public List<BOBJLoader.Face> faces = new ArrayList<>();
public String armatureName;
public BOBJArmature armature;
public BOBJMesh(String name) {
this.name = name;
}
public BOBJLoader.BOBJMesh add(int i, int j, int k) {
BOBJLoader.BOBJMesh bobjloader$bobjmesh = new BOBJLoader.BOBJMesh(this.name);
bobjloader$bobjmesh.armatureName = this.armatureName;
bobjloader$bobjmesh.armature = this.armature;
for (BOBJLoader.Face bobjloader$face : this.faces) {
bobjloader$bobjmesh.faces.add(bobjloader$face.add(i, j, k));
}
return bobjloader$bobjmesh;
}
}
public static class CompiledData {
public float[] posData;
public float[] texData;
public float[] normData;
public float[] weightData;
public int[] boneIndexData;
public int[] indexData;
public BOBJLoader.BOBJMesh mesh;
public CompiledData(
float[] posData, float[] texData, float[] normData, float[] weightData, int[] boneIndexData, int[] indexData, BOBJLoader.BOBJMesh mesh
) {
this.posData = posData;
this.texData = texData;
this.normData = normData;
this.weightData = weightData;
this.boneIndexData = boneIndexData;
this.indexData = indexData;
this.mesh = mesh;
}
}
public static class Face {
public BOBJLoader.IndexGroup[] idxGroups = new BOBJLoader.IndexGroup[3];
public Face(String s, String s1, String s2) {
this.idxGroups[0] = this.parseLine(s);
this.idxGroups[1] = this.parseLine(s1);
this.idxGroups[2] = this.parseLine(s2);
}
public Face() {
}
private BOBJLoader.IndexGroup parseLine(String s) {
BOBJLoader.IndexGroup bobjloader$indexgroup = new BOBJLoader.IndexGroup();
String[] astring = s.split("/");
int i = astring.length;
bobjloader$indexgroup.idxPos = Integer.parseInt(astring[0]) - 1;
if (i > 1) {
String s1 = astring[1];
if (!s1.isEmpty()) {
bobjloader$indexgroup.idxTextCoord = Integer.parseInt(s1) - 1;
}
if (i > 2) {
bobjloader$indexgroup.idxVecNormal = Integer.parseInt(astring[2]) - 1;
}
}
return bobjloader$indexgroup;
}
public BOBJLoader.Face add(int i, int j, int k) {
BOBJLoader.Face bobjloader$face = new BOBJLoader.Face();
for (int l = 0; l < bobjloader$face.idxGroups.length; ++l) {
BOBJLoader.IndexGroup bobjloader$indexgroup = this.idxGroups[l];
bobjloader$face.idxGroups[l] = new BOBJLoader.IndexGroup(
bobjloader$indexgroup.idxPos + i, bobjloader$indexgroup.idxTextCoord + k, bobjloader$indexgroup.idxVecNormal + j
);
}
return bobjloader$face;
}
}
public static class IndexGroup {
public static final int NO_VALUE = -1;
public int idxPos = -1;
public int idxTextCoord = -1;
public int idxVecNormal = -1;
public IndexGroup(int i, int j, int k) {
this.idxPos = i;
this.idxTextCoord = j;
this.idxVecNormal = k;
}
public IndexGroup() {
}
}
public static class Vertex {
public float x;
public float y;
public float z;
public List<BOBJLoader.Weight> weights = new ArrayList<>();
public Vertex(float x, float y, float z) {
this.x = x;
this.y = y;
this.z = z;
}
public void eliminateTinyWeights() {
this.weights.removeIf(weight -> (double) weight.factor < 0.05);
if (this.weights.size() > 0) {
float n = 0.0F;
for (BOBJLoader.Weight weight1 : this.weights) {
n += weight1.factor;
}
if (n < 1.0F) {
BOBJLoader.Weight weight = this.weights.get(this.weights.size() - 1);
weight.factor += 1.0F - n;
}
}
}
}
public static class Weight {
public String name;
public float factor;
public Weight(String name, float factor) {
this.name = name;
this.factor = factor;
}
}
}

View File

@ -0,0 +1,104 @@
package net.silentclient.client.emotes.emoticons;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.bobj.BOBJBone;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import org.joml.Vector4f;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;
public class Emote {
public final String id;
public final String title;
public int looping = 1;
public Icon icon = Icon.DEFAULT;
public Random rand = new Random();
public List<String> armatures = new ArrayList<>();
public Emote(String s, String s1) {
this.id = s;
this.title = s1;
}
public Emote looping(int i) {
this.looping = i;
return this;
}
public Emote armatures(String... astring) {
Collections.addAll(this.armatures, astring);
return this;
}
public void progressAnimation(IEmoteAccessor var1, BOBJArmature var2, int var3, float var4) {
}
public void startAnimation(IEmoteAccessor iemoteaccessor) {
for (String s : this.armatures) {
iemoteaccessor.getData().armatures.get(s).enabled = true;
}
}
public void stopAnimation(IEmoteAccessor iemoteaccessor) {
for (String s : this.armatures) {
iemoteaccessor.getData().armatures.get(s).enabled = false;
}
}
public Emote getDynamicEmote() {
return this;
}
public Emote getDynamicEmote(String var1) {
return this;
}
public Emote set(String var1) {
return this;
}
public String getKey() {
return this.id;
}
public String getActionName() {
return "emote_" + this.id;
}
public void spawnParticle(IEmoteAccessor iemoteaccessor, ParticleType particletype, double d0, double d1, double d2, float f) {
double d3 = this.rand.nextDouble() * (double) f * 2.0 - (double) f;
double d4 = this.rand.nextDouble() * (double) f * 2.0 - (double) f;
double d5 = this.rand.nextDouble() * (double) f * 2.0 - (double) f;
iemoteaccessor.spawnParticle(particletype, d0, d1, d2, d3, d4, d5);
}
public Vector4f direction(IEmoteAccessor iemoteaccessor, BOBJBone bobjbone, float f) {
return this.direction(iemoteaccessor, bobjbone, 0.0F, 0.1F, 0.0F, f);
}
public Vector4f direction(IEmoteAccessor iemoteaccessor, BOBJBone bobjbone, float f, float f1, float f2, float f3) {
Vector4f vector4f = iemoteaccessor.calcPosition(bobjbone, 0.0F, 0.0F, 0.0F, f3);
float f4 = vector4f.x;
float f5 = vector4f.y;
float f6 = vector4f.z;
vector4f = iemoteaccessor.calcPosition(bobjbone, f, f1, f2, f3);
vector4f.set(vector4f.x - f4, vector4f.y - f5, vector4f.z - f6, vector4f.w);
return vector4f;
}
public Vector4f position(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, String s, float f, float f1, float f2, float f3) {
return iemoteaccessor.calcPosition(bobjarmature.bones.get(s), f, f1, f2, f3);
}
public float rand(float f) {
return this.rand.nextFloat() * f - f / 2.0F;
}
protected int tick(int i) {
return (int) ((float) i / 30.0F * 20.0F);
}
}

View File

@ -0,0 +1,44 @@
package net.silentclient.client.emotes.emoticons;
import net.minecraft.client.gui.Gui;
import net.minecraft.util.ResourceLocation;
public class Icon {
public static final Icon DEFAULT = new Icon(new ResourceLocation("blc/textures/slideout/emotes/emote-icon.png"), 53, 85);
public ResourceLocation icon;
public int width;
public int height;
public Icon(ResourceLocation aj, int i, int j) {
this.set(aj, i, j);
}
public void set(ResourceLocation aj, int i, int j) {
this.icon = aj;
this.width = i;
this.height = j;
}
public void render(int i, int j) {
if (this.isIconPresent()) {
this.bindTexture();
Gui.drawModalRectWithCustomSizedTexture(i, j, 0.0F, 0.0F, this.width, this.height, (float) this.width, (float) this.height);
}
}
public void render(int i, int j, float f) {
if (this.isIconPresent()) {
int k = (int) ((float) this.width * f);
int l = (int) ((float) this.height * f);
this.bindTexture();
Gui.drawModalRectWithCustomSizedTexture(i - k / 2, j, 0.0F, 0.0F, k, l, (float) k, (float) l);
}
}
protected boolean isIconPresent() {
return this.icon != null;
}
protected void bindTexture() {
}
}

View File

@ -0,0 +1,42 @@
package net.silentclient.client.emotes.emoticons;
import net.silentclient.client.emotes.animation.AnimationMeshConfig;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class PropEmote extends Emote {
public List<String> props = new ArrayList<>();
public PropEmote(String s, String s1) {
super(s, s1);
}
public PropEmote props(String... astring) {
Collections.addAll(this.props, astring);
return this;
}
@Override
public void startAnimation(IEmoteAccessor iemoteaccessor) {
super.startAnimation(iemoteaccessor);
this.setVisible(iemoteaccessor, true);
}
@Override
public void stopAnimation(IEmoteAccessor iemoteaccessor) {
super.stopAnimation(iemoteaccessor);
this.setVisible(iemoteaccessor, false);
}
public void setVisible(IEmoteAccessor iemoteaccessor, boolean flag) {
for (String s : this.props) {
AnimationMeshConfig animationmeshconfig = iemoteaccessor.getConfig(s);
if (animationmeshconfig != null) {
animationmeshconfig.visible = flag;
}
}
}
}

View File

@ -0,0 +1,34 @@
package net.silentclient.client.emotes.emoticons.accessor;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.silentclient.client.emotes.animation.AnimationMeshConfig;
import net.silentclient.client.emotes.bobj.BOBJBone;
import net.silentclient.client.emotes.bobj.BOBJLoader;
import org.joml.Vector4f;
public interface IEmoteAccessor {
Vector4f calcPosition(BOBJBone var1, float var2, float var3, float var4, float var5);
AnimationMeshConfig getConfig(String var1);
BOBJLoader.BOBJData getData();
void setupMatrix(BOBJBone var1);
void setItem(ItemStack var1);
void setItemScale(float var1);
void setHand(boolean var1);
void spawnParticle(ParticleType var1, double var2, double var4, double var6, double var8, double var10, double var12);
void spawnItemParticle(ItemStack var1, double var2, double var4, double var6, double var8, double var10, double var12);
void renderBlock(ItemStack var1);
void throwSnowball(double var1, double var3, double var5, double var7, double var9, double var11);
void createFirework(double var1, double var3, double var5, double var7, double var9, double var11, NBTTagCompound var13);
}

View File

@ -0,0 +1,14 @@
package net.silentclient.client.emotes.emoticons.accessor;
public enum ParticleType {
WATER_DROP,
SPELL_MOB,
END_ROD,
EXPLODE,
SMOKE,
SNOW_PUFF,
FLAME,
CLOUD,
POPCORN,
SALT
}

View File

@ -0,0 +1,36 @@
package net.silentclient.client.emotes.emoticons.christmas;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import org.joml.Vector4f;
public class ChimneyEmote extends PropEmote {
public ChimneyEmote(String s, String s1) {
super(s, s1);
this.props("prop_chimney");
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
int j = this.rand.nextInt(6) + 4;
if (i % j == 0 && i > 10 && i < 143) {
Vector4f vector4f = this.position(iemoteaccessor, bobjarmature, "misc_bone_1", 0.0F, 0.4F, 0.0F, f);
for (int k = 0; k < 25; ++k) {
float f1 = vector4f.x + this.rand(0.3F);
float f2 = vector4f.z + this.rand(0.3F);
iemoteaccessor.spawnParticle(
ParticleType.SMOKE,
f1,
vector4f.y,
f2,
this.rand(0.05F),
0.025F + this.rand(0.01F),
this.rand(0.05F)
);
}
}
}
}

View File

@ -0,0 +1,51 @@
package net.silentclient.client.emotes.emoticons.christmas;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.bobj.BOBJBone;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import org.joml.Vector4f;
public class CoalEmote extends PropEmote {
private final ItemStack coal = new ItemStack(Items.coal);
public CoalEmote(String s, String s1) {
super(s, s1);
this.props("prop_grave_base");
}
@Override
public void startAnimation(IEmoteAccessor iemoteaccessor) {
super.startAnimation(iemoteaccessor);
iemoteaccessor.getConfig("prop_grave_base").texture = new ResourceLocation("textures/blocks/coal_block.png");
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
boolean flag = i == this.tick(116) || i == this.tick(137) || i == this.tick(157) || i == this.tick(179);
boolean flag1 = i == this.tick(128) || i == this.tick(148) || i == this.tick(168) || i == this.tick(193);
if (flag || flag1) {
BOBJBone bobjbone = bobjarmature.bones.get(flag1 ? "low_left_arm.end" : "low_right_arm.end");
Vector4f vector4f = this.direction(iemoteaccessor, bobjbone, f);
float f1 = vector4f.x * 3.5F + this.rand(0.1F);
float f2 = vector4f.y * 3.5F + this.rand(0.1F);
float f3 = vector4f.z * 3.5F + this.rand(0.1F);
Vector4f vector4f1 = iemoteaccessor.calcPosition(bobjbone, 0.0F, 0.25F, 0.0F, f);
for (int j = 0; j < 15; ++j) {
iemoteaccessor.spawnItemParticle(
this.coal,
vector4f1.x + this.rand(0.2F),
vector4f1.y,
vector4f1.z + this.rand(0.2F),
f1,
f2,
f3
);
}
}
}
}

View File

@ -0,0 +1,28 @@
package net.silentclient.client.emotes.emoticons.christmas;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import org.joml.Vector4f;
public class IceSkatingEmote extends PropEmote {
public IceSkatingEmote(String s, String s1) {
super(s, s1);
this.props("prop_skates");
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float var4) {
boolean flag = this.tick(40) < i && i < this.tick(90);
boolean flag1 = this.tick(95) < i && i < this.tick(140);
if ((flag || flag1) && i % 5 == 0) {
String s = flag ? "low_leg_right" : "low_left_leg";
Vector4f vector4f = this.position(iemoteaccessor, bobjarmature, s, 0.0F, 0.3125F, 0.0F, 0.1F);
for (int j = 0; j < 2; ++j) {
this.spawnParticle(iemoteaccessor, ParticleType.END_ROD, vector4f.x, vector4f.y, vector4f.z, 0.05F);
}
}
}
}

View File

@ -0,0 +1,39 @@
package net.silentclient.client.emotes.emoticons.christmas;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import org.joml.Vector4f;
public class IcebergEmote extends PropEmote {
public IcebergEmote(String s, String s1) {
super(s, s1);
this.props("prop_iceberg");
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
super.progressAnimation(iemoteaccessor, bobjarmature, i, f);
if (i <= 60 && i >= 40 && i % 2 == 0) {
int j = (i - 40) / 2;
Vector4f vector4f = this.position(iemoteaccessor, bobjarmature, "anchor", 0.0F, 0.0F, 0.0F, f);
float f1 = 0.6F;
float f2 = 1.0F - Math.abs((float) (i - 40) / 20.0F - 0.5F) * 2.0F;
f1 *= f2 * f2 * f2 * 0.5F + 0.5F;
for (int k = 0; k < 64; ++k) {
float f3 = (float) Math.cos((double) ((float) k / 64.0F) * Math.PI * 2.0) * f1 + this.rand(0.1F);
float f4 = (float) Math.sin((double) ((float) k / 64.0F) * Math.PI * 2.0) * f1 + this.rand(0.1F);
this.spawnParticle(
iemoteaccessor,
ParticleType.END_ROD,
vector4f.x + f3,
(double) vector4f.y + (double) ((float) j / 9.0F) * 1.8 - 0.5 + (double) this.rand(0.1F),
vector4f.z + f4,
0.025F
);
}
}
}
}

View File

@ -0,0 +1,91 @@
package net.silentclient.client.emotes.emoticons.christmas;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.Emote;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemEnchantedBook;
import net.minecraft.item.ItemStack;
public class PresentEmote extends PropEmote {
public int item = -1;
public PresentEmote(String s, String s1) {
super(s, s1);
this.props("prop_present");
}
public PresentEmote(String s, String s1, int i) {
this(s, s1);
this.item = i;
}
@Override
public Emote getDynamicEmote() {
return this.getDynamicEmote(String.valueOf(this.rand.nextInt(6) + 1));
}
@Override
public Emote getDynamicEmote(String s) {
int i = -1;
try {
i = Integer.parseInt(s);
} catch (Exception var4) {
}
return new PresentEmote(this.id, this.title, i).looping(this.looping);
}
@Override
public Emote set(String s) {
return s.contains(":") ? this.getDynamicEmote(s.split(":")[1]) : this;
}
@Override
public String getKey() {
return this.id + (this.item == -1 ? "" : ":" + this.item);
}
@Override
public String getActionName() {
return super.getActionName() + (this.item <= 3 ? ":bad" : ":good");
}
@Override
public void startAnimation(IEmoteAccessor iemoteaccessor) {
super.startAnimation(iemoteaccessor);
Item o = Items.coal;
if (this.item == 1) {
o = Items.fish;
} else if (this.item == 2) {
o = Items.stick;
} else if (this.item == 4) {
o = Items.diamond;
} else if (this.item == 5) {
ItemEnchantedBook m = Items.enchanted_book;
} else if (this.item == 6) {
o = Items.nether_star;
}
ItemStack m = new ItemStack(o);
if (this.item == 1) {
}
iemoteaccessor.setItem(m);
iemoteaccessor.setItemScale(0.0F);
}
@Override
public void stopAnimation(IEmoteAccessor iemoteaccessor) {
super.stopAnimation(iemoteaccessor);
iemoteaccessor.setItem(null);
iemoteaccessor.setItemScale(0.0F);
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature var2, int i, float f) {
}
}

View File

@ -0,0 +1,21 @@
package net.silentclient.client.emotes.emoticons.emoticons;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.Emote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import org.joml.Vector4f;
public class CryingEmote extends Emote {
public CryingEmote(String s, String s1) {
super(s, s1);
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
if (i % 2 == 0) {
Vector4f vector4f = this.position(iemoteaccessor, bobjarmature, "head", 0.0F, 0.5F, 0.15F, f);
this.spawnParticle(iemoteaccessor, ParticleType.WATER_DROP, vector4f.x, vector4f.y, vector4f.z, 0.25F);
}
}
}

View File

@ -0,0 +1,35 @@
package net.silentclient.client.emotes.emoticons.emoticons;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.Emote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import org.joml.Vector4f;
public class DisgustedEmote extends Emote {
private final ItemStack greenDye = new ItemStack(Items.dye, 1, 2);
public DisgustedEmote(String s, String s1) {
super(s, s1);
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
super.progressAnimation(iemoteaccessor, bobjarmature, i, f);
if (i >= this.tick(117) && i < this.tick(140)) {
for (int j = 0; j < 10; ++j) {
Vector4f vector4f = iemoteaccessor.calcPosition(bobjarmature.bones.get("head"), 0.0F, 0.125F, 0.25F, f);
iemoteaccessor.spawnItemParticle(
this.greenDye,
vector4f.x + this.rand(0.1F),
vector4f.y,
vector4f.z + this.rand(0.1F),
this.rand(0.05F),
-0.125,
this.rand(0.05F)
);
}
}
}
}

View File

@ -0,0 +1,26 @@
package net.silentclient.client.emotes.emoticons.emoticons;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import org.joml.Vector4f;
public class PopcornEmote extends PropEmote {
public PopcornEmote(String s, String s1) {
super(s, s1);
this.props("prop_popcorn");
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
if (i == 8 || i == 32 || i == 56 || i == 86) {
Vector4f vector4f = this.position(iemoteaccessor, bobjarmature, "low_right_arm.end", 0.0F, 0.15F, 0.0F, f);
int j = 0;
for (byte b0 = 15; j < b0; ++j) {
iemoteaccessor.spawnParticle(ParticleType.POPCORN, vector4f.x, vector4f.y, vector4f.z, 0.0, 0.1, 0.0);
}
}
}
}

View File

@ -0,0 +1,27 @@
package net.silentclient.client.emotes.emoticons.emoticons;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.Emote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import org.joml.Vector4f;
public class PureSaltEmote extends Emote {
public PureSaltEmote(String s, String s1) {
super(s, s1);
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
if (i > 18 && i <= 78 && i % 2 == 0) {
Vector4f vector4f = this.position(iemoteaccessor, bobjarmature, "low_right_arm.end", 0.0F, 0.15F, 0.0F, f);
int j = 0;
for (int k = i == 78 ? 12 : 1; j < k; ++j) {
iemoteaccessor.spawnParticle(
ParticleType.SALT, vector4f.x, vector4f.y, vector4f.z, this.rand(0.05F), this.rand(0.05F), 0.1F
);
}
}
}
}

View File

@ -0,0 +1,78 @@
package net.silentclient.client.emotes.emoticons.emoticons;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.Emote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
public class RockPaperScissorsEmote extends Emote {
public String suffix = "";
public RockPaperScissorsEmote(String s, String s1, int var3) {
super(s, s1);
}
public RockPaperScissorsEmote(String s, String s1, int i, String s2) {
this(s, s1, i);
this.suffix = s2;
}
@Override
public Emote getDynamicEmote() {
String s = "";
int i = this.rand.nextInt(30);
if (i <= 10) {
s = "rock";
} else if (i <= 20) {
s = "paper";
} else if (i <= 30) {
s = "scissors";
}
return this.getDynamicEmote(s);
}
@Override
public Emote getDynamicEmote(String s) {
return new RockPaperScissorsEmote(this.id, this.title, this.looping, s);
}
@Override
public Emote set(String s) {
return s.contains(":") ? this.getDynamicEmote(s.split(":")[1]) : this;
}
@Override
public String getKey() {
return this.id + (this.suffix.isEmpty() ? "" : ":" + this.suffix);
}
@Override
public void startAnimation(IEmoteAccessor iemoteaccessor) {
super.startAnimation(iemoteaccessor);
ItemStack m;
if (this.suffix.equals("rock")) {
m = new ItemStack(Blocks.stone);
} else if (this.suffix.equals("paper")) {
m = new ItemStack(Items.paper);
} else {
m = new ItemStack(Items.shears);
}
iemoteaccessor.setItem(m);
iemoteaccessor.setItemScale(0.0F);
}
@Override
public void stopAnimation(IEmoteAccessor iemoteaccessor) {
super.stopAnimation(iemoteaccessor);
iemoteaccessor.setItem(null);
iemoteaccessor.setItemScale(0.0F);
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature var2, int i, float f) {
}
}

View File

@ -0,0 +1,27 @@
package net.silentclient.client.emotes.emoticons.emoticons;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.Emote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import org.joml.Vector4f;
public class SneezeEmote extends Emote {
public SneezeEmote(String s, String s1) {
super(s, s1);
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
super.progressAnimation(iemoteaccessor, bobjarmature, i, f);
if (i == this.tick(121) - 1) {
Vector4f vector4f = iemoteaccessor.calcPosition(bobjarmature.bones.get("head"), 0.0F, 0.125F, 0.25F, f);
for (int j = 0; j < 10; ++j) {
iemoteaccessor.spawnParticle(
ParticleType.CLOUD, vector4f.x, vector4f.y, vector4f.z, this.rand(0.05F), -0.025F, this.rand(0.05F)
);
}
}
}
}

View File

@ -0,0 +1,65 @@
package net.silentclient.client.emotes.emoticons.emoticons;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.Emote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import org.joml.Vector4f;
public class StarPowerEmote extends Emote {
public StarPowerEmote(String s, String s1, int var3) {
super(s, s1);
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
if (i == 30) {
Vector4f vector4f = this.position(iemoteaccessor, bobjarmature, "low_right_arm.end", 0.0F, 0.15F, 0.0F, f);
int j = 0;
for (byte b0 = 15; j < b0; ++j) {
this.spawnParticle(iemoteaccessor, ParticleType.END_ROD, vector4f.x, vector4f.y, vector4f.z, 0.025F);
}
}
if (i >= 33 && i < 43) {
Vector4f vector4f1 = this.position(iemoteaccessor, bobjarmature, "low_right_arm.end", 0.0F, 0.15F, 0.0F, f);
float f3 = 1.0F;
float f4 = 0.0F;
float f1 = 0.0F;
float f2 = (float) (i - 33) / 10.0F;
if ((double) f2 >= 0.2) {
if ((double) f2 < 0.35) {
f4 = 0.5F;
} else if ((double) f2 < 0.45) {
f4 = 1.0F;
} else if ((double) f2 < 0.65) {
f3 = 0.25F;
f4 = 1.0F;
} else if ((double) f2 < 0.85) {
f3 = 0.0F;
f4 = 0.75F;
f1 = 1.0F;
} else {
f3 = 0.0F;
f4 = 0.0F;
f1 = 1.0F;
}
}
int k = 0;
for (byte b1 = 7; k < b1; ++k) {
iemoteaccessor.spawnParticle(
ParticleType.SPELL_MOB,
(double) vector4f1.x + this.rand.nextDouble() * 0.05 - 0.025,
(double) vector4f1.y + this.rand.nextDouble() * 0.05 - 0.025,
(double) vector4f1.z + this.rand.nextDouble() * 0.05 - 0.025,
f3,
f4,
f1
);
}
}
}
}

View File

@ -0,0 +1,64 @@
package net.silentclient.client.emotes.emoticons.halloween;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import org.joml.Vector4f;
public class RisingFromDeadEmote extends PropEmote {
private final ItemStack dirt = new ItemStack(Blocks.dirt);
public RisingFromDeadEmote(String s, String s1) {
super(s, s1);
this.props("prop_grave", "prop_grave_base");
}
@Override
public void startAnimation(IEmoteAccessor iemoteaccessor) {
super.startAnimation(iemoteaccessor);
iemoteaccessor.getConfig("prop_grave_base").texture = new ResourceLocation("textures/blocks/dirt.png");
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
if (i == 1 || i == 21 || i == 48 || i == 88 || i == 104) {
Vector4f vector4f = this.position(iemoteaccessor, bobjarmature, "misc_bone_1", 0.0F, 0.0F, 0.0F, f);
byte b0 = 10;
if (i == 1 || i == 21) {
b0 = 20;
}
for (int j = 0; j < b0; ++j) {
iemoteaccessor.spawnItemParticle(
this.dirt,
vector4f.x,
vector4f.y,
vector4f.z,
this.rand.nextDouble() * 0.05F,
this.rand.nextDouble() * 0.05F,
this.rand.nextDouble() * 0.05F
);
}
}
if (i == 83) {
Vector4f vector4f1 = this.position(iemoteaccessor, bobjarmature, "low_right_arm.end", 0.0F, 0.0F, 0.0F, f);
byte b1 = 10;
for (int k = 0; k < b1; ++k) {
iemoteaccessor.spawnItemParticle(
this.dirt,
vector4f1.x,
vector4f1.y,
vector4f1.z,
this.rand.nextDouble() * 0.05F,
this.rand.nextDouble() * 0.05F,
this.rand.nextDouble() * 0.05F
);
}
}
}
}

View File

@ -0,0 +1,26 @@
package net.silentclient.client.emotes.emoticons.halloween;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import org.joml.Vector4f;
public class TrickOrTreatEmote extends PropEmote {
public TrickOrTreatEmote(String s, String s1) {
super(s, s1);
this.props("prop_candy_bag");
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
if (i == 14 || i == 144) {
Vector4f vector4f = this.position(iemoteaccessor, bobjarmature, "low_right_arm.end", 0.0F, 0.15F, 0.0F, f);
int j = 0;
for (byte b0 = 15; j < b0; ++j) {
this.spawnParticle(iemoteaccessor, ParticleType.EXPLODE, vector4f.x, vector4f.y, vector4f.z, 0.025F);
}
}
}
}

View File

@ -0,0 +1,43 @@
package net.silentclient.client.emotes.emoticons.newyear;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.bobj.BOBJBone;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import org.joml.Vector4f;
public class ChampagneEmote extends PropEmote {
public ChampagneEmote(String s, String s1) {
super(s, s1);
this.props("prop_champagne_bottle", "prop_champagne_flying_cork");
}
@Override
public void stopAnimation(IEmoteAccessor iemoteaccessor) {
super.stopAnimation(iemoteaccessor);
iemoteaccessor.getConfig("prop_champagne_cork").visible = false;
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
iemoteaccessor.getConfig("prop_champagne_cork").visible = i < this.tick(75);
if (i > this.tick(80) && i < this.tick(160)) {
BOBJBone bobjbone = bobjarmature.bones.get("low_right_arm.item");
Vector4f vector4f = this.direction(iemoteaccessor, bobjbone, 0.0F, 0.0F, -1.0F, f);
float f1 = vector4f.x * 0.1F + this.rand(0.05F);
float f2 = vector4f.y * 0.1F + this.rand(0.05F);
float f3 = vector4f.z * 0.1F + this.rand(0.05F);
Vector4f vector4f1 = iemoteaccessor.calcPosition(bobjbone, 0.0F, 0.0F, -0.625F, f);
iemoteaccessor.spawnParticle(ParticleType.END_ROD, vector4f1.x, vector4f1.y, vector4f1.z, f1, f2, f3);
}
if (i == this.tick(83)) {
Vector4f vector4f2 = iemoteaccessor.calcPosition(bobjarmature.bones.get("misc_bone_2"), 0.0F, 0.0F, 0.0F, f);
for (int j = 0; j < 15; ++j) {
this.spawnParticle(iemoteaccessor, ParticleType.EXPLODE, vector4f2.x, vector4f2.y, vector4f2.z, 0.01F);
}
}
}
}

View File

@ -0,0 +1,4 @@
package net.silentclient.client.emotes.emoticons.newyear;
public class FireworksEmote {
}

View File

@ -0,0 +1,26 @@
package net.silentclient.client.emotes.emoticons.thanksgiving;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import org.joml.Vector4f;
public class HuntEmote extends PropEmote {
public HuntEmote(String s, String s1) {
super(s, s1);
this.props("prop_hunt_gun");
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
if (i == 91) {
Vector4f vector4f = this.position(iemoteaccessor, bobjarmature, "low_right_arm.item", 0.0F, 0.0F, -1.25F, f);
int j = 0;
for (byte b0 = 15; j < b0; ++j) {
this.spawnParticle(iemoteaccessor, ParticleType.EXPLODE, vector4f.x, vector4f.y, vector4f.z, 0.05F);
}
}
}
}

View File

@ -0,0 +1,77 @@
package net.silentclient.client.emotes.emoticons.thanksgiving;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.Emote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import org.joml.Vector4f;
public class PumpkinEmote extends Emote {
private final ItemStack shears = new ItemStack(Items.shears);
private final ItemStack pumpkin = new ItemStack(Blocks.pumpkin);
private final ItemStack pumpkinLit = new ItemStack(Blocks.lit_pumpkin);
public PumpkinEmote(String s, String s1) {
super(s, s1);
}
@Override
public void startAnimation(IEmoteAccessor iemoteaccessor) {
super.startAnimation(iemoteaccessor);
iemoteaccessor.setItem(this.shears);
iemoteaccessor.setItemScale(0.0F);
iemoteaccessor.setHand(false);
}
@Override
public void stopAnimation(IEmoteAccessor iemoteaccessor) {
super.stopAnimation(iemoteaccessor);
iemoteaccessor.setItem(null);
iemoteaccessor.setItemScale(0.0F);
iemoteaccessor.setHand(true);
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
boolean flag = true;
boolean flag1 = true;
boolean flag2 = true;
boolean flag3 = true;
iemoteaccessor.setupMatrix(bobjarmature.bones.get("misc_bone_1"));
GlStateManager.scale(0.475F, 0.475F, 0.475F);
GlStateManager.rotate(90.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(-0.5F, 0.0F, 0.5F);
iemoteaccessor.renderBlock(i > 117 ? this.pumpkinLit : this.pumpkin);
float f1 = 0.0F;
if (i >= 14 && i < 115) {
if (i < 21) {
f1 = ((float) (i - 14) + f) / 7.0F;
} else if (i >= 105) {
f1 = 1.0F - ((float) (i - 105) + f) / 10.0F;
} else {
f1 = 1.0F;
}
}
iemoteaccessor.setItemScale(f1);
if (i == 29 || i == 36 || i == 44 || i == 51 || i == 64 || i == 82) {
Vector4f vector4f = this.position(iemoteaccessor, bobjarmature, "misc_bone_1", 0.0F, 0.125F, 0.0F, f);
byte b0 = 10;
for (int j = 0; j < b0; ++j) {
iemoteaccessor.spawnItemParticle(
this.pumpkin,
vector4f.x,
vector4f.y,
vector4f.z,
this.rand.nextDouble() * 0.05F,
this.rand.nextDouble() * 0.05F,
this.rand.nextDouble() * 0.05F
);
}
}
}
}

View File

@ -0,0 +1,36 @@
package net.silentclient.client.emotes.emoticons.thanksgiving;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import org.joml.Vector4f;
public class TurkeyEmote extends PropEmote {
private final ItemStack chicken = new ItemStack(Items.cooked_chicken);
public TurkeyEmote(String s, String s1) {
super(s, s1);
this.props("prop_turkey");
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
if (i == 82) {
Vector4f vector4f = this.position(iemoteaccessor, bobjarmature, "misc_bone_1", 0.0F, 0.125F, 0.0F, f);
for (int j = 0; j < 20; ++j) {
iemoteaccessor.spawnItemParticle(
this.chicken,
vector4f.x,
vector4f.y,
vector4f.z,
this.rand(0.25F),
this.rand.nextDouble() * 0.2 + 0.1,
this.rand(0.25F)
);
}
}
}
}

View File

@ -0,0 +1,44 @@
package net.silentclient.client.emotes.emoticons.valentines;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import org.joml.Vector4f;
public class BlowKissEmote extends PropEmote {
public BlowKissEmote(String s, String s1) {
super(s, s1);
this.props("prop_heart");
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
if (i > this.tick(17) && i < this.tick(55)) {
new ItemStack(Items.redstone);
Vector4f vector4f = this.position(iemoteaccessor, bobjarmature, "low_right_arm.end", 0.0F, 0.15F, 0.0F, f);
int j = 0;
for (byte b0 = 7; j < b0; ++j) {
iemoteaccessor.spawnParticle(ParticleType.FLAME, vector4f.x, vector4f.y, vector4f.z, 0.0, 0.0, 0.0);
}
vector4f = this.position(iemoteaccessor, bobjarmature, "low_left_arm.end", 0.0F, 0.15F, 0.0F, f);
j = 0;
for (byte b1 = 7; j < b1; ++j) {
iemoteaccessor.spawnParticle(ParticleType.FLAME, vector4f.x, vector4f.y, vector4f.z, 0.0, 0.0, 0.0);
}
}
if (i == this.tick(152)) {
Vector4f vector4f1 = this.position(iemoteaccessor, bobjarmature, "misc_bone_2", 0.0F, 0.0F, -0.125F, f);
for (int k = 0; k < 10; ++k) {
this.spawnParticle(iemoteaccessor, ParticleType.SMOKE, vector4f1.x, vector4f1.y, vector4f1.z, 0.05F);
}
}
}
}

View File

@ -0,0 +1,54 @@
package net.silentclient.client.emotes.emoticons.valentines;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import org.joml.Vector4f;
public class HeartbrokenEmote extends PropEmote {
public HeartbrokenEmote(String s, String s1) {
super(s, s1);
this.props("prop_heart_1", "prop_heart_2");
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
if (i == this.tick(75)) {
ItemStack m = new ItemStack(Items.redstone);
for (int j = 0; j < 10; ++j) {
Vector4f vector4f = this.direction(iemoteaccessor, bobjarmature.bones.get("low_body"), 0.0F, 0.0F, -0.125F, f).mul(1.0F + this.rand(0.1F));
float f1 = vector4f.x + this.rand(0.1F);
float f2 = vector4f.y + this.rand(0.1F);
float f3 = vector4f.z + this.rand(0.1F);
Vector4f vector4f1 = this.position(iemoteaccessor, bobjarmature, "low_body", this.rand(0.05F), 0.125F + this.rand(0.05F), -0.25F, f);
iemoteaccessor.spawnItemParticle(m, vector4f1.x, vector4f1.y, vector4f1.z, f1, f2, f3);
}
}
if (i == this.tick(123) || i == this.tick(143) || i == this.tick(157) || i == this.tick(173) || i == this.tick(192)) {
Vector4f vector4f2 = this.position(iemoteaccessor, bobjarmature, "misc_bone_2", 0.0F, 0.0F, 0.0F, f);
for (int k = 0; k < 10; ++k) {
this.spawnParticle(iemoteaccessor, ParticleType.SMOKE, vector4f2.x, vector4f2.y, vector4f2.z, 0.1F);
}
}
if (i == this.tick(208)) {
Vector4f vector4f3 = this.position(iemoteaccessor, bobjarmature, "misc_bone_2", 0.0F, 0.0F, 0.0F, f);
for (int l = 0; l < 10; ++l) {
this.spawnParticle(iemoteaccessor, ParticleType.SMOKE, vector4f3.x, vector4f3.y, vector4f3.z, 0.1F);
}
vector4f3 = this.position(iemoteaccessor, bobjarmature, "misc_bone_3", 0.0F, 0.0F, 0.0F, f);
for (int i1 = 0; i1 < 10; ++i1) {
this.spawnParticle(iemoteaccessor, ParticleType.SMOKE, vector4f3.x, vector4f3.y, vector4f3.z, 0.1F);
}
}
}
}

View File

@ -0,0 +1,25 @@
package net.silentclient.client.emotes.emoticons.valentines;
import net.silentclient.client.emotes.bobj.BOBJArmature;
import net.silentclient.client.emotes.emoticons.PropEmote;
import net.silentclient.client.emotes.emoticons.accessor.IEmoteAccessor;
import net.silentclient.client.emotes.emoticons.accessor.ParticleType;
import org.joml.Vector4f;
public class RoseEmote extends PropEmote {
public RoseEmote(String s, String s1) {
super(s, s1);
this.props("prop_rose");
}
@Override
public void progressAnimation(IEmoteAccessor iemoteaccessor, BOBJArmature bobjarmature, int i, float f) {
if (i == this.tick(91)) {
Vector4f vector4f = this.position(iemoteaccessor, bobjarmature, "body", 0.375F, 0.25F, -0.25F, f);
for (int j = 0; j < 10; ++j) {
this.spawnParticle(iemoteaccessor, ParticleType.EXPLODE, vector4f.x, vector4f.y, vector4f.z, 0.01F);
}
}
}
}

View File

@ -0,0 +1,43 @@
package net.silentclient.client.emotes.particles;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
public class ParticleEndRod extends EntityFX {
public static final ResourceLocation TEXTURE = new ResourceLocation("emoticons:particles/mc-particles.png");
private final int numAgingFrames = 8;
public ParticleEndRod(World world, double d0, double d1, double d2, double d3, double d4, double d5) {
super(world, d0, d1, d2, d3, d4, d5);
this.motionX = d3;
this.motionY = d4;
this.motionZ = d5;
this.particleScale *= 0.75F;
this.particleMaxAge = 60 + this.rand.nextInt(12);
this.particleTextureIndexX = 0;
this.particleTextureIndexY = 11;
}
@Override
public void renderParticle(WorldRenderer worldrenderer, Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
Minecraft.getMinecraft().getTextureManager().bindTexture(TEXTURE);
if (worldrenderer != null) {
super.renderParticle(worldrenderer, entity, f, f1, f2, f3, f4, f5);
}
}
@Override
public void onUpdate() {
super.onUpdate();
this.particleTextureIndexX = this.numAgingFrames - 1 - this.particleAge * this.numAgingFrames / this.particleMaxAge;
}
@Override
public int getFXLayer() {
return 2;
}
}

View File

@ -0,0 +1,80 @@
package net.silentclient.client.emotes.particles;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.world.World;
public class PopcornParticle extends EntityFX {
public static ModelRenderer kernel1;
public static ModelRenderer kernel2;
public static ModelRenderer kernel3;
protected int color;
public PopcornParticle(World world, double d0, double d1, double d2, double d3) {
super(world, d0, d1, d2);
this.particleGravity = 0.5F;
this.particleMaxAge = 20 + this.rand.nextInt(10);
this.motionX = this.rand.nextFloat() * 0.05F;
this.motionZ = this.rand.nextFloat() * 0.05F;
this.motionY = d3 == 0.0 ? d3 : this.rand.nextDouble() * 0.1F + d3;
if (kernel1 == null) {
ModelBase modelbase = new ModelBase() {
};
modelbase.textureWidth = 64;
modelbase.textureHeight = 64;
kernel1 = new ModelRenderer(modelbase, 0, 2);
kernel1.addBox(-0.5F, -0.5F, 0.5F, 1, 1, 1);
kernel2 = new ModelRenderer(modelbase, 0, 4);
kernel2.addBox(-0.5F, -0.5F, 0.5F, 1, 1, 1);
kernel3 = new ModelRenderer(modelbase, 0, 6);
kernel3.addBox(-0.5F, -0.5F, 0.5F, 1, 1, 1);
}
this.color = this.rand.nextInt(2);
}
@Override
public void renderParticle(WorldRenderer var1, Entity entity, float f, float var4, float var5, float var6, float var7, float var8) {
float f1 = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) f - interpPosX);
float f2 = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) f - interpPosY);
float f3 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) f - interpPosZ);
int i = this.particleMaxAge - this.particleAge;
float f4 = 0.75F * (i < 5 ? (float) i / 5.0F : 1.0F);
ModelRenderer modelrenderer = kernel1;
if (this.color == 1) {
modelrenderer = kernel2;
} else if (this.color == 2) {
modelrenderer = kernel3;
}
int j = entity.getBrightnessForRender(f);
if (entity.isBurning()) {
j = 15728880;
}
int k = j % 65536;
int l = j / 65536;
GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) k, (float) l);
GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.pushMatrix();
GlStateManager.translate(f1, f2, f3);
GlStateManager.scale(f4, f4, f4);
RenderHelper.enableStandardItemLighting();
modelrenderer.render(0.0625F);
RenderHelper.disableStandardItemLighting();
GlStateManager.popMatrix();
}
@Override
public int getFXLayer() {
return 3;
}
}

View File

@ -0,0 +1,65 @@
package net.silentclient.client.emotes.particles;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.world.World;
public class SaltParticle extends EntityFX {
public static ModelRenderer salt;
public SaltParticle(World world, double d0, double d1, double d2, double d3, double d4, double d5) {
super(world, d0, d1, d2);
this.particleGravity = 0.5F;
this.particleMaxAge = 20 + this.rand.nextInt(10);
this.motionX = d3;
this.motionZ = d4;
this.motionY = d5;
if (salt == null) {
ModelBase modelbase = new ModelBase() {
};
modelbase.textureWidth = 64;
modelbase.textureHeight = 64;
salt = new ModelRenderer(modelbase, 0, 0);
salt.addBox(-0.5F, -0.5F, 0.5F, 1, 1, 1);
}
}
@Override
public void renderParticle(WorldRenderer var1, Entity entity, float f, float var4, float var5, float var6, float var7, float var8) {
float f1 = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) f - interpPosX);
float f2 = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) f - interpPosY);
float f3 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) f - interpPosZ);
int i = this.particleMaxAge - this.particleAge;
float f4 = 0.5F * (i < 5 ? (float) i / 5.0F : 1.0F);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
int j = entity.getBrightnessForRender(f);
if (entity.isBurning()) {
j = 15728880;
}
int k = j % 65536;
int l = j / 65536;
GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) k, (float) l);
GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.pushMatrix();
GlStateManager.translate(f1, f2, f3);
GlStateManager.scale(f4, f4, f4);
RenderHelper.enableStandardItemLighting();
salt.render(0.0625F);
RenderHelper.disableStandardItemLighting();
GlStateManager.popMatrix();
}
@Override
public int getFXLayer() {
return 3;
}
}

View File

@ -0,0 +1,218 @@
package net.silentclient.client.emotes.ui;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.MathHelper;
import net.silentclient.client.emotes.EmoteManager;
import net.silentclient.client.gui.SilentScreen;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
import java.awt.*;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.function.Consumer;
public class ScreenEmoteWheel extends SilentScreen {
int accept;
protected boolean hovered;
private final HashMap<String, Consumer<Boolean>> handlers = new HashMap<>();
private String foc;
private int page = 1;
private void handleScroll() {
int scroll = Mouse.getEventDWheel();
if (scroll > 0 && this.page > 1) {
--this.page;
}
if (scroll < 0 && this.page < 12) {
++this.page;
}
}
@Override
public void handleMouseInput() throws IOException {
super.handleMouseInput();
this.handleScroll();
}
@Override
protected void mouseReleased(int mouseX, int mouseY, int state) {
super.mouseReleased(mouseX, mouseY, state);
if (this.foc != null) {
this.mc.displayGuiScreen(null);
this.handlers.get(this.foc).accept(true);
}
}
@Override
public void initGui() {
this.handlers.clear();
switch(this.page) {
case 1:
this.handlers.put("Default", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 11));
this.handlers.put("Boneless", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 2));
this.handlers.put("Bow", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 3));
this.handlers.put("Boyy", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 4));
this.handlers.put("Calculated", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 5));
break;
case 2:
this.handlers.put("Chicken", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 6));
this.handlers.put("Clapping", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 7));
this.handlers.put("Confused", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 8));
this.handlers.put("Crying", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 9));
this.handlers.put("Dab", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 10));
break;
case 3:
this.handlers.put("Best Mates", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 1));
this.handlers.put("Disco Fever", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 12));
this.handlers.put("Electro Shuffle", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 13));
this.handlers.put("Facepalm", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 14));
this.handlers.put("Fist", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 15));
break;
case 4:
this.handlers.put("Floss", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 16));
this.handlers.put("Free Flow", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 17));
this.handlers.put("Fresh", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 18));
this.handlers.put("Gangnam Style", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 19));
this.handlers.put("Get Funky", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 20));
break;
case 5:
this.handlers.put("Hype", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 21));
this.handlers.put("Infinite Dab", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 22));
this.handlers.put("Laughing", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 23));
this.handlers.put("No", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 24));
this.handlers.put("Orange Justice", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 25));
break;
case 6:
this.handlers.put("Pointing", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 26));
this.handlers.put("Salute", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 27));
this.handlers.put("Shimmer", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 28));
this.handlers.put("Shrug", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 29));
this.handlers.put("Skibidi", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 30));
break;
case 7:
this.handlers.put("Squat Kick", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 31));
this.handlers.put("Star Power", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 32));
this.handlers.put("T Pose", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 33));
this.handlers.put("Take The L", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 34));
this.handlers.put("Thinking", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 35));
break;
case 8:
this.handlers.put("Tidy", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 36));
this.handlers.put("Wave", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 37));
this.handlers.put("Yes", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 38));
this.handlers.put("Rising From Dead", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 39));
this.handlers.put("Pumpkin", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 40));
break;
case 9:
this.handlers.put("Trick or Treat", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 41));
this.handlers.put("Blow kiss", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 42));
this.handlers.put("Twerk", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 43));
this.handlers.put("Club", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 44));
this.handlers.put("Sneeze", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 45));
break;
case 10:
this.handlers.put("Punch", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 46));
this.handlers.put("Bongo Cat", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 47));
this.handlers.put("Exhausted", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 48));
this.handlers.put("Disgusted", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 49));
this.handlers.put("Bitch Slap", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 50));
break;
case 11:
this.handlers.put("Threatening", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 51));
this.handlers.put("Woah!", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 52));
this.handlers.put("Breathtaking", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 53));
this.handlers.put("Bunny Hop", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 54));
this.handlers.put("Chicken Dance", emote -> EmoteManager.sendEmote(this.mc.thePlayer.getGameProfile().getName(), 55));
break;
case 12:
this.handlers.put("Broom", hello -> EmoteManager.sendEmote(Minecraft.getMinecraft().getSession().getUsername(), 56));
this.handlers.put("Iceberg", hello -> EmoteManager.sendEmote(Minecraft.getMinecraft().getSession().getUsername(), 57));
this.handlers.put("Present", hello -> EmoteManager.sendEmote(Minecraft.getMinecraft().getSession().getUsername(), 58));
this.handlers.put("Champagne", hello -> EmoteManager.sendEmote(Minecraft.getMinecraft().getSession().getUsername(), 59));
}
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
ScaledResolution resolution = new ScaledResolution(this.mc);
int centerY = resolution.getScaledHeight() / 2;
int centerX = resolution.getScaledWidth() / 2;
super.drawScreen(mouseX, mouseY, partialTicks);
this.foc = null;
this.initGui();
int count = this.handlers.size();
float radius = (float)resolution.getScaledHeight() * 2.0F / 5.0F;
float i = 0.0F;
this.drawString(this.fontRendererObj, "Scroll to view more.", 1, 1, -1);
for(String s : this.handlers.keySet()) {
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glDisable(3553);
GL11.glBlendFunc(770, 771);
GL11.glHint(3152, 4354);
GL11.glBegin(6);
GlStateManager.resetColor();
float startTheta = (float)((double)(i / (float)count) * Math.PI * 2.0);
float endTheta = (float)((double)((i + 1.0F) / (float)count) * Math.PI * 2.0);
float diff = endTheta - startTheta;
int mouseDeltaX = mouseX - centerX;
int mouseDeltaY = mouseY - centerY;
double sqrt = Math.sqrt(Math.pow((double)mouseDeltaX, 2.0) + Math.pow((double)mouseDeltaY, 2.0));
boolean hovered = false;
if (sqrt <= (double)radius) {
double mouseTheta = MathHelper.atan2((double)mouseDeltaX, (double)mouseDeltaY);
if (mouseTheta < 0.0) {
mouseTheta += Math.PI * 2;
}
if (mouseTheta > (double)startTheta && mouseTheta < (double)endTheta) {
this.foc = s;
hovered = true;
}
}
Color tmp = new Color(12, 12, 12, hovered ? 40 : 20);
GlStateManager.color((float)tmp.getRed() / 255.0F, (float)tmp.getGreen() / 255.0F, (float)tmp.getBlue() / 255.0F, (float)tmp.getAlpha() / 255.0F);
GL11.glVertex3d((double)centerX, (double)centerY, 0.0);
for(float j = 0.0F; j <= 50.0F; ++j) {
float x = (float)centerX + radius * MathHelper.sin(startTheta + diff * j / 50.0F);
float y = (float)centerY + radius * MathHelper.cos(startTheta + diff * j / 50.0F);
GL11.glVertex2f(x, y);
}
GL11.glEnd();
GL11.glEnable(3553);
GL11.glDisable(3042);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
float middle = (startTheta + endTheta) / 2.0F;
List<String> strings = this.fontRendererObj.listFormattedStringToWidth(s, 50);
int textCenterX = (int)((float)centerX + radius * MathHelper.sin(middle) / 3.0F * 2.0F);
int textCenterY = (int)((float)centerY + radius * MathHelper.cos(middle) / 3.0F * 2.0F);
textCenterY -= strings.size() * 15;
for(String string : strings) {
textCenterY += 15;
this.drawScaledText(string, textCenterX, textCenterY, Color.WHITE.getRGB());
}
GL11.glPopMatrix();
++i;
}
}
protected void drawScaledText(String text, int trueX, int trueY, int color) {
GlStateManager.pushMatrix();
GlStateManager.scale(1.2, 1.2, 1.2);
this.fontRendererObj
.drawString(text, (float)((double)trueX / 1.2) - (float)this.fontRendererObj.getStringWidth(text) / 2.0F, (float)((double)trueY / 1.2), color, false);
GlStateManager.popMatrix();
}
}

View File

@ -0,0 +1,39 @@
package net.silentclient.client.mixin.mixins.emotes;
import net.silentclient.client.Client;
import net.silentclient.client.emotes.AnimatorController;
import net.silentclient.client.emotes.EmoteControllerManager;
import net.silentclient.client.emotes.EmotesMod;
import net.silentclient.client.emotes.PlayerModelManager;
import net.minecraft.entity.player.EntityPlayer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
/**
* @author refactoring
*/
@Mixin(EntityPlayer.class)
public class EntityPlayerMixin {
@Unique
public AnimatorController controller;
@Inject(method = "<init>", at = @At("RETURN"))
public void ae$init(CallbackInfo ci) {
if(!Client.getInstance().getSettingsManager().getSettingByClass(EmotesMod.class, "Emotes").getValBoolean()) {
return;
}
controller = new AnimatorController(PlayerModelManager.get().steve, PlayerModelManager.get().steveConfig);
EmoteControllerManager.controllers.put((EntityPlayer) (Object) this, controller);
}
@Inject(method = "onUpdate", at = @At("RETURN"))
public void ae$onUpdate(CallbackInfo ci) {
if(!Client.getInstance().getSettingsManager().getSettingByClass(EmotesMod.class, "Emotes").getValBoolean()) {
return;
}
controller.update((EntityPlayer) (Object) this);
}
}

View File

@ -0,0 +1,32 @@
package net.silentclient.client.mixin.mixins.emotes;
import net.silentclient.client.Client;
import net.silentclient.client.emotes.EmotesMod;
import net.silentclient.client.emotes.PlayerModelManager;
import net.silentclient.client.emotes.ui.ScreenEmoteWheel;
import net.minecraft.client.Minecraft;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
/**
* @author refactoring
*/
@Mixin(Minecraft.class)
public class MinecraftMixin {
@Inject(method = "runTick", at = @At("RETURN"))
public void mchorse$runTick(CallbackInfo ci) {
if(!Client.getInstance().getSettingsManager().getSettingByClass(EmotesMod.class, "Emotes").getValBoolean()) {
return;
}
if(Client.getInstance().getSettingsManager().getSettingByClass(EmotesMod.class, "Emote Wheel Keybind").isKeyDown()) {
Minecraft.getMinecraft().displayGuiScreen(new ScreenEmoteWheel());
}
}
@Inject(method = "startGame", at = @At("RETURN"))
public void mchorse$startGame(CallbackInfo ci) {
PlayerModelManager.get();
}
}

View File

@ -0,0 +1,40 @@
package net.silentclient.client.mixin.mixins.emotes;
import net.silentclient.client.Client;
import net.silentclient.client.emotes.EmoteControllerManager;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.client.renderer.entity.RendererLivingEntity;
import net.silentclient.client.emotes.EmotesMod;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
/**
* @author refactoring
*/
@Mixin(RenderPlayer.class)
public abstract class RenderPlayerMixin extends RendererLivingEntity<AbstractClientPlayer> {
public RenderPlayerMixin(RenderManager renderManagerIn, ModelBase modelBaseIn, float shadowSizeIn) {
super(renderManagerIn, modelBaseIn, shadowSizeIn);
}
@Shadow
protected abstract void setModelVisibilities(AbstractClientPlayer p_177137_0_);
@Inject(method = "doRender(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDFF)V", at = @At("HEAD"), cancellable = true)
public void ae$doRender(AbstractClientPlayer entity, double x, double y, double z, float entityYaw, float partialTicks, CallbackInfo ci) {
if(!Client.getInstance().getSettingsManager().getSettingByClass(EmotesMod.class, "Emotes").getValBoolean()) {
return;
}
if (EmoteControllerManager.controllers.get(entity) != null) {
if (EmoteControllerManager.controllers.get(entity).renderHook((RenderPlayer) (Object) (this), entity, x, y, z, partialTicks, this.canRenderName(entity))) {
ci.cancel();
}
}
}
}

View File

@ -1,6 +1,7 @@
package net.silentclient.client.mods; package net.silentclient.client.mods;
import net.silentclient.client.Client; import net.silentclient.client.Client;
import net.silentclient.client.emotes.EmotesMod;
import net.silentclient.client.mods.hud.*; import net.silentclient.client.mods.hud.*;
import net.silentclient.client.mods.hypixel.AutoGGMod; import net.silentclient.client.mods.hypixel.AutoGGMod;
import net.silentclient.client.mods.hypixel.AutoTipMod; import net.silentclient.client.mods.hypixel.AutoTipMod;
@ -58,6 +59,7 @@ public class ModInstances {
private RenderMod renderMod; private RenderMod renderMod;
private CosmeticsMod cosmeticsMod; private CosmeticsMod cosmeticsMod;
private FPSBoostMod fpsBoostMod; private FPSBoostMod fpsBoostMod;
private EmotesMod emotesMod;
public ModInstances() { public ModInstances() {
fpsMod = new FPSMod(); fpsMod = new FPSMod();
@ -68,6 +70,9 @@ public class ModInstances {
autoSprintMod = new AutoSprintMod(); autoSprintMod = new AutoSprintMod();
mods.add(autoSprintMod); mods.add(autoSprintMod);
emotesMod = new EmotesMod();
mods.add(emotesMod);
keystrokesMod = new KeystrokesMod(); keystrokesMod = new KeystrokesMod();
mods.add(keystrokesMod); mods.add(keystrokesMod);
@ -203,6 +208,7 @@ public class ModInstances {
customMods.add(renderMod); customMods.add(renderMod);
customMods.add(fpsBoostMod); customMods.add(fpsBoostMod);
customMods.add(cosmeticsMod); customMods.add(cosmeticsMod);
customMods.add(emotesMod);
return customMods; return customMods;
} }

View File

@ -1,12 +1,12 @@
package net.silentclient.client.mods.settings; package net.silentclient.client.mods.settings;
import java.util.ArrayList;
import net.silentclient.client.Client; import net.silentclient.client.Client;
import net.silentclient.client.mods.Mod; import net.silentclient.client.mods.Mod;
import net.silentclient.client.mods.ModCategory; import net.silentclient.client.mods.ModCategory;
import net.silentclient.client.mods.Setting; import net.silentclient.client.mods.Setting;
import java.util.ArrayList;
public class CosmeticsMod extends Mod { public class CosmeticsMod extends Mod {
@Override @Override
public boolean isEnabled() { public boolean isEnabled() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,216 @@
{
"name": "Steve",
"primaryMesh": "body",
"scale": 0.9375,
"scaleItems": 1,
"scaleGui": 0.9375,
"renderHeldItems": true,
"leftHands": {
"low_left_arm.end": {
"rx": -90,
"ry": 180,
"z": -0.1,
"y": 0.1
}
},
"rightHands": {
"low_right_arm.end": {
"rx": -90,
"ry": 180,
"z": -0.1,
"y": 0.1
}
},
"head": "head",
"meshes": {
"prop_popcorn": {
"visible": false,
"normals": true,
"smooth": true,
"texture": "emoticons:models/props/popcorn.png"
},
"prop_grave": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/grave.png"
},
"prop_grave_base": {
"visible": false,
"normals": true,
"texture": "minecraft:textures/blocks/dirt.png"
},
"prop_coffin": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/coffin.png"
},
"prop_broom": {
"visible": false,
"normals": true,
"smooth": true,
"texture": "emoticons:models/props/broom.png"
},
"prop_candy_bag": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/candy_bag.png"
},
"prop_football": {
"visible": false,
"normals": true,
"smooth": true,
"texture": "emoticons:models/props/football.png"
},
"prop_turkey": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/turkey.png"
},
"prop_hunt_gun": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/hunt_gun.png"
},
"prop_cloud": {
"visible": false,
"normals": true,
"smooth": true,
"texture": "emoticons:models/props/cloud.png"
},
"prop_present": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/present.png"
},
"prop_iceberg": {
"visible": false,
"normals": true,
"texture": "minecraft:textures/blocks/ice.png"
},
"prop_chimney": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/chimney.png"
},
"prop_snowman_head": {
"visible": false,
"normals": true,
"texture": "minecraft:textures/entity/snowman.png"
},
"prop_snowman_body": {
"visible": false,
"normals": true,
"texture": "minecraft:textures/entity/snowman.png"
},
"prop_snowman_butt": {
"visible": false,
"normals": true,
"texture": "minecraft:textures/entity/snowman.png"
},
"prop_skates": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/skates.png"
},
"prop_champagne_bottle": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/palette.png"
},
"prop_champagne_cork": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/palette.png"
},
"prop_champagne_flying_cork": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/palette.png"
},
"prop_rocket": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/palette.png"
},
"prop_rocket_base": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/palette.png"
},
"prop_heart": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/heart.png"
},
"prop_heart_1": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/heart.png"
},
"prop_heart_2": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/heart.png"
},
"prop_rose": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/rose.png"
},
"body": {
"normals": true,
"smooth": true,
"texture": "minecraft:textures/entity/steve.png"
},
"headwear": {
"normals": true,
"smooth": true,
"texture": "minecraft:textures/entity/steve.png"
},
"bodywear": {
"normals": true,
"smooth": true,
"texture": "minecraft:textures/entity/steve.png"
},
"left_armwear": {
"normals": true,
"smooth": true,
"texture": "minecraft:textures/entity/steve.png"
},
"left_legwear": {
"normals": true,
"smooth": true,
"texture": "minecraft:textures/entity/steve.png"
},
"right_armwear": {
"normals": true,
"smooth": true,
"texture": "minecraft:textures/entity/steve.png"
},
"right_legwear": {
"normals": true,
"smooth": true,
"texture": "minecraft:textures/entity/steve.png"
},
"armor_helmet": {
"visible": false,
"normals": true,
"smooth": true
},
"armor_chest": {
"visible": false,
"normals": true,
"smooth": true
},
"armor_leggings": {
"visible": false,
"normals": true,
"smooth": true
},
"armor_feet": {
"visible": false,
"normals": true,
"smooth": true
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,216 @@
{
"name": "Alex",
"primaryMesh": "body",
"scale": 0.9375,
"scaleItems": 1,
"scaleGui": 0.9375,
"renderHeldItems": true,
"leftHands": {
"low_left_arm.end": {
"rx": -90,
"ry": 180,
"z": -0.1,
"y": 0.1
}
},
"rightHands": {
"low_right_arm.end": {
"rx": -90,
"ry": 180,
"z": -0.1,
"y": 0.1
}
},
"head": "head",
"meshes": {
"prop_popcorn": {
"visible": false,
"normals": true,
"smooth": true,
"texture": "emoticons:models/props/popcorn.png"
},
"prop_grave": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/grave.png"
},
"prop_grave_base": {
"visible": false,
"normals": true,
"texture": "minecraft:textures/blocks/dirt.png"
},
"prop_coffin": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/coffin.png"
},
"prop_broom": {
"visible": false,
"normals": true,
"smooth": true,
"texture": "emoticons:models/props/broom.png"
},
"prop_candy_bag": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/candy_bag.png"
},
"prop_football": {
"visible": false,
"normals": true,
"smooth": true,
"texture": "emoticons:models/props/football.png"
},
"prop_turkey": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/turkey.png"
},
"prop_hunt_gun": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/hunt_gun.png"
},
"prop_cloud": {
"visible": false,
"normals": true,
"smooth": true,
"texture": "emoticons:models/props/cloud.png"
},
"prop_present": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/present.png"
},
"prop_iceberg": {
"visible": false,
"normals": true,
"texture": "minecraft:textures/blocks/ice.png"
},
"prop_chimney": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/chimney.png"
},
"prop_snowman_head": {
"visible": false,
"normals": true,
"texture": "minecraft:textures/entity/snowman.png"
},
"prop_snowman_body": {
"visible": false,
"normals": true,
"texture": "minecraft:textures/entity/snowman.png"
},
"prop_snowman_butt": {
"visible": false,
"normals": true,
"texture": "minecraft:textures/entity/snowman.png"
},
"prop_skates": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/skates.png"
},
"prop_champagne_bottle": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/palette.png"
},
"prop_champagne_cork": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/palette.png"
},
"prop_champagne_flying_cork": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/palette.png"
},
"prop_rocket": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/palette.png"
},
"prop_rocket_base": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/palette.png"
},
"prop_heart": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/heart.png"
},
"prop_heart_1": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/heart.png"
},
"prop_heart_2": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/heart.png"
},
"prop_rose": {
"visible": false,
"normals": true,
"texture": "emoticons:models/props/rose.png"
},
"body": {
"normals": true,
"smooth": true,
"texture": "minecraft:textures/entity/alex.png"
},
"headwear": {
"normals": true,
"smooth": true,
"texture": "minecraft:textures/entity/alex.png"
},
"bodywear": {
"normals": true,
"smooth": true,
"texture": "minecraft:textures/entity/alex.png"
},
"left_armwear": {
"normals": true,
"smooth": true,
"texture": "minecraft:textures/entity/alex.png"
},
"left_legwear": {
"normals": true,
"smooth": true,
"texture": "minecraft:textures/entity/alex.png"
},
"right_armwear": {
"normals": true,
"smooth": true,
"texture": "minecraft:textures/entity/alex.png"
},
"right_legwear": {
"normals": true,
"smooth": true,
"texture": "minecraft:textures/entity/alex.png"
},
"armor_helmet": {
"visible": false,
"normals": true,
"smooth": true
},
"armor_chest": {
"visible": false,
"normals": true,
"smooth": true
},
"armor_leggings": {
"visible": false,
"normals": true,
"smooth": true
},
"armor_feet": {
"visible": false,
"normals": true,
"smooth": true
}
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -120,6 +120,9 @@
"mixins.WorldInfoMixin", "mixins.WorldInfoMixin",
"mixins.WorldMixin", "mixins.WorldMixin",
"mixins.WorldRendererMixin", "mixins.WorldRendererMixin",
"mixins.emotes.EntityPlayerMixin",
"mixins.emotes.MinecraftMixin",
"mixins.emotes.RenderPlayerMixin",
"mixins.lwjgl.WindowsDisplayMixin" "mixins.lwjgl.WindowsDisplayMixin"
] ]
} }