Jump to content

[1.7.10] Creating a ship, boat like (Entity render?)


ciroreed

Recommended Posts

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.

 

iVj1I5k.png

 

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!

Link to comment
Share on other sites

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.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

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.