Skip to content

Commit 8c5a265

Browse files
committed
# Hysentials V1.3.5-Beta1
- Added Confirm Purchase to Cosmetic GUI - Fixed flaw with tab/chat in housings - Fixed lots of bugs (I don't remember them all) - Added new cosmetics and so much more to come soon - I am sure I did more things so yeah find em :)
1 parent 1812260 commit 8c5a265

File tree

31 files changed

+664
-118
lines changed

31 files changed

+664
-118
lines changed

build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,20 @@ configurations {
6161
repositories {
6262
mavenCentral()
6363
mavenLocal()
64-
maven { url 'https://repo.polyfrost.cc/releases' }
64+
maven { url 'https://repo.polyfrost.org/releases' }
6565
maven { url 'https://jitpack.io' }
6666
maven { url 'https://repo.essential.gg/repository/maven-public' }
6767
maven { url 'https://repo.hypixel.net/repository/Hypixel/' }
68+
maven { url 'https://repo.nea.moe/releases' }
6869
}
6970

7071
dependencies {
7172
minecraft("com.mojang:minecraft:1.8.9")
7273
mappings("de.oceanlabs.mcp:mcp_stable:22-1.8.9")
7374
forge("net.minecraftforge:forge:1.8.9-11.15.1.2318-1.8.9")
7475

75-
compileOnly('cc.polyfrost:oneconfig-1.8.9-forge:0.2.1-alpha184')
76-
include('cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta+')
76+
compileOnly('cc.polyfrost:oneconfig-1.8.9-forge:0.2.2-alpha212')
77+
include('cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta17')
7778
include('org.reflections:reflections:0.10.2')
7879
include('org.json:json:20231013')
7980
include('org.slick2d:slick2d-core:1.0.2') {
@@ -88,6 +89,7 @@ dependencies {
8889
}
8990

9091
compileOnly('org.spongepowered:mixin:0.7.+')
92+
include("moe.nea:hotswapagent-forge:1.0.0")
9193
modRuntimeOnly("me.djtheredstoner:DevAuth-forge-legacy:1.1.2")
9294
}
9395

gradle.properties

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ mod_id = hysentials
99
mod_version = 1.3.2-beta2
1010
dev_version = 1.3.0-dev
1111

12-
dev = false
13-
14-
loom.platform = forge
12+
dev = true
1513

14+
loom.platform = forge

src/main/java/llc/redstone/hysentials/Hysentials.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import llc.redstone.hysentials.cosmetics.hats.blackcat.BlackCat;
1414
import llc.redstone.hysentials.cosmetics.hats.blackcat.LayerBlackCatHat;
1515
import llc.redstone.hysentials.cosmetics.hats.cat.CatHat;
16+
import llc.redstone.hysentials.cosmetics.hats.ponjo.PonjoHelmet;
1617
import llc.redstone.hysentials.cosmetics.kzero.KzeroBundle;
1718
import llc.redstone.hysentials.cosmetics.miya.MiyaCompanion;
1819
import llc.redstone.hysentials.cosmetics.pepper.PepperCompanion;
@@ -131,6 +132,7 @@ public class Hysentials {
131132
public MiyaCompanion miyaCompanion = new MiyaCompanion();
132133
public HamsterCompanion hamsterCompanion = new HamsterCompanion();
133134
public TechnoCrown technoCrown = new TechnoCrown();
135+
public PonjoHelmet ponjoHelmet = new PonjoHelmet();
134136
public BlackCat blackCat = new BlackCat();
135137
public KzeroBundle kzeroBundle = new KzeroBundle();
136138
public TdarthCosmetic tdarthCosmetic = new TdarthCosmetic();
@@ -435,6 +437,7 @@ private void registerHandlers() {
435437
eventBus.register(miyaCompanion);
436438
eventBus.register(hamsterCompanion);
437439
eventBus.register(technoCrown);
440+
eventBus.register(ponjoHelmet);
438441
eventBus.register(kzeroBundle);
439442
eventBus.register(tdarthCosmetic);
440443
eventBus.register(dragonCosmetic);

src/main/java/llc/redstone/hysentials/command/GlobalChatCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ public int getRequiredPermissionLevel() {
3939
@Override
4040
public void processCommand(ICommandSender sender, String[] args) throws CommandException {
4141
if (!BUtils.isHypixelOrSBX()) {
42-
UChat.chat(HysentialsConfig.chatPrefix + "&cYou are not on a Hypixel server!");
42+
UChat.chat(HysentialsConfig.chatPrefix + " &cYou are not on a Hypixel server!");
4343
return;
4444
}
4545
if (!ChatConfig.globalChat || !Hysentials.INSTANCE.getConfig().chatConfig.enabled) {
46-
UChat.chat(HysentialsConfig.chatPrefix + "&cGlobal chat is disabled!");
46+
UChat.chat(HysentialsConfig.chatPrefix + " &cGlobal chat is disabled!");
4747
return;
4848
}
4949
if (args.length == 0) {
50-
UChat.chat(HysentialsConfig.chatPrefix + "&cInvalid usage! /globalchat <message>");
50+
UChat.chat(HysentialsConfig.chatPrefix + " &cInvalid usage! /globalchat <message>");
5151
return;
5252
}
5353

src/main/java/llc/redstone/hysentials/command/VisitCommand.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import llc.redstone.hysentials.schema.HysentialsSchema;
88
import com.google.gson.JsonObject;
99
import com.google.gson.JsonParser;
10+
import llc.redstone.hysentials.websocket.Socket;
1011
import net.minecraft.client.Minecraft;
1112
import net.minecraft.command.CommandBase;
1213
import net.minecraft.command.CommandException;
@@ -33,6 +34,10 @@ public int getRequiredPermissionLevel() {
3334
public void processCommand(ICommandSender sender, String[] args) throws CommandException {
3435
if (args.length != 1) return;
3536
String player = args[0];
37+
if (Socket.CLIENT == null || !Socket.CLIENT.isOpen()) {
38+
Minecraft.getMinecraft().thePlayer.sendChatMessage("/visit " + player);
39+
return;
40+
}
3641
Multithreading.runAsync(() -> {
3742
try {
3843
String s = NetworkUtils.getString(HysentialsUtilsKt.getHYSENTIALS_API() + "/club?alias=" + player);

src/main/java/llc/redstone/hysentials/config/hysentialmods/replace/ReplaceOption.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public void draw(long vg, int x, int y, InputHandler inputHandler) {
133133

134134
confirmButton.draw(vg, x + 800, y, inputHandler);
135135
if (confirmButton.isClicked()) {
136-
update(replace, i);
136+
update(replace, i, keys.get(i));
137137
}
138138

139139
deleteElement.draw(vg, x + 900, y, inputHandler);
@@ -165,6 +165,7 @@ public void draw(long vg, int x, int y, InputHandler inputHandler) {
165165
if (replace.addIcon.isClicked()) {
166166
replace.replacements.put("", "");
167167
addElements(replace, "", "", clubsPage);
168+
reload();
168169
}
169170
y += 40;
170171
}
@@ -184,21 +185,22 @@ public void keyTyped(char key, int keyCode) {
184185
}
185186
}
186187

187-
public void update(ReplaceStuff replaceStuff, int index) {
188+
public void update(ReplaceStuff replaceStuff, int index, String s) {
188189
TextInputField replaceField = replaceStuff.replaceField.get(index);
189190
TextInputField withField = replaceStuff.withField.get(index);
190-
String editKey = replaceStuff.replacements.keySet().toArray(new String[0])[index];
191-
if (editKey.equals(replaceField.getInput())) {
191+
System.out.println(replaceField.getInput() + " " + withField.getInput() + " " + s);
192+
if (s.equals(replaceField.getInput())) {
192193
replaceStuff.replacements.put(replaceField.getInput(), withField.getInput());
193194
} else {
194195
replaceStuff.replacements.put(replaceField.getInput(), withField.getInput());
195-
replaceStuff.replacements.remove(editKey);
196+
replaceStuff.replacements.remove(s);
196197
}
197198
try {
198199
set(replacements);
199200
} catch (IllegalAccessException e) {
200201
e.printStackTrace();
201202
}
203+
reload();
202204
}
203205

204206
@Override
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package llc.redstone.hysentials.cosmetics.hats.ponjo;
2+
3+
import llc.redstone.hysentials.Hysentials;
4+
import net.minecraft.client.Minecraft;
5+
import net.minecraft.client.entity.AbstractClientPlayer;
6+
import net.minecraft.client.renderer.GlStateManager;
7+
import net.minecraft.client.renderer.entity.RenderPlayer;
8+
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
9+
import net.minecraft.entity.player.EnumPlayerModelParts;
10+
import net.minecraft.util.ResourceLocation;
11+
12+
public class LayerPonjoHelmet implements LayerRenderer<AbstractClientPlayer> {
13+
public static ResourceLocation texture = new ResourceLocation("hysentials:hats/ponjo.png");
14+
private final RenderPlayer playerRenderer;
15+
16+
public LayerPonjoHelmet(RenderPlayer renderPlayer) {
17+
this.playerRenderer = renderPlayer;
18+
}
19+
20+
@Override
21+
public void doRenderLayer(AbstractClientPlayer entitylivingbaseIn, float f, float g, float partialTicks, float h, float i, float j, float scale) {
22+
if (!Hysentials.INSTANCE.ponjoHelmet.canUse(entitylivingbaseIn)) {
23+
return;
24+
}
25+
if (entitylivingbaseIn.isInvisible()) return;
26+
this.playerRenderer.bindTexture(texture);
27+
Minecraft minecraft = Minecraft.getMinecraft();
28+
GlStateManager.pushMatrix();
29+
if (entitylivingbaseIn.isSneaking()) {
30+
GlStateManager.translate(0.0F, 0.2F, 0.0F);
31+
}
32+
playerRenderer.getMainModel().bipedHead.postRender(0.0625F);
33+
34+
boolean flag = entitylivingbaseIn.isWearing(EnumPlayerModelParts.HAT);
35+
36+
GlStateManager.translate(0, -1.5F - (flag ? 0.04F : 0F), 0.1F);
37+
float n = 1;
38+
GlStateManager.scale(n, n, n);
39+
Hysentials.INSTANCE.ponjoHelmet.model.render(entitylivingbaseIn, f, g, h, i, j, scale);
40+
GlStateManager.popMatrix();
41+
}
42+
43+
@Override
44+
public boolean shouldCombineTextures() {
45+
return false;
46+
}
47+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package llc.redstone.hysentials.cosmetics.hats.ponjo;
2+
3+
import llc.redstone.hysentials.cosmetic.CosmeticManager;
4+
import llc.redstone.hysentials.cosmetics.AbstractCosmetic;
5+
import llc.redstone.hysentials.cosmetics.Cosmetic;
6+
import llc.redstone.hysentials.cosmetics.hats.technocrown.TechnoCrownModel;
7+
import net.minecraft.client.model.ModelBase;
8+
import net.minecraft.entity.player.EntityPlayer;
9+
import net.minecraft.util.ResourceLocation;
10+
11+
public class PonjoHelmet implements Cosmetic {
12+
PonjoHelmetModel model;
13+
public PonjoHelmet() {
14+
model = new PonjoHelmetModel();
15+
AbstractCosmetic.cosmetics.add(this);
16+
}
17+
public boolean canUse(EntityPlayer player) {
18+
return CosmeticManager.equippedCosmetic(player.getUniqueID(), "ponjo")
19+
&& (CosmeticManager.hasCosmetic(player.getUniqueID(), "ponjo") || CosmeticManager.isPreviewing(player.getUniqueID(), "ponjo"));
20+
}
21+
22+
@Override
23+
public ModelBase getModel() {
24+
return model;
25+
}
26+
27+
@Override
28+
public ResourceLocation getTexture() {
29+
return new ResourceLocation("hysentials:hats/ponjo.png");
30+
}
31+
32+
@Override
33+
public String getName() {
34+
return "ponjo";
35+
}
36+
}

0 commit comments

Comments
 (0)