Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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!

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.

  • Author

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!

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.