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.

YusufTheCoder

Members
  • Joined

  • Last visited

Everything posted by YusufTheCoder

  1. Does this also mean i have to create my own version RecipeBookSettings as @Override public void init() { String name = this.name().toLowerCase(java.util.Locale.ROOT).replace("_",""); net.minecraft.stats.RecipeBookSettings.addTagsForType(this, "is" + name + "GuiOpen", "is" + name + "FilteringCraftable"); } needs RecipeBookType
  2. RecipeBookType can not be extended so what should i do instead.
  3. How would I go about create MY_MENU_TYPE
  4. What is the best way to create a crafting table in 1.19. Currently i have this. What should i use instead of use and getMenuProvider /** * @see CraftingTableBlock */ public class OmnitrixCrafter extends Block { public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING; private static final Component CONTAINER_TITLE = Component.translatable("container.omnitrix_crafter"); public OmnitrixCrafter() { super(Properties.of(Material.STONE).strength(2).sound(SoundType.STONE).noCollission()); } @Override public InteractionResult use(BlockState p_52233_, Level p_52234_, BlockPos p_52235_, Player p_52236_, InteractionHand p_52237_, BlockHitResult p_52238_) { if (p_52234_.isClientSide) { return InteractionResult.SUCCESS; } else { p_52236_.openMenu(p_52233_.getMenuProvider(p_52234_, p_52235_)); p_52236_.awardStat(Stats.INTERACT_WITH_CRAFTING_TABLE); return InteractionResult.CONSUME; } } @Override public MenuProvider getMenuProvider(BlockState p_52240_, Level p_52241_, BlockPos p_52242_) { return new SimpleMenuProvider((p_52229_, p_52230_, p_52231_) -> { return new CraftingMenu(p_52229_, p_52230_, ContainerLevelAccess.create(p_52241_, p_52242_)); }, CONTAINER_TITLE); } }
  5. So what do you think i should instead. Is there a way of create a new entity type as in non-static
  6. I keep receiving this error and it points to this public BenTenMod() { final var bus = FMLJavaModLoadingContext.get().getModEventBus(); ItemInit.ITEMS.register(bus); BlockInit.BLOCKS.register(bus); //this line EntityTypesInit.ENTITY_TYPES.register(bus); GeckoLibMod.DISABLE_IN_DEV = false; GeckoLib.initialize(); // bus.addGenericListener(RecipeSerializer.class, RegisterRecipeInit::registerRecipes) MinecraftForge.EVENT_BUS.register(this); LOGGER.info("Armour and Item loaded"); } and the entity type class is public class EntityTypesInit { private EntityTypesInit() { throw new IllegalStateException("Entity gen class"); } public static final DeferredRegister<EntityType<?>> ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, BenTenMod.MOD_ID); private static final Item.Properties spawn_egg_props = new Item.Properties().tab(MainItemGroup.MAIN); private static final EntityType<VilgaxEntity> vilgax = createStandardEntityType("vilgax", VilgaxEntity::new, MobCategory.MONSTER, 1f, 1f); // registering the entities public static final RegistryObject<EntityType<VilgaxEntity>> VILGAX_ENTITY = ENTITY_TYPES.register("vilgax", () -> vilgax); private static final EntityType<CrabEntity> crab = createStandardEntityType("crab", CrabEntity::new, MobCategory.MONSTER, 1.3f, 1.8f); public static final RegistryObject<EntityType<CrabEntity>> CRAB_ENTITY = ENTITY_TYPES.register("crab", () -> crab); private static final EntityType<CrabBoltEntity> crabBolt = createStandardEntityType("crab_bolt", CrabBoltEntity::new, MobCategory.MISC, 0.5F, 0.5F); public static final RegistryObject<EntityType<CrabBoltEntity>> CRAB_BOLT_ENTITY = ENTITY_TYPES.register("crab_bolt", () -> crabBolt); // register spawn eggs public static final RegistryObject<Item> VILGAX_SPAWN_EGG = ItemInit.ITEMS.register( "vilgax_spawn_egg", () -> new ForgeSpawnEggItem(VILGAX_ENTITY, 0xC4AA79, 0x7A5F22, spawn_egg_props)); public static final RegistryObject<Item> CRAB_SPAWN_EGG = ItemInit.ITEMS.register("crab_spawn_egg", () -> new ForgeSpawnEggItem(CRAB_ENTITY, 0xC4AA79, 0x7A5F22, spawn_egg_props)); private static <T extends Entity> EntityType<T> createStandardEntityType(String entity_name, EntityType.EntityFactory<T> factory, MobCategory classification, float width, float height) { return EntityType.Builder.of(factory, classification) .sized(width, height) .build(BenTenMod.MOD_ID + ":" + entity_name); } } The full error is java.lang.Exception: Mod Loading has failed at net.minecraftforge.logging.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:55) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23178%23185!/:?] {re:classloading} at net.minecraftforge.client.loading.ClientModLoader.completeModLoading(ClientModLoader.java:167) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23178%23185!/:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.lambda$new$2(Minecraft.java:587) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23179!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.Util.ifElse(Util.java:441) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23179!/:?] {re:classloading} at net.minecraft.client.Minecraft.lambda$new$3(Minecraft.java:581) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23179!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.gui.screens.LoadingOverlay.render(LoadingOverlay.java:135) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23179!/:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:897) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23179!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runTick(Minecraft.java:1138) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23179!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:702) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23179!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.run(Main.java:212) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23179!/:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:51) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23179!/:?] {re:classloading,pl:runtimedistcleaner:A} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {} at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {} at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {} at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:25) ~[fmlloader-1.19.1-42.0.1.jar%2393!/:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%23105!/:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%23105!/:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%23105!/:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%23105!/:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%23105!/:?] {} at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%23105!/:?] {} at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%23105!/:?] {} at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.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.registries.NamespacedHolderHelper.createIntrusiveHolder(NamespacedHolderHelper.java:192) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23178%23185!/:?] {re:classloading} -- MOD bentenmod -- Details: Caused by 0: java.lang.reflect.InvocationTargetException at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] {} at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] {} at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] {} at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] {} at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] {} at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:68) ~[javafmllanguage-1.19.1-42.0.1.jar%23180!/:?] {} at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$10(ModContainer.java:121) ~[fmlcore-1.19.1-42.0.1.jar%23183!/:?] {} at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {} at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {} at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {} at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {} at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {} at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {} at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {} Caused by 1: java.lang.ExceptionInInitializerError at io.github.realyusufismail.bentenmod.BenTenMod.<init>(BenTenMod.java:63) ~[%23184!/:?] {re:classloading} at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] {} at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] {} at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] {} at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] {} at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] {} at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:68) ~[javafmllanguage-1.19.1-42.0.1.jar%23180!/:?] {} at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$10(ModContainer.java:121) ~[fmlcore-1.19.1-42.0.1.jar%23183!/:?] {} at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {} at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {} at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {} at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {} at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {} at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {} at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {} Mod File: /Users/YI/Documents/GitHub/ Failure message: Ben10 Mod (bentenmod) has failed to load correctly java.lang.reflect.InvocationTargetException: null Mod Version: 0.0NONE Mod Issue URL: https://github.com/ Exception message: java.lang.IllegalStateException: Registry is already frozen Stacktrace: at net.minecraftforge.registries.NamespacedHolderHelper.createIntrusiveHolder(NamespacedHolderHelper.java:192) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23178%23185!/:?] {re:classloading} at net.minecraftforge.registries.NamespacedDefaultedWrapper.createIntrusiveHolder(NamespacedDefaultedWrapper.java:210) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23178%23185!/:?] {re:classloading} at net.minecraft.world.entity.EntityType.<init>(EntityType.java:158) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23179!/:?] {re:classloading} at net.minecraft.world.entity.EntityType$Builder.build(EntityType.java:712) ~[forge-1.19.1-42.0.1_mapped_parchment_1.18.2-2022.06.26-1.19.1-recomp.jar%23179!/:?] {re:classloading} at io.github.realyusufismail.bentenmod.core.init.EntityTypesInit.createStandardEntityType(EntityTypesInit.java:94) ~[%23184!/:?] {re:classloading} at io.github.realyusufismail.bentenmod.core.init.EntityTypesInit.<clinit>(EntityTypesInit.java:62) ~[%23184!/:?] {re:classloading} at io.github.realyusufismail.bentenmod.BenTenMod.<init>(BenTenMod.java:63) ~[%23184!/:?] {re:classloading} at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] {} at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] {} at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] {} at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] {} at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] {} at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:68) ~[javafmllanguage-1.19.1-42.0.1.jar%23180!/:?] {} at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$10(ModContainer.java:121) ~[fmlcore-1.19.1-42.0.1.jar%23183!/:?] {} at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {} at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {} at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {} at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {} at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {} at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {} at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {}

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.