Skip to content

Commit

Permalink
Major cosmetics overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
DustinRepo committed Jul 3, 2022
1 parent db045eb commit cffc08c
Show file tree
Hide file tree
Showing 71 changed files with 1,075 additions and 3,904 deletions.
8 changes: 8 additions & 0 deletions JexChangelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
0.8.3
Added more cosmetics available through the Jex website, including new Hats, customizable Ears, Peg-Legs, an Appendage, and the Dinnerbone upside-down effect
Added Swim mode to Jesus
Added ability to use Nuker in survival
Added translucency to capes
Fixed CustomMainMenu no longer displaying custom capes properly
Fixed EnchantColor not allowing customization after changing texture packs

0.8.2
Added Nuker mod
Fixed JexGUI sometimes opening the pause menu when closing the menu
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ loader_version=0.14.6
fabric_version=0.55.1+1.19

# Mod Properties
mod_version=0.8.2
mod_version=0.8.3
maven_group=me.dustin
archives_base_name=jex-client
8 changes: 8 additions & 0 deletions src/main/java/me/dustin/jex/JexClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
import me.dustin.jex.feature.plugin.JexPlugin;
import me.dustin.jex.gui.changelog.changelog.JexChangelog;
import me.dustin.jex.gui.waypoints.WaypointScreen;
import me.dustin.jex.helper.addon.ears.EarsHelper;
import me.dustin.jex.helper.addon.hat.HatHelper;
import me.dustin.jex.helper.addon.pegleg.PeglegHelper;
import me.dustin.jex.helper.addon.penis.PenisHelper;
import me.dustin.jex.helper.file.FileHelper;
import me.dustin.jex.helper.file.JsonHelper;
import me.dustin.jex.helper.file.ModFileHelper;
Expand Down Expand Up @@ -104,6 +108,10 @@ public void initializeClient() {
EventManager.register(ConnectedServerHelper.INSTANCE);
EventManager.register(AddonHelper.INSTANCE);
EventManager.register(CapeHelper.INSTANCE);
EventManager.register(EarsHelper.INSTANCE);
EventManager.register(HatHelper.INSTANCE);
EventManager.register(PenisHelper.INSTANCE);
EventManager.register(PeglegHelper.INSTANCE);
getLogger().info("Checking for update");
UpdateManager.INSTANCE.checkForUpdate();
CustomFont.INSTANCE.loadFont();
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/me/dustin/jex/event/render/EventInitPlayerModel.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package me.dustin.jex.event.render;

import me.dustin.events.core.Event;
import net.minecraft.client.model.ModelPart;

public class EventInitPlayerModel extends Event {
private final ModelPart root;

public EventInitPlayerModel(ModelPart root) {
this.root = root;
}

public ModelPart getRoot() {
return root;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package me.dustin.jex.event.render;

import me.dustin.events.core.Event;
import net.minecraft.entity.LivingEntity;

public class EventLivingEntityCallRender extends Event {
private final LivingEntity livingEntity;

public EventLivingEntityCallRender(LivingEntity livingEntity) {
this.livingEntity = livingEntity;
}

public LivingEntity getLivingEntity() {
return livingEntity;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package me.dustin.jex.event.render;

import me.dustin.events.core.Event;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.render.entity.model.PlayerEntityModel;

import java.util.ArrayList;

public class EventPlayerEntityGetBodyParts extends Event {
private final PlayerEntityModel<?> playerEntityModel;
private final ArrayList<ModelPart> bodyParts;

public EventPlayerEntityGetBodyParts(PlayerEntityModel<?> playerEntityModel, ArrayList<ModelPart> bodyParts) {
this.playerEntityModel = playerEntityModel;
this.bodyParts = bodyParts;
}

public ArrayList<ModelPart> getBodyParts() {
return bodyParts;
}

public PlayerEntityModel<?> getPlayerEntityModel() {
return playerEntityModel;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package me.dustin.jex.event.render;

import me.dustin.events.core.Event;
import net.minecraft.client.model.Dilation;
import net.minecraft.client.model.ModelData;

public class EventPlayerEntityTexturedModelData extends Event {
private final ModelData modelData;
private final Dilation dilation;

public EventPlayerEntityTexturedModelData(ModelData modelData, Dilation dilation) {
this.modelData = modelData;
this.dilation = dilation;
}

public ModelData getModelData() {
return modelData;
}

public Dilation getDilation() {
return dilation;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package me.dustin.jex.event.render;

import me.dustin.events.core.Event;

public class EventRenderBodyPart extends Event {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package me.dustin.jex.event.render;

import me.dustin.events.core.Event;
import net.minecraft.entity.LivingEntity;

public class EventShouldFlipUpsideDown extends Event {
private final LivingEntity livingEntity;
private boolean flip;

public EventShouldFlipUpsideDown(LivingEntity livingEntity, boolean flip) {
this.livingEntity = livingEntity;
this.flip = flip;
}

public LivingEntity getLivingEntity() {
return livingEntity;
}

public boolean isFlip() {
return flip;
}

public void setFlip(boolean flip) {
this.flip = flip;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.mojang.blaze3d.systems.RenderSystem;
import me.dustin.events.core.EventListener;
import me.dustin.events.core.annotate.EventPointer;
import me.dustin.jex.helper.addon.ears.EarsHelper;
import me.dustin.jex.helper.addon.hat.HatHelper;
import me.dustin.jex.event.render.EventRender2D;
import me.dustin.jex.event.render.EventRender3D;
Expand Down Expand Up @@ -174,11 +175,15 @@ public Nametag() {
float offset = entity.getHeight() + 0.2f;
if (entity instanceof PlayerEntity playerEntity) {
if (HatHelper.INSTANCE.hasHat(playerEntity)) {
if (HatHelper.INSTANCE.getType(playerEntity) == HatHelper.HatType.TOP_HAT || playerEntity.getEquippedStack(EquipmentSlot.HEAD).getItem() == Items.DRAGON_HEAD)
if (HatHelper.INSTANCE.getType(playerEntity) == HatHelper.HatType.TOP_HAT || playerEntity.getEquippedStack(EquipmentSlot.HEAD).getItem() == Items.DRAGON_HEAD || EarsHelper.INSTANCE.hasEars(playerEntity.getUuidAsString().replace("-", "")))
offset = entity.getHeight() + 0.7f;
else
offset = entity.getHeight() + 0.4f;
}
if (EarsHelper.INSTANCE.hasEars(playerEntity.getUuidAsString().replace("-", ""))) {
if (offset < entity.getHeight() + 0.4f)
offset = entity.getHeight() + 0.4f;
}
}
Vec3d vec = Render2DHelper.INSTANCE.getPos(entity, offset, event.getPartialTicks(), event.getPoseStack());
if (entity instanceof ItemEntity itemEntity) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ public Nuker() {
if (!stopWatch.hasPassed(delayProperty.value()))
return;
ArrayList<BlockPos> positions = getPositions();
if (positions.size() > 0)
JexClient.INSTANCE.getLogger().info(positions.size());
positions.forEach(blockPos -> {
new EventClickBlock(blockPos, Direction.UP, EventClickBlock.Mode.PRE).run();
NetworkHelper.INSTANCE.sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.START_DESTROY_BLOCK, blockPos, Direction.UP));
Expand Down Expand Up @@ -99,7 +97,7 @@ public ArrayList<BlockPos> getPositions() {
break;
}
}
//blockPosList.sort(Comparator.comparing(o -> o.getSquaredDistance(Wrapper.INSTANCE.getPlayer().getPos())));
blockPosList.sort(Comparator.comparing(o -> o.getSquaredDistance(Wrapper.INSTANCE.getPlayer().getPos())));
return blockPosList;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {

Render2DHelper.INSTANCE.bindTexture(hatsPic);
DrawableHelper.drawTexture(matrices, (int)midX + 8, 18, 0, 0, 120, 120, 120, 120);
HatHelper.HatInfo hatInfo = HatHelper.INSTANCE.getInfo(Wrapper.INSTANCE.getMinecraft().getSession().getUuid().replace("-", ""));
FontHelper.INSTANCE.drawWithShadow(matrices, Text.translatable("jex.personalization.current_hat", hatInfo == null ? "None" : StringUtils.capitalize(hatInfo.type.name().replace("_", " ").toLowerCase())), midX + 9, 192, -1);
HatHelper.HatType hatType = HatHelper.INSTANCE.getHatType(Wrapper.INSTANCE.getMinecraft().getSession().getUuid().replace("-", ""));
FontHelper.INSTANCE.drawWithShadow(matrices, Text.translatable("jex.personalization.current_hat", hatType == null ? "None" : StringUtils.capitalize(hatType.name().replace("_", " ").toLowerCase())), midX + 9, 192, -1);
super.render(matrices, mouseX, mouseY, delta);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ private void loadItems() {
float buttonHeight = 20;

for (Item item : Registry.ITEM) {
if (item == Items.AIR || item == HatHelper.INSTANCE.cowboyHat.asItem() || item == HatHelper.INSTANCE.topHat.asItem() || item == HatHelper.INSTANCE.propeller.asItem() || item == HatHelper.INSTANCE.crown.asItem() || item == HatHelper.INSTANCE.halo.asItem())
if (item == Items.AIR)
continue;
if (AutoDrop.INSTANCE.getItems().contains(item)) {
float y = startY + (buttonHeight * allowedCount);
Expand Down Expand Up @@ -315,7 +315,7 @@ private void loadItems(String name) {
float buttonHeight = 20;

for (Item item : Registry.ITEM) {
if (item == Items.AIR || item == HatHelper.INSTANCE.cowboyHat.asItem() || item == HatHelper.INSTANCE.topHat.asItem() || item == HatHelper.INSTANCE.propeller.asItem() || item == HatHelper.INSTANCE.crown.asItem() || item == HatHelper.INSTANCE.halo.asItem())
if (item == Items.AIR)
continue;
String itemName = Registry.ITEM.getId(item).toString();
if (itemName.contains(":"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ private void loadBlocks() {
float buttonHeight = 20;

for (Block block : Registry.BLOCK) {
if (block == Blocks.AIR || block == HatHelper.INSTANCE.cowboyHat || block == HatHelper.INSTANCE.halo || block == HatHelper.INSTANCE.topHat || block == HatHelper.INSTANCE.crown || block == HatHelper.INSTANCE.propeller)
if (block == Blocks.AIR)
continue;
if (Search.getBlocks().keySet().contains(block)) {
float y = startY + (buttonHeight * allowedCount);
Expand Down Expand Up @@ -315,7 +315,7 @@ private void loadBlocks(String name) {
float buttonHeight = 20;

for (Block block : Registry.BLOCK) {
if (block == Blocks.AIR || block == HatHelper.INSTANCE.cowboyHat || block == HatHelper.INSTANCE.halo || block == HatHelper.INSTANCE.topHat || block == HatHelper.INSTANCE.crown || block == HatHelper.INSTANCE.propeller)
if (block == Blocks.AIR)
continue;
String blockName = Registry.BLOCK.getId(block).toString();
if (blockName.contains(":"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ private void loadBlocks() {
float buttonHeight = 20;

for (Block block : Registry.BLOCK) {
if (block == Blocks.AIR || block == HatHelper.INSTANCE.cowboyHat || block == HatHelper.INSTANCE.halo || block == HatHelper.INSTANCE.topHat || block == HatHelper.INSTANCE.crown || block == HatHelper.INSTANCE.propeller)
if (block == Blocks.AIR)
continue;
if (Xray.blockList.contains(block)) {
float y = startY + (buttonHeight * allowedCount);
Expand Down Expand Up @@ -320,7 +320,7 @@ private void loadBlocks(String name) {
float buttonHeight = 20;

for (Block block : Registry.BLOCK) {
if (block == Blocks.AIR || block == HatHelper.INSTANCE.cowboyHat || block == HatHelper.INSTANCE.halo || block == HatHelper.INSTANCE.topHat || block == HatHelper.INSTANCE.crown || block == HatHelper.INSTANCE.propeller)
if (block == Blocks.AIR)
continue;
String blockName = Registry.BLOCK.getId(block).toString();
if (blockName.contains(":"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,8 @@ public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
super.render(matrices, mouseX, mouseY, delta);
if (AddonHelper.INSTANCE.isLinkedToAccount(Wrapper.INSTANCE.getMinecraft().getSession().getUuid().replace("-", ""))) {
FontHelper.INSTANCE.drawWithShadow(matrices, Text.translatable("jex.name").styled(style -> style.withColor(Formatting.GRAY)), 37, bottom + 12, 0xff696969);
AddonHelper.AddonResponse response = AddonHelper.INSTANCE.getResponse(Wrapper.INSTANCE.getMinecraft().getSession().getUuid().replace("-", ""));
try {
if (response != null && response.cape() != null && !response.cape().isEmpty() && !response.cape().equalsIgnoreCase("null")) {
if (CapeHelper.INSTANCE.hasCape(Wrapper.INSTANCE.getMinecraft().getSession().getUuid().replace("-", ""))) {
Render2DHelper.INSTANCE.draw3DCape(matrices, 2, bottom+ 35, CapeHelper.INSTANCE.getCape(Wrapper.INSTANCE.getMinecraft().getSession().getUuid().replace("-", "")), capeYaw, 0);
} else {
Render2DHelper.INSTANCE.draw3DCape(matrices, 2, bottom+ 35, new Identifier("assets/jex", "cape/jex_cape.png"), capeYaw, 0);
Expand Down
Loading

0 comments on commit cffc08c

Please sign in to comment.