Jump to content

Recommended Posts

Posted

I'm creating mod that creates blocks whose properties are set by server using packets. Because of this, I need to create client that can create block runtime when packet that holds properties arrive (when connecting)

 

In Java it impossible to create variable, which name is in variable. When I create new block using Forge, I need to set variable. Can I use maps or is there any other method?

Posted
In Java it impossible to create variable, which name is in variable.

since when ??

 

int a; <- boom

 

also, this looks like a reaaaally bad idea

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

I mean i cannot set name of variable using other variables content. Java "dynamic variables" simply don' exist (source: google :))

 

And why my idea is bad? I create client and server side mods, and when I need to modify something, I don't need to change client. Spoutcraft will do that, but it dont support Forge or even Minecraft 1.6.2, because I need to create similar (but simplier) mod myself.

Posted
I mean i cannot set name of variable using other variables content. Java "dynamic variables" simply don' exist (source: google :))

yknow you can use hashmaps to do something similar right ?

like ok its not literally adding a new

Block b;

to the class, but to try to do this is completelly stupid no matter which programing paradigm you do it in and its especially a bad idea for staticly typed language ...

 

beside block hardness (which can be taken care of with forge events btw :P), what could you possibly change ?

if you make a tottally new block you need to add a texture to it, if you need to add a texture to it you need to send that texture in some way. sending the texture at runtime ? yeah gl you're never goign to be able to change a jar at runtime. the JVM will go crazy and kill you.

so if you cant add the texture dynamicly you need to send the client a copy in another way, which would require him to at least restart hsi client

 

now the whole process is really starting to look like any mod update

 

may i suggest you try to concentrate your efforts on making a new launcher for your mod instead of this ?

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

i dont think it is but i could be wrong, my point is its goign to cost you a hell lot of time to do that when in practice its not that usefull, relaunching minecraft because the server has a new version takes like 30 sec max and updating with a script /new launcher would take as much time as updating in-game

 

 

anyway, if you still decide to do it i wish you good luck but it seems like a lot of trouble

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.