Jump to content

[1.18.2] Method for iterating over blocks belonging to a tag


Daeruin

Recommended Posts

Is there a handy way to get all the blocks that belong to a tag and then iterate over them? For example, I'm generating global loot modifiers and would like to iterate over all the leaf blocks to create loot modifiers for them. From my searching, it seems there was a method for that in 1.16, but it no longer exists in 1.18.

Back in 1.12 I used the HarvestDropsEvent and just checked if the block was an instance of BlockLeaves. Much more efficient.

Edited by Daeruin
Link to comment
Share on other sites

Quote

Back in 1.12 I used the HarvestDropsEvent and just checked if the block was an instance of BlockLeaves. Much more efficient.

And wrong, you should have been using the ore dictionary ūüôā

 

Vanilla would use

Registry.BLOCK.getTag(BlockTags.LEAVES)

but i guess the correct way to do it with forge is?

ForgeRegistries.BLOCKS.tags().getTag(BlockTags.LEAVES)

 

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

17 hours ago, warjort said:

Vanilla would use

Registry.BLOCK.getTag(BlockTags.LEAVES)

but i guess the correct way to do it with forge is?

ForgeRegistries.BLOCKS.tags().getTag(BlockTags.LEAVES)

Both of these produced an empty list during data generation. Seems like it should have worked, though.

15 hours ago, Luis_ST said:

the correct way would be BlockState#is with BlockTags.LEAVES,

but GLMs do not use Blocks, in this case it would be ItemStack#is with ItemTags.LEAVES

That is a great way to check if an individual block or item has the tag. It does not let me find all blocks or items that have the tag. I guess I could iterate over every block/item and use that method to find which ones have the tag. I was hoping for something a little more efficient.

I am using the LootItemBlockStatePropertyCondition as part of my loot modifiers, and it takes Blocks as input.

Link to comment
Share on other sites

Datapacks are not loaded during datagen. Datagen is where you generate them. ūüôā

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

5 hours ago, Daeruin said:

Hmmm, iterating over all the blocks and items and checking their tags showed that nothing seems to have tags during data generation of global loot modifiers.

Why did you need the Tag values in Data generation, what exactly did you try to achieve?

Link to comment
Share on other sites

19 hours ago, Luis_ST said:

Why did you need the Tag values in Data generation, what exactly did you try to achieve?

I said it in my initial post. I'm trying to generate loot modifiers for a bunch of items. All of the items have the same tag. It seemed like I should be able to just grab the tag, iterate over the items, and generate the loot modifier for each one that way.

Link to comment
Share on other sites

NOTE: What is below is not fully tested, I just wrote it and tested it once to see if it works.

I've never used GLMs so I had a go at implementing your requirement, this is what I found out (this is using the forge-1.19 mdk's example mod as a base):

 

First I create src/main/resource/data/forge/loot_modifiers/global_loot_modifiers.json to specify the modification files

{
  "replace": false,
  "entries": [
    "examplemod:leaves"
  ]
}

The added the mentioned modification in src/main/resources/data/examplemod/loot_modifiers/leaves.json

{
  "conditions": [
    {
      "condition": "examplemod:blocktag",
      "blocktag": "minecraft:leaves"
    }
  ],
  "type": "examplemod:singleitem",
  "item": "minecraft:diamond"
}

Suprisingly, there is no loot condition for block tags so I had to write that

public class BlockTagLootItemCondition implements LootItemCondition {
	final TagKey<Block> blockTag;

    BlockTagLootItemCondition(TagKey<Block> blockTag) {
       this.blockTag = blockTag;
   }

   public LootItemConditionType getType() {
       return ExampleMod.BLOCK_TAG_LOOT_ITEM.get();
   }

   public Set<LootContextParam<?>> getReferencedContextParams() {
       return ImmutableSet.of(LootContextParams.BLOCK_STATE);
   }

   public boolean test(LootContext p_81772_) {
       BlockState blockstate = p_81772_.getParamOrNull(LootContextParams.BLOCK_STATE);
       return blockstate != null && blockstate.is(this.blockTag);
   }

