Skip to content

Commit f5b0e35

Browse files
committed
I think i did something?
1 parent 4df9599 commit f5b0e35

File tree

16 files changed

+273
-176
lines changed

16 files changed

+273
-176
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
package llc.redstone.hysentials;
22

33
import cc.polyfrost.oneconfig.events.EventManager;
4-
import cc.polyfrost.oneconfig.internal.hud.HudCore;
54
import cc.polyfrost.oneconfig.libs.universal.ChatColor;
65
import cc.polyfrost.oneconfig.libs.universal.UChat;
76
import llc.redstone.hysentials.capes.CapeHandler;
87
import llc.redstone.hysentials.config.hysentialMods.FormattingConfig;
9-
import llc.redstone.hysentials.config.hysentialMods.IconsConfig;
108
import llc.redstone.hysentials.config.hysentialMods.icons.IconStuff;
119
import llc.redstone.hysentials.cosmetic.CosmeticManager;
1210
import llc.redstone.hysentials.cosmetics.backpack.BackpackCosmetic;
@@ -23,8 +21,6 @@
2321
import llc.redstone.hysentials.guis.club.ClubDashboardHandler;
2422
import llc.redstone.hysentials.guis.container.ContainerHandler;
2523
import llc.redstone.hysentials.handlers.chat.modules.misc.Limit256;
26-
import llc.redstone.hysentials.handlers.groupchats.GlobalChat;
27-
import llc.redstone.hysentials.handlers.groupchats.GroupChat;
2824
import llc.redstone.hysentials.handlers.guis.GuiScreenPost;
2925
import llc.redstone.hysentials.handlers.htsl.*;
3026
import llc.redstone.hysentials.handlers.misc.HousingJoinHandler;
@@ -40,7 +36,6 @@
4036
import llc.redstone.hysentials.event.events.HysentialsLoadedEvent;
4137
import llc.redstone.hysentials.guis.ResolutionUtil;
4238
import llc.redstone.hysentials.guis.actionLibrary.ActionLibrary;
43-
import llc.redstone.hysentials.guis.gameMenu.RevampedGameMenu;
4439
import llc.redstone.hysentials.guis.misc.PlayerInvHandler;
4540
import llc.redstone.hysentials.guis.sbBoxes.SBBoxesEditor;
4641
import llc.redstone.hysentials.handlers.chat.ChatHandler;
@@ -66,7 +61,6 @@
6661
import net.minecraft.util.ResourceLocation;
6762
import net.minecraftforge.client.ClientCommandHandler;
6863
import net.minecraftforge.common.MinecraftForge;
69-
import net.minecraftforge.fml.common.FMLModContainer;
7064
import net.minecraftforge.fml.common.Loader;
7165
import net.minecraftforge.fml.common.Mod;
7266
import net.minecraftforge.fml.common.ModContainer;
@@ -88,8 +82,6 @@
8882
import java.net.URL;
8983
import java.nio.charset.Charset;
9084
import java.nio.charset.StandardCharsets;
91-
import java.nio.file.Files;
92-
import java.nio.file.Paths;
9385
import java.util.ArrayList;
9486
import java.util.List;
9587

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

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import llc.redstone.hysentials.htsl.compiler.Compiler;
2121
import llc.redstone.hysentials.macrowheel.MacroWheelSelector;
2222
import llc.redstone.hysentials.profileViewer.DefaultProfileGui;
23+
import llc.redstone.hysentials.renderer.plusStand.PlusStandEntity;
2324
import llc.redstone.hysentials.schema.HysentialsSchema;
2425
import llc.redstone.hysentials.util.*;
2526
import llc.redstone.hysentials.utils.ChatLib;
@@ -29,8 +30,11 @@
2930
import com.google.gson.JsonObject;
3031
import com.mojang.authlib.GameProfile;
3132
import com.mojang.authlib.properties.PropertyMap;
33+
import net.hypixel.data.type.GameType;
34+
import net.hypixel.data.type.ServerType;
3235
import net.hypixel.modapi.HypixelModAPI;
3336
import net.hypixel.modapi.packet.PacketRegistry;
37+
import net.hypixel.modapi.packet.impl.clientbound.ClientboundLocationPacket;
3438
import net.hypixel.modapi.packet.impl.clientbound.ClientboundPingPacket;
3539
import net.hypixel.modapi.packet.impl.serverbound.ServerboundLocationPacket;
3640
import net.hypixel.modapi.packet.impl.serverbound.ServerboundPingPacket;
@@ -324,14 +328,43 @@ private static void handleTest(String command, String args) {
324328

325329
case "hypixel": {
326330
UChat.chat("Sending Hypixel mod API requests...");
327-
for (PacketRegistry.RegisteredType type : HypixelModAPI.getInstance().getRegistry().getRegisteredTypes()) {
328-
Hysentials.getModAPI().sendPacket(type.getServerPacketFactory(), (packet) -> {
331+
for (HypixelPacketType type : HypixelPacketType.values()) {
332+
Hysentials.getModAPI().sendPacket(type, (packet) -> {
329333
UChat.chat("§aReceived packet: " + packet.toString());
330334
});
331335
}
332336
break;
333337
}
334338

339+
case "plus": {
340+
UChat.chat("Sending Location Request...");
341+
Hysentials.getModAPI().sendPacket(HypixelPacketType.LOCATION, (p) -> {
342+
double x = 0;
343+
double y = 0;
344+
double z = 0;
345+
float yaw = 0;
346+
ClientboundLocationPacket packet = (ClientboundLocationPacket) p;
347+
if (!packet.getServerType().isPresent()) return;
348+
ServerType serverType = packet.getServerType().get();
349+
if (!(serverType instanceof GameType)) return;
350+
GameType gameType = (GameType) serverType;
351+
switch (gameType) {
352+
case HOUSING: {
353+
x = -16;
354+
y = 65;
355+
z = 30;
356+
yaw = 320f;
357+
break;
358+
}
359+
}
360+
361+
PlusStandEntity entity = new PlusStandEntity(Minecraft.getMinecraft().theWorld);
362+
entity.setPositionAndRotation(x, y, z, yaw, 0);
363+
Minecraft.getMinecraft().theWorld.spawnEntityInWorld(entity);
364+
});
365+
break;
366+
}
367+
335368
case "doorbell": {
336369
Socket.CLIENT.sendText(
337370
new Request(

src/main/java/llc/redstone/hysentials/config/hysentialMods/ChatConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ public class ChatConfig extends Config {
8787
description = "The prefix for all guild related chat messages.",
8888
category = "Guild",
8989
subcategory = "General",
90-
placeholder = ":guildprefix: "
90+
placeholder = ":guild: "
9191
)
92-
public static String guildPrefix = ":guildprefix: ";
92+
public static String guildPrefix = ":guild: ";
9393

9494
@Switch(
9595
name = "Player Guild Chat Prefix",

src/main/java/llc/redstone/hysentials/guis/gameMenu/RevampedGameMenu.java

Lines changed: 0 additions & 147 deletions
This file was deleted.

src/main/java/llc/redstone/hysentials/handlers/misc/PacketRecievedHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class PacketRecievedHandler {
1515
@SubscribeEvent
1616
public void onNetworkEvent(FMLNetworkEvent.ClientConnectedToServerEvent event) {
1717
event.manager.channel().pipeline()
18-
.addAfter("fml:packet_handler", "CT_packet_handler", new ChannelDuplexHandler() {
18+
.addAfter("fml:packet_handler", "HS_packet_handler", new ChannelDuplexHandler() {
1919
@Override
2020
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
2121
CancellableEvent packetReceivedEvent = new CancellableEvent();

src/main/java/llc/redstone/hysentials/mixin/MixinRenderManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import llc.redstone.hysentials.cosmetics.miya.RenderMiya;
99
import llc.redstone.hysentials.cosmetics.pepper.EntityPepper;
1010
import llc.redstone.hysentials.cosmetics.pepper.RenderPepper;
11+
import llc.redstone.hysentials.renderer.plusStand.PlusStandEntity;
12+
import llc.redstone.hysentials.renderer.plusStand.RenderPlusStand;
1113
import net.minecraft.client.Minecraft;
1214
import net.minecraft.client.gui.FontRenderer;
1315
import net.minecraft.client.renderer.entity.Render;
@@ -34,6 +36,7 @@ private void injectEntities(TextureManager renderEngineIn, RenderItem itemRender
3436
entityRenderMap.put(EntityPepper.class, new RenderPepper((RenderManager) (Object) this));
3537
entityRenderMap.put(EntityHamster.class, new RenderHamster((RenderManager) (Object) this));
3638
entityRenderMap.put(EntityMiya.class, new RenderMiya((RenderManager) (Object) this));
39+
entityRenderMap.put(PlusStandEntity.class, new RenderPlusStand((RenderManager) (Object) this));
3740
}
3841

3942
@Inject(method = "getFontRenderer", at = @At("HEAD"), cancellable = true)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
package llc.redstone.hysentials.renderer.plusStand;
2+
3+
import llc.redstone.hysentials.util.C;
4+
import llc.redstone.hysentials.util.Renderer;
5+
import net.minecraft.client.entity.EntityPlayerSP;
6+
import net.minecraft.enchantment.EnchantmentHelper;
7+
import net.minecraft.entity.Entity;
8+
import net.minecraft.entity.EntityAgeable;
9+
import net.minecraft.entity.EntityList;
10+
import net.minecraft.entity.EntityLiving;
11+
import net.minecraft.entity.ai.EntityAIFollowOwner;
12+
import net.minecraft.entity.ai.EntityAILookIdle;
13+
import net.minecraft.entity.ai.EntityAIWander;
14+
import net.minecraft.entity.ai.EntityAIWatchClosest;
15+
import net.minecraft.entity.item.EntityArmorStand;
16+
import net.minecraft.entity.passive.EntityAnimal;
17+
import net.minecraft.entity.passive.EntityTameable;
18+
import net.minecraft.pathfinding.PathNavigateGround;
19+
import net.minecraft.util.BlockPos;
20+
import net.minecraft.util.MathHelper;
21+
import net.minecraft.world.World;
22+
23+
public class PlusStandEntity extends EntityLiving {
24+
public String ownerName;
25+
26+
public PlusStandEntity(World worldIn) {
27+
super(worldIn);
28+
setSize(5F, 5F);
29+
preventEntitySpawning = false;
30+
}
31+
32+
@Override
33+
public void onLivingUpdate() {
34+
super.onLivingUpdate();
35+
updateEntityActionState();
36+
}
37+
38+
@Override
39+
public void moveEntityWithHeading(float strafe, float forward) {
40+
}
41+
42+
@Override
43+
public boolean canBeCollidedWith() {
44+
return false;
45+
}
46+
47+
@Override
48+
protected void updateAITasks() {
49+
super.updateAITasks();
50+
}
51+
}

0 commit comments

Comments
 (0)