Everything posted by XenoPyax
-
Custom Packets
I've been following this doc (https://mcforge.readthedocs.io/en/latest/networking/simpleimpl/) but I don't see how the INSTANCE encodes the message how should know how to decode the message? and also does the MessageClass packet need to implement something or does it just send the Object of a class as the message?
-
Rendering rectangles or an shape or form in the new IIngameOverlay
Hey, I just got back to modding, and I was wondering how drawing rectangles works in the new system, I figured out how it works with texture but since I don't always want to use textures I was wondering If a simple draw rect method with a color an alpha values exists.
-
1.17.1 IngameScreen hasn't been exposed?
I want to override the default in game UI and show my custom one. Uh, iirc in Java 16 they made it impossible to use reflection to re-assign final fields.
-
1.17.1 IngameScreen hasn't been exposed?
Hello, I was just upgrading my mod and notice that `gui` is not exposed even tho java 16 change the whole final system to being re-assignable, how are we supposed to set out custom GUI now?
-
Mod lags my minecraft?
Oh you're right
-
Mod lags my minecraft?
Well is there anyway I can see the lag spikes causes from ingame like F3 menu or is it just purely testing and knowing what could cause this?
-
Mod lags my minecraft?
Okay so it is in the dev env and in the "production" use with other mods, my mod is using RestAPIs to request data and displaying UI and data from the api requests.
-
Mod lags my minecraft?
Hello I am noticing lags spikes when using my mod what ways are there to identify what part of my mod is causing this?
-
[1.16.4] Replace vanilla block texture
my bad I was looking at the wrong project, it was my 1.8 project found it in the 1.16 one thanks!
-
[1.16.4] Replace vanilla block texture
this is all I could find in TextureAtlasSprite : TextureUtil.uploadTextureMipmap
-
[1.16.4] Replace vanilla block texture
Another question how do I draw over the blocks texture like what do I need to be able to draw over the block object? And when do I draw them I can't imagine drawing them each individually on chunk load or? any pseudocode or example class I could look at?
-
[1.16.4] Replace vanilla block texture
Ah thanks a lot!
-
[1.16.4] Replace vanilla block texture
Hello, so I wanted to make a mod that changes the blocks texture under certain conditions like for example if the scoreboard has a certain string all wool textures will be replaced with my custom texture. How would I set the texture for a block and show it when they enter a world with the scoreboard condition?
-
[1.16.4] Render Player in gui
Works perfectly Thanks a ton!!
-
[1.16.4] Render Player in gui
Smart didn't think of that, thanks
-
[1.16.4] Render Player in gui
SO I was trying to get the player to render in the gui I only got it to receive the skinResource and draw that skintexture in the gui but without a player model just the blank file texture in the gui. Any resources where I can look for an example on how to do it.
-
GUI Button has weird image
Oh I see thanks!
-
GUI Button has weird image
SO I have the following code I've been looking through the gui of the Minecraft menus and replicated them but somehow my buttons don't seem to take the correct texture. Code: https://paste.md-5.net/figovuzufa.java Image:
-
I can't find any guide or wiki docs
Ah okay thanks
-
I can't find any guide or wiki docs
So I am switching from 1.8 to 1.16 and until now I feel like the documentation got worse there are only a few things that are explained and some easy to do suddenly got 10x more complicated. My question now is I can't seem to figure out how to render an overlay to the players HUD, I figured out how to open a GUI to them but that will enable the mouse, and they can't move or interact is there a better source for figuring things like this out? The docs seem to only explain a few specific topics.
-
[1.8.8] 2nd GUI texture rendering with a purple shade
Hey there, so I try rending a calendar and an item info the calendar works fine and shows up as a semitransparent gray but for some reason the item info now renders the texture with a purple shade. Any idea what might be causing this or where I should start looking for. EDIT: Where would I ask for support if it's not supported here anymore? package dev.xenopyax.skyblockutils.gui; import java.util.ArrayList; import java.util.List; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; public class ItemStatsOverlay extends Gui { private Minecraft mc; private final ResourceLocation ITEM_DISPLAY_BACKGROUND; public ItemStatsOverlay(Minecraft mc) { this.mc = mc; ITEM_DISPLAY_BACKGROUND = new ResourceLocation("skyblockutils:textures/gui/itembackground.png"); if(getStats().size() > 0) { int length = 0; for(String s : getStats()) { if(mc.fontRendererObj.getStringWidth(s) > length) length = mc.fontRendererObj.getStringWidth(s); } if(mc.fontRendererObj.getStringWidth(getName()) > length) length = mc.fontRendererObj.getStringWidth(getName()); mc.getTextureManager().bindTexture(ITEM_DISPLAY_BACKGROUND); drawModalRectWithCustomSizedTexture(4, 4, length + 16, 45, (int) length + 16, (int) 45, length + 16, 45); drawString(mc.fontRendererObj, getName(), 30, 14, 0xffffff); getStats().forEach((stat) -> drawString(mc.fontRendererObj, stat, 12, 30, 0xffffff)); if(mc.thePlayer.getHeldItem() != null) drawItemStack(10, 10, mc.thePlayer.getHeldItem()); } } private void drawItemStack(int x, int y, ItemStack item) { RenderItem itemRender = mc.getRenderItem(); RenderHelper.enableStandardItemLighting(); itemRender.renderItemIntoGUI(item, x, y); } public String getName() { return mc.thePlayer.getHeldItem().getTooltip(mc.thePlayer, true).get(0).split("\\(")[0]; } public List<String> getStats() { List<String> stats = new ArrayList<String>(); for(String s : mc.thePlayer.getHeldItem().getTooltip(mc.thePlayer, false)) { String lore = s.replaceAll("(§[0-9a-fk-or])(?!.*\\1)", ""); if(lore.startsWith("Counter:") || lore.startsWith("Compact")) { stats.add(s); } } return stats; } }
-
[1.12.2] GUI display Client side not working
So I've been working on this for several days and cant get the gui to show what am I missing? https://github.com/XenoPyax/XenMod
IPS spam blocked by CleanTalk.