   public static class Serializer implements net.minecraft.world.level.storage.loot.Serializer<BlockTagLootItemCondition> {
       public void serialize(JsonObject p_81795_, BlockTagLootItemCondition p_81796_, JsonSerializationContext p_81797_) {
           p_81795_.addProperty("blocktag", p_81796_.blockTag.location().toString());
       }

       public BlockTagLootItemCondition deserialize(JsonObject p_81805_, JsonDeserializationContext p_81806_) {
    	   ResourceLocation resourcelocation = new ResourceLocation(GsonHelper.getAsString(p_81805_, "blocktag"));
    	   TagKey<Block> blockTag = TagKey.create(Registry.BLOCK_REGISTRY, resourcelocation);
    	   return new BlockTagLootItemCondition(blockTag);
       }
   }
}

Then write my actual modifier. This is a simple one that lets you define one item to add to the drops.

public class SingleItemLootModifier extends LootModifier {
    public static final Supplier<Codec<SingleItemLootModifier>> CODEC = Suppliers.memoize(() -> RecordCodecBuilder.create(inst -> codecStart(inst)
    		.and(ForgeRegistries.ITEMS.getCodec().fieldOf("item").forGetter(m -> m.item))
            .apply(inst, SingleItemLootModifier::new)
    ));
	 
	 private final Item item;

	 public SingleItemLootModifier(LootItemCondition[] conditions, Item item) {
		super(conditions);
		this.item = item;
	}

	  @Override
	public Codec<? extends IGlobalLootModifier> codec() {
		  return CODEC.get();
	}

	@Override
	protected @NotNull ObjectArrayList<ItemStack> doApply(ObjectArrayList<ItemStack> generatedLoot, LootContext context) {
        generatedLoot.add(new ItemStack(item, 1));
	    return generatedLoot;
	}
}

