12 janv. 2014, 15:50

@‘robin4002’:

Finalement ton container est bon x) (on tourne en rond)

^^ c’est à n’y rien comprendre…
@‘robin4002’:

Pourtant le gui handler est ok, je peux alors le code de ton bloc ?

Non c’est interdit ! 😛

import net.minecraft.block.BlockContainer;
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.world.World;
import cpw.mods.fml.common.network.FMLNetworkHandler;

public class SoundBlock extends BlockContainer{

public SoundBlock(int par1, Material par2Material) {
super(par1, par2Material);
}

@Override
public TileEntity createNewTileEntity(World world) {
return new TileEntitySoundBlock();
}

@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
FMLNetworkHandler.openGui(player, WirestoneMod.instance, 0, world, x, y, z);
return true;
}

@Override//TODO Verifier méthode
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack stack){}
}

Pour t’encourager, je te plussoie ! 😛