TileEntity 2 slots synchronisés sur 6



  • Bonjour à tous, j'ai un petit soucis avec mon TileEntity, en fait elle sauvegarde que les deux derniers slots, elle met également leur contenu dans les deux premiers slots du container au redémarrage et ne sauvegarde pas du tout les autres lorsque je quitte le monde. En gros quand je remplis mon container de 6 slots, les deux derniers sont sauvegardés mais pas le reste, j'ai essayé de faire des println etc.. mais je n'arrive toujours pas a localiser le bug, même si je soupçonne fortement la méthode readFromNBT mais j'aimerais avoir votre avis et surtout que je n'arrive pas a voir d'où peut venir ce bug.

    public class TileEntityFourCuisine extends TileEntity implements IInventory {
    
    private byte direction;
    private boolean fireParticle = false;
    public ItemStack[] contents = new ItemStack[6];
    private int cuisson[] = { 0, 0, 0, 0, 0, 0 };
    private int cuissonMax = 400;
    
    @Override
    public void readFromNBT(NBTTagCompound compound) {
    
    super.readFromNBT(compound);
    this.direction = compound.getByte("Direction");
    this.fireParticle = compound.getBoolean("isBurning");
    NBTTagList list = compound.getTagList("Items", Constants.NBT.TAG_COMPOUND);
    System.out.println("Liste Read: " + list);
    this.contents = new ItemStack[this.getSizeInventory()];
    
    for (int i = 0; i < list.tagCount(); i++) {
    NBTTagCompound compound1 = list.getCompoundTagAt(i);
    int j = compound1.getByte("Slot") & 225;
    
    if (j >= 0 && j <= this.contents.length) {
    
    this.contents[j] = ItemStack.loadItemStackFromNBT(compound1);
    System.out.println("Itemstack read : " + this.contents[j]);
    }
    }
    
    for (int i = 0; i <= 5; i++) {
    this.cuisson* = compound.getShort("cuisson" + i);
    }
    
    this.cuissonMax = compound.getShort("cuissonMax");
    }
    
    @Override
    public void writeToNBT(NBTTagCompound compound) {
    
    super.writeToNBT(compound);
    compound.setByte("Direction", this.direction);
    
    NBTTagList list = new NBTTagList();
    
    for (int i = 0; i < this.contents.length; i++) {
    
    if (contents* != null) {
    NBTTagCompound compound1 = new NBTTagCompound();
    
    compound1.setByte("Slot", (byte) i);
    compound1.setBoolean("isBurning", this.fireParticle);
    this.contents*.writeToNBT(compound1);
    list.appendTag(compound1);
    }
    
    }
    compound.setTag("Items", list);
    System.out.println("Liste Write: " + list);
    
    for (int i = 0; i <= 5; i++) {
    compound.setShort("cuisson" + i, (short) this.cuisson*);
    }
    
    compound.setShort("cuissonMax", (short) this.cuissonMax);
    }
    
    public byte getDirection() {
    return direction;
    }
    
    public void setDirection(byte direction) {
    this.direction = direction;
    this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
    }
    
    public Packet getDescriptionPacket() {
    NBTTagCompound nbttagcompound = new NBTTagCompound();
    this.writeToNBT(nbttagcompound);
    return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbttagcompound);
    }
    
    public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
    
    this.readFromNBT(pkt.func_148857_g());
    this.worldObj.markBlockRangeForRenderUpdate(this.xCoord, this.yCoord, this.zCoord, this.xCoord, this.yCoord,
    this.zCoord);
    }
    
    @Override
    public int getSizeInventory() {
    
    return this.contents.length;
    }
    
    @Override
    public ItemStack getStackInSlot(int slotIndex) {
    
    return this.contents[slotIndex];
    }
    
    @Override
    public ItemStack decrStackSize(int slotIndex, int amount) {
    
    if (this.contents[slotIndex] != null) {
    ItemStack stack;
    
    if (this.contents[slotIndex].stackSize <= amount) {
    stack = this.contents[slotIndex];
    this.contents[slotIndex] = null;
    this.markDirty();
    return stack;
    } else {
    
    stack = this.contents[slotIndex].splitStack(amount);
    if (this.contents[slotIndex].stackSize == 0) {
    this.contents[slotIndex] = null;
    }
    
    this.markDirty();
    return stack;
    }
    } else {
    
    return null;
    }
    }
    
    @Override
    public ItemStack getStackInSlotOnClosing(int slotIndex) {
    
    if (this.contents[slotIndex] != null) {
    
    ItemStack stack = this.contents[slotIndex];
    this.contents[slotIndex] = null;
    return stack;
    } else {
    return null;
    }
    }
    
    @Override
    public void setInventorySlotContents(int slotIndex, ItemStack stack) {
    
    this.contents[slotIndex] = stack;
    
    if (stack != null && stack.stackSize > this.getInventoryStackLimit()) {
    stack.stackSize = this.getInventoryStackLimit();
    }
    this.markDirty();
    
    }
    
    @Override
    public String getInventoryName() {
    
    return null;
    }
    
    @Override
    public boolean hasCustomInventoryName() {
    
    return false;
    }
    
    @Override
    public int getInventoryStackLimit() {
    
    return 1;
    }
    
    @Override
    public boolean isUseableByPlayer(EntityPlayer player) {
    
    return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false
    : player.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D,
    (double) this.zCoord + 0.5D) <= 64.0D;
    
    }
    
    @Override
    public void openInventory() {
    
    }
    
    @Override
    public void closeInventory() {
    
    }
    
    @Override
    public boolean isItemValidForSlot(int slotIndex, ItemStack stack) {
    
    if (stack.getItem() instanceof ItemsFoodHeimnor || stack.getItem() instanceof IngredientsHeimnor) {
    return true;
    } else {
    return false;
    }
    
    }
    
    public boolean isBurning(int slot) {
    return this.cuisson[slot] > 0;
    }
    
    public boolean canSmelt(int slot) {
    
    if (contents[slot] == null) {
    
    return false;
    
    } else {
    ItemStack stack = RecipesFour.smelting().getSmeltingResult(this.contents[slot]);
    if (stack == null) {
    return false;
    }
    
    if (contents[slot].isItemEqual(stack)) {
    return false;
    }
    
    return true;
    }
    }
    
    public void smeltItem(int slot) {
    
    if (this.canSmelt(slot)) {
    if (contents[slot] != null && cuisson[slot] == this.cuissonMax) {
    ItemStack stack = RecipesFour.smelting().getSmeltingResult(this.contents[slot]);
    this.cuisson[slot] = 0;
    –this.contents[slot].stackSize;
    if (this.contents[slot].stackSize <= 0)
    this.contents[slot] = null;
    this.setInventorySlotContents(slot, stack.copy());
    
    }
    }
    
    }
    
    public void updateEntity() {
    
    for (int i = 0; i <= 5; i++) {
    
    if (this.isBurning(i) && this.canSmelt(i)) {
    this.fireParticle = true;
    this.markDirty();
    
    ++this.cuisson*;
    }
    
    if (this.canSmelt(i) && !this.isBurning(i)) {
    this.cuisson* = 1;
    this.fireParticle = true;
    }
    if (this.canSmelt(i) && this.cuisson* == this.cuissonMax) {
    this.fireParticle = false;
    this.markDirty();
    this.smeltItem(i);
    }
    
    if (this.cuisson* > 0 && !this.canSmelt(i)) {
    this.fireParticle = false;
    }
    
    if (!this.canSmelt(i)) {
    this.cuisson* = 0;
    }
    }
    }
    
    public boolean getFireParticle() {
    return this.fireParticle;
    }
    }
    
    

    Contenu de la console au lancement :

    [01:52:51] [Server thread/INFO]: Generating keypair
    
    [01:52:52] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
    [01:52:52] [Server thread/INFO] [FML]: Applying holder lookups
    [01:52:52] [Server thread/INFO] [FML]: Holder lookups applied
    [01:52:52] [Server thread/INFO] [FML]: Loading dimension 0 (Nouveau monde) (net.minecraft.server.integrated.IntegratedServer@7e1ff5c7)
    [01:52:52] [Server thread/INFO] [FML]: Loading dimension 1 (Nouveau monde) (net.minecraft.server.integrated.IntegratedServer@7e1ff5c7)
    [01:52:52] [Server thread/INFO] [FML]: Loading dimension -1 (Nouveau monde) (net.minecraft.server.integrated.IntegratedServer@7e1ff5c7)
    [01:52:52] [Server thread/INFO]: Preparing start region for level 0
    [01:52:52] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:46]: Liste Read: [0:{Slot:0b,id:4250s,Count:1b,isBurning:0b,Damage:0s,},1:{Slot:1b,id:4250s,Count:1b,isBurning:0b,Damage:0s,},2:{Slot:2b,id:4250s,Count:1b,isBurning:0b,Damage:0s,},]
    [01:52:52] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:56]: Itemstack read : 1xitem.tranchedepain@0
    [01:52:52] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:56]: Itemstack read : 1xitem.tranchedepain@0
    [01:52:52] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:56]: Itemstack read : 1xitem.tranchedepain@0
    [01:52:53] [Server thread/INFO]: Changing view distance to 12, from 10
    [01:52:53] [Netty Client IO #0/INFO] [FML]: Server protocol version 2
    [01:52:53] [Netty IO #1/INFO] [FML]: Client protocol version 2
    [01:52:53] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : FML@7.10.99.99,Forge@10.13.4.1614,mcp@9.05,heimnormod@1.0.0
    [01:52:53] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT[/font]
    [01:52:53] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER[/font]
    [01:52:53] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
    [01:52:53] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established
    [01:52:54] [Server thread/INFO]: Player277[local:E:5100405f] logged in with entity id 173 at (84.30000001192093, 3.0, -354.3443296820576)
    [01:52:54] [Server thread/INFO]: Player277 a rejoint la partie
    [01:52:54] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:74]: Contents length : 6
    [01:52:54] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:78]: Saving slot 0
    [01:52:54] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:78]: Saving slot 1
    [01:52:54] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:89]: Liste Write: [0:{Slot:0b,id:4250s,Count:1b,isBurning:0b,Damage:0s,},1:{Slot:1b,id:4250s,Count:1b,isBurning:0b,Damage:0s,},]
    [01:52:54] [Client thread/INFO] [STDOUT]: [com.heimnor.client.PlayerDataEventHandler:onEntityJoinWorld:34]: test
    [01:52:54] [Client thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:46]: Liste Read: [0:{Slot:0b,id:4250s,Count:1b,isBurning:0b,Damage:0s,},1:{Slot:1b,id:4250s,Count:1b,isBurning:0b,Damage:0s,},]
    [01:52:54] [Client thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:56]: Itemstack read : 1xitem.tranchedepain@0
    [01:52:54] [Client thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:56]: Itemstack read : 1xitem.tranchedepain@0
    [01:52:59] [Server thread/INFO]: Saving and pausing game…
    [01:52:59] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/Overworld
    [01:52:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:74]: Contents length : 6
    [01:52:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:78]: Saving slot 0
    [01:52:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:78]: Saving slot 1
    [01:52:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:89]: Liste Write: [0:{Slot:0b,id:4250s,Count:1b,isBurning:0b,Damage:0s,},1:{Slot:1b,id:4250s,Count:1b,isBurning:0b,Damage:0s,},]
    [01:52:59] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/Nether
    [01:52:59] [Server thread/INFO]: Saving chunks for level 'Nouveau monde'/The End
    


  • Bonjour,
    Il y a un problème sur l'enregistrement de la variable fireParticle car elle est enregistrée dans les tags des item et elle est chargée à partir des tags du TE. Mais cela n'a pas de rapport avec ton bug.
    Essaye de print le contenu de contents dans writeToNBT et à la fin de readFromNBT pour que l'on voie bien ce qui doit être sauvegardé et ce qui a été chargé.



  • Déjà merci pour ta réponse et ensuite voici ce que j'obtiens. 
    Via ce code :

    private byte direction;
    private boolean fireParticle = false;
    public ItemStack[] contents = new ItemStack[6];
    private int cuisson[] = { 0, 0, 0, 0, 0, 0 };
    private int cuissonMax = 400;
    
    @Override
    public void readFromNBT(NBTTagCompound compound) {
    System.out.println("Contents read : " + this.contents);
    super.readFromNBT(compound);
    this.direction = compound.getByte("Direction");
    this.fireParticle = compound.getBoolean("isBurning");
    NBTTagList list = compound.getTagList("Items", 10);
    System.out.println("Liste Read: " + list);
    this.contents = new ItemStack[this.getSizeInventory()];
    
    for (int i = 0; i < list.tagCount(); i++) {
    NBTTagCompound compound1 = list.getCompoundTagAt(i);
    int j = compound1.getByte("Slot") & 225;
    
    if (j >= 0 && j < this.contents.length) {
    
    this.contents[j] = ItemStack.loadItemStackFromNBT(compound1);
    System.out.println("Itemstack read : " + this.contents[j]);
    }
    }
    
    for (int i = 0; i <= 5; i++) {
    this.cuisson* = compound.getShort("cuisson" + i);
    }
    
    this.cuissonMax = compound.getShort("cuissonMax");
    System.out.println("Print Contents : " + this.contents);
    }
    
    @Override
    public void writeToNBT(NBTTagCompound compound) {
    
    System.out.println("Contents Write : " + this.contents);
    
    super.writeToNBT(compound);
    compound.setByte("Direction", this.direction);
    
    NBTTagList list = new NBTTagList();
    System.out.println("Contents length : " + this.contents.length);
    for (int i = 0; i < this.contents.length; i++) {
    System.out.println("Contents Contenu : " + this.contents*);
    if (contents* != null) {
    System.out.println("Saving slot " + i);
    NBTTagCompound compound1 = new NBTTagCompound();
    
    compound1.setByte("Slot", (byte) i);
    compound1.setBoolean("isBurning", this.fireParticle);
    this.contents*.writeToNBT(compound1);
    list.appendTag(compound1);
    }
    
    }
    compound.setTag("Items", list);
    System.out.println("Liste Write: " + list);
    
    for (int i = 0; i <= 5; i++) {
    compound.setShort("cuisson" + i, (short) this.cuisson*);
    }
    
    compound.setShort("cuissonMax", (short) this.cuissonMax);
    
    }
    

    J'obtiens :

    [12:15:59] [Server thread/INFO]: Saving and pausing game…
    [12:15:59] [Server thread/INFO]: Saving chunks for level 'Copie de Copie de Copie de Copie'/Overworld
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:72]: Contents Write : [Lnet.minecraft.item.ItemStack;@5158787d
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:78]: Contents length : 6
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : 1xitem.fromagedoux@0
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:82]: Saving slot 0
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : 1xitem.fromagedoux@0
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:82]: Saving slot 1
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : 1xitem.fromagedoux@0
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:82]: Saving slot 2
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : 1xitem.fromagedoux@0
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:82]: Saving slot 3
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : 1xitem.fromagedoux@0
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:82]: Saving slot 4
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : 1xitem.fromagedoux@0
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:82]: Saving slot 5
    [12:15:59] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:93]: Liste Write: [0:{Slot:0b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},1:{Slot:1b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},2:{Slot:2b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},3:{Slot:3b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},4:{Slot:4b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},5:{Slot:5b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},]
    [12:15:59] [Server thread/INFO]: Saving chunks for level 'Copie de Copie de Copie de Copie'/Nether
    [12:15:59] [Server thread/INFO]: Saving chunks for level 'Copie de Copie de Copie de Copie'/The End
    [12:16:01] [Server thread/INFO]: Stopping server
    [12:16:01] [Server thread/INFO]: Saving players
    [12:16:01] [Server thread/INFO]: Saving worlds
    [12:16:01] [Server thread/INFO]: Saving chunks for level 'Copie de Copie de Copie de Copie'/Overworld
    [12:16:01] [Server thread/INFO]: Saving chunks for level 'Copie de Copie de Copie de Copie'/Nether
    [12:16:01] [Server thread/INFO]: Saving chunks for level 'Copie de Copie de Copie de Copie'/The End
    [12:16:01] [Server thread/INFO] [FML]: Unloading dimension 0
    [12:16:01] [Server thread/INFO] [FML]: Unloading dimension -1
    [12:16:01] [Server thread/INFO] [FML]: Unloading dimension 1
    [12:16:01] [Server thread/INFO] [FML]: Applying holder lookups
    [12:16:01] [Server thread/INFO] [FML]: Holder lookups applied
    [12:16:04] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10
    [12:16:04] [Server thread/INFO]: Generating keypair
    [12:16:04] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
    [12:16:04] [Server thread/INFO] [FML]: Applying holder lookups
    [12:16:04] [Server thread/INFO] [FML]: Holder lookups applied
    [12:16:04] [Server thread/INFO] [FML]: Loading dimension 0 (Copie de Copie de Copie de Copie) (net.minecraft.server.integrated.IntegratedServer@237fa890)
    [12:16:04] [Server thread/INFO] [FML]: Loading dimension 1 (Copie de Copie de Copie de Copie) (net.minecraft.server.integrated.IntegratedServer@237fa890)
    [12:16:04] [Server thread/INFO] [FML]: Loading dimension -1 (Copie de Copie de Copie de Copie) (net.minecraft.server.integrated.IntegratedServer@237fa890)
    [12:16:04] [Server thread/INFO]: Preparing start region for level 0
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:41]: Contents read : [Lnet.minecraft.item.ItemStack;@2a17c85d
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:46]: Liste Read: [0:{Slot:0b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},1:{Slot:1b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},2:{Slot:2b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},3:{Slot:3b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},4:{Slot:4b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},5:{Slot:5b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},]
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:56]: Itemstack read : 1xitem.fromagedoux@0
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:56]: Itemstack read : 1xitem.fromagedoux@0
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:56]: Itemstack read : 1xitem.fromagedoux@0
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:56]: Itemstack read : 1xitem.fromagedoux@0
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:56]: Itemstack read : 1xitem.fromagedoux@0
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:56]: Itemstack read : 1xitem.fromagedoux@0
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:65]: Print Contents : [Lnet.minecraft.item.ItemStack;@49c8f563
    [12:16:04] [Server thread/INFO]: Changing view distance to 12, from 10
    [12:16:04] [Netty Client IO #2/INFO] [FML]: Server protocol version 2
    [12:16:04] [Netty IO #5/INFO] [FML]: Client protocol version 2
    [12:16:04] [Netty IO #5/INFO] [FML]: Client attempting to join with 4 mods : FML@7.10.99.99,Forge@10.13.4.1614,mcp@9.05,heimnormod@1.0.0
    [12:16:04] [Netty IO #5/INFO] [FML]: Attempting connection with missing mods [] at CLIENT
    [12:16:04] [Netty Client IO #2/INFO] [FML]: Attempting connection with missing mods [] at SERVER
    [12:16:04] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
    [12:16:04] [Server thread/INFO]: Player491[local:E:44ce47c8] logged in with entity id 101438 at (92.35632286613254, 4.0, -360.55447284672823)
    [12:16:04] [Server thread/INFO]: Player491 a rejoint la partie
    [12:16:04] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established
    [12:16:04] [Client thread/INFO] [STDOUT]: [com.heimnor.client.PlayerDataEventHandler:onEntityJoinWorld:34]: test
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:getDescriptionPacket:113]: DescriptionPacketReceived
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:72]: Contents Write : [Lnet.minecraft.item.ItemStack;@49c8f563
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:78]: Contents length : 6
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : 1xitem.fromagedoux@0
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:82]: Saving slot 0
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : 1xitem.fromagedoux@0
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:82]: Saving slot 1
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : null
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : null
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : null
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : null
    [12:16:04] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:93]: Liste Write: [0:{Slot:0b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},1:{Slot:1b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},]
    [12:16:04] [Client thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:onDataPacket:121]: OnDataPacket
    [12:16:04] [Client thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:41]: Contents read : [Lnet.minecraft.item.ItemStack;@a578c92
    [12:16:04] [Client thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:46]: Liste Read: [0:{Slot:0b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},1:{Slot:1b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},]
    [12:16:04] [Client thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:56]: Itemstack read : 1xitem.fromagedoux@0
    [12:16:04] [Client thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:56]: Itemstack read : 1xitem.fromagedoux@0
    [12:16:04] [Client thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:readFromNBT:65]: Print Contents : [Lnet.minecraft.item.ItemStack;@4cae62f0
    [12:16:07] [Server thread/INFO]: Saving and pausing game…
    [12:16:07] [Server thread/INFO]: Saving chunks for level 'Copie de Copie de Copie de Copie'/Overworld
    [12:16:07] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:72]: Contents Write : [Lnet.minecraft.item.ItemStack;@49c8f563
    [12:16:07] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:78]: Contents length : 6
    [12:16:07] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : 1xitem.fromagedoux@0
    [12:16:07] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:82]: Saving slot 0
    [12:16:07] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : 1xitem.fromagedoux@0
    [12:16:07] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:82]: Saving slot 1
    [12:16:07] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : null
    [12:16:07] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : null
    [12:16:07] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : null
    [12:16:07] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:80]: Contents Contenu : null
    [12:16:07] [Server thread/INFO] [STDOUT]: [com.heimnor.tileentity.TileEntityFourCuisine:writeToNBT:93]: Liste Write: [0:{Slot:0b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},1:{Slot:1b,id:4251s,Count:1b,isBurning:1b,Damage:0s,},]
    


  • Problème trouvé et résolu, le soucis venait bien de la méthode readFromNBT, merci tout de même 😉


Log in to reply