Finally I have register the new condition and loot modifier in the main example mod class


    public static final DeferredRegister<LootItemConditionType> LOOT_ITEM_CONDITIONS = DeferredRegister.create(Registry.LOOT_ITEM_REGISTRY, MODID);
    public static final RegistryObject<LootItemConditionType> BLOCK_TAG_LOOT_ITEM = LOOT_ITEM_CONDITIONS.register("blocktag", () -> new LootItemConditionType(new BlockTagLootItemCondition.Serializer()));

    public static final DeferredRegister<Codec<? extends IGlobalLootModifier>> GLM = DeferredRegister.create(ForgeRegistries.Keys.GLOBAL_LOOT_MODIFIER_SERIALIZERS, MODID);
    public static final RegistryObject<Codec<SingleItemLootModifier>> SINGLE_ITEM_LOOT_MODIFIER = GLM.register("singleitem", SingleItemLootModifier.CODEC);
    
    public ExampleMod()
    {
        IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();

        // Register the commonSetup method for modloading
        modEventBus.addListener(this::commonSetup);

        // Register the Deferred Register to the mod event bus so blocks get registered
        BLOCKS.register(modEventBus);
        // Register the Deferred Register to the mod event bus so items get registered
        ITEMS.register(modEventBus);
      
        // NEW REGISTRIES HERE!
        LOOT_ITEM_CONDITIONS.register(modEventBus);
        GLM.register(modEventBus);

        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(this);

 

Now when I break anything in the BlockTags.LEAVES tag it drops a diamond.

Edited by warjort

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I have tried downloading forge and installing mods on my own, and it lead to crashes on start up. I have tried installing mods through curseforge to the same effect. I tried virtually every installation of forge that's available for 1.21, from forge 51.0.1-51.0.24. Either the game crashes when trying to load mods, or the game does not read the mods in my mod folder and runs like it was vanilla. I do not know what is causing the game to fail to recognize the mods. I installed forge from curseforge, and added the mods directly from cursed forge, and all of the mods are 1.21 compatible. in spite of that, it is still failing to load mods. what else could I do to get this fixed? the error loading the mods is "Error loading mods, 2 errors have occurred during loading" with each saying "Invalid mod file found." here is the crash log: ¬† Time: 2024-07-15 13:18:49 Description: Mod loading error has occurred java.lang.Exception: Mod Loading has failed ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraftforge.logging.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:49) ~[forge-1.21-51.0.24-universal.jar:?] {re:classloading} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraftforge.client.loading.ClientModLoader.completeModLoading(ClientModLoader.java:119) ~[forge-1.21-51.0.24-universal.jar:?] {re:classloading,pl:runtimedistcleaner:A} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.lambda$new$7(Minecraft.java:616) ~[forge-1.21-51.0.24-client.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraft.Util.ifElse(Util.java:513) ~[forge-1.21-51.0.24-client.jar:?] {re:classloading} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.lambda$new$8(Minecraft.java:609) ~[forge-1.21-51.0.24-client.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraftforge.client.loading.ForgeLoadingOverlay.render(ForgeLoadingOverlay.java:146) ~[forge-1.21-51.0.24-universal.jar:?] {re:classloading} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:879) ~[forge-1.21-51.0.24-client.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.runTick(Minecraft.java:1180) ~[forge-1.21-51.0.24-client.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.run(Minecraft.java:795) ~[forge-1.21-51.0.24-client.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:228) ~[forge-1.21-51.0.24-client.jar:?] {re:classloading,pl:runtimedistcleaner:A} ¬†¬† ¬†at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?] {} ¬†¬† ¬†at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] {} ¬†¬† ¬†at SECURE-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:91) ~[fmlloader-1.21-51.0.24.jar!/:?] {} ¬†¬† ¬†at SECURE-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonLaunchHandler.lambda$makeService$0(CommonLaunchHandler.java:75) ~[fmlloader-1.21-51.0.24.jar!/:?] {} ¬†¬† ¬†at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:77) [modlauncher-10.2.1.jar!/:?] {} ¬†¬† ¬†at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:97) [modlauncher-10.2.1.jar!/:?] {} ¬†¬† ¬†at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:116) [modlauncher-10.2.1.jar!/:?] {} ¬†¬† ¬†at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:75) [modlauncher-10.2.1.jar!/:?] {} ¬†¬† ¬†at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapEntry.main(BootstrapEntry.java:17) [modlauncher-10.2.1.jar!/:?] {} ¬†¬† ¬†at [email protected]/net.minecraftforge.bootstrap.Bootstrap.moduleMain(Bootstrap.java:188) [bootstrap-2.1.3.jar!/:?] {} ¬†¬† ¬†at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?] {} ¬†¬† ¬†at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] {} ¬†¬† ¬†at net.minecraftforge.bootstrap.Bootstrap.bootstrapMain(Bootstrap.java:133) [bootstrap-2.1.3.jar:2.1.3] {} ¬†¬† ¬†at net.minecraftforge.bootstrap.Bootstrap.start(Bootstrap.java:53) [bootstrap-2.1.3.jar:2.1.3] {} ¬†¬† ¬†at net.minecraftforge.bootstrap.ForgeBootstrap.main(ForgeBootstrap.java:19) [bootstrap-2.1.3.jar:2.1.3] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Suspected Mods: NONE Stacktrace: ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraftforge.logging.CrashReportExtender.lambda$dumpModLoadingCrashReport$7(CrashReportExtender.java:52) ~[forge-1.21-51.0.24-universal.jar!/:?] {re:classloading} -- NO MOD INFO AVAILABLE -- Details: ¬†¬† ¬†Mod File: NO FILE INFO ¬†¬† ¬†Failure message: Invalid mod file found C:\Users\Danny\curseforge\minecraft\Instances\Magic - modded\mods\mahoutsukai-1.21.0-v1.35.2.jar ¬†¬† ¬†Mod Version: NO MOD INFO AVAILABLE ¬†¬† ¬†Mod Issue URL: NOT PROVIDED ¬†¬† ¬†Exception message: MISSING EXCEPTION MESSAGE Stacktrace: ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraftforge.logging.CrashReportExtender.lambda$dumpModLoadingCrashReport$7(CrashReportExtender.java:52) ~[forge-1.21-51.0.24-universal.jar:?] {re:classloading} ¬†¬† ¬†at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) ~[?:?] {} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraftforge.logging.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:50) ~[forge-1.21-51.0.24-universal.jar:?] {re:classloading} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraftforge.client.loading.ClientModLoader.completeModLoading(ClientModLoader.java:119) ~[forge-1.21-51.0.24-universal.jar:?] {re:classloading,pl:runtimedistcleaner:A} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.lambda$new$7(Minecraft.java:616) ~[forge-1.21-51.0.24-client.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraft.Util.ifElse(Util.java:513) ~[forge-1.21-51.0.24-client.jar:?] {re:classloading} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.lambda$new$8(Minecraft.java:609) ~[forge-1.21-51.0.24-client.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraftforge.client.loading.ForgeLoadingOverlay.render(ForgeLoadingOverlay.java:146) ~[forge-1.21-51.0.24-universal.jar:?] {re:classloading} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:879) ~[forge-1.21-51.0.24-client.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.runTick(Minecraft.java:1180) ~[forge-1.21-51.0.24-client.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.run(Minecraft.java:795) ~[forge-1.21-51.0.24-client.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} ¬†¬† ¬†at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:228) ~[forge-1.21-51.0.24-client.jar:?] {re:classloading,pl:runtimedistcleaner:A} ¬†¬† ¬†at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?] {} ¬†¬† ¬†at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] {} ¬†¬† ¬†at SECURE-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:91) ~[fmlloader-1.21-51.0.24.jar!/:?] {} ¬†¬† ¬†at SECURE-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonLaunchHandler.lambda$makeService$0(CommonLaunchHandler.java:75) ~[fmlloader-1.21-51.0.24.jar!/:?] {} ¬†¬† ¬†at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:77) [modlauncher-10.2.1.jar!/:?] {} ¬†¬† ¬†at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:97) [modlauncher-10.2.1.jar!/:?] {} ¬†¬† ¬†at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:116) [modlauncher-10.2.1.jar!/:?] {} ¬†¬† ¬†at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:75) [modlauncher-10.2.1.jar!/:?] {} ¬†¬† ¬†at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapEntry.main(BootstrapEntry.java:17) [modlauncher-10.2.1.jar!/:?] {} ¬†¬† ¬†at [email protected]/net.minecraftforge.bootstrap.Bootstrap.moduleMain(Bootstrap.java:188) [bootstrap-2.1.3.jar!/:?] {} ¬†¬† ¬†at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?] {} ¬†¬† ¬†at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] {} ¬†¬† ¬†at net.minecraftforge.bootstrap.Bootstrap.bootstrapMain(Bootstrap.java:133) [bootstrap-2.1.3.jar:2.1.3] {} ¬†¬† ¬†at net.minecraftforge.bootstrap.Bootstrap.start(Bootstrap.java:53) [bootstrap-2.1.3.jar:2.1.3] {} ¬†¬† ¬†at net.minecraftforge.bootstrap.ForgeBootstrap.main(ForgeBootstrap.java:19) [bootstrap-2.1.3.jar:2.1.3] {} -- NO MOD INFO AVAILABLE -- Details: ¬†¬† ¬†Mod File: NO FILE INFO ¬†¬† ¬†Failure message: Invalid mod file found C:\Users\Danny\curseforge\minecraft\Instances\Magic - modded\mods\waystones-neoforge-1.21-21.0.8.jar ¬†¬† ¬†Mod Version: NO MOD INFO AVAILABLE ¬†¬† ¬†Mod Issue URL: NOT PROVIDED ¬†¬† ¬†Exception message: MISSING EXCEPTION MESSAGE -- System Details -- Details: ¬†¬† ¬†Minecraft Version: 1.21 ¬†¬† ¬†Minecraft Version ID: 1.21 ¬†¬† ¬†Operating System: Windows 10 (amd64) version 10.0 ¬†¬† ¬†Java Version: 21.0.3, Microsoft ¬†¬† ¬†Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft ¬†¬† ¬†Memory: 350197760 bytes (333 MiB) / 650117120 bytes (620 MiB) up to 4294967296 bytes (4096 MiB) ¬†¬† ¬†CPUs: 32 ¬†¬† ¬†Processor Vendor: GenuineIntel ¬†¬† ¬†Processor Name: 13th Gen Intel(R) Core(TM) i9-13900K ¬†¬† ¬†Identifier: Intel64 Family 6 Model 183 Stepping 1 ¬†¬† ¬†Microarchitecture: Raptor Lake ¬†¬† ¬†Frequency (GHz): 3.00 ¬†¬† ¬†Number of physical packages: 1 ¬†¬† ¬†Number of physical CPUs: 24 ¬†¬† ¬†Number of logical CPUs: 32 ¬†¬† ¬†Graphics card #0 name: NVIDIA GeForce GTX 1080 Ti ¬†¬† ¬†Graphics card #0 vendor: NVIDIA ¬†¬† ¬†Graphics card #0 VRAM (MiB): 11264.00 ¬†¬† ¬†Graphics card #0 deviceId: VideoController1 ¬†¬† ¬†Graphics card #0 versionInfo: 32.0.15.5612 ¬†¬† ¬†Memory slot #0 capacity (MiB): 8192.00 ¬†¬† ¬†Memory slot #0 clockSpeed (GHz): 3.20 ¬†¬† ¬†Memory slot #0 type: DDR4 ¬†¬† ¬†Memory slot #1 capacity (MiB): 8192.00 ¬†¬† ¬†Memory slot #1 clockSpeed (GHz): 3.20 ¬†¬† ¬†Memory slot #1 type: DDR4 ¬†¬† ¬†Memory slot #2 capacity (MiB): 8192.00 ¬†¬† ¬†Memory slot #2 clockSpeed (GHz): 3.20 ¬†¬† ¬†Memory slot #2 type: DDR4 ¬†¬† ¬†Memory slot #3 capacity (MiB): 8192.00 ¬†¬† ¬†Memory slot #3 clockSpeed (GHz): 3.20 ¬†¬† ¬†Memory slot #3 type: DDR4 ¬†¬† ¬†Virtual memory max (MiB): 37441.13 ¬†¬† ¬†Virtual memory used (MiB): 15153.36 ¬†¬† ¬†Swap memory total (MiB): 4864.00 ¬†¬† ¬†Swap memory used (MiB): 0.00 ¬†¬† ¬†Space in storage for jna.tmpdir (MiB): available: 147541.50, total: 475918.38 ¬†¬† ¬†Space in storage for org.lwjgl.system.SharedLibraryExtractPath (MiB): available: 147541.50, total: 475918.38 ¬†¬† ¬†Space in storage for io.netty.native.workdir (MiB): available: 147541.50, total: 475918.38 ¬†¬† ¬†Space in storage for java.io.tmpdir (MiB): available: 147541.50, total: 475918.38 ¬†¬† ¬†Space in storage for workdir (MiB): available: 147541.50, total: 475918.38 ¬†¬† ¬†JVM Flags: 4 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx4096m -Xms256m ¬†¬† ¬†ModLauncher: 10.2.1 ¬†¬† ¬†ModLauncher launch target: forge_client ¬†¬† ¬†ModLauncher naming: mcp ¬†¬† ¬†ModLauncher services:¬† ¬†¬† ¬†¬†¬† ¬†/ slf4jfixer PLUGINSERVICE¬† ¬†¬† ¬†¬†¬† ¬†/ runtimedistcleaner PLUGINSERVICE¬† ¬†¬† ¬†¬†¬† ¬†/ runtime_enum_extender PLUGINSERVICE¬† ¬†¬† ¬†¬†¬† ¬†/ object_holder_definalize PLUGINSERVICE¬† ¬†¬† ¬†¬†¬† ¬†/ capability_token_subclass PLUGINSERVICE¬† ¬†¬† ¬†¬†¬† ¬†/ accesstransformer PLUGINSERVICE¬† ¬†¬† ¬†¬†¬† ¬†/ eventbus PLUGINSERVICE¬† ¬†¬† ¬†¬†¬† ¬†/ mixin PLUGINSERVICE¬† ¬†¬† ¬†¬†¬† ¬†/ fml TRANSFORMATIONSERVICE¬† ¬†¬† ¬†¬†¬† ¬†/ mixin TRANSFORMATIONSERVICE¬† ¬†¬† ¬†FML Language Providers:¬† ¬†¬† ¬†¬†¬† ¬†lowcodefml@51 ¬†¬† ¬†¬†¬† ¬†[email protected] ¬†¬† ¬†¬†¬† ¬†[email protected] ¬†¬† ¬†Mod List:¬† ¬†¬† ¬†¬†¬† ¬†forge-1.21-51.0.24-client.jar ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† |Minecraft ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† |minecraft ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† |1.21 ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬†|NONE ¬† ¬† ¬†|Manifest: NOSIGNATURE ¬†¬† ¬†¬†¬† ¬†forge-1.21-51.0.24-universal.jar ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬†|Forge ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† |forge ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† |51.0.24 ¬† ¬† ¬† ¬† ¬† ¬† |NONE ¬† ¬† ¬†|Manifest: NOSIGNATURE
    • Re-add these one by one until you find the one causing this issue
    • i think removing all those helped, but i do need most of those mods.
    • I mean is it possible to do that? Like an Event so you can write what happens when a Player/Entity is hearing a Sound.
    • I'm trying to install a 1.16.4 forge server but when I run 'forge-1.16.4-35.1.37.jar' with start.bat 'java -Xmx2048M -Xms2048M -jar forge-1.16.4-35.1.37.jar nogui ' it freezes and gives me this error.¬† [10:38:39] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 35.1.37, --fml.mcpVersion, 20201102.104115, --fml.mcVersion, 1.16.4, --fml.forgeGroup, net.minecraftforge, nogui] [10:38:39] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 8.0.9+86+master.3cf110c starting: java version 22.0.1 by Oracle Corporation Exception in thread "main" java.lang.IllegalAccessError: class cpw.mods.modlauncher.SecureJarHandler (in unnamed module @0x78b1cc93) cannot access class sun.security.util.ManifestEntryVerifier (in module java.base) because module java.base does not export sun.security.util to unnamed module @0x78b1cc93 ¬† ¬† ¬† ¬† at cpw.mods.modlauncher.SecureJarHandler.lambda$static$1(SecureJarHandler.java:41) ¬† ¬† ¬† ¬† at cpw.mods.modlauncher.api.LamdbaExceptionUtils.uncheck(LamdbaExceptionUtils.java:95) ¬† ¬† ¬† ¬† at cpw.mods.modlauncher.SecureJarHandler.<clinit>(SecureJarHandler.java:41) ¬† ¬† ¬† ¬† at cpw.mods.modlauncher.Launcher.lambda$new$6(Launcher.java:55) ¬† ¬† ¬† ¬† at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1710) ¬† ¬† ¬† ¬† at cpw.mods.modlauncher.api.TypesafeMap.computeIfAbsent(TypesafeMap.java:52) ¬† ¬† ¬† ¬† at cpw.mods.modlauncher.api.TypesafeMap.computeIfAbsent(TypesafeMap.java:47) ¬† ¬† ¬† ¬† at cpw.mods.modlauncher.Environment.computePropertyIfAbsent(Environment.java:62) ¬† ¬† ¬† ¬† at cpw.mods.modlauncher.Launcher.<init>(Launcher.java:55) ¬† ¬† ¬† ¬† at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) ¬† ¬† ¬† ¬† at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:63) ¬† ¬† ¬† ¬† at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:60) ¬† ¬† ¬† ¬† at net.minecraftforge.server.ServerMain.main(ServerMain.java:57) When I run the same bat file aimed at the vanilla server jar, it runs fine but vanilla and not forge. I have no idea what this error code is telling me and would appreciate some help with starting this server. ¬†
  • Topics

×
×
  • Create New...

Important Information

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