Comment créer de nouvelles dalles



  • Bonjour, j'ouvre ce topic car je ne trouve pas comment créer des dalles pour mon mod.
    Je suis en train de faire un mod qui ajoute de outils, des escaliers, des blocs. Le problème, c'est que je ne trouve pas de tutos pour faire des dalles, et en regardant le code source je ne comprends pas trop. Je vois qu'il y a des classe BlockSlab, HalfBlockSlab, UpperBlockSlab mais je ne sais pas lesquelles utiliser.
    J'ai déjà essayé à deux reprises mais soit le jeu crashait au lancement, soit les textures ne s'affichait pas et le jeu crashait quand je posait ces dalles.

    Si jamais vous connaissez des tutoriels pour m'aider, je vous en serez reconnaissant.

    Pour infos, je n'ai pas les classes de mes essais car je les ai supprimées et la versions de forge est la 1.12.2 - 14.23.3.2655

    Merci d'avance



  • tu creer une class extends BlockSlab et apres tu fait les json comme minecraft



  • @'SpyMan':

    tu creer une class extends BlockSlab et apres tu fait les json comme minecraft

    Justement, je viens de tester et dès que je pose le bloc, minecraft crash.



  • crash log stp



  • @'SpyMan':

    crash log stp

    Désolé poir la réponse un peu tardive mais je ne peux pas aller sur mon ordi pour l'instant, je te l'enverai demain normalement.



  • @'SpyMan':

    crash log stp

    Voilà le crash log : :::

    –-- Minecraft Crash Report ----
    // Everything's going to plan. No, really, that was supposed to happen.
    
    Time: 4/20/18 6:39 PM
    Description: Unexpected error
    
    java.lang.IllegalArgumentException: Cannot get property PropertyEnum{name=half, clazz=class net.minecraft.block.BlockSlab$EnumBlockHalf, values=[top, bottom]} as it does not exist in BlockStateContainer{block=mt:copper_slab, properties=[]}
    at net.minecraft.block.state.BlockStateContainer$StateImplementation.getValue(BlockStateContainer.java:204)
    at net.minecraft.block.BlockSlab.getBoundingBox(BlockSlab.java:53)
    at net.minecraft.block.state.BlockStateContainer$StateImplementation.getBoundingBox(BlockStateContainer.java:468)
    at net.minecraft.block.Block.getCollisionBoundingBox(Block.java:584)
    at net.minecraft.block.state.BlockStateContainer$StateImplementation.getCollisionBoundingBox(BlockStateContainer.java:458)
    at net.minecraft.world.World.mayPlace(World.java:3435)
    at net.minecraft.item.ItemBlock.canPlaceBlockOnSide(ItemBlock.java:130)
    at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClickBlock(PlayerControllerMP.java:463)
    at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1692)
    at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2379)
    at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2145)
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1933)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1186)
    at net.minecraft.client.Minecraft.run(Minecraft.java:441)
    at net.minecraft.client.main.Main.main(Main.java:118)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:25)
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    –-------------------------------------------------------------------------------------
    
    -- Head --
    Thread: Client thread
    Stacktrace:
    at net.minecraft.block.state.BlockStateContainer$StateImplementation.getValue(BlockStateContainer.java:204)
    at net.minecraft.block.BlockSlab.getBoundingBox(BlockSlab.java:53)
    at net.minecraft.block.state.BlockStateContainer$StateImplementation.getBoundingBox(BlockStateContainer.java:468)
    at net.minecraft.block.Block.getCollisionBoundingBox(Block.java:584)
    at net.minecraft.block.state.BlockStateContainer$StateImplementation.getCollisionBoundingBox(BlockStateContainer.java:458)
    at net.minecraft.world.World.mayPlace(World.java:3435)
    at net.minecraft.item.ItemBlock.canPlaceBlockOnSide(ItemBlock.java:130)
    at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClickBlock(PlayerControllerMP.java:463)
    at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1692)
    at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2379)
    at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2145)
    
    -- Affected level --
    Details:
    Level name: MpServer
    All players: 1 total; [EntityPlayerSP['huggets'/34, l='MpServer', x=678.52, y=52.00, z=1485.28]]
    Chunk stats: MultiplayerChunkCache: 578, 578
    Level seed: 0
    Level generator: ID 01 - flat, ver 0\. Features enabled: false
    Level generator options:
    Level spawn location: World: (659,4,1474), Chunk: (at 3,0,2 in 41,92; contains blocks 656,0,1472 to 671,255,1487), Region: (1,2; contains chunks 32,64 to 63,95, blocks 512,0,1024 to 1023,255,1535)
    Level time: 35796 game time, 1240 day time
    Level dimension: 0
    Level storage version: 0x00000 - Unknown?
    Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
    Forced entities: 4 total; [EntityPig['Cochon'/0, l='MpServer', x=597.43, y=52.00, z=1406.77], EntityPig['Cochon'/2, l='MpServer', x=621.73, y=52.00, z=1410.55], EntityPig['Cochon'/4, l='MpServer', x=629.24, y=52.00, z=1407.27], EntityPlayerSP['huggets'/34, l='MpServer', x=678.52, y=52.00, z=1485.28]]
    Retry entities: 0 total; []
    Server brand: fml,forge
    Server type: Integrated singleplayer server
    Stacktrace:
    at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:461)
    at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2885)
    at net.minecraft.client.Minecraft.run(Minecraft.java:470)
    at net.minecraft.client.main.Main.main(Main.java:118)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:25)
    
    – System Details --
    Details:
    Minecraft Version: 1.12.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_161, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 684227288 bytes (652 MB) / 997720064 bytes (951 MB) up to 1892155392 bytes (1804 MB)
    JVM Flags: 0 total;
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.42 Powered by Forge 14.23.3.2655 5 mods loaded, 5 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    
    | State     | ID        | Version      | Source                           | Signature |
    |:--------- |:--------- |:------------ |:-------------------------------- |:--------- |
    | UCHIJAAAA | minecraft | 1.12.2       | minecraft.jar                    | None      |
    | UCHIJAAAA | mcp       | 9.42         | minecraft.jar                    | None      |
    | UCHIJAAAA | FML       | 8.0.99.99    | forgeSrc-1.12.2-14.23.3.2655.jar | None      |
    | UCHIJAAAA | forge     | 14.23.3.2655 | forgeSrc-1.12.2-14.23.3.2655.jar | None      |
    | UCHIJAAAA | mt        | 0.0.0.1      | bin                              | None      |
    
    Loaded coremods (and transformers):
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 391.35' Renderer: 'GeForce GTX 950M/PCIe/SSE2'
    Launched Version: 1.12.2
    LWJGL: 2.9.4
    OpenGL: GeForce GTX 950M/PCIe/SSE2 GL version 4.6.0 NVIDIA 391.35, NVIDIA Corporation
    GL Caps: Using GL 1.3 multitexturing.
    Using GL 1.3 texture combiners.
    Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
    Shaders are available because OpenGL 2.1 is supported.
    VBOs are available because OpenGL 1.5 is supported.
    
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'fml,forge'
    Type: Client (map_client.txt)
    Resource Packs:
    Current Language: Français (France)
    Profiler Position: N/A (disabled)
    CPU: 4x Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz
    

    :::

    Pour moi il a l'air de manquer des déclarations pour une dalle double et un simple



  • Tu n'as pas bien définit ton BlockStateContainer (Ou alors tu ne l'a peut-être pas définit.) Tu doit le faire en redéfinissant la méthode BlockStateContainer dans la classe de ton block.



  • @'LeBossMax2':

    Tu n'as pas bien définit ton BlockStateContainer (Ou alors tu ne l'a peut-être pas définit.) Tu doit le faire en redéfinissant la méthode BlockStateContainer dans la classe de ton block.

    C'est qu'il n'y a même pas cette méthode de définit dans la classe BlockSlab, ducoup je ne sais pas comment la définir



  • Cette method est definie dans la class block. Comme blockslab est extendba bloxk alors ta la method



  • Il n'y a pas de méthode BlockStateContainer, il a juste une méthode setBlockState (je ne me rapelera plus de son nom) de type BlockStateContainer. Je vais essayer de lire encore plus en détails le code source et je vous dirai si j'a réussi à faire ce que je voulais


  • Moddeurs confirmés Rédacteurs Modérateurs Administrateurs

    C'est bien la bonne méthode.



  • Ah oui désolé, je voulais dire la méthode createBlockState.



  • Bon je n'y arrive toujours pas :

    2018-05-05 15:28:49,602 main WARN Disabling terminal, you're running in an unsupported environment.
    [15:28:49] [main/INFO] [GradleStart]: username: hujalobill@hotmail.fr
    [15:28:49] [main/INFO] [GradleStart]: Extra: []
    [15:28:49] [main/INFO] [GradleStart]: Password found, attempting login
    [15:28:49] [main/INFO] [com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication]: Logging in with username & password
    [15:28:50] [main/INFO] [GradleStart]: Login Succesful!
    [15:28:50] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, [], –assetsDir, C:/Users/hujal/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --userType, mojang, --accessToken{REDACTED}, --version, 1.12.2, --uuid, 74914fee23f84c50874a432158f0778a, --username, huggets, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
    [15:28:50] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [15:28:50] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [15:28:50] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
    [15:28:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
    [15:28:50] [main/INFO] [FML]: Forge Mod Loader version 14.23.3.2655 for Minecraft 1.12.2 loading
    [15:28:50] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_161, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_161
    [15:28:50] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
    [15:28:50] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin
    [15:28:50] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin
    [15:28:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
    [15:28:50] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
    [15:28:50] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
    [15:28:50] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [15:28:50] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [15:28:50] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [15:28:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [15:28:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [15:28:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    [15:28:52] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
    [15:28:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    [15:28:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [15:28:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [15:28:53] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
    [15:28:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
    [15:28:53] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
    [15:28:53] [main/INFO] [net.minecraft.client.Minecraft]: Setting user: huggets
    [15:28:58] [main/WARN] [net.minecraft.client.settings.GameSettings]: Skipping bad option: lastServer:
    [15:28:58] [main/INFO] [net.minecraft.client.Minecraft]: LWJGL Version: 2.9.4
    [15:28:59] [main/INFO] [FML]: – System Details --
    Details:
    Minecraft Version: 1.12.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_161, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 403383432 bytes (384 MB) / 558891008 bytes (533 MB) up to 1892155392 bytes (1804 MB)
    JVM Flags: 0 total;
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML:
    Loaded coremods (and transformers):
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 397.31' Renderer: 'GeForce GTX 950M/PCIe/SSE2'
    [15:28:59] [main/INFO] [FML]: MinecraftForge v14.23.3.2655 Initialized
    [15:28:59] [main/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients.
    [15:28:59] [main/INFO] [FML]: Replaced 1036 ore ingredients
    [15:29:00] [main/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
    [15:29:00] [main/INFO] [FML]: Searching C:\Users\hujal\Documents\Minecraft\modding\MORETHINGS-refait\forge-1.12.2-14.23.3.2655-mdk\run\mods for mods
    [15:29:00] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
    [15:29:01] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, mt] at CLIENT
    [15:29:01] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, mt] at SERVER
    [15:29:02] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 113852474 nanos
    [15:29:02] [main/INFO] [net.minecraft.client.resources.SimpleReloadableResourceManager]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:More Things
    [15:29:02] [main/INFO] [FML]: Processing ObjectHolder annotations
    [15:29:02] [main/INFO] [FML]: Found 1168 ObjectHolder annotations
    [15:29:02] [main/INFO] [FML]: Identifying ItemStackHolder annotations
    [15:29:02] [main/INFO] [FML]: Found 0 ItemStackHolder annotations
    [15:29:02] [main/INFO] [FML]: Configured a dormant chunk cache size of 0
    [15:29:02] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
    [15:29:02] [main/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.RegistryEvent$Register@5a8dfd2e:
    java.lang.IllegalArgumentException: Don't know how to convert mt:copper_slab[seamless=true,variant=copper] back into data…
    at net.minecraft.block.Block.getMetaFromState(Block.java:248) ~[Block.class:?]
    at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:308) ~[GameData$BlockCallbacks.class:?]
    at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:284) ~[GameData$BlockCallbacks.class:?]
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:350) ~[ForgeRegistry.class:?]
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:281) ~[ForgeRegistry.class:?]
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:114) ~[ForgeRegistry.class:?]
    at net.minecraftforge.registries.ForgeRegistry.registerAll(ForgeRegistry.java:155) ~[ForgeRegistry.class:?]
    at com.huggets.mt.RegisteringHandler.registerBlocks(RegisteringHandler.java:44) ~[RegisteringHandler.class:?]
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_RegisteringHandler_registerBlocks_Register.invoke(.dynamic) ~[?:?]
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143) ~[EventBus$1.class:?]
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179) [EventBus.class:?]
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:736) [GameData.class:?]
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:604) [Loader.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:270) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.init(Minecraft.java:513) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:25) [start/:?]
    [15:29:02] [main/ERROR] [FML]: Index: 3 Listeners:
    [15:29:02] [main/ERROR] [FML]: 0: NORMAL
    [15:29:02] [main/ERROR] [FML]: 1: net.minecraftforge.fml.common.eventhandler.EventBus$1@4aebeda8
    [15:29:02] [main/ERROR] [FML]: 2: net.minecraftforge.fml.common.eventhandler.EventBus$1@7e634ead
    [15:29:02] [main/ERROR] [FML]: 3: net.minecraftforge.fml.common.eventhandler.EventBus$1@6ded49c4
    [15:29:03] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: –-- Minecraft Crash Report ----
    // Hi. I'm Minecraft, and I'm a crashaholic.
    
    Time: 5/5/18 3:29 PM
    Description: Initializing game
    
    java.lang.IllegalArgumentException: Don't know how to convert mt:copper_slab[seamless=true,variant=copper] back into data…
    at net.minecraft.block.Block.getMetaFromState(Block.java:248)
    at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:308)
    at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:284)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:350)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:281)
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:114)
    at net.minecraftforge.registries.ForgeRegistry.registerAll(ForgeRegistry.java:155)
    at com.huggets.mt.RegisteringHandler.registerBlocks(RegisteringHandler.java:44)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_RegisteringHandler_registerBlocks_Register.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:736)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:604)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:270)
    at net.minecraft.client.Minecraft.init(Minecraft.java:513)
    at net.minecraft.client.Minecraft.run(Minecraft.java:421)
    at net.minecraft.client.main.Main.main(Main.java:118)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:25)
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Thread: Client thread
    Stacktrace:
    at net.minecraft.block.Block.getMetaFromState(Block.java:248)
    at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:308)
    at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:284)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:350)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:281)
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:114)
    at net.minecraftforge.registries.ForgeRegistry.registerAll(ForgeRegistry.java:155)
    at com.huggets.mt.RegisteringHandler.registerBlocks(RegisteringHandler.java:44)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_RegisteringHandler_registerBlocks_Register.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:736)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:604)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:270)
    at net.minecraft.client.Minecraft.init(Minecraft.java:513)
    
    -- Initialization --
    Details:
    Stacktrace:
    at net.minecraft.client.Minecraft.run(Minecraft.java:421)
    at net.minecraft.client.main.Main.main(Main.java:118)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:25)
    
    -- System Details --
    Details:
    Minecraft Version: 1.12.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_161, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 454671360 bytes (433 MB) / 788529152 bytes (752 MB) up to 1892155392 bytes (1804 MB)
    JVM Flags: 0 total;
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.42 Powered by Forge 14.23.3.2655 5 mods loaded, 5 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    
    | State | ID        | Version      | Source                           | Signature |
    |:----- |:--------- |:------------ |:-------------------------------- |:--------- |
    | UCH   | minecraft | 1.12.2       | minecraft.jar                    | None      |
    | UCH   | mcp       | 9.42         | minecraft.jar                    | None      |
    | UCH   | FML       | 8.0.99.99    | forgeSrc-1.12.2-14.23.3.2655.jar | None      |
    | UCH   | forge     | 14.23.3.2655 | forgeSrc-1.12.2-14.23.3.2655.jar | None      |
    | UCH   | mt        | 0.0.0.1      | bin                              | None      |
    
    Loaded coremods (and transformers):
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 397.31' Renderer: 'GeForce GTX 950M/PCIe/SSE2'
    Launched Version: 1.12.2
    LWJGL: 2.9.4
    OpenGL: GeForce GTX 950M/PCIe/SSE2 GL version 4.6.0 NVIDIA 397.31, NVIDIA Corporation
    GL Caps: Using GL 1.3 multitexturing.
    Using GL 1.3 texture combiners.
    Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
    Shaders are available because OpenGL 2.1 is supported.
    VBOs are available because OpenGL 1.5 is supported.
    
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'fml,forge'
    Type: Client (map_client.txt)
    Resource Packs:
    Current Language: Français (France)
    Profiler Position: N/A (disabled)
    CPU: 4x Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz
    [15:29:03] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\hujal\Documents\Minecraft\modding\MORETHINGS-refait\forge-1.12.2-14.23.3.2655-mdk\run\.\crash-reports\crash-2018-05-05_15.29.03-client.txt
    
    

    J'ai toujours cette erreur et je ne sais pas ce qu'il faut faire 😢

    java.lang.IllegalArgumentException: Don't know how to convert mt:copper_slab[seamless=true,variant=copper] back into data..
    


  • Il faut aussi override les methodes getMetaFromState et getStateFromMeta pour que le monde puisse enregistrer ton block.



  • @'LeBossMax2':

    Il faut aussi override les methodes getMetaFromState et getStateFromMeta pour que le monde puisse enregistrer ton block.

    Ok, j'essayerai demain.

    Par contre, je n'ai pas trop compris à quoi cette annotation sert et ce qu'elle fait.


  • Moddeurs confirmés Rédacteurs Modérateurs Administrateurs

    Tu parles de quelle annotation ?



  • @'Superloup10':

    Tu parles de quelle annotation ?

    L'annotation @Override



  • Elle a aucun effet sur le code mais permet d'indiquer à celui qui code qu'ellle "remplace" la fonction du même nom et de mêmes paramètres de la classe mère.


  • Moddeurs confirmés Rédacteurs Modérateurs Administrateurs

    Pour être plus exact, elle indique au compilateur que la méthode que tu veux redéfinir existe ou pas, ensuite ton IDE lui va t'indiquer visuellement si c'est le cas ou pas.



  • Ok mais ducoup je ne vois pas a quoi ça sert d'override les deux méthodes si ça ne fait rien au code


Log in to reply