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.

warjort

Members
  • Joined

  • Last visited

Everything posted by warjort

  1. There are many errors in that log, but the root cause (the first error) looks like a conflict between farmer's delight and betterfences? Check you have the latest version of these mods then contact the mod authors.
  2. Minecraft is not documented. It is closed source software. Common modding tasks are documentated on the wiki: https://forge.gemwire.uk/wiki/Main_Page But don't expect to it to have everything. It mostly concentrates on the parts where you need to do things differently to what vanilla does. If it is not documented on the wiki, you should look at how something similar in the vanilla codebase works. Or find another mod doing a similar thing to learn from.
  3. ServerTickEvent - it is fired twice per tick, see the Phase. In 1.18 you need to use ServerLifecycleHooks.getCurrentServer() to get a reference to the server.
  4. Why aren't you just overriding Item.useOn() in your item? e.g. see DebugStickItem.useOn() The answer to your direct question is pretty trivial @Mod.EventBusSubscriber(modid = MODID) public class ModEvents { @SubscribeEvent public static void rightClickBlock(RightClickBlock event) { if (event.getItemStack().is(MY_ITEM.get())) { BlockState state = event.getLevel().getBlockState(event.getPos()); Block block = state.getBlock(); // etc. } } }
  5. I think you will find most intelligent people don't click on urls to sites they can't identify.
  6. You need to override the render() method. That is what does the drawing. You don't do rendering in the screen initialisation. Look at the vanilla code and try to understand how it works. e.g. yours sounds similar to the ErrorScreen?.
  7. This isn't a forge question. This is a "can you write my mod for me" question.
  8. int centerX = this.width / 2; int centerY = this.height / 2; Where "this" is the screen. You need to learn how to do your own research instead of asking trivial questions like this and wasting people's time. There must be a hundred examples of centering and left/right adjusting in the vanilla codebase.
  9. [23:37:47] [Render thread/ERROR] [ne.mi.fm.ja.FMLModContainer/]: Exception caught during firing event: null Index: 1 Listeners: 0: NORMAL 1: net.minecraftforge.eventbus.EventBus$$Lambda$4701/0x0000000801837620@2954c429 java.lang.ExceptionInInitializerError at TRANSFORMER/[email protected]/tfar.metalbarrels.init.ModItems.<clinit>(ModItems.java:40) at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method) at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1160) at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(MethodHandleAccessorFactory.java:300) at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newFieldAccessor(MethodHandleAccessorFactory.java:140) at java.base/jdk.internal.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:176) at java.base/java.lang.reflect.Field.acquireFieldAccessor(Field.java:1169) at java.base/java.lang.reflect.Field.getFieldAccessor(Field.java:1148) at java.base/java.lang.reflect.Field.get(Field.java:426) at TRANSFORMER/[email protected]/tfar.metalbarrels.MetalBarrels.superRegister(MetalBarrels.java:61) at TRANSFORMER/[email protected]/tfar.metalbarrels.MetalBarrels.register(MetalBarrels.java:73) -- snip -- Caused by: net.minecraftforge.fml.util.ObfuscationReflectionHelper$UnableToFindMethodException: java.lang.NoSuchMethodException: net.minecraft.world.level.block.entity.ChestBlockEntity.getItems() at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.util.ObfuscationReflectionHelper.findMethod(ObfuscationReflectionHelper.java:151) at TRANSFORMER/[email protected]/tfar.metalbarrels.item.BarrelUpgradeItem.<clinit>(BarrelUpgradeItem.java:48) ... 54 more Caused by: java.lang.NoSuchMethodException: net.minecraft.world.level.block.entity.ChestBlockEntity.getItems() at java.base/java.lang.Class.getDeclaredMethod(Class.java:2707) at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.util.ObfuscationReflectionHelper.findMethod(ObfuscationReflectionHelper.java:145) Issue with the meta barrels mod. Check you have the latest version then contact the mod author.
  10. The jvm arguments are in the installation configurations for the vanilla launcher. Click on installations at the top of the screen, edit the forge installation and click "more options"
  11. If that is the full log it ends with the following without showing an error. There is probably an issue with that file causing a crash? Try deleting it and it should recreate it with default values. If that doesn't fix it, post the launcher_log.txt, maybe the launcher has logged an error.
  12. Look at the method definition in ItemStack. It is not a static method. Then look at BeaconMenu.PaymentSlot.mayPlace() for an example usage.
  13. The error says it can't find that BYG sprout object because it is not registered. You will need to post a link to your logs/debug.log so we can see what the error is causing it not to be registered.
  14. Just use the direct download link. Click "show all versions" on the download page, then hover over the i next to the installer you want. Then buy Lex a coffee for his lost ad revenue. 🙂
  15. There is no Item.is(TagKey<Item>) // does not exist but there is an ItemStack.is(TagKey<Item>) Just remove your getItem() 🙂
  16. Use versions of optifine and forge that are compatible with each other. You can see compatibility on optifine's download page (including preview releases). If you still can't get it to work, either uninstall optifine or talk to the optifine mod authors.
  17. Maybe this will help you understand what your problem is? https://www.partitionwizard.com/partitionmagic/minecraft-server-failed-to-bind-to-port.html
  18. It says the minecraft server is probably already running. Or maybe you have some other service bound on the 25565 port?
  19. It says you need the puzzleslib mod. Please use a file sharing site to share the debug.log in future.
  20. https://forums.minecraftforge.net/topic/117667-my-error-pls-helt/#comment-518124
  21. Optifine is not supported here, this is the forge support forum. You need to ask them. The suggested workaround on that error report is to use forge 43.1.23 or before. Optifine only officially support 43.1.1 You can try other graphic optimisation mods, e.g. rubidium and the like. But the nature of such optimisation mods is that they make invasive changes which tend to conflict with other mods.
  22. There are many ways. For a simple example look at AbstractContainerScreen.renderLabels() used by AbstractContainerScreen.render(). For other examples just search for the usages of Screen.font
  23. Known optifine issue: https://github.com/sp614x/optifine/issues/7127
  24. If that's the way you do it in your constructor. Except I think you mean inventory slot not hotbar slot which will be at 27+2=29
  25. Use java 17, mixin does not support java 19

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.