• Recently Browsing

    No registered users viewing this page.

  • Posts

    • How @ObjectHolder can help in this situation? As far as I know @ObjectHolder just gives reference of the object after objects registration, so it cannot be used to replace vanilla objects, or am I misunderstanding something?   Anyway, I figured out how to do it using Java reflection, in this example I replaced wooden sword with custom item that extends SwordItem: boolean isRegistered = false; @SubscribeEvent public void onItemReg(RegistryEvent.Register<Item> event){ System.out.println("Entering item registry event"); if(!isRegistered){ try{ Field field = Items.class.getField("WOODEN_SWORD"); field.setAccessible(true); Method method = Items.class.getDeclaredMethod("register", String.class, Item.class); method.setAccessible(true); Item itemToInsert = (Item)method.invoke(Items.class, "wooden_sword", custom_wooden_sword); System.out.println("Item to insert: " + itemToInsert.toString()); System.out.println("Field: " + field.getName()); Field modifiersField = Field.class.getDeclaredField("modifiers"); modifiersField.setAccessible(true); modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL); field.set(null, itemToInsert); isRegistered = true; }catch(Throwable e){ System.out.println("ERROR while reflecting Items.java field: " + e); } } ATTENTION, I do not know how dangerous this method is and how it can negatively affect the operation of the game, but thanks to it I was able to completely replace the standard sword with a custom one and the game did not crash. I think somehow this can be done using standard forge solutions, but no matter how much I searched, I did not find any specific solutions, but this does not change the feeling that if someone experienced saw my code, he would have had a heart attack... (also dont hit me for this boolean, did it on a fast hand)
    • Data generators would create this in a matter of milliseconds for hundreds of blocks at once. Writing files manually is not recommended.
    • Hello, as you may know by the title, there's an error while loading a world on my mod pack.    The message states       I would like to know what I did. It seems this only happens when I remove a mod.   This happened before when I removed a mod, which deals with only weather (Better Weather), it doesn't add any new blocks, items, or features, except Blizzards, fog, and acid rain. I added it back, then everything returned back to normal. Then I just recently removed RoFl2Leather (Rotten Flesh To Leather) and this is happening again. I don't know if it's a bug or not. Plus apparently in 1.16.X the mods list also shows up in the Datapacks tab when creating a world. And I don't have any other datapacks except for the mods I have installed on my modpack. I hope that this can be understood and resolved. Here's the list of mods I have on my mod pack. And I am going to post my latest.log (The debug.log was not in the logs file, so I can't provide it) The log that I got is 2020-09-23-2.log I could not post my latest.log due to it exceeding the limit.   Mod List Mod                                                                                        Author                                                                                File ☃ Snow! Real Magic! Snownee_ SnowRealMagic-1.16.1-2.0.1.jar 🥝 Kiwi Snownee_ Kiwi-1.16.1-3.2.1.jar Abnormals Core SmellyModder Abnormals-Core-1.16.1-2.0.3.jar AI Improvements DarkGuardsman AI-Improvements-1.16.1-0.3.0.jar AmbientSounds 3 CreativeMD AmbientSounds_v3.0.20_mc1.16.2.jar Animalium vadis365 Animalium-0.6.0.jar AppleSkin squeek502 AppleSkin-mc1.16.1-forge-1.0.14.jar Aquaculture 2 Shadowclaimer Aquaculture-1.16.1-2.0.20.jar Atmospheric paradiscal Atmospheric-1.16.1-2.0.0.jar AutoRegLib Vazkii AutoRegLib-1.6-43.jar Autumnity martianarchitecture Autumnity-1.16.1-1.4.1.jar Bad Wither No Cookie - Reloaded Kreezxil bwncr-1.16.1-3.8.15.jar Bamboo Blocks bageldotjpg Bamboo-Blocks-1.16.1-2.0.1.jar Basalt Blocks Legopitstop BasaltBlocks-1.16.1-1.0.2.jar Basic Nether Ores [Forge/Fabric] cScotPlay BasicNetherOres-1.16.1-5.1.0.jar Beekeeper MacTso Beekeeper-1.16.1- Berry Good minecraftabnormals Berry-Good-1.16.1-3.0.0.jar Better Advancements way2muchnoise BetterAdvancements-1.16.1- Better Respawn henkelmax better_respawn-1.16.1-1.0.0.jar Better Weather Corgi_Taco betterweather-1.0.2.jar Better With Minecolonies [Forge] Kreezxil betterwithminecolonies-1.16.1-1.15.16.jar Biomes O' Plenty Forstride BiomesOPlenty-1.16.1- Bookshelf DarkhaxDev Bookshelf-1.16.1-6.3.20.jar Botania Vazkii Botania-1.16.1-403.1.jar Botany Pots DarkhaxDev BotanyPots-1.16.1-3.0.7.jar Buzzier Bees bageldotjpg Buzzier-Bees-1.16.1-2.1.0.jar Caelus API (Forge) TheIllusiveC4 caelus-FORGE-1.16.1-2.0-beta7.jar Clay WorldGen EwyBoy Clay WorldGen-1.1.0-1.16.1.jar Client Tweaks BlayTheNinth ClientTweaks_1.16.1-5.0.0.jar Clumps Jaredlll08 Clumps- Collective Serilum collective-1.16.1-1.35.jar Comforts TheIllusiveC4 comforts-FORGE-1.16.1- Construction Blocks Legopitstop ConstructionBlocks-1.16.1-1.0.0-pre2.jar Controlling Jaredlll08 Controlling- Cooking for Blockheads BlayTheNinth CookingForBlockheads_1.16.1-9.0.2.jar Cosmetic Armor Reworked LainMI CosmeticArmorReworked-1.16.1-v1b.jar Crafting Station tfarecnim craftingstation-4.0.0a.jar CraftTweaker Jaredlll08 CraftTweaker-1.16.1- Cucumber Library BlakeBr0 Cucumber-1.16.1-4.0.2.jar Curios API (Forge) TheIllusiveC4 curios-FORGE-1.16.1- Curious Elytra (Forge) TheIllusiveC4 curiouselytra-FORGE-1.16.1-3.0.jar Cyclic Lothrazar Cyclic-1.16.1-0.6.1.jar Decorative Blocks stohun decorative_blocks-1.16.1-1.5.jar Ding ohaiiChun Ding-1.16.1-1.2.0.jar Double Slabs CJMinecraft01 DoubleSlabs-1.16-3.3.3.jar EmbellishCraft Mapper embellishcraft-1.16.1- Enhanced Mushrooms Ep1c312 Enhanced-Mushrooms-1.16.1-v2.0.8.jar Et Tu, Brute? the_infamous_1 ettubrute-1.16.1-1.0.6.jar Excavation bloop428 excavation-1.5.2.jar Extra Boats martianarchitecture Extra-Boats-1.16.1-1.4.1.jar Extra Tags tfarecnim extratags-2.1g.jar FallingTree RakSrinaNa FallingTree-Forge-1.16.1-2.4.0.jar Farming for Blockheads BlayTheNinth FarmingForBlockheads_1.16.1-7.0.2.jar FastFurnace Shadows_of_Fire FastFurnace-1.16.1-4.1.2.jar FastWorkbench Shadows_of_Fire FastWorkbench-1.16.1-4.2.0.jar FPS Reducer bre2el FpsReducer-mc1.16.1-1.17.jar Fruitful Ep1c312 Fruitful-1.16.1-v1.3.0.jar FTB Backups LatvianModder ftb-backups- Gotta Climb Fast! Rongmario gottaclimbfast-mc1.16-1.1-forge.jar Hwyla TehNut Hwyla-forge-1.10.10-B77_1.16.1.jar Immersive Engineering BluSunrize ImmersiveEngineering-1.16.1-4.0.1-120.jar Incubation martianarchitecture Incubation-1.16.1-1.1.0.jar Industrial Foregoing Buuz135 industrial-foregoing-1.16.1-3.0.5-7e692e4.jar Inventory Tweaks Renewed David1544 invtweaks-1.16.2-1.0.0.jar JEI Enchantment Info Phylogeny JEIEnchantmentInfo-1.16.1-1.2.0.jar JEI Integration SnowShock35 jeiintegration_1.16.1- JEITweaker Jaredlll08 JEITweaker-1.16.1- Just Enough Items (JEI) mezz jei-1.16.1- Just Enough Resources (JER) way2muchnoise JustEnoughResources-1.16.1- KleeSlabs BlayTheNinth KleeSlabs_1.16.1-9.0.0.jar Macaw's Bridges sketch_macaw mcw-bridges-1.0.4-mc1.16.1.jar Macaw's Doors sketch_macaw mcw-doors-1.0.0-mc1.16.1.jar Macaw's Roofs sketch_macaw mcws-roofs-1.16.1-v2.0.0.jar Macaw's Windows sketch_macaw mcws-win-1.16.1-v1.0.2.jar Mapper Base Mapper mapperbase-1.16.1- Mekanism bradyaidanc Mekanism-1.16.1- Mekanism Additions bradyaidanc MekanismAdditions-1.16.1- Mekanism Generators bradyaidanc MekanismGenerators-1.16.1- Mekanism Tools bradyaidanc MekanismTools-1.16.1- MineColonies H3lay minecolonies-0.13.258-ALPHA-universal.jar MinecraftCapes Mod james090500 MinecraftCapes Forge 1.16.1-v10.jar More Living Things Buecher_wurm livingthings-1.16.1-1.0.3.jar Mouse Tweaks YaLTeR MouseTweaks-2.13-mc1.16.1.jar MrCrayfish's Furniture Mod MrCrayfish furniture-7.0.0-pre18-1.16.1.jar MrCrayfish's Vehicle Mod MrCrayfish vehicle-mod-0.45.0-1.16.1.jar Neat Vazkii Neat 1.7-23.jar NetherPortalFix BlayTheNinth NetherPortalFix_1.16.1-7.0.1.jar No Hostiles Around Campfire Serilum nhacampfire_1.16-2.3.jar Obfuscate MrCrayfish obfuscate-0.5.0-1.16.1.jar OldJavaWarning DarkhaxDev OldJavaWarning-1.16.1-4.0.1.jar Pane In The Glass MongoTheElder pitg-1.16.1-1.3.0.jar Patchouli Vazkii Patchouli-1.16-39.jar Pickle Tweaks BlakeBr0 PickleTweaks-1.16.1-5.0.1.jar Placebo Shadows_of_Fire Placebo-1.16.1-4.1.3.jar Pretty Beaches BlayTheNinth PrettyBeaches_1.16.1-5.0.0.jar Quark Vazkii Quark-r2.2-264.jar Quark Oddities Vazkii QuarkOddities-1.15.2.jar RandomPatches TheRandomLabs randompatches-1.16.1- Reap Mod henkelmax reap-1.16.1-1.0.2.jar Refined Storage raoulvdberge refinedstorage-1.9.2b.jar Refined Storage Addons raoulvdberge refinedstorageaddons-0.7.jar Savage & Ravage Farcr Savage-and-Ravage-1.16.1-2.0.0.jar Security Craft Geforce132 [1.16.1] SecurityCraft v1.8.19.3.jar Server Utilities ArrowsendGaming Server_Utils-1.16.1-1.3.19.jar Silent Lib SilentChaos512 SilentLib-1.16.1-4.7.1+59.jar Silent's Mechanisms SilentChaos512 SilentMechanisms-1.16.1-0.8.1+62.jar Simple Farming enemeez1 simplefarming-1.16.1-1.3.2.jar Simply Backpacks Flanks255 simplybackpacks-1.16.1-1.4.10.jar Simply Jetpacks 2 Tomson124 SimplyJetpacks2-1.16.1- Snow Under Trees bl4ckscor3 snowundertrees-1.16.1-v1.1.1.jar Sound Filters Tmtravlr SoundFilters-0.14_for_1.16.jar Storage Drawers Texelsaur StorageDrawers-1.16.2-8.1.0.jar Structurize H3lay structurize-0.13.65-ALPHA.jar Stupid Horse Stand Still Lothrazar horsestandstill-1.16.1-1.0.1.jar SwingThroughGrass exidex swingthroughgrass-1.16.1-1.5.1.jar The Endergetic Expansion endergized The-Endergetic-Expansion-1.16.1-2.0.0.jar Titanium hrznstudio titanium-1.16.1-3.0.4.jar Torch Slabs Mod EndlesNights torchslabmod-1.16.1_v1.6.16.jar Ultimate Car Mod henkelmax car-1.16.1-1.0.11.jar Upgrade Aquatic minecraftabnormals Upgrade-Aquatic-1.16.1-2.0.1.jar Valhelsia Structures ValhelsiaTeam valhelsia_structures-16.0.2.jar VanillaTweaks StrikerRocker VanillaTweaks-1.16.1-1.5.31.jar Villagers Respawn MacTso VillagersRespawn-1.16.1- VoxelMap MamiyaOtaru forgemod_VoxelMap-1.10.9_for_1.16.1.jar Waila Harvestability squeek502 WailaHarvestability-mc1.16.1-forge-1.1.12.jar Wither Skeleton Tweaks Shadows_of_Fire WitherSkeletonTweaks-1.16.1-5.0.0.jar YUNG's Better Caves (Forge) YUNGNICKYOUNG BetterCaves-1.16.1-1.0.jar YUNG's Better Mineshafts (Forge) YUNGNICKYOUNG BetterMineshaftsForge-1.16.1-1.3.jar 2020-09-23-2.log.gz
    • Ok nevermind, I got it: ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.DISPLAYTEST, ()-> Pair.of(()->FMLNetworkConstants.IGNORESERVERONLY, (version, network) -> {return true;}));   And my problem is solved now. Thanks for the help
    • I think that you mean someting like this:   ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.DISPLAYTEST, ...);   But I don't know how the function/the second argument would look like. I also tried looking on the internet but didn't find anything related to that.
  • Topics

  • Who's Online (See full list)