Jump to content

[1.7.2] Adding ID mapping to structure


TheEnderKiller

Recommended Posts

Hi.

When I create a new world to search for my custom village Minecraft instantly crashes. This is the crash report:

 

---- Minecraft Crash Report ----

// This doesn't make any sense!

 

Time: 2014-06-25 23:55

Description: Exception preparing structure feature

 

java.lang.RuntimeException: StructureStart "com.sirpigman.pigmanvillages.structure.MapGenPigmanVillage$Start" missing ID Mapping, Modder see MapGenStructureIO

at net.minecraft.world.gen.structure.StructureStart.func_143021_a(StructureStart.java:74)

at net.minecraft.world.gen.structure.MapGenStructure.func_143026_a(MapGenStructure.java:293)

at net.minecraft.world.gen.structure.MapGenStructure.func_151538_a(MapGenStructure.java:47)

at net.minecraft.world.gen.MapGenBase.func_151539_a(MapGenBase.java:33)

at com.sirpigman.dimensiontest.ChunkProviderDT.provideChunk(ChunkProviderDT.java:249)

at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:186)

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:145)

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:115)

at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:217)

at net.minecraft.world.World.getChunkFromChunkCoords(World.java:487)

at net.minecraft.world.World.getBlock(World.java:392)

at net.minecraft.world.World.isAirBlock(World.java:415)

at net.minecraft.world.World.getTopBlock(World.java:376)

at net.minecraft.world.WorldProvider.canCoordinateBeSpawn(WorldProvider.java:97)

at net.minecraft.world.WorldServer.createSpawnPosition(WorldServer.java:806)

at net.minecraft.world.WorldServer.initialize(WorldServer.java:770)

at net.minecraft.world.World.<init>(World.java:301)

at net.minecraft.world.WorldServer.<init>(WorldServer.java:103)

at net.minecraft.world.WorldServerMulti.<init>(WorldServerMulti.java:14)

at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:66)

at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:442)

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:747)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at net.minecraft.world.gen.structure.StructureStart.func_143021_a(StructureStart.java:74)

at net.minecraft.world.gen.structure.MapGenStructure.func_143026_a(MapGenStructure.java:293)

 

-- Feature being prepared --

Details:

Is feature chunk: True

Chunk location: 9,-13

Chunk pos hash: -55834574839

Structure type: com.sirpigman.pigmanvillages.structure.MapGenPigmanVillage

Stacktrace:

at net.minecraft.world.gen.structure.MapGenStructure.func_151538_a(MapGenStructure.java:47)

at net.minecraft.world.gen.MapGenBase.func_151539_a(MapGenBase.java:33)

at com.sirpigman.dimensiontest.ChunkProviderDT.provideChunk(ChunkProviderDT.java:249)

 

-- Chunk to be generated --

Details:

Location: 2,-5

Position hash: -21474836478

Generator: RandomLevelSource

Stacktrace:

at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:186)

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:145)

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:115)

at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:217)

at net.minecraft.world.World.getChunkFromChunkCoords(World.java:487)

 

-- Requested block coordinates --

Details:

Found chunk: true

Location: World: (47,64,-80), Chunk: (at 15,4,0 in 2,-5; contains blocks 32,0,-80 to 47,255,-65), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)

Stacktrace:

at net.minecraft.world.World.getBlock(World.java:392)

at net.minecraft.world.World.isAirBlock(World.java:415)

at net.minecraft.world.World.getTopBlock(World.java:376)

at net.minecraft.world.WorldProvider.canCoordinateBeSpawn(WorldProvider.java:97)

at net.minecraft.world.WorldServer.createSpawnPosition(WorldServer.java:806)

at net.minecraft.world.WorldServer.initialize(WorldServer.java:770)

 

-- Affected level --

Details:

Level name: Test.

All players: 0 total; []

Chunk stats: ServerChunkCache: 160 Drop: 0

Level seed: -153430852

Level generator: ID 00 - default, ver 1. Features enabled: true

Level generator options:

Level spawn location: World: (0,0,0), Chunk: (at 0,0,0 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)

Level time: 0 game time, 0 day time

Level dimension: 0

Level storage version: 0x04ABD - Anvil

Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)

Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true

Stacktrace:

at net.minecraft.world.World.<init>(World.java:301)

at net.minecraft.world.WorldServer.<init>(WorldServer.java:103)

at net.minecraft.world.WorldServerMulti.<init>(WorldServerMulti.java:14)

at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:66)

at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:442)

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:747)

 

-- System Details --

Details:

Minecraft Version: 1.7.2

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_51, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 686659968 bytes (654 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 5, tcache: 0, allocated: 13, tallocated: 95

FML: MCP v9.03 FML v7.2.213.1130 Minecraft Forge 10.12.2.1130 5 mods loaded, 5 mods active

mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available

FML{7.2.213.1130} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.2.1130.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized

 

It says something about a missing ID mapping and to check the class MapGenStructureIO.

 

java.lang.RuntimeException: StructureStart "com.sirpigman.pigmanvillages.structure.MapGenPigmanVillage$Start" missing ID Mapping, Modder see MapGenStructureIO

 

So the question is, how can I add an ID mapping to my structure?

 

EDIT: Yes, I have checked the class and trying to do it like there, but I couldn't get that to work.

Link to comment
Share on other sites

I created this class:

 

package com.sirpigman.pigmanvillages.structure;

import net.minecraft.world.gen.structure.MapGenStructureIO;

public class StructureRegister extends MapGenStructureIO {

public void registerStructures()
{
	registerStructure(MapGenPigmanVillage.Start.class, "Pigman Village");
        StructurePVillagePieces.registerVillagePieces();
}

}

 

Which is how structures are registred in MapGenIO:

 

static
    {
        registerStructure(StructureMineshaftStart.class, "Mineshaft");
        registerStructure(MapGenVillage.Start.class, "Village");
        registerStructure(MapGenNetherBridge.Start.class, "Fortress");
        registerStructure(MapGenStronghold.Start.class, "Stronghold");
        registerStructure(MapGenScatteredFeature.Start.class, "Temple");
        StructureMineshaftPieces.registerStructurePieces();
        StructureVillagePieces.registerVillagePieces();
        StructureNetherBridgePieces.registerNetherFortressPieces();
        StructureStrongholdPieces.registerStrongholdPieces();
        ComponentScatteredFeaturePieces.registerScatteredFeaturePieces();
    }

 

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

    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
    • It is an issue with quark - update it to this build: https://www.curseforge.com/minecraft/mc-mods/quark/files/3642325
    • Remove Instant Massive Structures Mod from your server     Add new crash-reports with sites like https://paste.ee/  
    • Update your drivers: https://www.amd.com/en/support/graphics/amd-radeon-r9-series/amd-radeon-r9-200-series/amd-radeon-r9-280x
  • Topics

×
×
  • Create New...

Important Information

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