-
[1.8.9] Coremod doesn't load outside the IDE
This is the first time I'm working with ASM, so please, be gentle. My mod is finished and works perfectly. I have my IFMLLoadingPlugin class and my IClassTransformer that do their job, but when I export the mod and test it with MultiMC the mod doesn't load as it should. The transform method get called and gives no error at all, but when minecraft launches my mod isn't in the modlist and nothing happens, like it wasn't there. I've been searching on Google for a while but i haven't find anyhing helpful, maybe I'm forgetting something.
-
[1.8.9]Draw a simple circle
Ok, I fixed the code, now it finally works. I'll post it, just in case anybody needs it. public static final double TWICE_PI = Math.PI*2; private static Tessellator tessellator = Tessellator.getInstance(); private static WorldRenderer worldRenderer = tessellator.getWorldRenderer(); public static void drawRegularPolygon(double x, double y, int radius, int sides) { GL11.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); worldRenderer.begin(GL11.GL_TRIANGLE_FAN, DefaultVertexFormats.POSITION); worldRenderer.pos(x, y, 0).endVertex(); for(int i = 0; i <= sides ;i++) { double angle = (TWICE_PI * i / sides) + Math.toRadians(180); worldRenderer.pos(x + Math.sin(angle) * radius, y + Math.cos(angle) * radius, 0).endVertex(); } tessellator.draw(); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_BLEND); } This will draw a regular polygon with <sides>sides. If you set it high enough, obviosly, you will get a circle.
-
[1.8.9]Draw a simple circle
Ok, looks like the problem was another one. I came up with this: private static final double twicePI = Math.PI*2; private static void drawCircle(double x, double y, int radius, int slices) { GL11.glBegin(GL11.GL_TRIANGLE_FAN); GL11.glVertex2d(x, y); for(int i = 0; i <= slices;i++) { GL11.glVertex2d(x + (radius * Math.cos(i * twicePI / slices)), y + (radius * Math.sin(i * twicePI / slices))); } GL11.glEnd(); } This should render a filled circle, centered at (x,y), but i doesn't render anything. If i replace "GL_TRIANGLE_FAN" with "GL_TRIANGLE_STRIPES" and I add "GlStateManager.disableTexture2D();" before I get something, but it's not what i want. Am I forgetting anything?
-
[1.8.9]Draw a simple circle
Yes, I know, but I need to draw it in slices of different colors and I have a dynamic number of slices. I really can't find anything on the new renderer class.
-
[1.8.9]Draw a simple circle
I just need to draw a filled circle, that's it, but I can't find anything helpful online. Everything I tried doesn't work. I'm inside the drawScreen method of a GuiScreen class.
-
[SOLVED]Client Commands
diesieben07 helped me on the #minecraftforge irc channel. You just need to add this to the class that extends CommandBase: @Override public int getRequiredPermissionLevel() { return 0; }
-
[SOLVED]Client Commands
I've tried this, but it doesn't work: @EventHandler public void init(FMLInitializationEvent event) { proxy.init(); ClientCommandHandler.instance.registerCommand(new CommandParty()); } I moved the line into my ClientProxy but, as expected, nothing changed.
-
[SOLVED]Client Commands
Hi guys, again after several researches on Google I'm asking for your help. I'm writing a ClientOnly mod and I would like to add a Chat Command and register it only on the Client Side. In all the tutorials that I've found they register the Command class on the server. It is possible to register the Command on the client side only?
-
[SOLVED][1.7.X]Client Chat Event
That's exactly what I was looking for. That list will help me a lot. Thank you!
-
[SOLVED][1.7.X]Client Chat Event
I'm looking for some kind of event that triggers when a client receive a Chat message. I've tried using the ChatListener, but it seems to be removed from Forge. I can't find anything similar on Google. There's the ServerChatEvent but it triggers when a chat message is sent, and not received. I'm making a Client Only mod.
-
[SOLVED]Version file with "@VERSION@"
Thank you
-
[SOLVED]Version file with "@VERSION@"
I've seen many modders using the "@VERSION@" String instead of the actual version in the mod references. I've tried to google it many times, without result. Anyone have a good tutorial that I can follow?
-
[Solved]Get Dimension name from client
THAT is what I was looking for. Thank you!
-
[Solved]Get Dimension name from client
Read carefully. In my gui, that the player can be open from any dimension I have many dimensionId. If one of the dimensionIds is -1(while the player is in the overworld) I have to print Nether, not Overworld.
-
[Solved]Get Dimension name from client
I know, but I need only the Name of the dimension. I'm quite sure that is saved somewhere in the client, i would like to know where.. The only thing that comes to mind at the moment is to send a packet from the server to the client with all dimension name and is respective dimensionId when the world loads.
IPS spam blocked by CleanTalk.