Everything posted by Luis_ST
-
problems when i create a custom Totem of Undying.
Why to the server, the effects of the Totem are client side only, you need to send a (custom) Packet from server to client. This can be done as follows: <your simple channel>.send(PacketDistributor.PLAYER.with(() -> <the server player>), <your custom packet>);
-
Pls help with gui
- Pls help with gui
Are you sure you know basic java, since the "Menu method" is the constructor. The Component is the title of the Screen you can use Component#empty for testing.- Pls help with gui
Please post the actual error message you get and please avoid posting images of errors and code, use the Forum code feature or a paste side instead.- problems when i create a custom Totem of Undying.
You should take a look at this FCW page, especially into this entry.- Pls help with gui
That should work yes. This will now blit a texture at screen pos 0/2 (x/y) with size 192/192 (w/h) with texture offset 0/0 (x/y).- Pls help with gui
blit is a method in the Screen class you need to call it after setting up the RenderSystem. If you don't know how to call a method you need to learn basic java before modding minecraft.- problems when i create a custom Totem of Undying.
Vanilla handles the Totem of Undying in LivingEntity#checkTotemDeathProtection. The particles and the totem overlay are handled via ServerLevel#broadcastEntityEvent with event id 35. Note this will call the vanilla logic of the Totem on the client in ClientPacketListener#handleEntityEvent. I you wish to have a custom behavior you need to send a custom Packet to the client which handle this for you.- Pls help with gui
You need to blit the texture to the screen via #blit.- World edit won't start
You can use https://gist.github.com/ or similar paste websites.- Pls help with gui
Where did you call it please show more context?- World edit won't start
If you using CurseForge you need to enable the debug.log in the settings. I guess this is is a issue with CurseForge- Pls help with gui
What did you mean by "try to call the screen"?- World edit won't start
Please post debug.log from the logs folder. What did you mean by "in Forge", Forge is not a File Explorer?- [1.19.2] Event that ticks during block mining by player
PlayerTickEvent would be the better option, check there if TickEvent#side is LogicalSide#SERVER. Also note that is fired each tick twice so make sure you check TickEvent#phase against Phase#START or Phase#END.- Chunk loader give an exit code 1
This error is often an indication that the max fps are set to 0, edit the options.txt file in your game directory and change the maxFps value.- [1.19.2] Event that ticks during block mining by player
Show what you have tried.- Pls help create gui [1.19.2]
Which version did you use since this is not 1.19.2 code?- [1.19.2] Event that ticks during block mining by player
I digged a bit into the vanilla code and i found MultiPlayerGameMode#destroyTicks (requires an AT). The only problem is this is client only, if you subscribe to ClientTickEvent in a client only EventHandler class you can access to the MultiPlayerGameMode instance via Minecraft#gameMode. If you use destroyTicks % 20 == 0 you can call the code each second, inside there you send a custom Packet to the server which will damage the Player on server. As I said before, this is unfortunately client only, which means it can easily be modified by other Mods. For this reason it will be difficult to verify this on the server, in this case you might damage the Player even though it doesn't mine a Block.- [1.18.2] Display message above hotbar
Player#displayClientMessage Note in your case the second argument must be true- [1.19.2] Event that ticks during block mining by player
Maybe BlockEvent.BreakEvent it is fired when the player has mined the Block, but has not been removed from the World yet (after the Event). If you create an EventHandler with EventPriority#LOWEST, you can make sure you are one of the last EventHandlers. Then you can get the break speed of the given BlockState and you can calculate the start time.- Pls help create gui [1.19.2]
- Instant crash when dying to a mob on a modded Forge 1.18.2 server.
Unfortunately there a lot of Mods which could cause the crash. The first thing you could try is to remove all magic performance Mods (like Rubidium, etc.) If the error remains please post debug.log from the logs folder. If you using CurseForge you need to enable the debug.log in the settings.- Forge keeps not wanting to load into my server and I cannot for the life of me figure out why.
This is still not the debug.log it's debug-1.log, please post a screenshot of your logs folder.- Pls help create gui [1.19.2]
There are a lot of changes in the vanilla and Forge code, if you have code from a older version you can throw it away. What did you already create and where did you need help? And for me, if you're talking about Gui's do you mean a Contains with Slots for Items or only a Screen (client side only) with Buttons etc.? - Pls help with gui
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.