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.

Sikino

Members
  • Joined

  • Last visited

  1. Sikino changed their profile photo
  2. Sikino replied to Sikino's topic in Modder Support
    I know Java but I'm not the only one in this project and the others don't know and just want to make little mods without spending hours of development. I think that nobody will answer so thanks to all of you and goodbye.
  3. Sikino replied to Sikino's topic in Modder Support
    Yes your right for MCreator but I want to prevent a player to open an inventory of an other mod and we can't do that with MCreator so it generate the code but I modify it.
  4. Sikino posted a topic in Modder Support
    I want to check is the block that the player see is a specific modded block and I don't find answers, can you help me ? This is the code : @Mod.EventBusSubscriber public class CookerCraftingModdedRestrictionsProcedure { @SubscribeEvent public static void onPlayerTick(TickEvent.PlayerTickEvent event) { if (event.phase == TickEvent.Phase.END) { execute(event, event.player.level, event.player); } } public static void execute(LevelAccessor world, Entity entity) { execute(null, world, entity); } private static void execute(@Nullable Event event, LevelAccessor world, Entity entity) { if (entity == null) return; if ((world.getBlockState(new BlockPos( entity.level.clip(new ClipContext(entity.getEyePosition(1f), entity.getEyePosition(1f).add(entity.getViewVector(1f).scale(5)), ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, entity)).getBlockPos().getX(), entity.level.clip(new ClipContext(entity.getEyePosition(1f), entity.getEyePosition(1f).add(entity.getViewVector(1f).scale(5)), ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, entity)).getBlockPos().getY(), entity.level.clip(new ClipContext(entity.getEyePosition(1f), entity.getEyePosition(1f).add(entity.getViewVector(1f).scale(5)), ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, entity)).getBlockPos().getZ()))) .getBlock().getRegistryName().equals(new ResourceLocation("minecraft", "diamond_ore"))) { if (entity instanceof Player _player) _player.closeContainer(); } } } I know it don't work but I don't find anything better. The imports aren't here but the error is not that. I want to prevent players from opening the inventory of a specific modded block (here it is vanilla and it is the diamond block but it will be modified) Hope you can help me.

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.