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.

Siphorus

Members
  • Joined

  • Last visited

Everything posted by Siphorus

  1. Hi, I'm having some trouble playing vanilla sounds in my client. I'm trying to play them at the players location when an event is fired using this code: Minecraft.getMinecraft().theWorld.playSoundEffect(event.pos.getX(), event.pos.getY(), event.pos.getZ(), "thunder" , 1.0f, 1.0f); However, my sound event isn't firing with the thunderclap sound. Any help appreciated, thanks!
  2. Hi, I've been having a bit of difficulty deciding the best way to track player movement or chunk's being rendered (the chunk render event doesn't work due to my mod needed 16x256x16 drawn first). But I'm looking to tell if the player has moved to a new chunk, or a new chunk is about to appear in the Player's render distance, and then updating these new chunks with my methods, thanks. I do not want to tie this to the ChunkLoad event, or update based on number of chunks loaded. Updating O(16x1(I can cut the Y axis to O(1))x16xNumber of Chunks Loaded) is too slow for my tastes even on multiple threads. Any feedback/comments/questions appreciated, thanks!
  3. So a bit of progress and non progress. I can now raise the water and make it act dynamically, however the engine doesn't do this for me. I do it in my own code. world.setBlockState(pos, BlockDynamicLiquid.getFlowingBlock(Material.water).getStateFromMeta(0x1), 3); I've tried marking the block for update, and a couple of other things, but it still seems to just hover in the air and not fill in the gaps. At this point I'm thinking of doing it in my own code, but any suggestions would be appreciated.
  4. I like that idea, a lot, its a little late tonight, so I'll play around with that tomorrow and see how that goes. Thanks!
  5. Hi! I recently got into minecraft modding and I'm having a bit of trouble finding the right function to make the blocks behave as they normally do in the vanilla game. Basically I spawn the water block, however it will just sit there upon spawning. I want it to flow as a normal water block would (Similar to a water bucket when its clicked on a block). Here's my current code: BlockPos pos = new BlockPos((myChunk.xPosition * 16) + x + 1, y + 2, (myChunk.zPosition * 16) + z); //Set block to current position and set it to flow. //State 8 is flowing water, 9 is water. //TODO: Test differences between state 8 and 9. world.setBlockState(pos, BlockLiquid.getFlowingBlock(Material.water).getDefaultState()); Right now the code obviously isn't correct. I was experimenting with a few different changes. The ones I stumbled across mentioned setBlockMetadataWithNotify, however that seems to be deprecated with IBlockStates, however I'm not sure what state to change it to to make it flow. I've also tried notify however I'm probably using it wrong. If there's any function to say "Hey world/chunk, you need to update this block according to vanilla water properties", that would be great. Any advice/tips/response would be appreciated. -Thanks.

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.