Everything posted by Draco18s
-
Null pointer Exception on the class
Also don't new Object(){} for your recipes. You can just add them as parameters: GameRegistry.addShapelessRecipe(new ItemStack(BlockTrap.instance), new ItemStack(Item.painting), new ItemStack(Block.dispenser)); or GameRegistry.addShapedRecipe(new ItemStack(BlockWallPlate.instance, 2), "s", "s", "s", 's', stone);
-
Packets. Large amounts of data. Breaking the 32kb cap
It's only 4 packets sent off all at once. I haven't tried to handle edge cases like that yet. Which is part of the reason I was looking for another solution, because I knew that the one I have is untenable at larger scales.
-
Packets. Large amounts of data. Breaking the 32kb cap
I think I might just yoink that. Thanks
-
Packets. Large amounts of data. Breaking the 32kb cap
I have a need to send a packet from client to server (and back) dealing with data sizes larger than 32 kb. A lot larger. (Interestingly an array of 4096 integers is the max the current packets can handle, which should only be 16kb) Based on my current handling of ~128kb, I'd like to increase this at least 4 fold (~512kb) without having to do the same thing I'm currently doing, where the server can only handle one player at a time sending the data (it sets a Lock flag until it receives the final packet from the original player). This is reasonably acceptable for only 4 packets and the communication I'm performing, but for something a lot larger I'm not as certain. Someone pointed me at FMLPacket, as it had a way to automatically split packet data into 32kb chunks, but that won't work, as the FMLPacket is only used for specific FML purposes: it requires a packet type, which is one of: mod_list_request/response, mod_ids, mod_missing, guiopen, entityspawn(adjustment), or mod_idmap. Any other ideas?
-
Rendering help
Server code does not have any class found in net.minecraft.client.* Which includes all rendering classes.
-
Textures Show Up When Launched From Eclipse, But not After Recompling
make unlocalized names also lower case then make sure that all files and folders are ALSO all lower case.
-
Rendering help
In which case, your mod is not SMP compatible. You'll get classNotFound errors when you install it into a server.
-
[1.6.4] How to make "meta items" based on NBT Tags.
So look at Artifacts. You're going to be using almost the entire code base. "Components" you'll be replacing to be the effects YOU want, and the FactoryArtifacts is going to need to be changed as well (as its based on the assumption that things are random).
-
my mod dont run
Better yet, don't. FML is just an API to turn ModLoader calls into Forge calls. There's ZERO reason to do that if you're trying to work with Forge. Unless you want the extra overhead of multiple unnecessary dot references and function calls.
-
Alpha Blending with DynamicTexture (in a GUI)
I had already, actually.
-
Rendering help
Even if it doesn't have a texture, you should be able to see it with the MISSING TEXTURE texture. :\
-
Forge Api
On the other hand, when Minecraft updates, Bukkit takes a year and a half to update all their stuff so that mods are functional with the new version....
-
[1.6.4] How to make "meta items" based on NBT Tags.
So start coding o..o
-
Get server Side EntityPlayer in client TickHandler
Dude, the client and server can be running on different machines. The client CANNOT get a memory address for the server object.
-
[1.6.4] How to make "meta items" based on NBT Tags.
So use an NBT tag to store your "metadata" and just use that value everywhere the Item class calls a function and passes an ItemStack.
-
Using cirar to forge a new game mode?
Your game mode is a WORLD PROPERTY not a PLAYER PROPERTY and therefore not actually a game mode. "Game Mode" just sets various PLAYER PROPERTIES (like the ability to fly, the ability to instantly break blocks, the ability to have infinite resources, the ability to respawn, etc.) You're asking the wrong question.
-
Get server Side EntityPlayer in client TickHandler
"Get server side entity from the client side" -> You can't. You need to use packets to communicate from the client ("This event has occurred") and interpret it on the server ("Event A has occurred? Ok, I'll do X")
-
Rendering help
RenderingRegistry.registerEntityRenderingHandler(NameOfYourEntityClass.class, new NameOfYourRenderer());
-
[1.6.4] How to make "meta items" based on NBT Tags.
Ok, so to start off, all you're talking about is making new items that behave in different ways, each one will have its own class. Different maximum damage is simply just a property of that class instance. You haven't even gotten to the point where you need NBT data yet. My artifacts are unique in that they all use the same class, and the effects ("throws fireballs" "heals the player" "causes lightning") are handled separately with key-value data stored in the NBT.
-
[SOLVED] Problems With Tick Handlers (Casting World to Object[])
Ah ha. See, I knew jack about Java when I started, but I was coming from a programming background. So all of my questions have either been highly technical, dealing with a section of Forge/vanilla I'm not familiar with, or deep math (as I'm not so good at designing algorithms). You're more in the dark, so when you run into posts like the one in your OP, you don't grasp the solution as readily.
-
Alpha Blending with DynamicTexture (in a GUI)
I haven't actually tried it yet, but I'm pretty sure that's it. Edit: Got a moment to drop a glDisable in. Works perfectly.
-
Rendering label over block is not white
For shits and giggles, compare to the code I used: Tessellator tessellator = Tessellator.instance; byte byte0 = 0; GL11.glDisable(3553); tessellator.disableColor(); tessellator.startDrawingQuads(); int j = fontrenderer.getStringWidth(s) / 2; tessellator.setColorRGBA_F(0.0F, 0.0F, 0.0F, 0.35F); tessellator.addVertex(-j - 1, -1 + byte0, 0.0D); tessellator.addVertex(-j - 1, 8 + byte0, 0.0D); tessellator.addVertex(j + 1, 8 + byte0, 0.0D); tessellator.addVertex(j + 1, -1 + byte0, 0.0D); tessellator.draw(); //tessellator.func_78381_a(); GL11.glEnable(3553); fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, byte0, 553648127); GL11.glEnable(2929); GL11.glDepthMask(true); fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, byte0, -1); GL11.glEnable(2896); GL11.glDisable(3042); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glPopMatrix();
-
Rendering help
You need to register the renderer with the Render....(RenderManager? RenderEngine? One sec...oh, right the RenderingRegistry)
-
Completely Override a gui?
If you're trying to change the look, you can use texture packs.
-
[SOLVED] Problems With Tick Handlers (Casting World to Object[])
How much other programming experience did you have prior, though?
IPS spam blocked by CleanTalk.