ciroreed Posted November 20, 2015 Posted November 20, 2015 Hi all. Im pretty new at minecraft forge as a coder but i know java so far. What i want to do is something weird that isnt in any basic or advanced tutorial. I was thinking about TunnelBore in railcraft which is an entity which we can interact with. https://github.com/CovertJaguar/Railcraft/blob/master/src/main/java/mods/railcraft/client/render/carts/RenderTunnelBore.java But the code isnt descriptive at all. I used Mrscrayfish model creator to do a simple boat model (dont worry about if it looks like a s***), then i exported to json model. What ever. How i can render it in game? to provide more aditional info about the mod: Player can build several ships, corvette, frigate .. These ships must be BUILD as a multiblock structure at water (like railcraft multiblock or other mods do or vanilla mc with iron golem, etc) When the structure match the design an entity (or whatever) must be replace the structure, like railcraft's tunnelbore. Then ... this isnt clear now but, the player can enter and command the ship. While player is inside the ship he cant move it self, only command the ship. But im looking to a solution to leave the command and move inside the ship through a blank dimension which only contains a chamber which represents inside the ship, if the player breaks the chamber, ship will sink! (player will be teleported to the place where the ship was, many wood blocks will be dropped). Many thanks guys! any help is welcome! Quote
Ernio Posted November 20, 2015 Posted November 20, 2015 Currently there are few (outdated?) mods that introduce ships. More currently - theBest108 is developing quite awesome idea of making ships being their own world: http://www.minecraftforge.net/forum/index.php/topic,34903.msg184035.html#msg184035 As to problem: My guess is that you are on 1.8. To track placing blocks you will probably want PlaceEvent and check if there is a match. Then simply spawn new Entity (lookup boats). Entities require Renderer, which should be registered on game startup. If you registered .json model, then you can pull it from registry and render inside Renderer, as to how: MinecraftByExample might be helpful regarding how to work with models at all, but presonally I can't give you direct instructions about Entities, you might want to look at how EntityItem is rendered into world. Quote 1.7.10 is no longer supported by forge, you are on your own.
ciroreed Posted November 20, 2015 Author Posted November 20, 2015 Okay, ill try to PM him. I think my question is kitte advanced for my forge api knowledge. If someone knows how to port .json models to java GL code, any help is welcome! Quote
Recommended Posts
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.