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.

R33D3Y

Members
  • Joined

  • Last visited

  1. R33D3Y changed their profile photo
  2. I've been able to add a CustomBlock and texture it so far; just simple stuff. Upping the game and I want to start getting that block to interact with other items in the world, so I've gone through the docs and found onBlockPlacedBy, and I have this class. package com.example.examplemod; import net.minecraft.core.BlockPos; import net.minecraft.world.*; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; public class CustomBlock extends Block { public CustomBlock() { super(BlockBehaviour.Properties.of()); } @Override public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) { super.onBlockPlacedBy(world, pos, state, placer, stack); } } All the other imports work correctly, and can find BlockPos, BlockState, LivingEntity, ItemStack but I can't find World. I've tried letting Eclipse find it, but it can't. I've searched the docs, and I can see it, but not for anything past 1.16.x This is on 1.20.1, I don't believe it to be an import issue as other Types can be found and the super.onBlockPlacedBy() knows it needs a World type as its first parameter, yet I can't find where onBlockPlacedBy() is implemented in the inheritance tree either... Any help would be great, I can't seem to find any docs for 1.20.1 that are up to date either.

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.