Jump to content

Just_EmSee

Members
  • Posts

    24
  • Joined

  • Last visited

Posts posted by Just_EmSee

  1. I am trying to create a "research" like system for crafting some items and I have the custom recipes set up but i would like to know if it is possible to reference an advancement in the JSON

     

    I am looking for something like this:

    {
      "type": "majestic:scribing",
      "advancement": "insert advancement"
      "ingredients": [
        {
          "item": "insert custom item"
        },
        {
          "item": "insert custom item"
        },
        {
          "item": "insert custom item"
        },
        {
          "item": "insert custom item"
        }
      ],
      "output": {
        "item": "insert custom item",
        "count": 1
      }
    }

    is that doable and how do I reference it in the code?

  2. im sorry, here is the code i am referring to

     

    package net.JustEmSee_Burd.the_majestic.item;
    
    import net.JustEmSee_Burd.the_majestic.The_Majestic;
    import net.JustEmSee_Burd.the_majestic.block.ModBlocks;
    import net.JustEmSee_Burd.the_majestic.spell.Spell;
    import net.JustEmSee_Burd.the_majestic.spell.SpellItem;
    import net.JustEmSee_Burd.the_majestic.world.feature.ModConfiguredFeatures;
    import net.JustEmSee_Burd.the_majestic.world.feature.ModOrePlacement;
    import net.minecraft.data.worldgen.features.OreFeatures;
    import net.minecraft.world.item.CreativeModeTab;
    import net.minecraft.world.item.Item;
    import net.minecraft.world.level.block.Block;
    import net.minecraft.world.level.block.state.BlockBehaviour;
    import net.minecraft.world.level.levelgen.VerticalAnchor;
    import net.minecraft.world.level.levelgen.placement.HeightRangePlacement;
    import net.minecraft.world.level.levelgen.placement.PlacementModifier;
    import net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest;
    import net.minecraft.world.level.material.Material;
    import net.minecraftforge.eventbus.api.IEventBus;
    import net.minecraftforge.registries.DeferredRegister;
    import net.minecraftforge.registries.ForgeRegistries;
    import net.minecraftforge.registries.RegistryObject;
    import org.jetbrains.annotations.Nullable;
    
    import java.lang.reflect.Array;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.function.Supplier;
    
    public class ModCrystalItems {
        private List GenerateOres = new ArrayList();
        public static final DeferredRegister<Item> CRYSTALS =
                DeferredRegister.create(ForgeRegistries.ITEMS, The_Majestic.MOD_ID);
    
        public static final RegistryObject<Item> MANA_CRYSTAL =  registerCrystal("mana_crystal",
                () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
                false, false, null, 0 ,
                null, null);
    
    
        public static final RegistryObject<Item> FIRE_CRYSTAL =  registerCrystal("fire_crystal",
                () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
                true, false, OreFeatures.NETHER_ORE_REPLACEABLES, 100 ,
                ModOrePlacement.commonOrePlacement(1 ,HeightRangePlacement.triangle(VerticalAnchor.aboveBottom(-80), VerticalAnchor.aboveBottom(80))), null);
    
        public static final RegistryObject<Item> WATER_CRYSTAL =  registerCrystal("water_crystal",
                () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
                true, true, OreFeatures.STONE_ORE_REPLACEABLES, 100 ,
                ModOrePlacement.commonOrePlacement(1 ,HeightRangePlacement.triangle(VerticalAnchor.aboveBottom(-80), VerticalAnchor.aboveBottom(80))), null);
    
        public static final RegistryObject<Item> EARTH_CRYSTAL =  registerCrystal("earth_crystal",
                () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
                true, true, OreFeatures.STONE_ORE_REPLACEABLES, 100 ,
                ModOrePlacement.commonOrePlacement(1 ,HeightRangePlacement.triangle(VerticalAnchor.aboveBottom(-80), VerticalAnchor.aboveBottom(80))), null);
    
        public static final RegistryObject<Item> AIR_CRYSTAL =  registerCrystal("air_crystal",
                () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
                true, true, OreFeatures.STONE_ORE_REPLACEABLES, 100 ,
                ModOrePlacement.commonOrePlacement(1 ,HeightRangePlacement.triangle(VerticalAnchor.aboveBottom(-80), VerticalAnchor.aboveBottom(80))), null);
    
        public static final RegistryObject<Item> MAGMA_CRYSTAL =  registerCrystal("magma_crystal",
                () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
                false, false, null, 0 ,
                null, null);
    
        public static final RegistryObject<Item> ICE_CRYSTAL =  registerCrystal("ice_crystal",
                () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
                false, false, null, 0 ,
                null, null);
    
        public static final RegistryObject<Item> NATURE_CRYSTAL =  registerCrystal("nature_crystal",
                () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
                false, false, null, 0 ,
                null, null);
    
        public static final RegistryObject<Item> LIGHTNING_CRYSTAL =  registerCrystal("lightning_crystal",
                () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
                false, false, null, 0 ,
                null, null);
    
        public static final RegistryObject<Item> LIGHT_CRYSTAL =  registerCrystal("light_crystal",
                () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
                false, false, null, 0 ,
                null, null);
    
        public static final RegistryObject<Item> DARKNESS_CRYSTAL =  registerCrystal("darkness_crystal",
                () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
                false,false, null, 0,
                null, null);
    
        public static final RegistryObject<Item> VOID_CRYSTAL =  registerCrystal("void_crystal",
                () -> new Item(new Item.Properties().tab(ModCreativeModeTab.Majestic_TAB)),
                false, false, null, 0,
                null, null);
    
        public static void register(IEventBus eventBus) {
            CRYSTALS.register(eventBus);
        }
    
        private static <T extends Item> RegistryObject<T> registerCrystal(String name, Supplier<T> item, boolean hasOre, boolean hasDeepslateOre, RuleTest defaultOreReplaceBlock, int oreSize, List<PlacementModifier> orePlacementFeatures, List Features) {
            RegistryObject<T> toReturn = CRYSTALS.register(name, item);
            String oreName = null;
            String deepslateOreName = null;
            if (hasOre) oreName = name+"_ore";
            if (hasDeepslateOre)deepslateOreName = "deepslate_"+name+"_ore";
            if (hasOre || hasDeepslateOre)registerCrystalOre(oreName, deepslateOreName, ModCreativeModeTab.Majestic_TAB, defaultOreReplaceBlock, oreSize, orePlacementFeatures, Features);
    
            return toReturn;
        }
    
        private static void registerCrystalOre(String oreName, String deepslateOreName, CreativeModeTab tab,RuleTest ruleTest, int oreSize,List<PlacementModifier> orePlacementFeatures, List Features) {
            RegistryObject<Block> ore = null;
            RegistryObject<Block> deepslateOre = null;
            if(oreName != null) ore = ModBlocks.registerBlock(oreName, () -> new Block(BlockBehaviour.Properties.of(Material.STONE)
                    .strength(5F).requiresCorrectToolForDrops()), tab);
            if(deepslateOreName != null) deepslateOre = ModBlocks.registerBlock(deepslateOreName, () -> new Block(BlockBehaviour.Properties.of(Material.STONE)
                    .strength(5F).requiresCorrectToolForDrops()), tab);
            ModConfiguredFeatures.RegisterOre(oreName, ore, deepslateOre, ruleTest, oreSize, orePlacementFeatures, Features);
        }
    
    }
    package net.JustEmSee_Burd.the_majestic.world.feature;
    
    import net.JustEmSee_Burd.the_majestic.The_Majestic;
    import net.minecraft.core.Holder;
    import net.minecraft.data.worldgen.features.FeatureUtils;
    import net.minecraft.data.worldgen.features.OreFeatures;
    import net.minecraft.world.level.block.Block;
    import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
    import net.minecraft.world.level.levelgen.feature.Feature;
    import net.minecraft.world.level.levelgen.feature.configurations.OreConfiguration;
    import net.minecraft.world.level.levelgen.placement.PlacementModifier;
    import net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest;
    import net.minecraftforge.registries.RegistryObject;
    
    import java.util.ArrayList;
    import java.util.List;
    
    public class ModConfiguredFeatures {
    
        public static List<OreConfiguration.TargetBlockState> RegisterOre(String name, RegistryObject<Block> oreBlock, RegistryObject<Block> deepslateOreBlock, RuleTest deafaultOreReplaceBlock, int OreSize, List<PlacementModifier> OrePlacementFeatures, List ExtraFeatures) {
            List<OreConfiguration.TargetBlockState> toReturn = new ArrayList<>();
            if (oreBlock != null) toReturn.add(OreConfiguration.target(deafaultOreReplaceBlock, oreBlock.get().defaultBlockState()));
            if (deepslateOreBlock != null) toReturn.add(OreConfiguration.target(OreFeatures.DEEPSLATE_ORE_REPLACEABLES, deepslateOreBlock.get().defaultBlockState()));
            if (ExtraFeatures != null) toReturn.addAll(ExtraFeatures);
            configureOre(toReturn, name, OreSize, OrePlacementFeatures);
            return toReturn;
        }
    
        public static Holder<ConfiguredFeature<OreConfiguration, ?>> configureOre(List<OreConfiguration.TargetBlockState> features, String name, int OreSize, List<PlacementModifier> OrePlacementFeatures) {
            Holder<ConfiguredFeature<OreConfiguration, ?>> toReturn = FeatureUtils.register(name,
                    Feature.ORE, new OreConfiguration(features, OreSize));
            ModPlacedFeatures.GenerateOrePlacement(name+"_placed", toReturn, OrePlacementFeatures);
            return toReturn;
        }
    
        public static void registerConfiguredFeatures() {
            System.out.println("Registering ModConfiguredFeatures for " + The_Majestic.MOD_ID);
        }
    
    
    }
    
    package net.JustEmSee_Burd.the_majestic.world.feature;
    
    
    import net.minecraft.world.level.levelgen.placement.*;
    
    import java.util.List;
    
    public class ModOrePlacement {
        public static List<PlacementModifier> orePlacement(PlacementModifier veinsPerChunk, PlacementModifier p_195348_) {
            return List.of(veinsPerChunk, InSquarePlacement.spread(), p_195348_, BiomeFilter.biome());
        }
    
        public static List<PlacementModifier> commonOrePlacement(int p_195344_, PlacementModifier p_195345_) {
            return orePlacement(CountPlacement.of(p_195344_), p_195345_);
        }
    
        public static List<PlacementModifier> rareOrePlacement(int p_195350_, PlacementModifier p_195351_) {
            return orePlacement(RarityFilter.onAverageOnceEvery(p_195350_), p_195351_);
        }
    }
    package net.JustEmSee_Burd.the_majestic.world.gen;
    
    
    import net.minecraft.core.Holder;
    import net.minecraft.world.level.levelgen.GenerationStep;
    import net.minecraft.world.level.levelgen.placement.PlacedFeature;
    import net.minecraftforge.event.world.BiomeLoadingEvent;
    
    import java.util.ArrayList;
    import java.util.List;
    
    public class ModOreGeneration {
        private static List<Holder<PlacedFeature>> list = new ArrayList<>();
    
        public static void generateOres(final BiomeLoadingEvent event) {
            List<Holder<PlacedFeature>> base =
                    event.getGeneration().getFeatures(GenerationStep.Decoration.UNDERGROUND_ORES);
            base.addAll(list);
        }
        
        public static void addOreGen(Holder<PlacedFeature> placedFeatureHolder) {
            list.add(placedFeatureHolder);
        }
    
    
    }

     

    or the github: https://github.com/sen2006/The-Majestic

  3. the thing I'm trying to do is for each item in ModCrystals that has a value set to true I want to generate an ore with ore generation which is different per crystal, but I guess that is just not possible?

     

  4. ---- Minecraft Crash Report ----
    // Shall we play a game?
    
    Time: 30/04/2023, 13:47
    Description: Mod loading error has occurred
    
    java.lang.Exception: Mod Loading has failed
    	at net.minecraftforge.logging.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:55) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2375%2382!/:?] {re:classloading}
    	at net.minecraftforge.client.loading.ClientModLoader.completeModLoading(ClientModLoader.java:170) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2375%2382!/:?] {re:classloading,pl:runtimedistcleaner:A}
    	at net.minecraft.client.Minecraft.lambda$new$1(Minecraft.java:560) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    	at net.minecraft.Util.ifElse(Util.java:400) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {re:classloading}
    	at net.minecraft.client.Minecraft.lambda$new$2(Minecraft.java:554) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    	at net.minecraft.client.gui.screens.LoadingOverlay.render(LoadingOverlay.java:135) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {re:classloading,pl:runtimedistcleaner:A}
    	at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:891) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1070) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    	at net.minecraft.client.Minecraft.run(Minecraft.java:668) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    	at net.minecraft.client.main.Main.main(Main.java:205) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2376!/:?] {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:24) ~[fmlloader-1.18.2-40.1.51.jar%230!/:?] {}
    	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%2310!/:?] {}
    	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%2310!/:?] {}
    	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%2310!/:?] {}
    	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%2310!/:?] {}
    	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%2310!/:?] {}
    	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%2310!/:?] {}
    	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%2310!/:?] {}
    	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?] {}
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Thread: Render thread
    Stacktrace:
    	at java.util.Objects.requireNonNull(Objects.java:334) ~[?:?] {}
    -- MOD majestic --
    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:67) ~[javafmllanguage-1.18.2-40.1.51.jar%2377!/:?] {}
    		at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:106) ~[fmlcore-1.18.2-40.1.51.jar%2380!/:?] {}
    		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 net.JustEmSee_Burd.the_majestic.The_Majestic.<init>(The_Majestic.java:47) ~[%2381!/:?] {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:67) ~[javafmllanguage-1.18.2-40.1.51.jar%2377!/:?] {}
    		at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:106) ~[fmlcore-1.18.2-40.1.51.jar%2380!/:?] {}
    		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: main
    	Failure message: The Majestic (majestic) has failed to load correctly
    		java.lang.reflect.InvocationTargetException: null
    	Mod Version: 0.0NONE
    	Mod Issue URL: NOT PROVIDED
    	Exception message: java.lang.NullPointerException: Registry Object not present: majestic:fire_crystal_ore
    Stacktrace:
    	at java.util.Objects.requireNonNull(Objects.java:334) ~[?:?] {}
    	at net.minecraftforge.registries.RegistryObject.get(RegistryObject.java:320) ~[forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1.18.2-recomp.jar%2375%2382!/:?] {re:classloading,xf:fml:forge:registry_object_binary_compat}
    	at net.JustEmSee_Burd.the_majestic.world.feature.ModConfiguredFeatures.RegisterOre(ModConfiguredFeatures.java:23) ~[%2381!/:?] {re:classloading}
    	at net.JustEmSee_Burd.the_majestic.item.ModCrystalItems.registerCrystalOre(ModCrystalItems.java:117) ~[%2381!/:?] {re:classloading}
    	at net.JustEmSee_Burd.the_majestic.item.ModCrystalItems.registerCrystal(ModCrystalItems.java:105) ~[%2381!/:?] {re:classloading}
    	at net.JustEmSee_Burd.the_majestic.item.ModCrystalItems.<clinit>(ModCrystalItems.java:40) ~[%2381!/:?] {re:classloading}
    	at net.JustEmSee_Burd.the_majestic.The_Majestic.<init>(The_Majestic.java:47) ~[%2381!/:?] {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:67) ~[javafmllanguage-1.18.2-40.1.51.jar%2377!/:?] {}
    	at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:106) ~[fmlcore-1.18.2-40.1.51.jar%2380!/:?] {}
    	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) ~[?:?] {}
    
    
    -- System Details --
    Details:
    	Minecraft Version: 1.18.2
    	Minecraft Version ID: 1.18.2
    	Operating System: Windows 10 (amd64) version 10.0
    	Java Version: 17.0.2, Oracle Corporation
    	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
    	Memory: 1758408704 bytes (1676 MiB) / 2187329536 bytes (2086 MiB) up to 4282384384 bytes (4084 MiB)
    	CPUs: 16
    	Processor Vendor: AuthenticAMD
    	Processor Name: AMD Ryzen 7 3700X 8-Core Processor             
    	Identifier: AuthenticAMD Family 23 Model 113 Stepping 0
    	Microarchitecture: Zen 2
    	Frequency (GHz): 3.59
    	Number of physical packages: 1
    	Number of physical CPUs: 8
    	Number of logical CPUs: 16
    	Graphics card #0 name: NVIDIA GeForce GTX 970
    	Graphics card #0 vendor: NVIDIA (0x10de)
    	Graphics card #0 VRAM (MB): 4095.00
    	Graphics card #0 deviceId: 0x13c2
    	Graphics card #0 versionInfo: DriverVersion=31.0.15.2737
    	Memory slot #0 capacity (MB): 8192.00
    	Memory slot #0 clockSpeed (GHz): 2.13
    	Memory slot #0 type: DDR4
    	Memory slot #1 capacity (MB): 8192.00
    	Memory slot #1 clockSpeed (GHz): 2.13
    	Memory slot #1 type: DDR4
    	Virtual memory max (MB): 41929.35
    	Virtual memory used (MB): 18962.37
    	Swap memory total (MB): 25600.00
    	Swap memory used (MB): 984.88
    	JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
    	ModLauncher: 9.1.3+9.1.3+main.9b69c82a
    	ModLauncher launch target: forgeclientuserdev
    	ModLauncher naming: mcp
    	ModLauncher services: 
    		 mixin PLUGINSERVICE 
    		 eventbus PLUGINSERVICE 
    		 slf4jfixer PLUGINSERVICE 
    		 object_holder_definalize PLUGINSERVICE 
    		 runtime_enum_extender PLUGINSERVICE 
    		 capability_token_subclass PLUGINSERVICE 
    		 accesstransformer PLUGINSERVICE 
    		 runtimedistcleaner PLUGINSERVICE 
    		 mixin TRANSFORMATIONSERVICE 
    		 fml TRANSFORMATIONSERVICE 
    	FML Language Providers: 
    		[email protected]
    		lowcodefml@null
    		javafml@null
    	Mod List: 
    		forge-1.18.2-40.1.51_mapped_parchment_2022.03.13-1|Minecraft                     |minecraft                     |1.18.2              |COMMON_SET|Manifest: 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                         |forge                         |40.1.51             |COMMON_SET|Manifest: NOSIGNATURE
    		Patchouli-1.18.2-71.1_mapped_parchment_2022.03.13-|Patchouli                     |patchouli                     |1.18.2-71.1         |COMMON_SET|Manifest: NOSIGNATURE
    		main                                              |The Majestic                  |majestic                      |0.0NONE             |ERROR     |Manifest: NOSIGNATURE
    		geckolib-forge-1.18-3.0.41_mapped_parchment_2022.0|GeckoLib                      |geckolib3                     |3.0.41              |COMMON_SET|Manifest: NOSIGNATURE
    		jei-1.18.2-9.7.1.255_mapped_parchment_2022.03.13-1|Just Enough Items             |jei                           |9.7.1.255           |COMMON_SET|Manifest: NOSIGNATURE
    	Crash Report UUID: 670498e1-ca33-4e4d-b9d9-7456cf682631
    	FML: 40.1
    	Forge: net.minecraftforge:40.1.51

    tried to add automatic ore generation for automictic generating blocks but got this error

  5. whenever I assign surface rules to my custom dimension i get this error

    Caused by: java.lang.IllegalStateException: Trying to access unbound value 'ResourceKey[minecraft:dimension / majestic:ancient_realms]' from registry Registry[ResourceKey[minecraft:root / minecraft:dimension] (Stable)]

     

    these are the surface rules

     

    "surface_rule": {
            "type": "minecraft:sequence",
            "sequence": [
              {
                "type": "minecraft:condition",
                "if_true": {
                  "type": "minecraft:vertical_gradient",
                  "random_name": "bedrock_floor",
                  "true_at_and_below": {
                    "above_bottom": 0
                  },
                  "false_at_and_above": {
                    "above_bottom": 5
                  }
                },
                "then_run": {
                  "type": "minecraft:block",
                  "result_state": {
                    "Name": "minecraft:bedrock"
                  }
                }
              },
              {
                "type": "minecraft:condition",
                "if_true": {
                  "type": "minecraft:vertical_gradient",
                  "random_name": "bedrock_roof",
                  "true_at_and_below": {
                    "below_top": 0
                  },
                  "false_at_and_above": {
                    "below_top": 5
                  }
                },
                "then_run": {
                  "type": "minecraft:block",
                  "result_state": {
                    "Name": "minecraft:bedrock"
                  }
                }
              },
              {
                "type": "minecraft:condition",
                "if_true": {
                  "type": "minecraft:biome",
                  "biome_is": [
                    "majestic:ancient_basalt_deltas"
                  ]
                },
                "then_run": {
                  "type": "minecraft:block",
                  "result_state": {
                    "Name": "minecraft:stone"
                  }
                }
              }
            ]
          }

     

     

    and the full .json file

    {
      "type": "majestic:ancient_realms",
      "generator": {
        "type": "minecraft:noise",
        "seed": 0,
        "settings": {
          "sea_level": 32,
          "disable_mob_generation": true,
          "aquifers_enabled": false,
          "ore_veins_enabled": false,
          "legacy_random_source": true,
          "default_block": {
            "Name": "majestic:limestone"
          },
          "default_fluid": {
            "Name": "majestic:limestone",
            "Properties": {
              "level": "0"
            }
          },
          "noise": {
            "min_y": 0,
            "height": 192,
            "size_horizontal": 1,
            "size_vertical": 2,
            "sampling": {
              "xz_scale": 1,
              "y_scale": 3,
              "xz_factor": 80,
              "y_factor": 60
            },
            "bottom_slide": {
              "target": 2.5,
              "size": 4,
              "offset": -1
            },
            "top_slide": {
              "target": 0.9375,
              "size": 3,
              "offset": 0
            },
            "terrain_shaper": {
              "offset": 0,
              "factor": 0,
              "jaggedness": 0
            }
          },
          "noise_router": {
            "barrier": 0,
            "fluid_level_floodedness": 0,
            "fluid_level_spread": 0,
            "lava": 0,
            "temperature": 0,
            "vegetation": 0,
            "continents": 0,
            "erosion": 0,
            "depth": 0,
            "ridges": 0,
            "initial_density_without_jaggedness": 0,
            "final_density": {
              "type": "minecraft:interpolated",
              "argument": "minecraft:overworld/base_3d_noise"
            },
            "vein_toggle": 0,
            "vein_ridged": 0,
            "vein_gap": 0
          },
          "surface_rule": {
            "type": "minecraft:sequence",
            "sequence": [
              {
                "type": "minecraft:condition",
                "if_true": {
                  "type": "minecraft:vertical_gradient",
                  "random_name": "bedrock_floor",
                  "true_at_and_below": {
                    "above_bottom": 0
                  },
                  "false_at_and_above": {
                    "above_bottom": 5
                  }
                },
                "then_run": {
                  "type": "minecraft:block",
                  "result_state": {
                    "Name": "minecraft:bedrock"
                  }
                }
              },
              {
                "type": "minecraft:condition",
                "if_true": {
                  "type": "minecraft:vertical_gradient",
                  "random_name": "bedrock_roof",
                  "true_at_and_below": {
                    "below_top": 0
                  },
                  "false_at_and_above": {
                    "below_top": 5
                  }
                },
                "then_run": {
                  "type": "minecraft:block",
                  "result_state": {
                    "Name": "minecraft:bedrock"
                  }
                }
              },
              {
                "type": "minecraft:condition",
                "if_true": {
                  "type": "minecraft:biome",
                  "biome_is": [
                    "majestic:ancient_basalt_deltas"
                  ]
                },
                "then_run": {
                  "type": "minecraft:block",
                  "result_state": {
                    "Name": "minecraft:stone"
                  }
                }
              }
            ]
          }
        },
        "biome_source": {
          "type": "majestic:ancient_basalt_deltas",
          "biomes": [
            {
              "biome": "minecraft:plains",
              "parameters": {
                "temperature": 0,
                "humidity": 0,
                "continentalness": 0,
                "erosion": 0,
                "weirdness": 0,
                "depth": 0,
                "offset": 0
              }
            }
          ]
        }
      }
    }

     

  6.     @Override
        public void onUse(Level pLevel, ItemStack pWand, LivingEntity pPlayer) {
                List<Entity> list = pLevel.getEntities(pPlayer, AABB.ofSize(pPlayer.position(), this.getSize(), this.getSize(), this.getSize()));
                if (!pLevel.isClientSide) {
                    if (pPlayer.getItemInHand(InteractionHand.OFF_HAND).getItem() instanceof SpellItem) {
                        SpellItem spellItem = (SpellItem) pPlayer.getItemInHand(InteractionHand.OFF_HAND).getItem();
                        spellItem.cooldown(pPlayer, this.getCooldown());
                    }
                    for (Entity entity : list) {
                        if (entity.isAlive()) {
                            if (!pLevel.isClientSide()) {
                                LivingEntity livingentity = (LivingEntity) entity;
                                livingentity.addEffect(new MobEffectInstance(MobEffects.WEAKNESS, 200, 1), entity);
                                livingentity.addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SLOWDOWN, 200, 5), entity);
                                BlockPos pos = new BlockPos(entity.position());
                                pLevel.setBlock(pos, Blocks.ICE.defaultBlockState(), 0);
                            }
                        }
                    }
                }
                else {
                    ParticleGen.spheremove(pPlayer.position().x, pPlayer.position().y+(pPlayer.getBbHeight()/2), pPlayer.position().z, 1, pLevel, ParticleTypes.SNOWFLAKE, 0, 0, 0, 1, 50, -3, true);
                }
                super.onUse(pLevel, pWand, pPlayer);
        }

     

  7. this is the part resposible for the error, by not calling this i dont get the error

    private static <T extends Spell>RegistryObject<SpellItem> registerSpellItem(String name, RegistryObject<T> spell, CreativeModeTab tab) {

    return ModItems.ITEMS.register(name+"_scroll", () -> new SpellItem(spell.get(),

    new SpellItem.Properties().tab(tab))); }

  8. i get this error, what do i do

    Caused by: java.lang.ClassCastException: class net.minecraftforge.registries.RegistryObject cannot be cast to class net.JustEmSee_Burd.the_majestic.spell.Spell (net.minecraftforge.registries.RegistryObject is in module [email protected] of loader 'TRANSFORMER' @9aa2002; net.JustEmSee_Burd.the_majestic.spell.Spell is in module [email protected] of loader 'TRANSFORMER' @9aa2002)
     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.