[09Jul2025 19:41:12.192] [Worker-Main-15/ERROR] [net.minecraftforge.common.ForgeHooks/]: Couldn't parse element loot_tables:prehistoricascension:blocks/ginkgo_knuckles
com.google.gson.JsonSyntaxException: Expected name to be an item, was unknown string 'prehistoricascension:ginkgo_knuckles'
at net.minecraft.util.GsonHelper.lambdaconvertToItem0(GsonHelper.java:145) ~[forge-1.20.1-47.4.1_mapped_parchment_2023.09.03-1.20.1.jar%23191!/:?]
at java.util.Optional.orElseThrow(Optional.java:403) ~[?:?]
at net.minecraft.util.GsonHelper.convertToItem(GsonHelper.java:145) ~[forge-1.20.1-47.4.1_mapped_parchment_2023.09.03-1.20.1.jar%23191!/:?]
at net.minecraft.util.GsonHelper.getAsItem(GsonHelper.java:153) ~[forge-1.20.1-47.4.1_mapped_parchment_2023.09.03-1.20.1.jar%23191!/:?]
at net.minecraft.world.level.storage.loot.entries.LootItemSerializer.deserialize(LootItem.java:55)[forge−1.20.1−47.4.1Serializer.deserialize(LootItem.java:40) ~[forge-1.20.1-47.4.1_mapped_parchment_2023.09.03-1.20.1.jar%23191!/:?]
at net.minecraft.world.level.storage.loot.entries.LootPoolSingletonContainerSerializer.deserializeCustom(LootPoolSingletonContainer.java:129) ~[forge-1.20.1-47.4.1_mapped_parchment_2023.09.03-1.20.1.jar%23191!/:?]
at net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainerSerializer.deserialize(LootPoolEntryContainer.java:74) ~[forge-1.20.1-47.4.1_mapped_parchment_2023.09.03-1.20.1.jar%23191!/:?]
at net.minecraft.world.level.storage.loot.GsonAdapterFactoryGsonContextImpl.deserialize(TreeTypeAdapter.java:179) ~[gson-2.10.jar%23130!/:?]
at net.minecraft.util.GsonHelper.convertToObject(GsonHelper.java:463) ~[forge-1.20.1-47.4.1_mapped_parchment_2023.09.03-1.20.1.jar%23191!/:?]
at net.minecraft.util.GsonHelper.getAsObject(GsonHelper.java:471) ~[forge-1.20.1-47.4.1_mapped_parchment_2023.09.03-1.20.1.jar%23191!/:?]
at net.minecraft.world.level.storage.loot.LootPoolSerializer.deserialize(LootPool.java:189) ~[forge-1.20.1-47.4.1_mapped_parchment_2023.09.03-1.20.1.jar%23191!/:?]
at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:76) ~[gson-2.10.jar%23130!/:?]
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) ~[gson-2.10.jar%23130!/:?]
at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72) ~[gson-2.10.jar%23130!/:?]
at com.google.gson.Gson.fromJson(Gson.java:1214) ~[gson-2.10.jar%23130!/:?]
at com.google.gson.Gson.fromJson(Gson.java:1319) ~[gson-2.10.jar%23130!/:?]
at com.google.gson.Gson.fromJson(Gson.java:1290) ~[gson-2.10.jar%23130!/:?]
at com.google.gson.internal.bind.TreeTypeAdapterSerializer.deserialize(LootTable.java:294) ~[forge-1.20.1-47.4.1_mapped_parchment_2023.09.03-1.20.1.jar%23191!/:?]
at net.minecraft.world.level.storage.loot.LootTablegetLootTableDeserializerscheduleElementParsescheduleElementParse5(LootDaAsyncRun.run(CompletableFuture.java:1804) ~[?:?]
at java.util.concurrent.CompletableFutureWorkQueue.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) ~[?:?]
[09Jul2025 19:41:25.438] [Render thread/ERROR] [net.minecraft.client.Minecraft/FATAL]: Unreported exception thrown!
java.lang.IllegalArgumentException: The stack count must be 1
at net.minecraftforge.common.ForgeHooks.lambdaonCreativeModeTabBuildContents17(ForgeHooks.java:1629) ~[forge-1.20.1-47.4.1_mapped_parchment_2023.09.03-1.20.1.jar:?]
at net.minecraft.world.item.CreativeModeTabstaticbuildAllTabContentsForEachOp2IteratorSpliterator.forEachRemaining(Spliterators.java:1845) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
at java.util.stream.ForEachOpsForEachOpmakeService$7(CommonDevLaunchHandler.java:135) ~[fmlloader-1.20.1-47.4.1.jar:?]
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?]
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?]
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?]
at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?]
at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?]
at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?]
at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?]
at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?]
public class GinkgoKnucklesItem extends BlockItem {
// Define an array of allowed blocks (you can add more here)
private static final Block[] ALLOWED_BLOCKS = {
ModBlocks.GINKO_LOG.get() // Currently only ginko_log; add more as needed, e.g., ModBlocks.ANOTHER_BLOCK.get()
};
public GinkgoKnucklesItem(Block block, Item.Properties properties) {
super(block, properties);
}
@Override
public InteractionResult useOn(UseOnContext context) {
Level level = context.getLevel();
BlockPos clickedPos = context.getClickedPos();
Direction face = context.getClickedFace();
BlockState clickedState = level.getBlockState(clickedPos);
// Check if the block being clicked on is in the allowed blocks list
boolean isAllowedBlock = false;
for (Block allowedBlock : ALLOWED_BLOCKS) {
if (clickedState.getBlock() == allowedBlock) {
isAllowedBlock = true;
break;
}
}
if (!isAllowedBlock) {
return InteractionResult.FAIL; // Fail if not on an allowed block
}
// The position to place the block is offset by the face clicked
BlockPos placePos = clickedPos.relative(face);
if (!level.getBlockState(placePos).canBeReplaced()) {
return InteractionResult.FAIL; // Can't place if the spot is occupied
}
// Get the block state with FACING set to DOWN (upside down)
BlockState placeState = getBlock().defaultBlockState().setValue(GinkgoKnucklesBlock.FACING, Direction.DOWN);
// Place the block
if (level.setBlock(placePos, placeState, 11)) {
return InteractionResult.sidedSuccess(level.isClientSide());
}
return InteractionResult.FAIL;
}
}
public static final RegistryObject<Block> GINKGO_KNUCKLES = BLOCKS.register("ginkgo_knuckles",
() -> new GinkgoKnucklesBlock(BlockBehaviour.Properties.copy(Blocks.SPRUCE_PLANKS).noOcclusion()));
The errors you're encountering are due to two main issues:
Loot Table Error: The loot table is referencing prehistoricascension:ginkgo_knuckles as an item, but the item isn't properly registered or the loot table format is incorrect.
Creative Tab Error: There's an issue with adding the item to the creative tab - "The stack count must be 1" suggests you're trying to add an item with an invalid stack size.
Let me help you fix these issues:
1. Fix the Item Registration
First, you need to register the item properly. Update your registration code:
// In your ModBlocks.java or wherever you register blocks
public static final RegistryObject<Block> GINKGO_KNUCKLES = BLOCKS.register("ginkgo_knuckles",
() -> new GinkgoKnucklesBlock(BlockBehaviour.Properties.copy(Blocks.SPRUCE_PLANKS).noOcclusion()));
// In your ModItems.java or wherever you register items
public static final RegistryObject<Item> GINKGO_KNUCKLES_ITEM = ITEMS.register("ginkgo_knuckles",
() -> new GinkgoKnucklesItem(ModBlocks.GINKGO_KNUCKLES.get(), new Item.Properties()));
2. Fix the Creative Tab Registration
In your ModCreativeModTabs.java, make sure you're adding the item correctly:
// In your creative tab registration
public static final RegistryObject<CreativeModeTab> YOUR_TAB = CREATIVE_MODE_TABS.register("your_tab_name",
() -> CreativeModeTab.builder().icon(() -> new ItemStack(ModItems.SOME_ITEM.get()))
.title(Component.translatable("creativetab.your_tab_name"))
.displayItems((parameters, output) -> {
// Add your items here
output.accept(ModItems.GINKGO_KNUCKLES_ITEM.get()); // Make sure this is the ITEM, not the BLOCK
})
.build());
3. Create the Loot Table
Create a loot table file at src/main/resources/data/prehistoricascension/loot_tables/blocks/ginkgo_knuckles.json:
public static final RegistryObject<Block> GINKGO_KNUCKLES = BLOCKS.register("ginkgo_knuckles",
() -> new GinkgoKnucklesBlock(BlockBehaviour.Properties.copy(Blocks.SPRUCE_PLANKS).noOcclusion()));
ModItems.java:
public static final RegistryObject<Item> GINKGO_KNUCKLES = ITEMS.register("ginkgo_knuckles",
() -> new GinkgoKnucklesItem(ModBlocks.GINKGO_KNUCKLES.get(), new Item.Properties()));
In your main mod class or wherever you handle registration:
// Make sure both BLOCKS and ITEMS DeferredRegisters are registered to the mod event bus
BLOCKS.register(modEventBus);
ITEMS.register(modEventBus);
6. Update Your Creative Tab
Make sure you're referencing the item, not the block:
// In ModCreativeModTabs.java
output.accept(ModItems.GINKGO_KNUCKLES.get()); // Use the ITEM registry object
The key points:
Register both the block AND the item separately
Use the item in creative tabs and loot tables, not the block
Make sure the loot table references the correct item name
Ensure all models referenced in blockstate exist or reuse existing ones
After making these changes, clean and rebuild your project. The errors should be resolved.