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.

Leronus

Members
  • Joined

  • Last visited

Everything posted by Leronus

  1. Yeah that was my old model, I have since committed and pushed the new models, where new problems arise
  2. I have updated the json models. The blocking is now registering properly in third person mode, however when just holding the shield it is still slightly rotated. It also appears to be rendering the blocking shield permanently in first person mode. Even when not actually blocking. Any ideas what might be the cause?
  3. oh shit okay thanks I'll take a look at that
  4. Yeah it must be something in my ModelHandler.java but I'm not sure what
  5. I am? ShieldTileEntityRenderer extends ItemStackTileEntityRenderer
  6. Your question was and I quote "did you looked at vanilla?" This can be interpreted in many ways, but I'm guessing that you meant "did you look at the vanilla source code for the shield?" If that is in fact what you meant, I answered with "yes I did." I believe that suffices as an answer to your question but please correct me if I'm wrong. In conclusion, I still don't see how a single annotation in a class used for saving the ResourceLocation of my shield textures impacts the way the model is rendered when blocking with the shield...
  7. I did, removing it doesn't solve my issue though
  8. Using ShieldBaseModel from vanilla, I have added a copper shield with the exact same model as the vanilla item. It renders properly when holding it, but it doesn't properly go up when blocking with the shield. It's also slightly rotated when I look at the player in third person mode. I can't figure out where the mistake lies, any help would be greatly appreciated. I am modding with Forge 36.2.6 for Minecraft 1.16.5 GitRepo: https://github.com/Leronus/mOres Classes used: src/main/java/mod/mores/client/entity/model/ModelHandler.java src/main/java/mod/mores/client/entity/render/ShieldTileEntityRenderer.java src/main/java/mod/mores/client/entity/ShieldTextures.java src/main/java/mod/mores/init/ItemInit.java src/main/java/mod/mores/objects/ItemShield.java https://imgshare.io/image/pFTDBO https://imgshare.io/image/pFTtc9
  9. I'm trying to add an autosmelt function to the ruby pickaxe. I've tried looking at how other mods did it and I thought I've implemented it correctly but it doesn't seem to work... I'm guessing the LootModifier class isn't being used correctly but I wouldn't know what to do to fix this. AutoSmeltHandler.java: https://github.com/Leronus/mOres/blob/1.16.5/src/main/java/mod/mores/helper/AutoSmeltHandler.java ItemPickaxe.java: https://github.com/Leronus/mOres/blob/1.16.5/src/main/java/mod/mores/objects/ItemPickaxe.java MoresLootModifiers.java: https://github.com/Leronus/mOres/blob/1.16.5/src/main/java/mod/mores/helper/MoresLootModifiers.java Thanks in advance for any tips!
  10. I've created a new Duck entity which is supposed to function exactly the same as a chicken, with some minor changes (sound & dropped items). However, it keeps flapping its wings, even when it's on the ground. I want this to only happen when it is in the air. How do fix this? https://github.com/Leronus/mOres/blob/1.16.5/src/main/java/mod/mores/entity/DuckEntity.java
  11. I still have one issue; When I remove the catalyst or the fuel, the TileEntity will remain in its LIT state. How do I solve this? Scratch that, it seems to work actually.
  12. Thanks a lot for explaining it this way! I've updated the code and everything works like a charm now.
  13. I don't understand, how do I use RecipeWrapper on the actual IItemHandler and how do I fix these broken checks?
  14. Thanks, I've updated the recipes accordingly. Still the recipes do not seem to work. Any idea what I'm doing wrong?
  15. I'm now getting this JSON Syntax error [14:35:52] [Render thread/ERROR] [minecraft/RecipeManager]: Parsing error loading recipe mores:alloy_furnace/steel_ingot com.google.gson.JsonSyntaxException: Missing output, expected to find a JsonObject at net.minecraft.util.JSONUtils.getAsJsonObject(JSONUtils.java:203) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading} at mod.mores.recipe.AlloyFurnaceRecipe$AlloyRecipeSerializer.fromJson(AlloyFurnaceRecipe.java:203) ~[main/:?] {re:classloading} at mod.mores.recipe.AlloyFurnaceRecipe$AlloyRecipeSerializer.fromJson(AlloyFurnaceRecipe.java:196) ~[main/:?] {re:classloading} at net.minecraft.item.crafting.RecipeManager.fromJson(RecipeManager.java:141) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading} at net.minecraft.item.crafting.RecipeManager.apply(RecipeManager.java:61) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading} at net.minecraft.item.crafting.RecipeManager.apply(RecipeManager.java:38) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading} at net.minecraft.client.resources.ReloadListener.lambda$reload$1(ReloadListener.java:14) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading} at java.util.concurrent.CompletableFuture$UniAccept.tryFire$$$capture(CompletableFuture.java:714) ~[?:?] {} at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java) ~[?:?] {} at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478) ~[?:?] {} at net.minecraft.resources.AsyncReloader.lambda$null$3(AsyncReloader.java:66) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading} at net.minecraft.util.concurrent.ThreadTaskExecutor.doRunTask(ThreadTaskExecutor.java:136) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.util.concurrent.RecursiveEventLoop.doRunTask(RecursiveEventLoop.java:22) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading} at net.minecraft.util.concurrent.ThreadTaskExecutor.pollTask(ThreadTaskExecutor.java:109) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.util.concurrent.ThreadTaskExecutor.managedBlock(ThreadTaskExecutor.java:119) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.client.Minecraft.makeServerStem(Minecraft.java:1863) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.loadWorld(Minecraft.java:1712) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.loadLevel(Minecraft.java:1681) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screen.WorldSelectionList$Entry.loadWorld(WorldSelectionList.java:364) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screen.WorldSelectionList$Entry.joinWorld(WorldSelectionList.java:273) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screen.WorldSelectionList$Entry.mouseClicked(WorldSelectionList.java:225) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.widget.list.AbstractList.mouseClicked(AbstractList.java:309) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.INestedGuiEventHandler.mouseClicked(INestedGuiEventHandler.java:28) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.MouseHelper.lambda$onPress$0(MouseHelper.java:87) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screen.Screen.wrapScreenError(Screen.java:427) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.MouseHelper.onPress(MouseHelper.java:85) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.MouseHelper.lambda$null$4(MouseHelper.java:175) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.util.concurrent.ThreadTaskExecutor.execute(ThreadTaskExecutor.java:86) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.client.MouseHelper.lambda$setup$5(MouseHelper.java:174) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36) ~[lwjgl-glfw-3.2.2.jar:build 10] {} at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.2.2.jar:build 10] {} at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3174) ~[lwjgl-glfw-3.2.2.jar:build 10] {} at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(RenderSystem.java:112) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runTick(Minecraft.java:999) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:607) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] {} at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {} at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {} Why am I getting this error?
  16. Aight, my bad https://github.com/Leronus/mOres/tree/1.16.5
  17. The recipes are located in Mores\mOres_1.16.5\src\main\resources\data\mores\recipes\alloy_furnace Example of a recipe I'm using (bronze_ingot.json): { "conditions": [ { "modid": "mores", "type": "forge:mod_loaded" } ], "type": "mores:alloying", "process_time": 300, "ingredients": [ { "item": "mores:copper_ingot" }, { "item": "mores:tin_ingot" }, { "item": "minecraft:bone_meal" } ], "result": { "item": "mores:bronze_ingot", "count": 1 } }
  18. RecipeTypeInit: package mod.mores.init; import mod.mores.recipe.AlloyFurnaceRecipe; import mod.mores.recipe.IAlloyFurnaceRecipe; import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipeSerializer; import net.minecraft.item.crafting.IRecipeType; import net.minecraft.util.registry.Registry; public class RecipeTypeInit { public static final IRecipeType<IAlloyFurnaceRecipe> ALLOY_TYPE = new RecipeType<>(); public static final IRecipeSerializer<AlloyFurnaceRecipe> ALLOY_SERIALIZER = new AlloyFurnaceRecipe.AlloyRecipeSerializer(); private static class RecipeType<T extends IRecipe<?>> implements IRecipeType<T> { @Override public String toString() { return Registry.RECIPE_TYPE.getKey(this).toString(); } } // end class RecipeType } // end class ModRecipeTypes DataGenerators: @EventBusSubscriber(modid = Mores.MOD_ID, bus = EventBusSubscriber.Bus.MOD) public class DataGenerators { /** * GatherDataEvent handler. * * @param event the GatherDataEvent. */ @SubscribeEvent public static void gatherData(GatherDataEvent event) { DataGenerator gen = event.getGenerator(); if (event.includeServer()) { gen.addProvider(new AlloyFurnaceRecipes(gen)); } } } Main mod class: package mod.mores; import mod.mores.harvestlevel.HarvestCheck; import mod.mores.init.BlockInit; import mod.mores.init.ContainerInit; import mod.mores.init.ItemInit; import mod.mores.init.TileEntityTypeInit; import mod.mores.world.OreGeneration; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.EventPriority; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.InterModComms; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.*; import net.minecraftforge.fml.event.server.FMLServerStartingEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import java.util.stream.Collectors; /** * Main class that loads mOres * @author Leronus */ // The value here should match an entry in the META-INF/mods.toml file @Mod("mores") public class Mores { // Directly reference a log4j logger. public static final Logger LOGGER = LogManager.getLogger(); public static final String MOD_ID = "mores"; public Mores() { IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); // Register the setup method for modloading bus.addListener(this::setup); // Register the enqueueIMC method for modloading bus.addListener(this::enqueueIMC); // Register the processIMC method for modloading bus.addListener(this::processIMC); // Register the doClientStuff method for modloading bus.addListener(this::doClientStuff); BlockInit.BLOCKS.register(bus); ItemInit.ITEMS.register(bus); ContainerInit.CONTAINER_TYPES.register(bus); TileEntityTypeInit.TILE_ENTITY_TYPES.register(bus); MinecraftForge.EVENT_BUS.register(HarvestCheck.class); // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); // Start the ore generation MinecraftForge.EVENT_BUS.addListener(EventPriority.HIGH, OreGeneration::generateOres); } private void setup(final FMLCommonSetupEvent event) { // some preinit code // LOGGER.info("PreInit"); // LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); } private void doClientStuff(final FMLClientSetupEvent event) { // do something that can only be done on the client LOGGER.info("Got game settings {}", event.getMinecraftSupplier().get().options); } private void enqueueIMC(final InterModEnqueueEvent event) { // some example code to dispatch IMC to another mod InterModComms.sendTo("mores", "modloaded", () -> { LOGGER.info("Intermod queue event"); return "Mores ready to talk";}); } private void processIMC(final InterModProcessEvent event) { // some example code to receive and process InterModComms from other mods LOGGER.info("Got IMC {}", event.getIMCStream(). map(m->m.getMessageSupplier().get()). collect(Collectors.toList())); } // You can use SubscribeEvent and let the Event Bus discover methods to call @SubscribeEvent public void onServerStarting(FMLServerStartingEvent event) { // do something when the server starts LOGGER.info("Server has started"); } }
  19. I have a custom tile entity named the Alloy Furnace with 3 input items and 1 output item. For some reason, my recipes aren't working, showing up in the terminal as invalid/unsupported Recipe type. I believe I created the recipe type correctly, but I may be very wrong about that. Please tell me what I've missed, because I can't figure it out. https://github.com/Leronus/mOres/tree/1.16.5
  20. @Mod.EventBusSubscriber(modid = "mores", bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class HarvestCheck { @SubscribeEvent public static void doPlayerHarvestCheck(PlayerEvent.HarvestCheck event) { boolean success = false; if (event.getPlayer().getMainHandItem().getItem() == Items.DIAMOND_PICKAXE){ if (event.getTargetBlock().getHarvestLevel() <= 5){ success = true; } } event.setCanHarvest(success); MinecraftForge.EVENT_BUS.post(event); } } This time the game crash as I tried to harvest a block. Not sure what I broke this time. Error log: Time: 01/07/2021, 20:39 Description: Unexpected error java.lang.IllegalArgumentException: Attempted to set event phase to NORMAL when already NORMAL at net.minecraftforge.eventbus.api.Event.setPhase(Event.java:173) ~[eventbus-4.0.0.jar:?] {} at net.minecraftforge.eventbus.api.EventPriority.invoke(EventPriority.java:48) ~[eventbus-4.0.0.jar:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?] {} at mod.mores.harvestlevel.HarvestCheck.doPlayerHarvestCheck(HarvestCheck.java:25) ~[main/:?] {re:classloading} at net.minecraftforge.eventbus.ASMEventHandler_15_HarvestCheck_doPlayerHarvestCheck_HarvestCheck.invoke(.dynamic) ~[?:?] {} at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?] {} at net.minecraftforge.event.ForgeEventFactory.doPlayerHarvestCheck(ForgeEventFactory.java:176) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading} at net.minecraftforge.common.ForgeHooks.canHarvestBlock(ForgeHooks.java:220) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading} at net.minecraft.block.AbstractBlock.getDestroyProgress(AbstractBlock.java:300) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading} at net.minecraft.block.AbstractBlock$AbstractBlockState.getDestroyProgress(AbstractBlock.java:503) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading} at net.minecraft.client.multiplayer.PlayerController.startDestroyBlock(PlayerController.java:152) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.startAttack(Minecraft.java:1311) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.handleKeybinds(Minecraft.java:1641) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.tick(Minecraft.java:1460) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runTick(Minecraft.java:953) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:607) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] {} at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {} at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at net.minecraftforge.eventbus.api.Event.setPhase(Event.java:173) ~[eventbus-4.0.0.jar:?] {} at net.minecraftforge.eventbus.api.EventPriority.invoke(EventPriority.java:48) ~[eventbus-4.0.0.jar:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?] {} at mod.mores.harvestlevel.HarvestCheck.doPlayerHarvestCheck(HarvestCheck.java:25) ~[main/:?] {re:classloading} at net.minecraftforge.eventbus.ASMEventHandler_15_HarvestCheck_doPlayerHarvestCheck_HarvestCheck.invoke(.dynamic) ~[?:?] {} at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?] {} at net.minecraftforge.event.ForgeEventFactory.doPlayerHarvestCheck(ForgeEventFactory.java:176) ~[forge:?] {re:classloading} at net.minecraftforge.common.ForgeHooks.canHarvestBlock(ForgeHooks.java:220) ~[forge:?] {re:classloading} at net.minecraft.block.AbstractBlock.getDestroyProgress(AbstractBlock.java:300) ~[forge:?] {re:classloading} at net.minecraft.block.AbstractBlock$AbstractBlockState.getDestroyProgress(AbstractBlock.java:503) ~[forge:?] {re:classloading} at net.minecraft.client.multiplayer.PlayerController.startDestroyBlock(PlayerController.java:152) ~[forge:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.startAttack(Minecraft.java:1311) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.handleKeybinds(Minecraft.java:1641) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} -- Affected level -- Details: All players: 1 total; [ClientPlayerEntity['Dev'/137, l='ClientLevel', x=-235.98, y=67.00, z=-281.58]] Chunk stats: Client Chunk Cache: 1369, 440 Level dimension: minecraft:overworld Level spawn location: World: (-160,75,-128), Chunk: (at 0,4,0 in -10,-8; contains blocks -160,0,-128 to -145,255,-113), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1) Level time: 6875 game time, 6875 day time Server brand: forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.world.ClientWorld.fillReportDetails(ClientWorld.java:447) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.fillReport(Minecraft.java:2029) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:628) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] {} at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {} at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.jar:?] {} -- System Details -- Details: Minecraft Version: 1.16.5 Minecraft Version ID: 1.16.5 Operating System: Windows 10 (amd64) version 10.0 Java Version: 13.0.2, AdoptOpenJDK Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), AdoptOpenJDK Memory: 277255168 bytes (264 MB) / 1300234240 bytes (1240 MB) up to 8571060224 bytes (8174 MB) CPUs: 16 JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump ModLauncher: 8.0.9+86+master.3cf110c ModLauncher launch target: fmluserdevclient ModLauncher naming: mcp ModLauncher services: /mixin-0.8.2.jar mixin PLUGINSERVICE /eventbus-4.0.0.jar eventbus PLUGINSERVICE /forge-1.16.5-36.1.0_mapped_official_1.16.5-launcher.jar object_holder_definalize PLUGINSERVICE /forge-1.16.5-36.1.0_mapped_official_1.16.5-launcher.jar runtime_enum_extender PLUGINSERVICE /forge-1.16.5-36.1.0_mapped_official_1.16.5-launcher.jar capability_inject_definalize PLUGINSERVICE /accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE /forge-1.16.5-36.1.0_mapped_official_1.16.5-launcher.jar runtimedistcleaner PLUGINSERVICE /mixin-0.8.2.jar mixin TRANSFORMATIONSERVICE /forge-1.16.5-36.1.0_mapped_official_1.16.5-launcher.jar fml TRANSFORMATIONSERVICE FML: 36.1 Forge: net.minecraftforge:36.1.0 FML Language Providers: [email protected] minecraft@1 Mod List: client-extra.jar |Minecraft |minecraft |1.16.5 |DONE |a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f forge-1.16.5-36.1.0_mapped_official_1.16.5-recomp.|Forge |forge |36.1.0 |DONE |NOSIGNATURE main |mOres |mores |NONE |DONE |NOSIGNATURE Crash Report UUID: 56202530-8ae4-4c70-a4c1-e9133f437ca0 Launched Version: MOD_DEV Backend library: LWJGL version 3.2.2 build 10 Backend API: AMD Radeon RX 5600 XT GL version 4.6.14831 Compatibility Profile Context 21.5.2 27.20.21003.8013, ATI Technologies Inc. GL Caps: Using framebuffer using OpenGL 3.0 Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'forge' Type: Client (map_client.txt) Graphics mode: fast Resource Packs: Current Language: English (US) CPU: 16x AMD Ryzen 7 3800X 8-Core Processor [20:39:43] [Render thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:realStdoutPrintln:123]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Leron\Desktop\Mores\mOres_1.16.5\run\.\crash-reports\crash-2021-07-01_20.39.43-client.txt AL lib: (EE) alc_cleanup: 1 device not closed Process finished with exit code -1
  21. I beg for an example, because in the documentation there's only code for creating a new event, not modifying an existing one...
  22. I realise I need to pass only one argument in a subscribeEvent, but then how on earth am I supposed to get the blockstate and the playerentity?
  23. @Mod.EventBusSubscriber(modid = "mores", bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class HarvestCheck { @SubscribeEvent public static boolean doPlayerHarvestCheck(PlayerEntity player, BlockState state, boolean success) { PlayerEvent.HarvestCheck event = new PlayerEvent.HarvestCheck(player, state, success); if (player.getMainHandItem().getItem() == Items.DIAMOND_PICKAXE){ if (state.getHarvestLevel() <= 5){ success = true; } } event.setCanHarvest(success); MinecraftForge.EVENT_BUS.post(event); return event.canHarvest(); } } Now it's crashing. I've read the docs 10 times over and I still don't understand. What am I doing wrong?

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.