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.

Alpvax

Members
  • Joined

  • Last visited

  1. Use the server IP address / domain name and port.
  2. Alpvax replied to Zacomat's topic in Modder Support
    You need to register the ENTITY_TYPES deferred register to the mod bus.
  3. You definitely need to be doing this on the server, not the client. AFAIK there is no oxygen used event, so you will have to use a tick event. I would suggest using a capability to store the previous air level, and comparing it each tick. Looking at LivingEntity#increaseAirSupply and LivingEntity#decreaseAirSupply you can see exactly how the air supply is replenished, the actual replenishing or losing is done in LivingEntity#baseTick. Entity#setAirSupply is public, so you can set that to whatever you wish in order to update the vanilla bubbles rendering. Remember to check for the maxAirSupply, and if applicable the enchantments/effects on the player.
  4. What are you trying to achieve?
  5. It is. The code provided will crash on dedicated servers, and only check the host keybindings in a LAN world. It should not be used.
  6. You can't unless you manually send them from the client. Why do you want to do this? If you want to trigger something on the server when a button is pressed, you need to send a packet from the client when the key is pressed
  7. I imagine most mods (or vanilla with the map item) keep a cached image or structure of the visible blocks and update it when the chunk is loaded/saved.
  8. Then you are only setting players pose on the client. The server has no idea that the player should be swimming, so there is nothing telling the other players that this player should be swimming.
  9. Classes in the client package don't exist on the server. Are those methods in the same class? Any code that interacts with client only code should be in a seperate class. Minecraft#player is an instance of LocalPlayer, so the game tries to load that class in order to cast it. Please provide a complete stacktrace and git repo.
  10. Only register the event handler one way, not both. IntelliJ thinks the functions aren't called because the code that calls them is not normal code. You can safely ignore the warnings, as long as the methods are being called in-game (which you could check by setting a breakpoint and running debug).
  11. When the player doesn't need to be crawling you need to set the forced pose back to null
  12. C is a generic parameter. You need to pass in an instance of C, which will be a subclass of Container which supports the RecipeType. With the Generic parameters `<C extends Container, T extends Recipe<C>>`: if you look at the type of RecipeType.CRAFTING, you find it is a RecipeType<CraftingRecipe>, meaning the generic T is `CraftingRecipe`, which extends Recipe<CraftingContainer>, so your C type is CraftingContainer. So you need to provide an instance of CraftingContainer to match the items and get an output.
  13. Minecraft code is obfuscated. It sounds like you are either trying to run non-obfuscated code, or trying to run client-only code on the server. Please provide the full crash log, and ideally your source code in a git repository
  14. You need to make your own capability, and you can give it whatever methods you want.

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.