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

  • Author

Is everything okay with this method? Here is the error:

 

Reveal hidden contents

 

 

  • Replies 60
  • Views 23.9k
  • Created
  • Last Reply

Top Posters In This Topic

  Quote
java.lang.NoSuchMethodException: itsamysterious.mods.reallifemod.core.vehicles.EntityVehicle.<init>(net.minecraft.world.World)

 

Your entity class must have a constructor that takes a single

World

argument.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author

Okay - ill try that, but i have to apply a file to the entity so it knows its values and the renderer know what to render. will this make any problems?

  On 9/9/2015 at 5:26 PM, ItsAMysteriousYT said:

Okay - ill try that, but i have to apply a file to the entity so it knows its values and the renderer know what to render. will this make any problems?

 

If you need any information on the client side, you'll need to send it from the server in some way. Depending on the nature of the information, you may want to use the

DataWatcher

or implement

IEntityAdditionalSpawnData

.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author
  On 9/9/2015 at 5:34 PM, Choonster said:

  Quote

Okay - ill try that, but i have to apply a file to the entity so it knows its values and the renderer know what to render. will this make any problems?

 

If you need any information on the client side, you'll need to send it from the server in some way. Depending on the nature of the information, you may want to use the

DataWatcher

or implement

IEntityAdditionalSpawnData

.

 

Okay, how do i use IAdditionalSpawnData?

  On 9/9/2015 at 5:36 PM, ItsAMysteriousYT said:

Okay, how do i use IAdditionalSpawnData?

 

Implement it in your

Entity

class and do what the doc comment for each method says: write your data to the buffer on the server and then read it back on the client.

 

FML will call the methods for you, you just need to implement them.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author

But i hold all the values in one Class - the VehicleFile. This class generates for every txtfile in a custom folder. And i get the values from that class in the renderer and in the entity. How can i do this properly?

EDIT:

Can i use the writeSpawnData method from the constructor, in that bytebuffer an id that is helt in the VehicleFile. And then i could set the file from a method that gets the file from the global list of vehicle files?

  On 9/9/2015 at 5:43 PM, ItsAMysteriousYT said:

But i hold all the values in one Class - the VehicleFile. This class generates for every txtfile in a custom folder. And i get the values from that class in the renderer and in the entity. How can i do this properly?

 

Break the class down into its primitive components (strings, booleans and numbers) and write those to the buffer.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author
  On 9/9/2015 at 5:52 PM, Choonster said:

  Quote

But i hold all the values in one Class - the VehicleFile. This class generates for every txtfile in a custom folder. And i get the values from that class in the renderer and in the entity. How can i do this properly?

 

Break the class down into its primitive components (strings, booleans and numbers) and write those to the buffer.

 

Can i use the writeSpawnData method from the constructor, in that bytebuffer an id that is helt in the VehicleFile. And then i could set the file from a method that gets the file from the global list of vehicle files?

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.