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

Hello everyone,

 

I'm making a mod which need to save the player's money, so I made a IExtendedEntityProperties which contain the getter and the variable.

Here's my classes:

  - GuiMenu: http://paste.minecraftforge.net/view/a7b5d273

  - EntityCustomPlayer: http://paste.minecraftforge.net/view/451bc4d3

 

And it crashes on GuiMenu:29 (Where i drawString) because of pl is null ...

I dont understand why. I also need a good tutorial about PacketHandling (I found the one on the Forge's wiki but its not enough comprehensible :(

 

well this line

pl = (EntityCustomPlayer)pl2.getExtendedProperties("knux Custom Player");

could possibly return null, are how are you registering the extended properties ?

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

  • Author

Here's the event:

@ForgeSubscribe
public void entityConstructing(EntityConstructing evt)
{
	Entity et = evt.entity;

	if (et instanceof EntityPlayer) 
	{
		et.registerExtendedProperties("JetpackJoycraft Custom Player", new EntityCustomPlayer(et.worldObj));
	}
}

but it do not seems to run ....

oh wait... I didn't registred the event -_-

 

YEY its seems to work :)

Thanks man, sorry for this noob-question :(

Guest
This topic is now closed to further replies.

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.