• 0

    posted a message on Item NBT

    Wow wow wow... Do you know java?

    Posted in: Modification Development
  • 0

    posted a message on Item NBT

    have you looked at my example? It should tell you what to do

    Posted in: Modification Development
  • 0

    posted a message on Item NBT

    You write/read from stack were you are editing or using the values.

    Example:


    You have an integer timesClicked stored in nbt and you want it to increase every time you click. Than you would use:
    public boolean onItemUse(ItemStack itemstack, other stuff....){
     if(itemstack.getTagCompound()==null)itemstack.setTagCompound(new NBTTagCompound());
     itemstack.getTagCompound().setInteger("timesClicked", itemstack.getTagCompound().getInteger("timesClicked")+1);
    }


    and than you lets say want to use that in onUpdate than you would use this

    public void onUpdate(ItemStack itemstack, oter stuff...){
     if(itemstack.getTagCompound()!=null){
     int timesClicked = itemstack.getTagCompound().getInteger("timesClicked");
     do stuff with it...
     }
    }

    Posted in: Modification Development
  • 0

    posted a message on Jython for modding?

    Yeah stuff like block gravity and hunk rewriting should not be actively supported (and it seems as thou it is possible without an api) but I am just talking about small interfaces that are extremely powerful like IItemRednerer and ISBRH and are removed for some reason. And instead of that we get a shitty minimal java interaction API that said: 3 files (or if you are talking forge than 3 batches of files) that are a lot similar to each other and are required for 1 block!

    Posted in: Modification Development
  • 0

    posted a message on Jython for modding?
    Quote from Foeskes»

    but it does help with resource pack makers.

    Exactly. So this an an api for resource pack makers that kicks the modders in to the ground...
    Posted in: Modification Development
  • 0

    posted a message on Any way to make Custom Steve Mod compatible with Smart Moving Mod? <^_^>

    O well if you are new to this than first make sure that you know java. Than start making something a little bit more simple because what you are talking about is not that simple and it is not really worth it to do it now. &lt;_&lt;

    Posted in: Modification Development
  • 0

    posted a message on Jython for modding?
    Quote from Leviathan143»

    Also why do you say that Mojang likes to restrict stuff? Several Mojangstas worked on Bukkit or MCP.

    It's because most of the time things in the source code are made in a way so you have to follow an exact path of doing something that is usually not that good. But maybe I am overreacting because of the terrible json system and the rage that it has produced. :P
    Posted in: Modification Development
  • 0

    posted a message on rotated log texture

    You need to rotate the uv-s on the side in cases of the rotated texture

    Posted in: Modification Development
  • 0

    posted a message on Crash report HelpTh

    You need to set the value that you are registering before you actually try to register it.

    Can you please use spoilers? I want to keep my scrolling wheel for just a little bit longer...

    Posted in: Modification Development
  • 0

    posted a message on Jython for modding?
    Quote from Vic_»

    I disagree. If you build your entire game with an API in mind you will eventually be able to use every aspect of the game engine without the need for workaround. Forge doesn't do enough, not too much.


    Yeah you have a good point. But anything that is not already in or partially in minecraft would be impossible to do because there would be no api for other ways of doing new features. (we can make our own engines but with a script not so much) Again Mojang likes to restrict stuff. And you would not have asm or reflection and things like that what would also make the modding harder.

    Minetest has a Lua API and its modding community seems to be doing just fine.


    I never looked at it so I am asking is in there engines that force you to do something one way and only that way?

    Posted in: Modification Development
  • 1

    posted a message on Problem with progress bar update in tile entity. [SOLVED]

    This is because you are using if(!this.worldObj.isRemote) when updating the progress.

    There are 2 solutions:

    1. remove if(!this.worldObj.isRemote) to enable clients to calculate their own bars. This can cause a desync of about 0-2 ticks and is not noticeable if the process is longer than 20 ticks or 1s

    2. send custom packets about the process bar when the gui is open. This can have a desync of about 0-1 ticks but it is heavier on server bandwidth.

    Posted in: Modification Development
  • 0

    posted a message on Jython for modding?
    Quote from Vic_»



    A lot of other games provide an API over a scripting language such as Lua or Python. The reason for that is because those languages are usually easier to learn and less verobose (because they are dynamic), more flexible (again, because they are dynamic) and you can run them in a sandbox. Using java gives a lot of room for exploits and there are many things you can do wrong. I bet that this forum wouldn't be half as crowded if it Forge were written in a more restricting fashion.

    To give you an example of why scripting languages are awesome, this is an example in Lua for defining a block:

    block : name {
        hardness = 4,
        texture = "mymod:mytexture",
        ...
    }





    ItemStacks could be done like this:

    charcoal = item.coal/1 




    Hmm interesting point! That can be a good thing but not for minecraft. As you may know Mojang likes to restrict everything to the point here only things that are extremely simple can be done (what they need). A great example is vanilla json models. Now imagine that but in everything. I think that generic elemental tools would be the best mod out if that was the case. (if a modding community would even exist)

    Posted in: Modification Development
  • 0

    posted a message on Coding Help Needed

    I would like to help I know a lot about java and minecraft. But I don't really have the time to help individuals. You should post if you have any problems on the modification development and you will get a lot of help. And you will resolve a problem publicly so other people that have the same problem will be able to learn from your/our posts! (that is kinda of the purpose of this section)

    Posted in: Modification Development
  • 0

    posted a message on Jython for modding?

    I am sorry for getting in to this late but I just want to ask something.

    Why would you use a different language for mod that is not Java or Scala?

    I mean you are working on a mod! And that means that you will have to heavily really on the base of the program (aka MC) so why give yourself a lot of headache with using a partially incompatible language and try to fix the incompatibility issues? Java is a great language one of the fastest and easiest to use! And you can use scala if you really don't want to use java for some reason. But a third language? That is just weird in my eyes. And not to mention that pretty much none over here will be able to help you. Sooo yeah...

    Posted in: Modification Development
  • To post a comment, please .