Jump to content

Recommended Posts

Posted

Hello everybody! First of all sorry for my bad English, I'm from Spain :(.

Could You help me? I'm learning how to make mods with forge.  I'm creating a mod called "Olives" (Yes, it's weird). Now, I want to create a custom tree that spawns in certain biomes like Forests and Plains. The point is that I don't know how to make the necessary code. I'm very disappointed because I can't find any tutorial for 1.5 about it. Sorry again for my bad English :-[;D.Tell me if you need some more information.

Posted

Never tried creating Trees/Biomes etc so can't help you there but what I will say is find a tutorial for 1.4.7 or closest to, follow it then when you hit errors you can post specific questions based upon the errors found. 1.5 couldn't of broken it too much so I'm sure the underlining system are still pretty much the same.

Posted

Hello and thank you for comment. I will do as you said and if I get errors I'll put them here. Now only remains to find a good tutorial. Thank you again ;D

 

 

Modif: I have tried a 1.4.7 tutorial, but it has not worked. Do not know of any tutorial for 1.4.7 or 1.5? Please :(. Thanks!

Posted

Hello! TheGrovesyProject101 thank you very much but I still can not make it work. I followed the tutorials but my tree is not generated in the world (I've been exploring a lot but I didn't find it). The matter is that code does not give me any error...Thanks anyway. :)

Posted

The fact that the code ain't giving an error means that the code's syntax is valid. Not that it will do as you intended.

When it get's errors before you run it, the errors are with the syntax or grammar of your code if you will.

When it crashes at runtime it encounters something it didn't know how to handle, like nothing where it expected something(Null pointer exception).

 

But when it does neither and does not produce the wanted result, the code is still wrong. It's just allowed to type it out that way you did so you get no pre-compile errors :P

 

If you want help tough, post your mainmod file at pastbin.com (USE JAVA SYNTAX HIGHLIGHTNING!!!) and give us the link.

Also include code for blocks and the generation files etc.

 

Then we can help you figure out where your problem is located so you can fix it.

  Quote

If you guys dont get it.. then well ya.. try harder...

Posted

Hello! Here are all the mod files:

 

 

MainClass:

 

http://pastebin.com/bWYR3W8f

 

Olive:

 

http://pastebin.com/AJ6CQHJp

 

OliveBlock:

 

http://pastebin.com/2reVmetE

 

TutLeaf:

 

http://pastebin.com/cZFc570y

 

TutLog:

 

http://pastebin.com/qFLYJ41x

 

TutSapling:

 

http://pastebin.com/XpmzRZMp

 

TutWorldGen:

 

http://pastebin.com/R8BqFVg9

 

WorldGenTutTree:

 

http://pastebin.com/yc0My0cd

 

 

 

When I solve the error I will change the names of the class files. Thank you :)

 

 

Posted

put this in the load method

GameRegistry.registerWorldGenerator(new TutWorldGen());

and put @Init above the load method. It should look like this

@Init
public void load ()

and get rid of the extra set of {} that comess right after the load method on the same line

Posted

Hello and tank you soooo much :D. My trees generates normaly without errors, but How can I use bonemeal with my custom sapling? I tried to put some bonemeal on but it doesn't work. Finally, using the tutorial from TheGrovesyProject101, How can I put the textures? Sorry but it is my first time creating a custom tree :-[. Thank you :D!!

Posted

You should go check out this page!

It should give you some better understanding of the @Init and @Mod annotations as well as help you get your textures and blocks working.

For information on Textures and Icons as of 1.5.X read AtomicStryker's post about it :)

 

As for Bonemeal to work, I believe that one is quite easy to fix but did you try something from a tutorial which didn't work or did I misunderstand your post? :)

If the tutorial code didn't work for you then share your code for the sappling and whatever you modified to get the bonemeal to work. (like your mainMod file).

 

  Quote

If you guys dont get it.. then well ya.. try harder...

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello all. I'm currently grappling with the updateShape method in a custom class extending Block.  My code currently looks like this: The conditionals in CheckState are there to switch blockstate properties, which is working fine, as it functions correctly every time in getStateForPlacement.  The problem I'm running into is that when I update a state, the blocks seem to call CheckState with the position of the block which was changed updated last.  If I build a wall I can see the same change propagate across. My question thus is this: is updateShape sending its return to the neighbouring block?  Is each block not independently executing the updateShape method, thus inserting its own current position?  The first statement appears to be true, and the second false (each block is not independently executing the method). I have tried to fix this by saving the block's own position to a variable myPos at inception, and then feeding this in as CheckState(myPos) but this causes a worse outcome, where all blocks take the update of the first modified block, rather than just their neighbour.  This raises more questions than it answers, obviously: how is a different instance's variable propagating here?  I also tried changing it so that CheckState did not take a BlockPos, but had myPos built into the body - same problem. I have previously looked at neighbourUpdate and onNeighbourUpdate, but could not find a way to get this to work at all.  One post on here about updatePostPlacement and other methods has proven itself long superceded.  All other sources on the net seem to be out of date. Many thanks in advance for any help you might offer me, it's been several days now of trying to get this work and several weeks of generally trying to get round this roadblock.  - Sandermall
    • sorry, I might be stupid, but how do I open it? because the only options I have are too X out, copy it, which doesn't work and send crash report, which doesn't show it to me, also, sorry for taking so long.
    • Can you reproduce this with version 55.0.21? A whole lot of plant placement issues were just fixed in this PR.
    • Necro'ing that thread to ask if you found a solution ? I'm encountering the same crash on loading the world. I created the world in Creative to test my MP, went into survival to test combat, died, crashed on respawn and since then crash on loading the world. Deactivating Oculus isn't fixing it either, and I don't have Optifine (Twilight forest is incompatible)
  • Topics

×
×
  • Create New...

Important Information

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