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.

Zanckor

Members
  • Joined

  • Last visited

Everything posted by Zanckor

  1. Eya! I'm trying to do a overlay gui with images (only images, no strings), to do a health bar, like a typical MMORPG overlay gui, but I'm not finding any references on vanilla to do it, so, i would like to know what class to extend, or any vanilla code to check
  2. Oh wait, my bad lmao, try calling your data inside a CloneEvent to assign them again Like docs say: "reading the data from the original entity and assigning it to the new entity" Thats a CapabilityProvider that maybe can help you: https://github.com/MinecraftForge/MinecraftForge/blob/1.18.x/src/main/java/net/minecraftforge/common/capabilities/CapabilityProvider.java And a 1.17 topic with the same question:
  3. *Don't read that, is not about capabilities Ya, you need to use Clone event, so, where you are registrying your data, you need to add an PlayerEventClone and add your data. For example, I've a class called "assignStat.java", here I've a method called "assignStatsOnLoggin" and "assignStatsOnClone", both method have the same code, but "assignStatsOnClone" is PlayerEvent.Clone That's because when you die or teleport all your data is deleted and recreated in a new entity, so, you need to put your data again
  4. Eya! That's my capabilities system: https://github.com/Zanckor/Dragon-Ball-Z/tree/main/src/main/java/com/zanckor/capabilities I think, you can keep Capabilities.class like already is. On IMyCapability, you need to put your values, like: int getNumber(); void setNumer(int NUM); #to set your value to X void addNumber(int value); #to add X to your value On MyCapabilityAttacher.class just put your MODID On MyCapabilityImplementation.class delete my values and put yours I hope that can help you
  5. So, why should i send packets if it works now?
  6. Look, with this code is already working without packets, at least on singleplayer, that should work on multiplayer too? Is regenerating and working with other methods https://ibb.co/B3NXYGx
  7. Okay, so, i should do something like, if(player instanceof ServerPlayer){ RegenCode } and, if(player instanceof Player) { RegenCode }, but when, on server side, Current Ki is full, 0, or whatever i want, send a packet to check if both values are the same, and if not change client value Edit: Okay, i realized that its better just make it server side, and whenever i need to use it, like, before attacking with ki, send a packet to sync it
  8. Wait a second xD, so, i need to put my regen code on server side, and then sync it from server to client, arent? But, I still dont know how to put this code on server side, i mean, if i put it on ServerTickEvent i cant put (Player player = e.getPlayer), so, how server know to which player is this info
  9. So, i need to call this custom packet on ServerTickEvent, but this dont will lag player?
  10. ya, all its working, but is not sending it to server side
  11. Okay, its done, but, when I want to regen my Ki, it still not working cause it is on PlayerTickEvent. I've upload my new code to github Btw, my code is a bit ugly cause I'm just testing
  12. So, how can I make the actual system work in server side?
  13. Oh ya, sorry, now is public
  14. Here again... Well, actually imo I need to create a new packet. I'm creating a KI system (should work like a mana system, just another name), so, I've created an EventHandler to regen my Ki, but it works on client side, is there any other way to regenerate Ki with server side? Or, what I think I should do, create a packet to send my Ki from Client to Server. https://github.com/Zanckor/Dragon-Ball-Z/blob/main/src/main/java/com/zanckor/events/valueStatBars.java
  15. Tnks! It apparently works, but idk why on "Run" appears me some errors (10)
  16. K, its done, i just restarted it, and now it works
  17. ya, i made it https://ibb.co/0Bjh0CL
  18. K, i know what's not working, idk why but is not reading the .cfg
  19. I dont really understand it ๐Ÿ˜…
  20. Eya! I was testing some stuff with my new capabilities, and i recently seen that max health i can put is 1024, there's any way to increase max max health?
  21. Oh fuck ma bad, i did something else
  22. Capabilities.getPlayer(e.getPlayer()) is returning me always "null", so whenever i try to set any value minecraft crashes. Why is returning me "null"?
  23. Where and how I should register it? Failing is that something is wrong/not working
  24. Eya! I'm here again ๐Ÿ˜… I'm trying to create a custom capabilities, I've made caps before on 1.16, but idk how to make them on 1.19 and something is failing. Here's my code: https://github.com/Zanckor/DBZ.git

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.