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.

Luis_ST

Members
  • Joined

  • Last visited

Everything posted by Luis_ST

  1. overwrite Item#use in your Item class, if you want to summon the LightningBolt only if the Item is used on a Block overwrite Item#useOn, then create there a new LightningBolt and add it via Level#addFreshEntity to the world
  2. this is client side only so world.isRemote returns always true
  3. you never register the BiomeLoadingEvent handler
  4. try to use 1.0F as last parameter in shootFromRotation
  5. show your build.grade file
  6. then subscribe to TickEvent.Player and check if it's on server, then get your Capability and call tick there Note: TickEvents are fired twice you need to check the phase of the Event
  7. it's KeyBind#isDown you need different conditions, but minecraft will mark this KeyBind as a conflict KeyBind which means it colored red in the settings yeah that should be possible, but you don't need a custom KeyBind for that, since you need to cancel the Input of the F key (if your conditions are true) via KeyInputEvent, if you cancel the input just send a custom Packet to the server which do your logic for the Item on server Note: KeyBindings are client side so you need to use the Minecraft class to get the ClientPlayerEntity
  8. about which method you are talking, MyCapabilityInterface#tick? it depends on what the method should do
  9. update forge
  10. what are you talking about?
  11. about which json files do you take
  12. you can get the server via ServerLifecycleHooks.getCurrentServer, if the game is running (there is a World and you are on server) it will never return null also note there is a code feature which you can use to post code here
  13. downgrade your java to a older version of java 8
  14. you could make the fields final and initialize the level field in the constructor, does it work?
  15. if this retruns true the LivingEntity is a PlayerEntity so you can cast the LivingEntity of the Event to a PlayerEntity, if you don't know how to do that -> learn basic Java.
  16. please don't ask for my help in other threads, I read 95% of all threads if i have an answer/solution i will reply, but i will take a look into your thread (again) do not use the Minecraft class when you want to change a server side thing use the LivingEntity of the Event use and instanceof check instead of == to check if the LivingEntity is a PlayerEntity LivingUpdateEvent#getEntityLiving and LivingUpdateEvent#getEntity retrun the same Entity
  17. correct, you can short up the code a bit but this is optional yeah that's basic java, to create a Constructor with a parameter and then to store the Object in Field
  18. show the update code so I can debug this locally I haven't done so much render stuff, I hava basic knowledge, but for your question it's not enough
  19. it should work in LivingUpdateEvent i mean the debug feature of your IDE, or a simple Logger#debug
  20. iirc the Player class override the tick method completely which call the LivingUpdateEvent in LivingEntity, this means he does not call super. But now I'm not sure I will later take a look into it.

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.