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.

BliX5

Members
  • Joined

  • Last visited

Everything posted by BliX5

  1. Thanks for the help! I just realized my mistake: for some reason, in the block.json file, if I insert a space between two attributes, it doesn't recognize the second one. I fixed it, and now my block works perfectly
  2. I've searched through videos and websites, as well as the forge docs, but I can't find how to properly add a custom blockstate to my custom-modeled block. I'm trying to change the texture of the block whenever I right click it, but nothing I add in seems to work correctly. I keep getting the correct hitbox, but no model or texture is recognized. What is the proper way to do this for the newest version?
  3. Nevermind, I'm dumb. It's fixed now. Thanks for the help!
  4. I tested it and the code tracks all entities, not just the player. How can I make LivingJumpEvent only track the player?
  5. @Mod.EventBusSubscriber(modid = main.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class ModClientEvents { @SubscribeEvent public static void onJumpNearStone(LivingEvent.LivingJumpEvent event) { LivingEntity player = event.getEntityLiving(); World world = player.getEntityWorld(); BlockPos pos = player.func_233580_cy_(); if (world.getBlockState(pos.add(1, 0, 0)).getBlock() == Blocks.STONE) { main.LOGGER.info(pos.add(1, 0, 0)); } else if (world.getBlockState(pos.add(-1, 0, 0)).getBlock() == Blocks.STONE) { main.LOGGER.info(pos.add(-1, 0, 0)); } else if (world.getBlockState(pos.add(0, 0, 1)).getBlock() == Blocks.STONE) { main.LOGGER.info(pos.add(0, 0, 1)); } else if (world.getBlockState(pos.add(0, 0, -1)).getBlock() == Blocks.STONE) { main.LOGGER.info(pos.add(0, 0, -1)); } } } It's probably very inefficient, but it works (mostly). My only problem is I must've messed up some code with the player, so instead of tracking only the player, it tracks every entity. I noticed this when I kept getting random messages when I wasn't jumping, but turning off mob spawning fixed the issue. Help?
  6. How would I use BlockPos.offset to find a Block value?
  7. New to modding, and I'm trying to make a climbing feature, so if you jump next to a certain block, you'll start climbing. The problem is: I don't know how to identify a block next to a player, only directly under. Any help would be appreciated. Thanks in advance.

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.