MFF

    Minecraft Forge France
    • Récent
    • Mots-clés
    • Populaire
    • Utilisateurs
    • Groupes
    • Forge Events
      • Automatique
      • Foncé
      • Clair
    • S'inscrire
    • Se connecter

    (Block Bound) Rotation de la hitbox en même temps que le bloc

    Planifier Épinglé Verrouillé Déplacé Résolu Anciennes versions
    1.6.4
    13 Messages 2 Publieurs 2.8k Vues 1 Watching
    Charger plus de messages
    • Du plus ancien au plus récent
    • Du plus récent au plus ancien
    • Les plus votés
    Répondre
    • Répondre à l'aide d'un nouveau sujet
    Se connecter pour répondre
    Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir.
    • robin4002R Hors-ligne
      robin4002 Moddeurs confirmés Rédacteurs Administrateurs
      dernière édition par

      Peut être car la rotation est sauvegardé dans ton tile entity ?
      switch(tileEntity.getDirection())

      1 réponse Dernière réponse Répondre Citer 0
      • AmaA Hors-ligne
        Ama
        dernière édition par

        J’ai ça donc

        :::

        @Override
        public void setBlockBoundsBasedOnState(IBlockAccess access, int x, int y, int z) {
        TileEntityCrossTomb tileEntity = (TileEntityCrossTomb) access.getBlockTileEntity(x, y, z);
        switch(tileEntity.getDirection())
        {
        case 0:
        this.setBlockBounds(0.125F, 0, 0.0625F, 0.875F, 0.9375F, 0.1875F);
        break;
        case 1:
        this.setBlockBounds(0.125F, 0, 0.8125F, 0.875F, 0.9375F, 0.9375F);
        break;
        case 2:
        this.setBlockBounds(0.0625F, 0, 0.125F, 0.1875F, 0.9375F, 0.875F);
        break;
        case 3:
        this.setBlockBounds(0.8125F, 0, 0.125F, 0.9375F, 0.9375F, 0.875F);
        break;
        }
        }
        
        

        :::

        Mais toujours pareil

        Je vous donne la classe de la Tile Entity

        :::

        package viruz.zeamateis.tileEntity;
        
        import net.minecraft.entity.player.EntityPlayer;
        import net.minecraft.item.ItemStack;
        import net.minecraft.nbt.NBTTagCompound;
        import net.minecraft.nbt.NBTTagList;
        import net.minecraft.network.INetworkManager;
        import net.minecraft.network.packet.Packet;
        import net.minecraft.network.packet.Packet132TileEntityData;
        import net.minecraft.tileentity.TileEntity;
        
        public class TileEntityCrossTomb extends TileEntity
        {
        public byte direction;
        
        public void readFromNBT(NBTTagCompound nbtTag)
        {
        super.readFromNBT(nbtTag);
        direction = nbtTag.getByte("direction");
        }
        
        public void writeToNBT(NBTTagCompound nbtTag)
        {
        super.writeToNBT(nbtTag);
        nbtTag.setByte("direction", direction);
        }
        
        public void setDirection(byte direct)
        {
        direction = direct;
        }
        
        public byte getDirection()
        {
        return direction;
        }
        public Packet getDescriptionPacket()
        {
        NBTTagCompound nbttagcompound = new NBTTagCompound();
        this.writeToNBT(nbttagcompound);
        return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 4, nbttagcompound);
        }
        
        public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt)
        {
        this.readFromNBT(pkt.data);
        }
        }
        

        :::

        Si je t'ai filé un coup de main n'oublie pas le + / -
        Par contre évite les demandes d'aides en MP, tu sera sympa'

        La JavaDoc c'est comme le PQ, ça sert à ce démerder tous seul. -Victor Hugo- 2017

        Une superbe API pour animer vos super modèles CraftStudio dans Minecraft !

        1 réponse Dernière réponse Répondre Citer 0
        • robin4002R Hors-ligne
          robin4002 Moddeurs confirmés Rédacteurs Administrateurs
          dernière édition par

          Classe complète du bloc ?

          1 réponse Dernière réponse Répondre Citer 0
          • AmaA Hors-ligne
            Ama
            dernière édition par

            :::

            package viruz.zeamateis.block;
            
            import net.minecraft.block.Block;
            import net.minecraft.block.material.Material;
            import net.minecraft.entity.Entity;
            import net.minecraft.entity.EntityLivingBase;
            import net.minecraft.entity.player.EntityPlayer;
            import net.minecraft.item.ItemStack;
            import net.minecraft.tileentity.TileEntity;
            import net.minecraft.util.Icon;
            import net.minecraft.util.MathHelper;
            import net.minecraft.world.IBlockAccess;
            import net.minecraft.world.World;
            import viruz.zeamateis.core.ViruZCore;
            import viruz.zeamateis.proxy.client.ClientProxy;
            import viruz.zeamateis.tileEntity.TileEntityCrossTomb;
            import viruz.zeamateis.tileEntity.TileEntityWorkingTable;
            import cpw.mods.fml.relauncher.Side;
            import cpw.mods.fml.relauncher.SideOnly;
            
            public class BlockWoodenCrossTomb extends Block {
            
            public BlockWoodenCrossTomb(int par1, Material par2Material)
            {
            super(par1, par2Material);
            this.setHardness(5.5F);
            this.setStepSound(Block.soundWoodFootstep);
            this.setCreativeTab(ViruZCore.Blocks);
            }
            
            @Override
            public void setBlockBoundsBasedOnState(IBlockAccess access, int x, int y, int z) {
            TileEntityCrossTomb tileEntity = (TileEntityCrossTomb) access.getBlockTileEntity(x, y, z);
            switch(tileEntity.getDirection())
            {
            case 0:
            this.setBlockBounds(0.125F, 0, 0.0625F, 0.875F, 0.9375F, 0.1875F);
            break;
            case 1:
            this.setBlockBounds(0.125F, 0, 0.8125F, 0.875F, 0.9375F, 0.9375F);
            break;
            case 2:
            this.setBlockBounds(0.0625F, 0, 0.125F, 0.1875F, 0.9375F, 0.875F);
            break;
            case 3:
            this.setBlockBounds(0.8125F, 0, 0.125F, 0.9375F, 0.9375F, 0.875F);
            break;
            }
            }
            
            public boolean renderAsNormalBlock()
            {
            return false;
            }
            
            public boolean isOpaqueCube()
            {
            return false;
            }
            
            @SideOnly(Side.CLIENT)
            public int getRenderType()
            {
            return ClientProxy.renderInventoryTESRID;
            }
            
            public TileEntity createTileEntity(World world, int metadata)
            {
            return new TileEntityCrossTomb();
            }
            
            public boolean hasTileEntity(int metadata)
            {
            return true;
            }
            
            public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack stack)
            {
            int direction = MathHelper.floor_double((double)(living.rotationYaw * 4.0F / 360.0F) + 2.5D) & 3;
            TileEntity te = world.getBlockTileEntity(x, y, z);
            if(te != null && te instanceof TileEntityCrossTomb)
            {
            ((TileEntityCrossTomb)te).setDirection((byte)direction);
            world.markBlockForUpdate(x, y, z);
            }
            }
            
            public Icon getIcon(int side, int metadata)
            {
            return Block.wood.getIcon(0, 0);
            }
            }
            

            :::

            Si je t'ai filé un coup de main n'oublie pas le + / -
            Par contre évite les demandes d'aides en MP, tu sera sympa'

            La JavaDoc c'est comme le PQ, ça sert à ce démerder tous seul. -Victor Hugo- 2017

            Une superbe API pour animer vos super modèles CraftStudio dans Minecraft !

            1 réponse Dernière réponse Répondre Citer 0
            • robin4002R Hors-ligne
              robin4002 Moddeurs confirmés Rédacteurs Administrateurs
              dernière édition par

              https://github.com/FFMT/Privatizer/blob/master/privatizer_src/fr/mcnanotech/privatizer/common/BlockPrivateDoor.java#L149-L160
              +
              https://github.com/FFMT/Privatizer/blob/master/privatizer_src/fr/mcnanotech/privatizer/common/BlockPrivateDoor.java#L291-L295

              1 réponse Dernière réponse Répondre Citer 0
              • AmaA Hors-ligne
                Ama
                dernière édition par

                J’ai un crash

                :::

                juil. 27, 2014 8:05:23 PM net.minecraft.launchwrapper.LogWrapper log
                INFOS: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                juil. 27, 2014 8:05:23 PM net.minecraft.launchwrapper.LogWrapper log
                INFOS: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                juil. 27, 2014 8:05:23 PM net.minecraft.launchwrapper.LogWrapper log
                INFOS: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
                2014-07-27 20:05:23 [INFOS] [ForgeModLoader] Forge Mod Loader version 6.4.49.965 for Minecraft 1.6.4 loading
                2014-07-27 20:05:23 [INFOS] [ForgeModLoader] Java is Java HotSpot(TM) Client VM, version 1.7.0_60, running on Windows 8.1:x86:6.3, installed at C:\Program Files (x86)\Java\jre7
                2014-07-27 20:05:23 [INFOS] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
                2014-07-27 20:05:23 [INFOS] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                2014-07-27 20:05:23 [INFOS] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
                2014-07-27 20:05:23 [INFOS] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                2014-07-27 20:05:23 [INFOS] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                2014-07-27 20:05:23 [INFOS] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                2014-07-27 20:05:23 [INFOS] [STDOUT] Loaded 40 rules from AccessTransformer config file fml_at.cfg
                2014-07-27 20:05:23 [GRAVE] [ForgeModLoader] The binary patch set is missing. Either you are in a development environment, or things are not going to work!
                2014-07-27 20:05:24 [INFOS] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                2014-07-27 20:05:24 [INFOS] [STDOUT] Loaded 110 rules from AccessTransformer config file forge_at.cfg
                2014-07-27 20:05:24 [INFOS] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
                2014-07-27 20:05:24 [INFOS] [ForgeModLoader] Launching wrapped minecraft {net.minecraft.client.main.Main}
                2014-07-27 20:05:25 [INFOS] [Minecraft-Client] Setting user: ShLennon640
                2014-07-27 20:05:26 [INFOS] [Minecraft-Client] LWJGL Version: 2.9.0
                2014-07-27 20:05:26 [INFOS] [Minecraft-Client] Reloading ResourceManager: Default, TheHorde-ViruZ[1.0.5].zip
                2014-07-27 20:05:27 [INFOS] [MinecraftForge] Attempting early MinecraftForge initialization
                2014-07-27 20:05:27 [INFOS] [STDOUT] MinecraftForge v9.11.1.965 Initialized
                2014-07-27 20:05:27 [INFOS] [ForgeModLoader] MinecraftForge v9.11.1.965 Initialized
                2014-07-27 20:05:27 [INFOS] [STDOUT] Replaced 111 ore recipies
                2014-07-27 20:05:27 [INFOS] [MinecraftForge] Completed early MinecraftForge initialization
                2014-07-27 20:05:27 [INFOS] [ForgeModLoader] Reading custom logging properties from C:\Users\Jean-Baptiste\Desktop\Modding\JAVA\Stand-by\ViruZ_Core_Forge_1.6.4_9.11.1.965\forge\mcp\jars\config\logging.properties
                2014-07-27 20:05:27 [DÉSACTIVÉ] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL
                2014-07-27 20:05:27 [INFOS] [ForgeModLoader] Searching C:\Users\Jean-Baptiste\Desktop\Modding\JAVA\Stand-by\ViruZ_Core_Forge_1.6.4_9.11.1.965\forge\mcp\jars\mods for mods
                2014-07-27 20:05:30 [INFOS] [ForgeModLoader] Forge Mod Loader has identified 7 mods to load
                2014-07-27 20:05:30 [INFOS] [mcp] Activating mod mcp
                2014-07-27 20:05:30 [INFOS] [FML] Activating mod FML
                2014-07-27 20:05:30 [INFOS] [Forge] Activating mod Forge
                2014-07-27 20:05:30 [INFOS] [JoypadSplitscreenMod] Activating mod JoypadSplitscreenMod
                2014-07-27 20:05:30 [INFOS] [AnimationAPI] Activating mod AnimationAPI
                2014-07-27 20:05:30 [INFOS] [AnimationExample] Activating mod AnimationExample
                2014-07-27 20:05:30 [INFOS] [ViruZ] Activating mod ViruZ
                2014-07-27 20:05:30 [AVERTISSEMENT] [Forge Mod Loader] Mod Forge Mod Loader is missing a pack.mcmeta file, things may not work well
                2014-07-27 20:05:30 [AVERTISSEMENT] [Minecraft Forge] Mod Minecraft Forge is missing a pack.mcmeta file, things may not work well
                2014-07-27 20:05:30 [AVERTISSEMENT] [Joypad / SplitScreen Mod] Mod Joypad / SplitScreen Mod is missing a pack.mcmeta file, things may not work well
                2014-07-27 20:05:30 [AVERTISSEMENT] [AnimationAPI] Mod AnimationAPI is missing a pack.mcmeta file, things may not work well
                2014-07-27 20:05:30 [AVERTISSEMENT] [Animation Example] Mod Animation Example is missing a pack.mcmeta file, things may not work well
                2014-07-27 20:05:30 [AVERTISSEMENT] [ViruZ] Mod ViruZ is missing a pack.mcmeta file, things may not work well
                2014-07-27 20:05:30 [INFOS] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Joypad / SplitScreen Mod, FMLFileResourcePack:AnimationAPI, FMLFileResourcePack:Animation Example, FMLFileResourcePack:ViruZ, TheHorde-ViruZ[1.0.5].zip
                2014-07-27 20:05:30 [INFOS] [ForgeModLoader] Registering Forge Packet Handler
                2014-07-27 20:05:30 [INFOS] [ForgeModLoader] Succeeded registering Forge Packet Handler
                2014-07-27 20:05:31 [INFOS] [ForgeModLoader] Configured a dormant chunk cache size of 0
                2014-07-27 20:05:31 [INFOS] [ForgeModLoader] preInit
                2014-07-27 20:05:31 [INFOS] [ForgeModLoader] Setting shared profile to false
                2014-07-27 20:05:31 [INFOS] [ForgeModLoader] Deleted category -Global- key SharedProfile
                2014-07-27 20:05:31 [INFOS] [ForgeModLoader] updateKey updated -Global-:SharedProfile with false
                2014-07-27 20:05:31 [INFOS] [ForgeModLoader] ShLennon640's JoyNo == -1 (). SharedProfile = false. GrabMouse = false. invertYAxis = false. ConfigVersion 0.1\. Game Sensitivity multiplier: 40\. Menu Sensitivity multiplier: 10
                2014-07-27 20:05:31 [INFOS] [ForgeModLoader] Deleted category Joypad-ShLennon640 key ConfigVersion
                2014-07-27 20:05:31 [INFOS] [ForgeModLoader] updateKey updated Joypad-ShLennon640:ConfigVersion with 0.1
                2014-07-27 20:05:31 [GRAVE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_1011_workingTable.png
                2014-07-27 20:05:31 [GRAVE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_1008_campfireBurning.png
                2014-07-27 20:05:31 [GRAVE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_1013_woodenCrossTomb.png
                2014-07-27 20:05:31 [GRAVE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_1015_barricades.png
                2014-07-27 20:05:31 [GRAVE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_1007_campfireIdle.png
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] init
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] Replaced mousehelper in Minecraft with JoypadMouseHelper
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] postInit
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] Minecraft Joypad (Controller) Mod v1.6.4 by Ljubomir Simin & Andrew Hickey
                –-
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] Initializing Controllers
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] Found 3 controller(s) in total.
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] Found controller Toshiba Hotkey Driver (0)
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] It has 2 buttons.
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] It has 0 axes.
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] This controller does not meet the input requirements
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] –-
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] Found controller Toshiba Hotkey Driver (1)
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] It has 1 buttons.
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] It has 0 axes.
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] This controller does not meet the input requirements
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] –-
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] Found controller Toshiba Hotkey Driver (2)
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] It has 5 buttons.
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] It has 0 axes.
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] This controller does not meet the input requirements
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] –-
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] Found 0 valid controllers!
                2014-07-27 20:05:32 [AVERTISSEMENT] [ForgeModLoader] No joypad set up for this session.
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] Creating VirtualKeyboard
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] Creating VirtualMouse
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] Creating McGuiHelper
                2014-07-27 20:05:32 [INFOS] [ForgeModLoader] Forge Mod Loader has successfully loaded 7 mods
                2014-07-27 20:05:32 [AVERTISSEMENT] [Forge Mod Loader] Mod Forge Mod Loader is missing a pack.mcmeta file, things may not work well
                2014-07-27 20:05:32 [AVERTISSEMENT] [Minecraft Forge] Mod Minecraft Forge is missing a pack.mcmeta file, things may not work well
                2014-07-27 20:05:32 [AVERTISSEMENT] [Joypad / SplitScreen Mod] Mod Joypad / SplitScreen Mod is missing a pack.mcmeta file, things may not work well
                2014-07-27 20:05:32 [AVERTISSEMENT] [AnimationAPI] Mod AnimationAPI is missing a pack.mcmeta file, things may not work well
                2014-07-27 20:05:32 [AVERTISSEMENT] [Animation Example] Mod Animation Example is missing a pack.mcmeta file, things may not work well
                2014-07-27 20:05:32 [AVERTISSEMENT] [ViruZ] Mod ViruZ is missing a pack.mcmeta file, things may not work well
                2014-07-27 20:05:32 [INFOS] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Joypad / SplitScreen Mod, FMLFileResourcePack:AnimationAPI, FMLFileResourcePack:Animation Example, FMLFileResourcePack:ViruZ, TheHorde-ViruZ[1.0.5].zip
                2014-07-27 20:05:32 [GRAVE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_1011_workingTable.png
                2014-07-27 20:05:32 [GRAVE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_1008_campfireBurning.png
                2014-07-27 20:05:32 [GRAVE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_1013_woodenCrossTomb.png
                2014-07-27 20:05:32 [GRAVE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_1015_barricades.png
                2014-07-27 20:05:32 [GRAVE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_1007_campfireIdle.png
                2014-07-27 20:05:33 [INFOS] [STDOUT]
                2014-07-27 20:05:33 [INFOS] [STDOUT] Starting up SoundSystem…
                2014-07-27 20:05:33 [INFOS] [STDOUT] Initializing LWJGL OpenAL
                2014-07-27 20:05:33 [INFOS] [STDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
                2014-07-27 20:05:33 [INFOS] [STDOUT] OpenAL initialized.
                2014-07-27 20:05:33 [INFOS] [STDOUT]
                2014-07-27 20:05:39 [INFOS] [Minecraft-Server] Starting integrated minecraft server version 1.6.4
                2014-07-27 20:05:39 [INFOS] [Minecraft-Server] Generating keypair
                2014-07-27 20:05:40 [INFOS] [ForgeModLoader] Loading dimension 0 (Dev' Test World) (net.minecraft.server.integrated.IntegratedServer@3f93e8)
                2014-07-27 20:05:40 [INFOS] [ForgeModLoader] Loading dimension 1 (Dev' Test World) (net.minecraft.server.integrated.IntegratedServer@3f93e8)
                2014-07-27 20:05:40 [INFOS] [ForgeModLoader] Loading dimension -1 (Dev' Test World) (net.minecraft.server.integrated.IntegratedServer@3f93e8)
                2014-07-27 20:05:40 [INFOS] [Minecraft-Server] Preparing start region for level 0
                2014-07-27 20:05:41 [INFOS] [Minecraft-Server] Preparing spawn area: 67%
                2014-07-27 20:05:41 [INFOS] [STDOUT] loading single player
                2014-07-27 20:05:41 [INFOS] [Minecraft-Server] ShLennon640[/127.0.0.1:0] logged in with entity id 98 at (1400.159305541699, 4.0, -1065.0027341654231)
                2014-07-27 20:05:41 [INFOS] [Minecraft-Server] ShLennon640 joined the game
                2014-07-27 20:05:42 [INFOS] [STDOUT] Setting up custom skins
                2014-07-27 20:05:49 [INFOS] [Minecraft-Server] Saving and pausing game…
                2014-07-27 20:05:49 [INFOS] [Minecraft-Server] Saving chunks for level 'Dev' Test World'/Overworld
                2014-07-27 20:05:49 [INFOS] [Minecraft-Server] Saving chunks for level 'Dev' Test World'/Nether
                2014-07-27 20:05:49 [INFOS] [Minecraft-Server] Saving chunks for level 'Dev' Test World'/The End
                2014-07-27 20:06:01 [INFOS] [Minecraft-Server] [ShLennon640: Set own game mode to Creative Mode]
                2014-07-27 20:06:01 [INFOS] [Minecraft-Client] [CHAT] Your game mode has been updated
                2014-07-27 20:06:08 [INFOS] [Minecraft-Server] Stopping server
                2014-07-27 20:06:08 [INFOS] [Minecraft-Server] Saving players
                2014-07-27 20:06:08 [INFOS] [Minecraft-Server] ShLennon640 left the game
                2014-07-27 20:06:08 [INFOS] [Minecraft-Server] Saving worlds
                2014-07-27 20:06:08 [INFOS] [Minecraft-Server] Saving chunks for level 'Dev' Test World'/Overworld
                2014-07-27 20:06:08 [INFOS] [Minecraft-Server] Saving chunks for level 'Dev' Test World'/Nether
                2014-07-27 20:06:08 [INFOS] [Minecraft-Server] Saving chunks for level 'Dev' Test World'/The End
                2014-07-27 20:06:09 [INFOS] [ForgeModLoader] Unloading dimension 0
                2014-07-27 20:06:09 [INFOS] [ForgeModLoader] Unloading dimension -1
                2014-07-27 20:06:09 [INFOS] [ForgeModLoader] Unloading dimension 1
                2014-07-27 20:06:09 [INFOS] [STDERR] java.lang.NullPointerException
                2014-07-27 20:06:09 [INFOS] [STDERR] at viruz.zeamateis.block.BlockWoodenCrossTomb.setBlockBoundsBasedOnState(BlockWoodenCrossTomb.java:34)
                2014-07-27 20:06:09 [INFOS] [STDERR] at viruz.zeamateis.block.BlockWoodenCrossTomb.getCollisionBoundingBoxFromPool(BlockWoodenCrossTomb.java:97)
                2014-07-27 20:06:09 [INFOS] [STDERR] at net.minecraft.world.World.canPlaceEntityOnSide(World.java:3852)
                2014-07-27 20:06:09 [INFOS] [STDERR] at net.minecraft.item.ItemBlock.canPlaceItemBlockOnSide(ItemBlock.java:180)
                2014-07-27 20:06:09 [INFOS] [STDERR] at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:381)
                2014-07-27 20:06:09 [INFOS] [STDERR] at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1390)
                2014-07-27 20:06:09 [INFOS] [STDERR] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1868)
                2014-07-27 20:06:09 [INFOS] [STDERR] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:910)
                2014-07-27 20:06:09 [INFOS] [STDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:838)
                2014-07-27 20:06:09 [INFOS] [STDERR] at net.minecraft.client.main.Main.main(Main.java:93)
                2014-07-27 20:06:09 [INFOS] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                2014-07-27 20:06:09 [INFOS] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                2014-07-27 20:06:09 [INFOS] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                2014-07-27 20:06:09 [INFOS] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
                2014-07-27 20:06:09 [INFOS] [STDERR] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
                2014-07-27 20:06:09 [INFOS] [STDERR] at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
                2014-07-27 20:06:09 [INFOS] [STDOUT] –-- Minecraft Crash Report ----
                2014-07-27 20:06:09 [INFOS] [STDOUT] // I feel sad now :(
                2014-07-27 20:06:09 [INFOS] [STDOUT]
                2014-07-27 20:06:09 [INFOS] [STDOUT] Time: 27/07/14 20:06
                2014-07-27 20:06:09 [INFOS] [STDOUT] Description: Unexpected error
                2014-07-27 20:06:09 [INFOS] [STDOUT]
                2014-07-27 20:06:09 [INFOS] [STDOUT] java.lang.NullPointerException
                2014-07-27 20:06:09 [INFOS] [STDOUT] at viruz.zeamateis.block.BlockWoodenCrossTomb.setBlockBoundsBasedOnState(BlockWoodenCrossTomb.java:34)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at viruz.zeamateis.block.BlockWoodenCrossTomb.getCollisionBoundingBoxFromPool(BlockWoodenCrossTomb.java:97)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.world.World.canPlaceEntityOnSide(World.java:3852)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.item.ItemBlock.canPlaceItemBlockOnSide(ItemBlock.java:180)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:381)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1390)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1868)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:910)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.client.Minecraft.run(Minecraft.java:838)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.client.main.Main.main(Main.java:93)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at java.lang.reflect.Method.invoke(Unknown Source)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
                2014-07-27 20:06:09 [INFOS] [STDOUT]
                2014-07-27 20:06:09 [INFOS] [STDOUT]
                2014-07-27 20:06:09 [INFOS] [STDOUT] A detailed walkthrough of the error, its code path and all known details is as follows:
                2014-07-27 20:06:09 [INFOS] [STDOUT] –-------------------------------------------------------------------------------------
                2014-07-27 20:06:09 [INFOS] [STDOUT]
                2014-07-27 20:06:09 [INFOS] [STDOUT] – Head --
                2014-07-27 20:06:09 [INFOS] [STDOUT] Stacktrace:
                2014-07-27 20:06:09 [INFOS] [STDOUT] at viruz.zeamateis.block.BlockWoodenCrossTomb.setBlockBoundsBasedOnState(BlockWoodenCrossTomb.java:34)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at viruz.zeamateis.block.BlockWoodenCrossTomb.getCollisionBoundingBoxFromPool(BlockWoodenCrossTomb.java:97)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.world.World.canPlaceEntityOnSide(World.java:3852)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.item.ItemBlock.canPlaceItemBlockOnSide(ItemBlock.java:180)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:381)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1390)
                2014-07-27 20:06:09 [INFOS] [STDOUT]
                2014-07-27 20:06:09 [INFOS] [STDOUT] – Affected level --
                2014-07-27 20:06:09 [INFOS] [STDOUT] Details:
                2014-07-27 20:06:09 [INFOS] [STDOUT] Level name: MpServer
                2014-07-27 20:06:09 [INFOS] [STDOUT] All players: 1 total; [EntityClientPlayerMP['ShLennon640'/98, l='MpServer', x=1404,47, y=5,62, z=-1051,29]]
                2014-07-27 20:06:09 [INFOS] [STDOUT] Chunk stats: MultiplayerChunkCache: 441
                2014-07-27 20:06:09 [INFOS] [STDOUT] Level seed: 0
                2014-07-27 20:06:09 [INFOS] [STDOUT] Level generator: ID 01 - flat, ver 0\. Features enabled: false
                2014-07-27 20:06:09 [INFOS] [STDOUT] Level generator options:
                2014-07-27 20:06:09 [INFOS] [STDOUT] Level spawn location: World: (1388,4,-1067), Chunk: (at 12,0,5 in 86,-67; contains blocks 1376,0,-1072 to 1391,255,-1057), Region: (2,-3; contains chunks 64,-96 to 95,-65, blocks 1024,0,-1536 to 1535,255,-1025)
                2014-07-27 20:06:09 [INFOS] [STDOUT] Level time: 119872 game time, 4747 day time
                2014-07-27 20:06:09 [INFOS] [STDOUT] Level dimension: 0
                2014-07-27 20:06:09 [INFOS] [STDOUT] Level storage version: 0x00000 - Unknown?
                2014-07-27 20:06:09 [INFOS] [STDOUT] Level weather: Rain time: 0 (now: true), thunder time: 0 (now: false)
                2014-07-27 20:06:09 [INFOS] [STDOUT] Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
                2014-07-27 20:06:09 [INFOS] [STDOUT] Forced entities: 8 total; [EntityCow['Cow'/68, l='MpServer', x=1447,09, y=4,00, z=-1097,97], EntityBoar['Boar'/64, l='MpServer', x=1438,06, y=4,00, z=-1053,97], EntityDeer['entity.Deer.name'/17, l='MpServer', x=1331,47, y=4,00, z=-975,13], EntityDeer['entity.Deer.name'/23, l='MpServer', x=1328,44, y=4,00, z=-1093,06], EntityClientPlayerMP['ShLennon640'/98, l='MpServer', x=1404,47, y=5,62, z=-1051,29], EntityDeer['entity.Deer.name'/40, l='MpServer', x=1377,72, y=4,00, z=-1131,28], EntityDeer['entity.Deer.name'/45, l='MpServer', x=1402,28, y=4,00, z=-1127,81], EntityDeer['entity.Deer.name'/63, l='MpServer', x=1443,44, y=4,00, z=-1104,28]]
                2014-07-27 20:06:09 [INFOS] [STDOUT] Retry entities: 0 total; []
                2014-07-27 20:06:09 [INFOS] [STDOUT] Server brand: fml,forge
                2014-07-27 20:06:09 [INFOS] [STDOUT] Server type: Integrated singleplayer server
                2014-07-27 20:06:09 [INFOS] [STDOUT] Stacktrace:
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:440)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2312)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.client.Minecraft.run(Minecraft.java:863)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.client.main.Main.main(Main.java:93)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at java.lang.reflect.Method.invoke(Unknown Source)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
                2014-07-27 20:06:09 [INFOS] [STDOUT] at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
                2014-07-27 20:06:09 [INFOS] [STDOUT]
                2014-07-27 20:06:09 [INFOS] [STDOUT] – System Details --
                2014-07-27 20:06:09 [INFOS] [STDOUT] Details:
                2014-07-27 20:06:09 [INFOS] [STDOUT] Minecraft Version: 1.6.4
                2014-07-27 20:06:09 [INFOS] [STDOUT] Operating System: Windows 8.1 (x86) version 6.3
                2014-07-27 20:06:09 [INFOS] [STDOUT] Java Version: 1.7.0_60, Oracle Corporation
                2014-07-27 20:06:09 [INFOS] [STDOUT] Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
                2014-07-27 20:06:09 [INFOS] [STDOUT] Memory: 605685040 bytes (577 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB)
                2014-07-27 20:06:09 [INFOS] [STDOUT] JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
                2014-07-27 20:06:09 [INFOS] [STDOUT] AABB Pool Size: 3254 (182224 bytes; 0 MB) allocated, 2 (112 bytes; 0 MB) used
                2014-07-27 20:06:09 [INFOS] [STDOUT] Suspicious classes: FML and Forge are installed
                2014-07-27 20:06:09 [INFOS] [STDOUT] IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
                2014-07-27 20:06:09 [INFOS] [STDOUT] FML: MCP v8.11 FML v6.4.49.965 Minecraft Forge 9.11.1.965 7 mods loaded, 7 mods active
                2014-07-27 20:06:09 [INFOS] [STDOUT] mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                2014-07-27 20:06:09 [INFOS] [STDOUT] FML{6.4.49.965} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                2014-07-27 20:06:09 [INFOS] [STDOUT] Forge{9.11.1.965} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                2014-07-27 20:06:09 [INFOS] [STDOUT] JoypadSplitscreenMod{1.6.4-0.1} [Joypad / SplitScreen Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                2014-07-27 20:06:09 [INFOS] [STDOUT] AnimationAPI{1.1.1} [AnimationAPI] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                2014-07-27 20:06:09 [INFOS] [STDOUT] AnimationExample{1.0.0} [Animation Example] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                2014-07-27 20:06:09 [INFOS] [STDOUT] ViruZ{3.0} [ViruZ] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                2014-07-27 20:06:09 [INFOS] [STDOUT] Launched Version: 1.6
                2014-07-27 20:06:09 [INFOS] [STDOUT] LWJGL: 2.9.0
                2014-07-27 20:06:09 [INFOS] [STDOUT] OpenGL: Intel(R) HD Graphics 3000 GL version 3.1.0 - Build 9.17.10.3347, Intel
                2014-07-27 20:06:09 [INFOS] [STDOUT] Is Modded: Definitely; Client brand changed to 'fml,forge'
                2014-07-27 20:06:09 [INFOS] [STDOUT] Type: Client (map_client.txt)
                2014-07-27 20:06:09 [INFOS] [STDOUT] Resource Pack: TheHorde-ViruZ[1.0.5].zip
                2014-07-27 20:06:09 [INFOS] [STDOUT] Current Language: English (US)
                2014-07-27 20:06:09 [INFOS] [STDOUT] Profiler Position: N/A (disabled)
                2014-07-27 20:06:09 [INFOS] [STDOUT] Vec3 Pool Size: 82 (4592 bytes; 0 MB) allocated, 17 (952 bytes; 0 MB) used
                2014-07-27 20:06:09 [INFOS] [STDOUT] #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Jean-Baptiste\Desktop\Modding\JAVA\Stand-by\ViruZ_Core_Forge_1.6.4_9.11.1.965\forge\mcp\jars\.\crash-reports\crash-2014-07-27_20.06.09-client.txt
                AL lib: (EE) alc_cleanup: 1 device not closed
                
                

                :::

                La classe du bloc

                :::

                package viruz.zeamateis.block;
                
                import net.minecraft.block.Block;
                import net.minecraft.block.material.Material;
                import net.minecraft.entity.EntityLivingBase;
                import net.minecraft.item.ItemStack;
                import net.minecraft.tileentity.TileEntity;
                import net.minecraft.util.AxisAlignedBB;
                import net.minecraft.util.Icon;
                import net.minecraft.util.MathHelper;
                import net.minecraft.util.MovingObjectPosition;
                import net.minecraft.util.Vec3;
                import net.minecraft.world.IBlockAccess;
                import net.minecraft.world.World;
                import viruz.zeamateis.core.ViruZCore;
                import viruz.zeamateis.proxy.client.ClientProxy;
                import viruz.zeamateis.tileEntity.TileEntityCrossTomb;
                import cpw.mods.fml.relauncher.Side;
                import cpw.mods.fml.relauncher.SideOnly;
                
                public class BlockWoodenCrossTomb extends Block {
                
                public BlockWoodenCrossTomb(int par1, Material par2Material)
                {
                super(par1, par2Material);
                this.setHardness(5.5F);
                this.setStepSound(Block.soundWoodFootstep);
                this.setCreativeTab(ViruZCore.Blocks);
                }
                
                @Override
                public void setBlockBoundsBasedOnState(IBlockAccess access, int x, int y, int z) {
                TileEntityCrossTomb tileEntity = (TileEntityCrossTomb) access.getBlockTileEntity(x, y, z);
                switch(tileEntity.getDirection())
                {
                case 0:
                this.setBlockBounds(0.125F, 0, 0.0625F, 0.875F, 0.9375F, 0.1875F);
                break;
                case 1:
                this.setBlockBounds(0.125F, 0, 0.8125F, 0.875F, 0.9375F, 0.9375F);
                break;
                case 2:
                this.setBlockBounds(0.0625F, 0, 0.125F, 0.1875F, 0.9375F, 0.875F);
                break;
                case 3:
                this.setBlockBounds(0.8125F, 0, 0.125F, 0.9375F, 0.9375F, 0.875F);
                break;
                }
                }
                
                public boolean renderAsNormalBlock()
                {
                return false;
                }
                
                public boolean isOpaqueCube()
                {
                return false;
                }
                
                @SideOnly(Side.CLIENT)
                public int getRenderType()
                {
                return ClientProxy.renderInventoryTESRID;
                }
                
                public TileEntity createTileEntity(World world, int metadata)
                {
                return new TileEntityCrossTomb();
                }
                
                public boolean hasTileEntity(int metadata)
                {
                return true;
                }
                
                public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack stack)
                {
                int direction = MathHelper.floor_double((double)(living.rotationYaw * 4.0F / 360.0F) + 2.5D) & 3;
                TileEntity te = world.getBlockTileEntity(x, y, z);
                if(te != null && te instanceof TileEntityCrossTomb)
                {
                ((TileEntityCrossTomb)te).setDirection((byte)direction);
                world.markBlockForUpdate(x, y, z);
                }
                }
                
                @SideOnly(Side.CLIENT)
                public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z)
                {
                this.setBlockBoundsBasedOnState(world, x, y, z);
                return super.getSelectedBoundingBoxFromPool(world, x, y, z);
                }
                
                public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
                {
                this.setBlockBoundsBasedOnState(world, x, y, z);
                return super.getCollisionBoundingBoxFromPool(world, x, y, z);
                }
                
                public Icon getIcon(int side, int metadata)
                {
                return Block.wood.getIcon(0, 0);
                }
                
                public MovingObjectPosition collisionRayTrace(World world, int x, int y, int z, Vec3 vec31, Vec3 vec32)
                {
                this.setBlockBoundsBasedOnState(world, x, y, z);
                return super.collisionRayTrace(world, x, y, z, vec31, vec32);
                }
                }
                

                :::

                Si je t'ai filé un coup de main n'oublie pas le + / -
                Par contre évite les demandes d'aides en MP, tu sera sympa'

                La JavaDoc c'est comme le PQ, ça sert à ce démerder tous seul. -Victor Hugo- 2017

                Une superbe API pour animer vos super modèles CraftStudio dans Minecraft !

                1 réponse Dernière réponse Répondre Citer 0
                • robin4002R Hors-ligne
                  robin4002 Moddeurs confirmés Rédacteurs Administrateurs
                  dernière édition par

                  Le tile entity est null, c’est étrange, vérifie tout.

                  1 réponse Dernière réponse Répondre Citer 0
                  • AmaA Hors-ligne
                    Ama
                    dernière édition par

                    Tu veux que je vérifie quoi ? Le tile entity ? La classe du bloc ?

                    La classe du tyle entity est un peu plus haut

                    Si je t'ai filé un coup de main n'oublie pas le + / -
                    Par contre évite les demandes d'aides en MP, tu sera sympa'

                    La JavaDoc c'est comme le PQ, ça sert à ce démerder tous seul. -Victor Hugo- 2017

                    Une superbe API pour animer vos super modèles CraftStudio dans Minecraft !

                    1 réponse Dernière réponse Répondre Citer 0
                    • robin4002R Hors-ligne
                      robin4002 Moddeurs confirmés Rédacteurs Administrateurs
                      dernière édition par

                      Il est bien enregistré ?

                      1 réponse Dernière réponse Répondre Citer 0
                      • AmaA Hors-ligne
                        Ama
                        dernière édition par

                        Oui, il est enregistrer comme ça

                        GameRegistry.registerTileEntity(TileEntityCrossTomb.class, “Cross_Tomb”);

                        Si je t'ai filé un coup de main n'oublie pas le + / -
                        Par contre évite les demandes d'aides en MP, tu sera sympa'

                        La JavaDoc c'est comme le PQ, ça sert à ce démerder tous seul. -Victor Hugo- 2017

                        Une superbe API pour animer vos super modèles CraftStudio dans Minecraft !

                        1 réponse Dernière réponse Répondre Citer 0
                        • robin4002R Hors-ligne
                          robin4002 Moddeurs confirmés Rédacteurs Administrateurs
                          dernière édition par

                          Je vois pas ce qui peut causer problème alors 😕
                          Il n’y a pas de raison que le tile entity soit null.

                          1 réponse Dernière réponse Répondre Citer 0
                          • AmaA Hors-ligne
                            Ama
                            dernière édition par

                            Oh non !

                            Faut pas que ça foire…
                            Chui dèg, je vais continuer les tests de mon côté


                            J’ai réussi !

                            A vous de juger le travail !

                            :::

                            package viruz.zeamateis.block;
                            
                            import net.minecraft.block.Block;
                            import net.minecraft.block.material.Material;
                            import net.minecraft.entity.EntityLivingBase;
                            import net.minecraft.entity.player.EntityPlayer;
                            import net.minecraft.item.ItemStack;
                            import net.minecraft.tileentity.TileEntity;
                            import net.minecraft.util.AxisAlignedBB;
                            import net.minecraft.util.Icon;
                            import net.minecraft.util.MathHelper;
                            import net.minecraft.util.MovingObjectPosition;
                            import net.minecraft.util.Vec3;
                            import net.minecraft.world.IBlockAccess;
                            import net.minecraft.world.World;
                            import viruz.zeamateis.core.ViruZCore;
                            import viruz.zeamateis.proxy.client.ClientProxy;
                            import viruz.zeamateis.tileEntity.TileEntityCrossTomb;
                            import cpw.mods.fml.relauncher.Side;
                            import cpw.mods.fml.relauncher.SideOnly;
                            
                            public class BlockWoodenCrossTomb extends Block {
                            
                            public BlockWoodenCrossTomb(int par1, Material par2Material)
                            {
                            super(par1, par2Material);
                            this.setHardness(5.5F);
                            this.setStepSound(Block.soundWoodFootstep);
                            this.setCreativeTab(ViruZCore.Blocks);
                            }
                            
                            public void setBlockBoundsBasedOnState(IBlockAccess access, int x, int y, int z)
                            {
                            TileEntity te = access.getBlockTileEntity(x, y, z);
                            if(te instanceof TileEntityCrossTomb)
                            {
                            TileEntityCrossTomb tile = (TileEntityCrossTomb)te;
                            switch(tile.getDirection())
                            {
                            case 0:
                            this.setBlockBounds(0.125F, 0, 0.0625F, 0.875F, 1F, 0.1875F);
                            break;
                            case 1:
                            this.setBlockBounds(0.8125F, 0, 0.125F, 0.9375F, 1F, 0.875F);
                            break;
                            case 2:
                            this.setBlockBounds(0.125F, 0, 0.8125F, 0.875F, 1F, 0.9375F);
                            break;
                            case 3:
                            this.setBlockBounds(0.0625F, 0, 0.125F, 0.1875F, 1F, 0.875F);
                            break;
                            }
                            }
                            
                            }
                            
                            public boolean renderAsNormalBlock()
                            {
                            return false;
                            }
                            
                            public boolean isOpaqueCube()
                            {
                            return false;
                            }
                            
                            @SideOnly(Side.CLIENT)
                            public int getRenderType()
                            {
                            return ClientProxy.renderInventoryTESRID;
                            }
                            
                            public TileEntity createTileEntity(World world, int metadata)
                            {
                            return new TileEntityCrossTomb();
                            }
                            
                            public boolean hasTileEntity(int metadata)
                            {
                            return true;
                            }
                            
                            public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack stack)
                            {
                            int direction = MathHelper.floor_double((double)(living.rotationYaw * 4.0F / 360.0F) + 2.5D) & 3;
                            TileEntity te = world.getBlockTileEntity(x, y, z);
                            if(te != null && te instanceof TileEntityCrossTomb)
                            {
                            ((TileEntityCrossTomb)te).setDirection((byte)direction);
                            world.markBlockForUpdate(x, y, z);
                            }
                            
                            }
                            
                            @SideOnly(Side.CLIENT)
                            public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z)
                            {
                            this.setBlockBoundsBasedOnState(world, x, y, z);
                            return super.getSelectedBoundingBoxFromPool(world, x, y, z);
                            }
                            
                            public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
                            {
                            this.setBlockBoundsBasedOnState(world, x, y, z);
                            return super.getCollisionBoundingBoxFromPool(world, x, y, z);
                            }
                            
                            public Icon getIcon(int side, int metadata)
                            {
                            return Block.wood.getIcon(0, 0);
                            }
                            
                            public MovingObjectPosition collisionRayTrace(World world, int x, int y, int z, Vec3 vec31, Vec3 vec32)
                            {
                            this.setBlockBoundsBasedOnState(world, x, y, z);
                            return super.collisionRayTrace(world, x, y, z, vec31, vec32);
                            }
                            }
                            

                            :::

                            Si je t'ai filé un coup de main n'oublie pas le + / -
                            Par contre évite les demandes d'aides en MP, tu sera sympa'

                            La JavaDoc c'est comme le PQ, ça sert à ce démerder tous seul. -Victor Hugo- 2017

                            Une superbe API pour animer vos super modèles CraftStudio dans Minecraft !

                            1 réponse Dernière réponse Répondre Citer 0
                            • 1 / 1
                            • Premier message
                              Dernier message
                            Design by Woryk
                            ContactMentions Légales

                            MINECRAFT FORGE FRANCE © 2024

                            Powered by NodeBB