MFF

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

    Problème d'ouverture du GUI de mon four 1.7.10

    Planifier Épinglé Verrouillé Déplacé Résolu 1.7.x
    1.7.10
    12 Messages 4 Publieurs 655 Vues 4 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

      Bonjour,
      Il manque le gui handler, vérifies que tu en as bien un et qu’il est bien enregistré.

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

        Merci beaucoup, je m’améliore grâce à vous

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

          Bonjour j’ai repris ton code mais j’ai une erreur quand je pose le four

          ---- Minecraft Crash Report ----
          // Don't be sad. I'll do better next time, I promise!
          
          Time: 18/11/19 15:57
          Description: Exception ticking world
          
          java.lang.RuntimeException: class fr.r0x4s.cite4.tileentity.TileEntityFour is missing a mapping! This is a bug!
          	at net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:96)
          	at fr.r0x4s.cite4.tileentity.TileEntityFour.writeToNBT(TileEntityFour.java:72)
          	at fr.r0x4s.cite4.tileentity.TileEntityFour.getDescriptionPacket(TileEntityFour.java:115)
          	at net.minecraft.server.management.PlayerManager$PlayerInstance.sendTileToAllPlayersWatchingChunk(PlayerManager.java:632)
          	at net.minecraft.server.management.PlayerManager$PlayerInstance.sendChunkUpdate(PlayerManager.java:574)
          	at net.minecraft.server.management.PlayerManager.updatePlayerInstances(PlayerManager.java:80)
          	at net.minecraft.world.WorldServer.tick(WorldServer.java:193)
          	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:692)
          	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
          	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
          	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
          	at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
          
          
          A detailed walkthrough of the error, its code path and all known details is as follows:
          ---------------------------------------------------------------------------------------
          
          -- Head --
          Stacktrace:
          	at net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:96)
          	at fr.r0x4s.cite4.tileentity.TileEntityFour.writeToNBT(TileEntityFour.java:72)
          	at fr.r0x4s.cite4.tileentity.TileEntityFour.getDescriptionPacket(TileEntityFour.java:115)
          	at net.minecraft.server.management.PlayerManager$PlayerInstance.sendTileToAllPlayersWatchingChunk(PlayerManager.java:632)
          	at net.minecraft.server.management.PlayerManager$PlayerInstance.sendChunkUpdate(PlayerManager.java:574)
          	at net.minecraft.server.management.PlayerManager.updatePlayerInstances(PlayerManager.java:80)
          	at net.minecraft.world.WorldServer.tick(WorldServer.java:193)
          
          -- Affected level --
          Details:
          	Level name: New World
          	All players: 1 total; [EntityPlayerMP['Player385'/347, l='New World', x=-153,28, y=70,00, z=257,18]]
          	Chunk stats: ServerChunkCache: 683 Drop: 0
          	Level seed: -4580569012153532039
          	Level generator: ID 00 - default, ver 1. Features enabled: true
          	Level generator options: 
          	Level spawn location: World: (-156,64,256), Chunk: (at 4,4,0 in -10,16; contains blocks -160,0,256 to -145,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
          	Level time: 315862 game time, 1341 day time
          	Level dimension: 0
          	Level storage version: 0x04ABD - Anvil
          	Level weather: Rain time: 5362 (now: false), thunder time: 62331 (now: false)
          	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
          Stacktrace:
          	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:692)
          	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
          	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
          	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
          	at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
          
          -- System Details --
          Details:
          	Minecraft Version: 1.7.10
          	Operating System: Windows 10 (amd64) version 10.0
          	Java Version: 1.8.0_211, Oracle Corporation
          	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
          	Memory: 862255904 bytes (822 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
          	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
          	AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
          	IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
          	FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 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
          	UCHIJAAAA	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
          	UCHIJAAAA	FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) 
          	UCHIJAAAA	Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) 
          	UCHIJAAAA	cite4{0.1} [Cité 4] (bin) 
          	GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
          	Profiler Position: N/A (disabled)
          	Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
          	Player Count: 1 / 8; [EntityPlayerMP['Player385'/347, l='New World', x=-153,28, y=70,00, z=257,18]]
          	Type: Integrated Server (map_client.txt)
          	Is Modded: Definitely; Client brand changed to 'fml,forge'
          
          1 réponse Dernière réponse Répondre Citer 0
          • R0X4SR Hors-ligne
            R0X4S
            dernière édition par

            Donc je sait pas si toi @Binaire ou @robin4002 vous pourriez m’aider

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

              C’est sur que copié une classe comme sa … C’est moyen 😕
              Essaye de regarder déjà à quoi correspond ce qu’il y’a dans ses classes.

              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 faut enregistrer le tile entity.

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

                  Dac merci j’avais pas fait gaffe a enregistrer le Titleentity
                  serrai tu a quoi correspond cette erreur @robin4002 ?
                  en gros quand je veux faire cuire un item sa crash et sa de dit sa

                  ---- Minecraft Crash Report ----
                  // My bad.
                  
                  Time: 19/11/19 12:08
                  Description: Ticking block entity
                  
                  java.lang.ClassCastException: net.minecraft.tileentity.TileEntityFurnace cannot be cast to fr.r0x4s.cite4.tileentity.TileEntityFourTest
                  	at fr.r0x4s.cite4.blocks.fourTest.breakBlock(fourTest.java:182)
                  	at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:658)
                  	at net.minecraft.world.World.setBlock(World.java:519)
                  	at net.minecraft.world.World.setBlock(World.java:681)
                  	at net.minecraft.block.BlockFurnace.updateFurnaceBlockState(BlockFurnace.java:138)
                  	at net.minecraft.tileentity.TileEntityFurnace.updateEntity(TileEntityFurnace.java:289)
                  	at net.minecraft.world.World.updateEntities(World.java:2160)
                  	at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515)
                  	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703)
                  	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
                  	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
                  	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
                  	at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
                  
                  
                  A detailed walkthrough of the error, its code path and all known details is as follows:
                  ---------------------------------------------------------------------------------------
                  
                  -- Head --
                  Stacktrace:
                  	at fr.r0x4s.cite4.blocks.fourTest.breakBlock(fourTest.java:182)
                  	at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:658)
                  	at net.minecraft.world.World.setBlock(World.java:519)
                  	at net.minecraft.world.World.setBlock(World.java:681)
                  	at net.minecraft.block.BlockFurnace.updateFurnaceBlockState(BlockFurnace.java:138)
                  	at net.minecraft.tileentity.TileEntityFurnace.updateEntity(TileEntityFurnace.java:289)
                  
                  -- Block entity being ticked --
                  Details:
                  	Name: Furnace // net.minecraft.tileentity.TileEntityFurnace
                  	Block type: ID #180 (tile.fourTest // fr.r0x4s.cite4.blocks.fourTest)
                  	Block data value: 4 / 0x4 / 0b0100
                  	Block location: World: (-151,70,257), Chunk: (at 9,4,1 in -10,16; contains blocks -160,0,256 to -145,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
                  	Actual block type: ID #62 (tile.furnace // net.minecraft.block.BlockFurnace)
                  	Actual block data value: 0 / 0x0 / 0b0000
                  Stacktrace:
                  	at net.minecraft.world.World.updateEntities(World.java:2160)
                  	at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515)
                  
                  -- Affected level --
                  Details:
                  	Level name: New World
                  	All players: 1 total; [EntityPlayerMP['Player412'/347, l='New World', x=-153,03, y=70,00, z=257,70]]
                  	Chunk stats: ServerChunkCache: 721 Drop: 0
                  	Level seed: -4580569012153532039
                  	Level generator: ID 00 - default, ver 1. Features enabled: true
                  	Level generator options: 
                  	Level spawn location: World: (-156,64,256), Chunk: (at 4,4,0 in -10,16; contains blocks -160,0,256 to -145,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
                  	Level time: 347061 game time, 25839 day time
                  	Level dimension: 0
                  	Level storage version: 0x04ABD - Anvil
                  	Level weather: Rain time: 131415 (now: false), thunder time: 116021 (now: false)
                  	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
                  Stacktrace:
                  	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703)
                  	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
                  	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
                  	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
                  	at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
                  
                  -- System Details --
                  Details:
                  	Minecraft Version: 1.7.10
                  	Operating System: Windows 10 (amd64) version 10.0
                  	Java Version: 1.8.0_211, Oracle Corporation
                  	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                  	Memory: 700898480 bytes (668 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
                  	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
                  	AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
                  	IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
                  	FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 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
                  	UCHIJAAAA	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
                  	UCHIJAAAA	FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) 
                  	UCHIJAAAA	Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) 
                  	UCHIJAAAA	cite4{0.1} [Cité 4] (bin) 
                  	GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
                  	Profiler Position: N/A (disabled)
                  	Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
                  	Player Count: 1 / 8; [EntityPlayerMP['Player412'/347, l='New World', x=-153,03, y=70,00, z=257,70]]
                  	Type: Integrated Server (map_client.txt)
                  	Is Modded: Definitely; Client brand changed to 'fml,forge'
                  
                  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

                    Ton problème se trouve dans la classe fourTest à la ligne 182, dans laquelle il y a un cast invalide.

                    R0X4SR 1 réponse Dernière réponse Répondre Citer 0
                    • R0X4SR Hors-ligne
                      R0X4S @robin4002
                      dernière édition par

                      @robin4002
                      J’ai repris le code de base de minecraft mais je vois pas trop se qui vas pas

                      Ligne 182

                      TileEntityFourTest tileentityfourtest = (TileEntityFourTest) p_149749_1_.getTileEntity(p_149749_2_,
                      					p_149749_3_, p_149749_4_);
                      
                      1 réponse Dernière réponse Répondre Citer 0
                      • R0X4SR Hors-ligne
                        R0X4S
                        dernière édition par

                        class fourTest:

                        package fr.r0x4s.cite4.blocks;
                        
                        import java.util.Random;
                        
                        import cpw.mods.fml.relauncher.Side;
                        import cpw.mods.fml.relauncher.SideOnly;
                        import fr.r0x4s.cite4.Cite4;
                        import fr.r0x4s.cite4.tileentity.TileEntityFourTest;
                        import net.minecraft.block.Block;
                        import net.minecraft.block.BlockContainer;
                        import net.minecraft.block.material.Material;
                        import net.minecraft.client.renderer.texture.IIconRegister;
                        import net.minecraft.entity.EntityLivingBase;
                        import net.minecraft.entity.item.EntityItem;
                        import net.minecraft.entity.player.EntityPlayer;
                        import net.minecraft.init.Blocks;
                        import net.minecraft.item.Item;
                        import net.minecraft.item.ItemStack;
                        import net.minecraft.nbt.NBTTagCompound;
                        import net.minecraft.tileentity.TileEntity;
                        import net.minecraft.tileentity.TileEntityFurnace;
                        import net.minecraft.util.IIcon;
                        import net.minecraft.util.MathHelper;
                        import net.minecraft.world.World;
                        
                        public class fourTest extends BlockContainer {
                        	private final Random field_149933_a = new Random();
                        	private final boolean field_149932_b;
                        	private static boolean field_149934_M;
                        	@SideOnly(Side.CLIENT)
                        	private IIcon field_149935_N;
                        	@SideOnly(Side.CLIENT)
                        	private IIcon field_149936_O;
                        	private static final String __OBFID = "CL_00000248";
                        
                        	public fourTest(boolean rock) {
                        		super(Material.rock);
                        		this.field_149932_b = rock;
                        	}
                        
                        	public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
                        		return Item.getItemFromBlock(Blocks.furnace);
                        	}
                        
                        	/**
                        	 * Called whenever the block is added into the world. Args: world, x, y, z
                        	 */
                        	public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_) {
                        		super.onBlockAdded(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);
                        		this.func_149930_e(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);
                        	}
                        
                        	private void func_149930_e(World p_149930_1_, int p_149930_2_, int p_149930_3_, int p_149930_4_) {
                        		if (!p_149930_1_.isRemote) {
                        			Block block = p_149930_1_.getBlock(p_149930_2_, p_149930_3_, p_149930_4_ - 1);
                        			Block block1 = p_149930_1_.getBlock(p_149930_2_, p_149930_3_, p_149930_4_ + 1);
                        			Block block2 = p_149930_1_.getBlock(p_149930_2_ - 1, p_149930_3_, p_149930_4_);
                        			Block block3 = p_149930_1_.getBlock(p_149930_2_ + 1, p_149930_3_, p_149930_4_);
                        			byte b0 = 3;
                        
                        			if (block.func_149730_j() && !block1.func_149730_j()) {
                        				b0 = 3;
                        			}
                        
                        			if (block1.func_149730_j() && !block.func_149730_j()) {
                        				b0 = 2;
                        			}
                        
                        			if (block2.func_149730_j() && !block3.func_149730_j()) {
                        				b0 = 5;
                        			}
                        
                        			if (block3.func_149730_j() && !block2.func_149730_j()) {
                        				b0 = 4;
                        			}
                        
                        			p_149930_1_.setBlockMetadataWithNotify(p_149930_2_, p_149930_3_, p_149930_4_, b0, 2);
                        		}
                        	}
                        
                        	/**
                        	 * Gets the block's texture. Args: side, meta
                        	 */
                        	@SideOnly(Side.CLIENT)
                        	public IIcon getIcon(int p_149691_1_, int p_149691_2_) {
                        		return p_149691_1_ == 1 ? this.field_149935_N
                        				: (p_149691_1_ == 0 ? this.field_149935_N
                        						: (p_149691_1_ != p_149691_2_ ? this.blockIcon : this.field_149936_O));
                        	}
                        
                        	@SideOnly(Side.CLIENT)
                        	public void registerBlockIcons(IIconRegister p_149651_1_) {
                        		this.blockIcon = p_149651_1_.registerIcon("four_side");
                        		this.field_149936_O = p_149651_1_.registerIcon(this.field_149932_b ? "four_front_on" : "four_front_off");
                        		this.field_149935_N = p_149651_1_.registerIcon("four_top");
                        	}
                        
                        	/**
                        	 * Called upon block activation (right click on the block.)
                        	 */
                        	public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_,
                        			EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
                        		if (p_149727_1_.isRemote) {
                        			return true;
                        		} else {
                        			TileEntityFurnace tileentityfurnace = (TileEntityFurnace) p_149727_1_.getTileEntity(p_149727_2_,
                        					p_149727_3_, p_149727_4_);
                        
                        			if (tileentityfurnace != null) {
                        				p_149727_5_.func_146101_a(tileentityfurnace);
                        			}
                        
                        			return true;
                        		}
                        	}
                        
                        	/**
                        	 * Update which block the furnace is using depending on whether or not it is
                        	 * burning
                        	 */
                        	public static void updateFurnaceBlockState(boolean p_149931_0_, World p_149931_1_, int p_149931_2_, int p_149931_3_,
                        			int p_149931_4_) {
                        		int l = p_149931_1_.getBlockMetadata(p_149931_2_, p_149931_3_, p_149931_4_);
                        		TileEntity tileentity = p_149931_1_.getTileEntity(p_149931_2_, p_149931_3_, p_149931_4_);
                        		field_149934_M = true;
                        
                        		if (p_149931_0_) {
                        			p_149931_1_.setBlock(p_149931_2_, p_149931_3_, p_149931_4_, Blocks.lit_furnace);
                        		} else {
                        			p_149931_1_.setBlock(p_149931_2_, p_149931_3_, p_149931_4_, Blocks.furnace);
                        		}
                        
                        		field_149934_M = false;
                        		p_149931_1_.setBlockMetadataWithNotify(p_149931_2_, p_149931_3_, p_149931_4_, l, 2);
                        
                        		if (tileentity != null) {
                        			tileentity.validate();
                        			p_149931_1_.setTileEntity(p_149931_2_, p_149931_3_, p_149931_4_, tileentity);
                        		}
                        	}
                        
                        	/**
                        	 * Returns a new instance of a block's tile entity class. Called on placing the
                        	 * block.
                        	 */
                        	public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
                        		return new TileEntityFurnace();
                        	}
                        
                        	/**
                        	 * Called when the block is placed in the world.
                        	 */
                        	public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_,
                        			EntityLivingBase p_149689_5_, ItemStack p_149689_6_) {
                        		int l = MathHelper.floor_double((double) (p_149689_5_.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
                        
                        		if (l == 0) {
                        			p_149689_1_.setBlockMetadataWithNotify(p_149689_2_, p_149689_3_, p_149689_4_, 2, 2);
                        		}
                        
                        		if (l == 1) {
                        			p_149689_1_.setBlockMetadataWithNotify(p_149689_2_, p_149689_3_, p_149689_4_, 5, 2);
                        		}
                        
                        		if (l == 2) {
                        			p_149689_1_.setBlockMetadataWithNotify(p_149689_2_, p_149689_3_, p_149689_4_, 3, 2);
                        		}
                        
                        		if (l == 3) {
                        			p_149689_1_.setBlockMetadataWithNotify(p_149689_2_, p_149689_3_, p_149689_4_, 4, 2);
                        		}
                        
                        		if (p_149689_6_.hasDisplayName()) {
                        			((TileEntityFourTest) p_149689_1_.getTileEntity(p_149689_2_, p_149689_3_, p_149689_4_))
                        					.func_145951_a(p_149689_6_.getDisplayName());
                        		}
                        	}
                        
                        	public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_,
                        			int p_149749_6_) {
                        		if (!field_149934_M) {
                        			TileEntityFourTest tileentityfourtest = (TileEntityFourTest) p_149749_1_.getTileEntity(p_149749_2_,
                        					p_149749_3_, p_149749_4_);
                        
                        			if (tileentityfourtest != null) {
                        				for (int i1 = 0; i1 < tileentityfourtest.getSizeInventory(); ++i1) {
                        					ItemStack itemstack = tileentityfourtest.getStackInSlot(i1);
                        
                        					if (itemstack != null) {
                        						float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
                        						float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
                        						float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
                        
                        						while (itemstack.stackSize > 0) {
                        							int j1 = this.field_149933_a.nextInt(21) + 10;
                        
                        							if (j1 > itemstack.stackSize) {
                        								j1 = itemstack.stackSize;
                        							}
                        
                        							itemstack.stackSize -= j1;
                        							EntityItem entityitem = new EntityItem(p_149749_1_, (double) ((float) p_149749_2_ + f),
                        									(double) ((float) p_149749_3_ + f1), (double) ((float) p_149749_4_ + f2),
                        									new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
                        
                        							if (itemstack.hasTagCompound()) {
                        								entityitem.getEntityItem()
                        										.setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
                        							}
                        
                        							float f3 = 0.05F;
                        							entityitem.motionX = (double) ((float) this.field_149933_a.nextGaussian() * f3);
                        							entityitem.motionY = (double) ((float) this.field_149933_a.nextGaussian() * f3 + 0.2F);
                        							entityitem.motionZ = (double) ((float) this.field_149933_a.nextGaussian() * f3);
                        							p_149749_1_.spawnEntityInWorld(entityitem);
                        						}
                        					}
                        				}
                        
                        				p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
                        			}
                        		}
                        
                        		super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
                        	}
                        
                        	/**
                        	 * A randomly called display update to be able to add particles or other items
                        	 * for display
                        	 */
                        	@SideOnly(Side.CLIENT)
                        	public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_,
                        			Random p_149734_5_) {
                        		if (this.field_149932_b) {
                        			int l = p_149734_1_.getBlockMetadata(p_149734_2_, p_149734_3_, p_149734_4_);
                        			float f = (float) p_149734_2_ + 0.5F;
                        			float f1 = (float) p_149734_3_ + 0.0F + p_149734_5_.nextFloat() * 6.0F / 16.0F;
                        			float f2 = (float) p_149734_4_ + 0.5F;
                        			float f3 = 0.52F;
                        			float f4 = p_149734_5_.nextFloat() * 0.6F - 0.3F;
                        
                        			if (l == 4) {
                        				p_149734_1_.spawnParticle("smoke", (double) (f - f3), (double) f1, (double) (f2 + f4), 0.0D, 0.0D,
                        						0.0D);
                        				p_149734_1_.spawnParticle("flame", (double) (f - f3), (double) f1, (double) (f2 + f4), 0.0D, 0.0D,
                        						0.0D);
                        			} else if (l == 5) {
                        				p_149734_1_.spawnParticle("smoke", (double) (f + f3), (double) f1, (double) (f2 + f4), 0.0D, 0.0D,
                        						0.0D);
                        				p_149734_1_.spawnParticle("flame", (double) (f + f3), (double) f1, (double) (f2 + f4), 0.0D, 0.0D,
                        						0.0D);
                        			} else if (l == 2) {
                        				p_149734_1_.spawnParticle("smoke", (double) (f + f4), (double) f1, (double) (f2 - f3), 0.0D, 0.0D,
                        						0.0D);
                        				p_149734_1_.spawnParticle("flame", (double) (f + f4), (double) f1, (double) (f2 - f3), 0.0D, 0.0D,
                        						0.0D);
                        			} else if (l == 3) {
                        				p_149734_1_.spawnParticle("smoke", (double) (f + f4), (double) f1, (double) (f2 + f3), 0.0D, 0.0D,
                        						0.0D);
                        				p_149734_1_.spawnParticle("flame", (double) (f + f4), (double) f1, (double) (f2 + f3), 0.0D, 0.0D,
                        						0.0D);
                        			}
                        		}
                        	}
                        
                        	/**
                        	 * If this returns true, then comparators facing away from this block will use
                        	 * the value from getComparatorInputOverride instead of the actual redstone
                        	 * signal strength.
                        	 */
                        	public boolean hasComparatorInputOverride() {
                        		return true;
                        	}
                        
                        	/**
                        	 * If hasComparatorInputOverride returns true, the return value from this is
                        	 * used instead of the redstone signal strength when this block inputs to a
                        	 * comparator.
                        	 */
                        	
                        	/**
                        	 * Gets an item for the block being called on. Args: world, x, y, z
                        	 */
                        	@SideOnly(Side.CLIENT)
                        	public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) {
                        		return Item.getItemFromBlock(Cite4.fourTest);
                        	}
                        }
                        
                        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

                          Dans ta fonction createNewTileEntity tu créés un TileEntityFurnace pas étonnant d’avoir des soucis ensuite …

                          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