Block orientable



  • voila, je voulais rendre mon block orientable, seulement j'ai suivi un totoriel 1.8 et il s'avere que depuis ça à changé …
    La fonction "BlockState" n'existe plus !

    Je l'ai donc remplacé par "BlockStateContainer" mais cela ne fonctionne pas, mon jeu crash me disant qu'il y a un probleme de la Pre-initialisation jusqu'a l'initialisation ...

    J'ai fait ceci

    package com.tuto.mod.blocks;
    
    import net.minecraft.block.BlockDirectional;
    import net.minecraft.block.material.Material;
    import net.minecraft.block.properties.IProperty;
    import net.minecraft.block.state.BlockStateContainer;
    import net.minecraft.block.state.IBlockState;
    import net.minecraft.entity.EntityLivingBase;
    import net.minecraft.util.EnumFacing;
    import net.minecraft.util.math.AxisAlignedBB;
    import net.minecraft.util.math.BlockPos;
    import net.minecraft.world.IBlockAccess;
    import net.minecraft.world.World;
    
    public class RubiksMod extends BlockDirectional
    {    
        protected static final AxisAlignedBB RUBIKS_AABB = new AxisAlignedBB(0.3D, 0.0D, 0.3D, 0.7D, 0.4D, 0.7D);
    
        public RubiksMod(Material materialIn)
        {
            super(Material.GRASS);
            setHardness(0.5F);
            this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
        }
    
         public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
            {
                return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
            }
    
         public IBlockState getStateFromMeta(int meta)
         {
             return this.getDefaultState().withProperty(FACING, EnumFacing.getHorizontal(meta));
         }
    
         public int getMetaFromState(IBlockState state)
         {
             return ((EnumFacing)state.getValue(FACING)).getHorizontalIndex();
         }
    
         protected BlockStateContainer createBlockState()
         {
             return new BlockStateContainer(this, new IProperty[] {FACING});
         }
    
          public BlockStateContainer getBlockState()
            {
                return this.blockState;
            }
    
        public boolean isFullCube(IBlockState state)
        {
            return false;
        }
    
        public boolean isOpaqueCube(IBlockState state)
        {
            return false;
        }
    
         public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
            {
                return RUBIKS_AABB;
            }
    
    }
    

    le crash report

    2017-05-03 15:34:56,676 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-05-03 15:34:56,678 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    [15:34:56] [main/INFO] [GradleStart]: Extra: []
    [15:34:56] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/laura pc/.gradle/caches/minecraft/assets, --assetIndex, 1.9, --accessToken{REDACTED}, --version, 1.9.4, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
    [15:34:56] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [15:34:57] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
    [15:34:57] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
    [15:34:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
    [15:34:57] [main/INFO] [FML]: Forge Mod Loader version 12.17.0.2051 for Minecraft 1.9.4 loading
    [15:34:57] [main/INFO] [FML]: Java is Java HotSpot(TM) Client VM, version 1.8.0_111, running on Windows 7:x86:6.1, installed at C:\Program Files (x86)\Java\jre1.8.0_111
    [15:34:57] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
    [15:34:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
    [15:34:57] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
    [15:34:57] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
    [15:34:57] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [15:34:57] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [15:34:57] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [15:34:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [15:34:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
    [15:34:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    [15:34:57] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
    [15:35:00] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
    [15:35:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
    [15:35:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
    [15:35:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
    [15:35:00] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
    [15:35:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
    [15:35:00] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
    2017-05-03 15:35:01,465 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-05-03 15:35:01,504 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    2017-05-03 15:35:01,507 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
    [15:35:01] [Client thread/INFO]: Setting user: Player651
    [15:35:06] [Client thread/INFO]: LWJGL Version: 2.9.4
    [15:35:08] [Client thread/INFO] [STDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:202]: –-- Minecraft Crash Report ----
    // I blame Dinnerbone.
    
    Time: 03/05/17 15:35
    Description: Loading screen debug info
    
    This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- System Details --
    Details:
    Minecraft Version: 1.9.4
    Operating System: Windows 7 (x86) version 6.1
    Java Version: 1.8.0_111, Oracle Corporation
    Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
    Memory: 848829144 bytes (809 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML:
    Loaded coremods (and transformers):
    GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.1.10664 Compatibility Profile Context' Renderer: 'ATI Mobility Radeon HD 5470'
    [15:35:08] [Client thread/INFO] [FML]: MinecraftForge v12.17.0.2051 Initialized
    [15:35:08] [Client thread/INFO] [FML]: Replaced 232 ore recipes
    [15:35:08] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
    [15:35:08] [Client thread/INFO] [FML]: Searching C:\Users\laura pc\Desktop\Benji\ModderMinecraft\forge-1.9.4-12.17.0.2051-mdk\mods for mods
    [15:35:10] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
    [15:35:10] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, tuto] at CLIENT
    [15:35:10] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, tuto] at SERVER
    [15:35:11] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:§4Topaze Mod
    [15:35:11] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
    [15:35:12] [Client thread/INFO] [FML]: Found 418 ObjectHolder annotations
    [15:35:12] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
    [15:35:12] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
    [15:35:12] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
    [15:35:12] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
    [15:35:12] [Client thread/INFO] [FML]: Applying holder lookups
    [15:35:12] [Client thread/INFO] [FML]: Holder lookups applied
    [15:35:12] [Client thread/INFO] [FML]: Injecting itemstacks
    [15:35:12] [Client thread/INFO] [FML]: Itemstack injection complete
    [15:35:12] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue
    [15:35:12] [Client thread/ERROR] [FML]:
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar)
    UCH FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.9.4-12.17.0.2051.jar)
    UCH Forge{12.17.0.2051} [Minecraft Forge] (forgeSrc-1.9.4-12.17.0.2051.jar)
    UCE tuto{1.0.0} [§4Topaze Mod] (bin)
    [15:35:12] [Client thread/ERROR] [FML]: The following problems were captured during this phase
    [15:35:12] [Client thread/ERROR] [FML]: Caught exception from tuto
    java.lang.ArrayIndexOutOfBoundsException: -1
    at java.util.ArrayList.elementData(Unknown Source) ~[?:1.8.0_111]
    at java.util.ArrayList.set(Unknown Source) ~[?:1.8.0_111]
    at net.minecraft.util.ObjectIntIdentityMap.put(ObjectIntIdentityMap.java:36) ~[forgeSrc-1.9.4-12.17.0.2051.jar:?]
    at net.minecraftforge.fml.common.registry.GameData$BlockCallbacks.onAdd(GameData.java:284) ~[forgeSrc-1.9.4-12.17.0.2051.jar:?]
    at net.minecraftforge.fml.common.registry.GameData$BlockCallbacks.onAdd(GameData.java:273) ~[forgeSrc-1.9.4-12.17.0.2051.jar:?]
    at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.addObjectRaw(FMLControlledNamespacedRegistry.java:567) ~[forgeSrc-1.9.4-12.17.0.2051.jar:?]
    at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.add(FMLControlledNamespacedRegistry.java:465) ~[forgeSrc-1.9.4-12.17.0.2051.jar:?]
    at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.register(FMLControlledNamespacedRegistry.java:803) ~[forgeSrc-1.9.4-12.17.0.2051.jar:?]
    at net.minecraftforge.fml.common.registry.GameData.register_impl(GameData.java:243) ~[forgeSrc-1.9.4-12.17.0.2051.jar:?]
    at net.minecraftforge.fml.common.registry.GameRegistry.register(GameRegistry.java:146) ~[forgeSrc-1.9.4-12.17.0.2051.jar:?]
    at net.minecraftforge.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:425) ~[forgeSrc-1.9.4-12.17.0.2051.jar:?]
    at net.minecraftforge.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:439) ~[forgeSrc-1.9.4-12.17.0.2051.jar:?]
    at com.tuto.mod.init.BlocksMod.register(BlocksMod.java:47) ~[bin/:?]
    at com.tuto.mod.ModTuto.preInit(ModTuto.java:62) ~[bin/:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_111]
    at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:568) ~[forgeSrc-1.9.4-12.17.0.2051.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_111]
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:228) ~[forgeSrc-1.9.4-12.17.0.2051.jar:?]
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:206) ~[forgeSrc-1.9.4-12.17.0.2051.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_111]
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
    at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135) [LoadController.class:?]
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:586) [Loader.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:249) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:475) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:384) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_111]
    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_111]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_111]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:26) [start/:?]
    [15:35:12] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: –-- Minecraft Crash Report ----
    // I'm sorry, Dave.
    
    Time: 03/05/17 15:35
    Description: Initializing game
    
    java.lang.ArrayIndexOutOfBoundsException: -1
    at java.util.ArrayList.elementData(Unknown Source)
    at java.util.ArrayList.set(Unknown Source)
    at net.minecraft.util.ObjectIntIdentityMap.put(ObjectIntIdentityMap.java:36)
    at net.minecraftforge.fml.common.registry.GameData$BlockCallbacks.onAdd(GameData.java:284)
    at net.minecraftforge.fml.common.registry.GameData$BlockCallbacks.onAdd(GameData.java:273)
    at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.addObjectRaw(FMLControlledNamespacedRegistry.java:567)
    at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.add(FMLControlledNamespacedRegistry.java:465)
    at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.register(FMLControlledNamespacedRegistry.java:803)
    at net.minecraftforge.fml.common.registry.GameData.register_impl(GameData.java:243)
    at net.minecraftforge.fml.common.registry.GameRegistry.register(GameRegistry.java:146)
    at net.minecraftforge.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:425)
    at net.minecraftforge.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:439)
    at com.tuto.mod.init.BlocksMod.register(BlocksMod.java:47)
    at com.tuto.mod.ModTuto.preInit(ModTuto.java:62)
    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.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:568)
    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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:228)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:206)
    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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:586)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:249)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:475)
    at net.minecraft.client.Minecraft.run(Minecraft.java:384)
    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:26)
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Thread: Client thread
    Stacktrace:
    at java.util.ArrayList.elementData(Unknown Source)
    at java.util.ArrayList.set(Unknown Source)
    at net.minecraft.util.ObjectIntIdentityMap.put(ObjectIntIdentityMap.java:36)
    at net.minecraftforge.fml.common.registry.GameData$BlockCallbacks.onAdd(GameData.java:284)
    at net.minecraftforge.fml.common.registry.GameData$BlockCallbacks.onAdd(GameData.java:273)
    at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.addObjectRaw(FMLControlledNamespacedRegistry.java:567)
    at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.add(FMLControlledNamespacedRegistry.java:465)
    at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.register(FMLControlledNamespacedRegistry.java:803)
    at net.minecraftforge.fml.common.registry.GameData.register_impl(GameData.java:243)
    at net.minecraftforge.fml.common.registry.GameRegistry.register(GameRegistry.java:146)
    at net.minecraftforge.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:425)
    at net.minecraftforge.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:439)
    at com.tuto.mod.init.BlocksMod.register(BlocksMod.java:47)
    at com.tuto.mod.ModTuto.preInit(ModTuto.java:62)
    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.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:568)
    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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:228)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:206)
    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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:586)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:249)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:475)
    
    -- Initialization --
    Details:
    Stacktrace:
    at net.minecraft.client.Minecraft.run(Minecraft.java:384)
    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:26)
    
    -- System Details --
    Details:
    Minecraft Version: 1.9.4
    Operating System: Windows 7 (x86) version 6.1
    Java Version: 1.8.0_111, Oracle Corporation
    Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
    Memory: 769584856 bytes (733 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.28 Powered by Forge 12.17.0.2051 4 mods loaded, 4 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar)
    UCH FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.9.4-12.17.0.2051.jar)
    UCH Forge{12.17.0.2051} [Minecraft Forge] (forgeSrc-1.9.4-12.17.0.2051.jar)
    UCE tuto{1.0.0} [§4Topaze Mod] (bin)
    Loaded coremods (and transformers):
    GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.1.10664 Compatibility Profile Context' Renderer: 'ATI Mobility Radeon HD 5470'
    Launched Version: 1.9.4
    LWJGL: 2.9.4
    OpenGL: ATI Mobility Radeon HD 5470 GL version 4.1.10664 Compatibility Profile Context, ATI Technologies Inc.
    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: No
    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: net.minecraft.client.Minecraft$15@649f9a
    [15:35:12] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\laura pc\Desktop\Benji\ModderMinecraft\forge-1.9.4-12.17.0.2051-mdk\.\crash-reports\crash-2017-05-03_15.35.12-client.txt
    Java HotSpot(TM) Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
    
    

    J'ai chercher dans les code de la log mais je ne trouve absolument pas.
    Je pensais aussi que ce genre de block là pouvais ce faire via Json mais apparemment non…

    Je viens donc vers vous !
    Merci pour vos futurs réponses

    Tituya



  • Salut !

    Je ne peux que te conseiller de faire un tour dans le code du "Block Furnace" , il a tout se dont tu as besoin;
    regarde le .json également. Je pourrais te donner uniquement les méthodes, mais le problème c'est que je ne sais pas
    s'il y a une grosse différence entre les versions.

    Je te drop quand-même l'utile :

    Alors je ne sais pas s'il y a tout se qu'il faut, ou si il y en a certains optionnels. J'ai bien un block orientable dans un autre projet; mais actuellement je ne peux pas te le donner je l'ai pas sous la main. Étudie le block Furnace ainsi que son .Json et tu devrais faire des merveilles  🙂


  • Rédacteurs

    Il te faut simplement un property et suivants sa valeur, tu effectue une rotation du modèle depuis le fichier JSON