Jump to content

NBT What am I doing wrong?


American2050

Recommended Posts

So I have this on my readFromNBT in a TileEntity

 

Problem is... Why this if is false?

 

    @Override
    public void readFromNBT(NBTTagCompound compound) {
        
        super.readFromNBT(compound);

        LogHelper.info("CALLED HERE!!! " + compound);

        if (compound.hasKey(PANELS)) {

            LogHelper.info("CALLED INSIDE HAS KEY PANELS");

            NBTTagCompound panels = compound.getCompoundTag(PANELS);
            this.stackPanelUp = new ItemStack(panels.getCompoundTag("up"));

        } else {
            LogHelper.info("NOT TRUE PANELS");
        }

    }

 

Console shows:

 

[21:46:03] [main/INFO] [LogHelper]: CALLED HERE!!! {ForgeData:{factory.panels:{east:{id:"minecraft:air",Count:1b,Damage:0s},south:{id:"minecraft:air",Count:1b,Damage:0s},north:{id:"minecraft:air",Count:1b,Damage:0s},west:{id:"minecraft:air",Count:1b,Damage:0s},up:{id:"minecraft:air",Count:1b,Damage:0s},down:{id:"minecraft:air",Count:1b,Damage:0s}}},x:50,y:83,z:272,id:"factoryblock:te_factory"}
[21:46:03] [main/INFO] [LogHelper]: NOT TRUE PANELS

 

 

PANEL is:

 

public static final String PANELS = "factory.panels";

 

Link to comment
Share on other sites

19 minutes ago, TheAwesomeGem said:

Show  your  writeToNBT method.

Here:
 

    @Override
    public NBTTagCompound writeToNBT(NBTTagCompound compound) {
        // this is called by minecraft to give you the posibility to update your NBT before being saved to the world
        super.writeToNBT(compound);

        compound.setTag("up", this.stackPanelUp.writeToNBT(new NBTTagCompound()));
        compound.setTag("down", this.stackPanelDown.writeToNBT(new NBTTagCompound()));
        compound.setTag("east", this.stackPanelEast.writeToNBT(new NBTTagCompound()));
        compound.setTag("west", this.stackPanelWest.writeToNBT(new NBTTagCompound()));
        compound.setTag("north", this.stackPanelNorth.writeToNBT(new NBTTagCompound()));
        compound.setTag("south", this.stackPanelSouth.writeToNBT(new NBTTagCompound()));

        return compound;
    }

 

The whole class, just in case:

 

Spoiler

package org.bitbucket.factoryblock.tileentity;

import org.bitbucket.factoryblock.LogHelper;
import org.bitbucket.factoryblock.enums.EnumPanels;
import org.bitbucket.factoryblock.interfaces.IPanel;

import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraft.util.NonNullList;

public class TileEntityFactory extends TileEntity implements ITickable, net.minecraft.client.renderer.texture.ITickable {

    public static final String PANELS = "factory.panels";

    private NonNullList<EnumPanels> factoryPanels = NonNullList.withSize(6, EnumPanels.EMPTY);

    private ItemStack stackPanelUp = ItemStack.EMPTY;
    private ItemStack stackPanelDown = ItemStack.EMPTY;
    private ItemStack stackPanelEast = ItemStack.EMPTY;
    private ItemStack stackPanelWest = ItemStack.EMPTY;
    private ItemStack stackPanelNorth = ItemStack.EMPTY;
    private ItemStack stackPanelSouth = ItemStack.EMPTY;

    public TileEntityFactory() {
        this.getTileData().setTag(PANELS, createNBTData());
    }

    @Override
    public void update() {
        // TODO Auto-generated method stub

    }

    // TODO Do we need this?
    @Override
    public void tick() {
        // TODO Auto-generated method stub

    }

    public void setPanelAt(EnumFacing facing, ItemStack stack) {
        switch (facing) {
            case UP:
                this.stackPanelUp = stack;
                break;
            case DOWN:
                this.stackPanelUp = stack;
                break;
            case EAST:
                this.stackPanelUp = stack;
                break;
            case WEST:
                this.stackPanelUp = stack;
                break;
            case NORTH:
                this.stackPanelUp = stack;
                break;
            case SOUTH:
                this.stackPanelUp = stack;
                break;
        }

        // This Force NBT Update?
        this.markDirty();
    }

    public EnumPanels getPanelTypeAt(EnumFacing facing) {

        switch (facing) {
            case UP:
                if (this.stackPanelUp.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelUp.getItem();
                    return thePanel.getPanelType();
                }
            case DOWN:
                if (this.stackPanelDown.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelDown.getItem();
                    return thePanel.getPanelType();
                }
            case EAST:
                if (this.stackPanelEast.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelEast.getItem();
                    return thePanel.getPanelType();
                }
            case WEST:
                if (this.stackPanelWest.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelWest.getItem();
                    return thePanel.getPanelType();
                }
            case NORTH:
                if (this.stackPanelNorth.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelNorth.getItem();
                    return thePanel.getPanelType();
                }
            case SOUTH:
                if (this.stackPanelSouth.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelSouth.getItem();
                    return thePanel.getPanelType();
                }
        }

        return EnumPanels.EMPTY;
    }

    public NBTTagCompound createNBTData() {
        NBTTagCompound panels = new NBTTagCompound();

        // NBTTagCompound panelUp = new NBTTagCompound();
        // NBTTagCompound panelDown = new NBTTagCompound();
        // NBTTagCompound panelEast = new NBTTagCompound();
        // NBTTagCompound panelWest = new NBTTagCompound();
        // NBTTagCompound panelNorth = new NBTTagCompound();
        // NBTTagCompound panelSouth = new NBTTagCompound();

        // panelUp.setString("panel", EnumPanels.EMPTY.getName());
        // stackPanelUp.writeToNBT(panelUp);
        panels.setTag("up", stackPanelUp.writeToNBT(new NBTTagCompound()));

        // panelDown.setString("panel", EnumPanels.EMPTY.getName());
        // stackPanelDown.writeToNBT(panelDown);
        panels.setTag("down", stackPanelDown.writeToNBT(new NBTTagCompound()));

        // panelEast.setString("panel", EnumPanels.EMPTY.getName());
        // stackPanelEast.writeToNBT(panelEast);
        panels.setTag("east", stackPanelEast.writeToNBT(new NBTTagCompound()));

        // panelWest.setString("panel", EnumPanels.EMPTY.getName());
        // stackPanelWest.writeToNBT(panelWest);
        panels.setTag("west", stackPanelWest.writeToNBT(new NBTTagCompound()));

        // panelNorth.setString("panel", EnumPanels.EMPTY.getName());
        // stackPanelNorth.writeToNBT(panelNorth);
        panels.setTag("north", stackPanelNorth.writeToNBT(new NBTTagCompound()));

        // panelSouth.setString("panel", EnumPanels.EMPTY.getName());
        // stackPanelSouth.writeToNBT(panelSouth);
        panels.setTag("south", stackPanelSouth.writeToNBT(new NBTTagCompound()));

        return panels;
    }

    @Override
    public NBTTagCompound writeToNBT(NBTTagCompound compound) {
        // this is called by minecraft to give you the posibility to update your NBT before being saved to the world
        super.writeToNBT(compound);

        compound.setTag("up", this.stackPanelUp.writeToNBT(new NBTTagCompound()));
        compound.setTag("down", this.stackPanelDown.writeToNBT(new NBTTagCompound()));
        compound.setTag("east", this.stackPanelEast.writeToNBT(new NBTTagCompound()));
        compound.setTag("west", this.stackPanelWest.writeToNBT(new NBTTagCompound()));
        compound.setTag("north", this.stackPanelNorth.writeToNBT(new NBTTagCompound()));
        compound.setTag("south", this.stackPanelSouth.writeToNBT(new NBTTagCompound()));

        return compound;
    }

    @Override
    public void readFromNBT(NBTTagCompound compound) {

        super.readFromNBT(compound);

        LogHelper.info("CALLED HERE!!! " + compound);

        if (compound.hasKey(PANELS)) {

            LogHelper.info("CALLED INSIDE HAS KEY PANELS");

            NBTTagCompound panels = compound.getCompoundTag(PANELS);

            this.stackPanelUp = new ItemStack(panels.getCompoundTag("up"));
            this.stackPanelDown = new ItemStack(panels.getCompoundTag("down"));
            this.stackPanelEast = new ItemStack(panels.getCompoundTag("east"));
            this.stackPanelWest = new ItemStack(panels.getCompoundTag("west"));
            this.stackPanelNorth = new ItemStack(panels.getCompoundTag("north"));
            this.stackPanelSouth = new ItemStack(panels.getCompoundTag("south"));

        } else {
            LogHelper.info("NOT TRUE PANELS");
        }

    }

    @Override
    public NBTTagCompound getUpdateTag() {
        // TODO Auto-generated method stub
        return super.getUpdateTag();
    }

}

 

PS: I believe I now see the problem :P But lets see...

Edited by American2050
Link to comment
Share on other sites

22 minutes ago, American2050 said:

Here:
 


    @Override
    public NBTTagCompound writeToNBT(NBTTagCompound compound) {
        // this is called by minecraft to give you the posibility to update your NBT before being saved to the world
        super.writeToNBT(compound);

        compound.setTag("up", this.stackPanelUp.writeToNBT(new NBTTagCompound()));
        compound.setTag("down", this.stackPanelDown.writeToNBT(new NBTTagCompound()));
        compound.setTag("east", this.stackPanelEast.writeToNBT(new NBTTagCompound()));
        compound.setTag("west", this.stackPanelWest.writeToNBT(new NBTTagCompound()));
        compound.setTag("north", this.stackPanelNorth.writeToNBT(new NBTTagCompound()));
        compound.setTag("south", this.stackPanelSouth.writeToNBT(new NBTTagCompound()));

        return compound;
    }

 

The whole class, just in case:

 

  Hide contents


package org.bitbucket.factoryblock.tileentity;

import org.bitbucket.factoryblock.LogHelper;
import org.bitbucket.factoryblock.enums.EnumPanels;
import org.bitbucket.factoryblock.interfaces.IPanel;

import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraft.util.NonNullList;

public class TileEntityFactory extends TileEntity implements ITickable, net.minecraft.client.renderer.texture.ITickable {

    public static final String PANELS = "factory.panels";

    private NonNullList<EnumPanels> factoryPanels = NonNullList.withSize(6, EnumPanels.EMPTY);

    private ItemStack stackPanelUp = ItemStack.EMPTY;
    private ItemStack stackPanelDown = ItemStack.EMPTY;
    private ItemStack stackPanelEast = ItemStack.EMPTY;
    private ItemStack stackPanelWest = ItemStack.EMPTY;
    private ItemStack stackPanelNorth = ItemStack.EMPTY;
    private ItemStack stackPanelSouth = ItemStack.EMPTY;

    public TileEntityFactory() {
        this.getTileData().setTag(PANELS, createNBTData());
    }

    @Override
    public void update() {
        // TODO Auto-generated method stub

    }

    // TODO Do we need this?
    @Override
    public void tick() {
        // TODO Auto-generated method stub

    }

    public void setPanelAt(EnumFacing facing, ItemStack stack) {
        switch (facing) {
            case UP:
                this.stackPanelUp = stack;
                break;
            case DOWN:
                this.stackPanelUp = stack;
                break;
            case EAST:
                this.stackPanelUp = stack;
                break;
            case WEST:
                this.stackPanelUp = stack;
                break;
            case NORTH:
                this.stackPanelUp = stack;
                break;
            case SOUTH:
                this.stackPanelUp = stack;
                break;
        }

        // This Force NBT Update?
        this.markDirty();
    }

    public EnumPanels getPanelTypeAt(EnumFacing facing) {

        switch (facing) {
            case UP:
                if (this.stackPanelUp.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelUp.getItem();
                    return thePanel.getPanelType();
                }
            case DOWN:
                if (this.stackPanelDown.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelDown.getItem();
                    return thePanel.getPanelType();
                }
            case EAST:
                if (this.stackPanelEast.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelEast.getItem();
                    return thePanel.getPanelType();
                }
            case WEST:
                if (this.stackPanelWest.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelWest.getItem();
                    return thePanel.getPanelType();
                }
            case NORTH:
                if (this.stackPanelNorth.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelNorth.getItem();
                    return thePanel.getPanelType();
                }
            case SOUTH:
                if (this.stackPanelSouth.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelSouth.getItem();
                    return thePanel.getPanelType();
                }
        }

        return EnumPanels.EMPTY;
    }

    public NBTTagCompound createNBTData() {
        NBTTagCompound panels = new NBTTagCompound();

        // NBTTagCompound panelUp = new NBTTagCompound();
        // NBTTagCompound panelDown = new NBTTagCompound();
        // NBTTagCompound panelEast = new NBTTagCompound();
        // NBTTagCompound panelWest = new NBTTagCompound();
        // NBTTagCompound panelNorth = new NBTTagCompound();
        // NBTTagCompound panelSouth = new NBTTagCompound();

        // panelUp.setString("panel", EnumPanels.EMPTY.getName());
        // stackPanelUp.writeToNBT(panelUp);
        panels.setTag("up", stackPanelUp.writeToNBT(new NBTTagCompound()));

        // panelDown.setString("panel", EnumPanels.EMPTY.getName());
        // stackPanelDown.writeToNBT(panelDown);
        panels.setTag("down", stackPanelDown.writeToNBT(new NBTTagCompound()));

        // panelEast.setString("panel", EnumPanels.EMPTY.getName());
        // stackPanelEast.writeToNBT(panelEast);
        panels.setTag("east", stackPanelEast.writeToNBT(new NBTTagCompound()));

        // panelWest.setString("panel", EnumPanels.EMPTY.getName());
        // stackPanelWest.writeToNBT(panelWest);
        panels.setTag("west", stackPanelWest.writeToNBT(new NBTTagCompound()));

        // panelNorth.setString("panel", EnumPanels.EMPTY.getName());
        // stackPanelNorth.writeToNBT(panelNorth);
        panels.setTag("north", stackPanelNorth.writeToNBT(new NBTTagCompound()));

        // panelSouth.setString("panel", EnumPanels.EMPTY.getName());
        // stackPanelSouth.writeToNBT(panelSouth);
        panels.setTag("south", stackPanelSouth.writeToNBT(new NBTTagCompound()));

        return panels;
    }

    @Override
    public NBTTagCompound writeToNBT(NBTTagCompound compound) {
        // this is called by minecraft to give you the posibility to update your NBT before being saved to the world
        super.writeToNBT(compound);

        compound.setTag("up", this.stackPanelUp.writeToNBT(new NBTTagCompound()));
        compound.setTag("down", this.stackPanelDown.writeToNBT(new NBTTagCompound()));
        compound.setTag("east", this.stackPanelEast.writeToNBT(new NBTTagCompound()));
        compound.setTag("west", this.stackPanelWest.writeToNBT(new NBTTagCompound()));
        compound.setTag("north", this.stackPanelNorth.writeToNBT(new NBTTagCompound()));
        compound.setTag("south", this.stackPanelSouth.writeToNBT(new NBTTagCompound()));

        return compound;
    }

    @Override
    public void readFromNBT(NBTTagCompound compound) {

        super.readFromNBT(compound);

        LogHelper.info("CALLED HERE!!! " + compound);

        if (compound.hasKey(PANELS)) {

            LogHelper.info("CALLED INSIDE HAS KEY PANELS");

            NBTTagCompound panels = compound.getCompoundTag(PANELS);

            this.stackPanelUp = new ItemStack(panels.getCompoundTag("up"));
            this.stackPanelDown = new ItemStack(panels.getCompoundTag("down"));
            this.stackPanelEast = new ItemStack(panels.getCompoundTag("east"));
            this.stackPanelWest = new ItemStack(panels.getCompoundTag("west"));
            this.stackPanelNorth = new ItemStack(panels.getCompoundTag("north"));
            this.stackPanelSouth = new ItemStack(panels.getCompoundTag("south"));

        } else {
            LogHelper.info("NOT TRUE PANELS");
        }

    }

    @Override
    public NBTTagCompound getUpdateTag() {
        // TODO Auto-generated method stub
        return super.getUpdateTag();
    }

}

 

PS: I believe I now see the problem :P But lets see...

You are not saving the PANELS tag.

Link to comment
Share on other sites

9 hours ago, TheAwesomeGem said:

You are not saving the PANELS tag.

Yes now that I see the writeToNBT I noticed that, but how come that when I print the compound to the console it does show the tag PANELS there and the default values for each side?

PS: the createNBT is implemented correctly? Is it ok to call it from the constructor?

Thanks a lot.

Link to comment
Share on other sites

Also... Independent of the fact that I was missing to write the tag PANELS... How come it's there on the NBT I receive, but the hasKey still is false?

 

@Override
    public NBTTagCompound writeToNBT(NBTTagCompound compound) {
        // this is called by minecraft to give you the posibility to update your NBT before being saved to the world
        super.writeToNBT(compound);

        LogHelper.info("CALLED WRITE " + compound + " content");

        if (compound.hasKey(PANELS)) {
            LogHelper.info("HAS PANELS");
        }

 

Console shows:

 

[08:35:04] [Server thread/INFO] [LogHelper]: CALLED WRITE {ForgeData:{factory.panels:{east:{id:"minecraft:air",Count:1b,Damage:0s},south:{id:"minecraft:air",Count:1b,Damage:0s},north:{id:"minecraft:air",Count:1b,Damage:0s},west:{id:"minecraft:air",Count:1b,Damage:0s},up:{id:"minecraft:air",Count:1b,Damage:0s},down:{id:"minecraft:air",Count:1b,Damage:0s}}},x:50,y:83,z:272,id:"factoryblock:te_factory"} content

 

but HAS PANELS never shows... isn't {ForgeData:{factory.panels:{east:{id indicating the precense of the tag PANELS there, or I'm missing something?

Link to comment
Share on other sites

Judging by the "ForgeData" tag, it looks like you're using TileEntity#getTileData somewhere; don't do this. The tag returned by TileEntity#getTileData is for mods to store custom data on external TileEntities; but the capability system is a much better way to do this.

 

When you call TileEntity#writeToNBT, pass an empty compound tag as the argument.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

9 minutes ago, Choonster said:

Judging by the "ForgeData" tag, it looks like you're using TileEntity#getTileData somewhere; don't do this. The tag returned by TileEntity#getTileData is for mods to store custom data on external TileEntities; but the capability system is a much better way to do this.

 

When you call TileEntity#writeToNBT, pass an empty compound tag as the argument.

Ohh ok. Well a friend told me that apparently I should never call the writeToNBT myself, not sure where he saw that. Is it ok to call it from the createNBT method that I have in my constructor, so each time the tileentity is set on the world, it creates the default values?

 

PD: I had the getTileData at the constructor as // this.getTileData().setTag(PANELS, createNBTData());

Link to comment
Share on other sites

6 minutes ago, American2050 said:

Ohh ok. Well a friend told me that apparently I should never call the writeToNBT myself, not sure where he saw that. Is it ok to call it from the createNBT method that I have in my constructor, so each time the tileentity is set on the world, it creates the default values?

 

PD: I had the getTileData at the constructor as // this.getTileData().setTag(PANELS, createNBTData());

 

Don't call TileEntity#writeToNBT unless you actually need to serialise the TileEntity to NBT (e.g. to store the data in an ItemStack). Minecraft automatically calls it when the chunk is written to disk.

 

Your TileEntity's data should be stored in regular fields and only written to NBT when necessary.

  • Like 1

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Just now, Choonster said:

 

Don't call TileEntity#writeToNBT unless you actually need to serialise the TileEntity to NBT (e.g. to store the data in an ItemStack). Minecraft automatically calls it when the chunk is written to disk.

 

Your TileEntity's data should be stored in regular fields and only written to NBT when necessary.

Ohhh ok, so I don't need to worry about storing the values for the first time when the TileEntity is placed in the world?

 

I was doing this so, when I call methods from the Block, for example onBlockActivated I already "know" and can be "sure" that the TileEntity already has default values. But I guess I check against variables and not the data on the NBT right? Like if I want to change the value of for example ItemStack on side "UP" I just change the value of that variable and whenever Minecraft calls the writeToNBT it will update that value?

 

Thanks, and sorry for so many questions NBT was/is (and hopefully not will always be) a shady part on codding that I never clearly understand.

Link to comment
Share on other sites

Apparently the problem is that the server isn't receiving the updated information.

 

This is a log when loading a world with one of my TileEntities placed on it...

 

[09:35:44] [Server thread/INFO] [LogHelper]: CALLED HERE ON READ!!!
[09:35:44] [Server thread/INFO] [LogHelper]: COMPOUND ON READ IS: {ForgeData:{factory.data:{factory.panels:{east:{id:"minecraft:air",Count:1b,Damage:0s},south:{id:"minecraft:air",Count:1b,Damage:0s},north:{id:"minecraft:air",Count:1b,Damage:0s},west:{id:"minecraft:air",Count:1b,Damage:0s},up:{id:"minecraft:air",Count:1b,Damage:0s},down:{id:"minecraft:air",Count:1b,Damage:0s}}}},x:52,y:83,z:269,id:"factoryblock:te_factory",factory.data:{factory.panels:{east:{id:"minecraft:air",Count:0b,Damage:0s},south:{id:"minecraft:air",Count:0b,Damage:0s},north:{id:"minecraft:air",Count:0b,Damage:0s},west:{id:"minecraft:air",Count:0b,Damage:0s},up:{id:"minecraft:air",Count:0b,Damage:0s},down:{id:"minecraft:air",Count:0b,Damage:0s}}}}
[09:35:44] [Server thread/INFO] [LogHelper]: HAS TAG ON READ
[09:35:44] [Server thread/INFO] [LogHelper]: HAS PANELS ON READ

[09:35:49] [Server thread/INFO] [LogHelper]: COMPOUND ON WRITE IS: {ForgeData:{factory.data:{factory.panels:{east:{id:"minecraft:air",Count:1b,Damage:0s},south:{id:"minecraft:air",Count:1b,Damage:0s},north:{id:"minecraft:air",Count:1b,Damage:0s},west:{id:"minecraft:air",Count:1b,Damage:0s},up:{id:"minecraft:air",Count:1b,Damage:0s},down:{id:"minecraft:air",Count:1b,Damage:0s}}}},x:52,y:83,z:269,id:"factoryblock:te_factory",factory.data:{factory.panels:{east:{id:"minecraft:air",Count:0b,Damage:0s},south:{id:"minecraft:air",Count:0b,Damage:0s},north:{id:"minecraft:air",Count:0b,Damage:0s},west:{id:"minecraft:air",Count:0b,Damage:0s},up:{id:"minecraft:air",Count:0b,Damage:0s},down:{id:"minecraft:air",Count:0b,Damage:0s}}}}
[09:35:49] [Server thread/INFO] [LogHelper]: HAS TAG ON WRITE
[09:35:49] [Server thread/INFO] [LogHelper]: HAS PANELS ON WRITE
[09:35:49] [Server thread/INFO] [LogHelper]: HAS up ON WRITE

[09:35:49] [main/INFO] [LogHelper]: CALLED HERE ON READ!!!
[09:35:49] [main/INFO] [LogHelper]: COMPOUND ON READ IS: {ForgeData:{factory.data:{factory.panels:{east:{id:"minecraft:air",Count:1b,Damage:0s},south:{id:"minecraft:air",Count:1b,Damage:0s},north:{id:"minecraft:air",Count:1b,Damage:0s},west:{id:"minecraft:air",Count:1b,Damage:0s},up:{id:"minecraft:air",Count:1b,Damage:0s},down:{id:"minecraft:air",Count:1b,Damage:0s}}}},x:52,y:83,z:269,id:"factoryblock:te_factory"}

[09:35:53] [Server thread/INFO] [LogHelper]: COMPOUND ON WRITE IS: {ForgeData:{factory.data:{factory.panels:{east:{id:"minecraft:air",Count:1b,Damage:0s},south:{id:"minecraft:air",Count:1b,Damage:0s},north:{id:"minecraft:air",Count:1b,Damage:0s},west:{id:"minecraft:air",Count:1b,Damage:0s},up:{id:"minecraft:air",Count:1b,Damage:0s},down:{id:"minecraft:air",Count:1b,Damage:0s}}}},x:52,y:83,z:269,id:"factoryblock:te_factory",factory.data:{factory.panels:{east:{id:"minecraft:air",Count:0b,Damage:0s},south:{id:"minecraft:air",Count:0b,Damage:0s},north:{id:"minecraft:air",Count:0b,Damage:0s},west:{id:"minecraft:air",Count:0b,Damage:0s},up:{id:"minecraft:air",Count:0b,Damage:0s},down:{id:"minecraft:air",Count:0b,Damage:0s}}}}
[09:35:53] [Server thread/INFO] [LogHelper]: HAS TAG ON WRITE
[09:35:53] [Server thread/INFO] [LogHelper]: HAS PANELS ON WRITE
[09:35:53] [Server thread/INFO] [LogHelper]: HAS up ON WRITE
[09:35:53] [Server thread/INFO]: Saving chunks for level 'New World'/the_nether
[09:35:53] [Server thread/INFO]: Saving chunks for level 'New World'/the_end

 

This are the differences I notice: The Write was only called on server.

 

And when the read is called both, Server and Client side, the information on the NBT is different

 

SERVER on READ
{ForgeData:{factory.data:
{factory.panels:{
east:{id:"minecraft:air",Count:1b,Damage:0s},
south:{id:"minecraft:air",Count:1b,Damage:0s},
north:{id:"minecraft:air",Count:1b,Damage:0s},
west:{id:"minecraft:air",Count:1b,Damage:0s},
up:{id:"minecraft:air",Count:1b,Damage:0s},
down:{id:"minecraft:air",Count:1b,Damage:0s}}}},
x:52,y:83,z:269,id:"factoryblock:te_factory",

factory.data:
{factory.panels:{
east:{id:"minecraft:air",Count:0b,Damage:0s},
south:{id:"minecraft:air",Count:0b,Damage:0s},
north:{id:"minecraft:air",Count:0b,Damage:0s},
west:{id:"minecraft:air",Count:0b,Damage:0s},
up:{id:"minecraft:air",Count:0b,Damage:0s},
down:{id:"minecraft:air",Count:0b,Damage:0s}}}}


CLIENT on READ
{ForgeData:{factory.data:
{factory.panels:{
east:{id:"minecraft:air",Count:1b,Damage:0s},
south:{id:"minecraft:air",Count:1b,Damage:0s},
north:{id:"minecraft:air",Count:1b,Damage:0s},
west:{id:"minecraft:air",Count:1b,Damage:0s},
up:{id:"minecraft:air",Count:1b,Damage:0s},
down:{id:"minecraft:air",Count:1b,Damage:0s}}}},
x:52,y:83,z:269,id:"factoryblock:te_factory"}

 

What I don't understand why is the ForgeData there? And how the client go it?

PS: I guess the fix for this is to work with packets now? I remember I saw something about overwriting 4 packet methods for TileEntities but will have to read about this as I have not idea.
 

This is my TE code now after cleanup:

 

package org.bitbucket.factoryblock.tileentity;

import org.bitbucket.factoryblock.LogHelper;
import org.bitbucket.factoryblock.enums.EnumPanels;
import org.bitbucket.factoryblock.interfaces.IPanel;

import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;

public class TileEntityFactory extends TileEntity implements ITickable, net.minecraft.client.renderer.texture.ITickable {

    public static final String TAG = "factory.data";
    public static final String PANELS = "factory.panels";

    private ItemStack stackPanelUp = ItemStack.EMPTY;
    private ItemStack stackPanelDown = ItemStack.EMPTY;
    private ItemStack stackPanelEast = ItemStack.EMPTY;
    private ItemStack stackPanelWest = ItemStack.EMPTY;
    private ItemStack stackPanelNorth = ItemStack.EMPTY;
    private ItemStack stackPanelSouth = ItemStack.EMPTY;

    public TileEntityFactory() {
    }

    @Override
    public void update() {
        // TODO Auto-generated method stub

    }

    // TODO Do we need this?
    @Override
    public void tick() {
        // TODO Auto-generated method stub

    }

    public void setPanelAt(EnumFacing facing, ItemStack stack) {
        switch (facing) {
            case UP:
                this.stackPanelUp = stack;
                break;
            case DOWN:
                this.stackPanelUp = stack;
                break;
            case EAST:
                this.stackPanelUp = stack;
                break;
            case WEST:
                this.stackPanelUp = stack;
                break;
            case NORTH:
                this.stackPanelUp = stack;
                break;
            case SOUTH:
                this.stackPanelUp = stack;
                break;
        }

        // This Force NBT Update?
        this.markDirty();
    }

    public EnumPanels getPanelTypeAt(EnumFacing facing) {

        switch (facing) {
            case UP:
                if (this.stackPanelUp.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelUp.getItem();
                    return thePanel.getPanelType();
                }
            case DOWN:
                if (this.stackPanelDown.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelDown.getItem();
                    return thePanel.getPanelType();
                }
            case EAST:
                if (this.stackPanelEast.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelEast.getItem();
                    return thePanel.getPanelType();
                }
            case WEST:
                if (this.stackPanelWest.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelWest.getItem();
                    return thePanel.getPanelType();
                }
            case NORTH:
                if (this.stackPanelNorth.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelNorth.getItem();
                    return thePanel.getPanelType();
                }
            case SOUTH:
                if (this.stackPanelSouth.getItem() instanceof IPanel) {
                    IPanel thePanel = (IPanel) this.stackPanelSouth.getItem();
                    return thePanel.getPanelType();
                }
        }

        return EnumPanels.EMPTY;
    }

    @Override
    public NBTTagCompound writeToNBT(NBTTagCompound compound) {

        super.writeToNBT(compound);

        // DATA
        NBTTagCompound data = new NBTTagCompound();

        // PANELS
        NBTTagCompound panels = new NBTTagCompound();

        panels.setTag("up", this.stackPanelUp.writeToNBT(new NBTTagCompound()));
        panels.setTag("down", this.stackPanelDown.writeToNBT(new NBTTagCompound()));
        panels.setTag("east", this.stackPanelEast.writeToNBT(new NBTTagCompound()));
        panels.setTag("west", this.stackPanelWest.writeToNBT(new NBTTagCompound()));
        panels.setTag("north", this.stackPanelNorth.writeToNBT(new NBTTagCompound()));
        panels.setTag("south", this.stackPanelSouth.writeToNBT(new NBTTagCompound()));

        // STORE PANELS ON DATA
        data.setTag(PANELS, panels);

        // STORE DATA ON A MAIN TAG
        compound.setTag(TAG, data);

        LogHelper.info("COMPOUND ON WRITE IS: " + compound);

        if (compound.hasKey(TAG)) {
            LogHelper.info("HAS TAG ON WRITE");
            NBTTagCompound temp = compound.getCompoundTag(TAG);
            if (temp.hasKey(PANELS)) {
                LogHelper.info("HAS PANELS ON WRITE");
                NBTTagCompound temp_panels = temp.getCompoundTag(PANELS);

                if (temp_panels.hasKey("up")) {
                    LogHelper.info("HAS up ON WRITE");
                }
            }
        }
        return compound;
    }

    @Override
    public void readFromNBT(NBTTagCompound compound) {

        super.readFromNBT(compound);

        LogHelper.info("CALLED HERE ON READ!!!");
        LogHelper.info("COMPOUND ON READ IS: " + compound);

        if (compound.hasKey(TAG)) {

            LogHelper.info("HAS TAG ON READ");

            NBTTagCompound data = compound.getCompoundTag(TAG);

            if (data.hasKey(PANELS)) {

                LogHelper.info("HAS PANELS ON READ");

                NBTTagCompound panels = data.getCompoundTag(PANELS);

                this.stackPanelUp = new ItemStack(panels.getCompoundTag("up"));
                this.stackPanelDown = new ItemStack(panels.getCompoundTag("down"));
                this.stackPanelEast = new ItemStack(panels.getCompoundTag("east"));
                this.stackPanelWest = new ItemStack(panels.getCompoundTag("west"));
                this.stackPanelNorth = new ItemStack(panels.getCompoundTag("north"));
                this.stackPanelSouth = new ItemStack(panels.getCompoundTag("south"));
            }

        }

    }

    /*
     * @Override
     * public NBTTagCompound getUpdateTag() {
     * return super.getUpdateTag();
     * }
     */

}

 

Link to comment
Share on other sites

26 minutes ago, diesieben07 said:

Some things to clear up:

  • Saving to disk for tile entities (and normal entities) happens automatically, you get no control over when it happens. The only thing you must do is call TileEntity::markDirty when data that needs saving has changed. This tells Minecraft "Hey, I need saving before you unload me". When that happens does not matter and you should not care about it. markDirty also tells nearby blocks "hey, my tile entity data has changed" (by calling Block::onNeighborChange if Block::getWeakChanges returns true for the neighboring block). This is used to update comparators when a nearby inventory changes. Making these two things one method is ugly, but that's how it is.
  • Loading from disk for tile entities happens automatically. You can (usually) assume that your tile entity will not be in a state of "I am freshly created but do not have the data yet". Only exception is a constructor in your TileEntity class (seriously, you almost never should write one) and obviously the Block::createTileEntity method, where you just created the fresh instance.
  • Stop thinking in terms of "store stuff in NBT". NBT is a serialization format (like JSON). You store things in your tile entity, which happens to use NBT to persist data into the world. But nobody but the methods writeToNbt and readFromNbt need to care about this and nobody else but them should touch NBT.
  • getUpdateTag (which you have pointlessly overridden) is vanilla's crude tile entity synchronization mechanism. For vanilla this mechanism is "take the complete tile entity state, serialize it like we would if saving to disk and then shove it down the network". Adopting this mechanism in modded code is terrible, since modded tile entities often have incredibly complex functionality and produce lots of data when saving to disk. There is no need to shove all this crap down the network. Only send over what you need to and if you are feeling especially nice, stop using the terrible NBT-based syncing that vanilla uses.

Now, on to the issues with your code:

  • Do not implement that client-only ITickable interface on your tile entity. You will crash a dedicated server.
  • Never, ever use getTileData. Seriously. For your own tile entities, store data in normal fields (see above). Do not use NBT here, NBT is for saving to disk, only (ignore ItemStacks, they are terrible).

Thanks a lot for all this, great information. Some points here. I used the getUpdateTag  because I was following a tutorial and example code from MinecraftByExamples on the TileEntities examples

https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe20_tileentity_data

(so now I have the 4 methods suggested there getUpdatePacket(), getUpdateTag(), onDataPacket(), and handleUpdateTag() been overriden.

 

Now going with the thinking of "I store things in my TileEntity" problem comes when I change a variable on my TileEntity but those changes are made server only, then the client doesn't know about them until writeToNBT and readFromNBT are called.

 

I have a point on my TileEntity after I set x ItemStack to any given side, at the end of that method I call this.markDirty (But you mention I shouldn't care of "When" that happens) I would like for it to happen inmediatly, so my block knows about the changes.

 

Now on my block, on the method onBlockActivated (And server side) I set the ItemStacks on my tile entity and, after that is done I am calling .notifyBlockUpdate on the client side. It's not until the 2nd time I right click that you can see the render update (At this point I'm not sure if it's because the first time it's called, it still doesn't have the information of what ItemStack is on X side or what) I will have to see what's going on there.

 

PS: What do you mean with "ignore ItemStacks they are terrible"? You mean why I'm storing itemstacks on my TileEntity this way?

Edited by American2050
Link to comment
Share on other sites

diesieben07 Thanks a lot for the time you take answering this questions and clarifying all the points. I believe that I finally have a better understanding on what's happening and when it's happening and more important, on how to handle this things.

I'm gonna start implementing all this and let you know how it went.

 

I was super super lost because I'm using a lot of things I never experiment with before. Special Rendering for my block, extended unlisted properties, and all this data sync across server and client. Tons of stuff going on at the same time, and I unsure on how to implement all of those, so it literally fell like 1 step forward and 10 back for each thing I got working. Always hitting some bump :P

 

Thanks once again. :x

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hey, Me and my friends decided to start up a Server with "a few" mods, the last few days everything went well we used all the items we wanted. Now our Game crashes the moment we touch a Lava Bucket inside our Inventory. It just instantly closes and gives me an "Alc Cleanup"  Crash screen (Using GDLauncher). I honestly dont have a clue how to resolve this error. If anyone could help id really appreciate it, I speak German and Englisch so you can choose whatever you speak more fluently. Thanks in Advance. Plus I dont know how to link my Crash Report help for that would be nice too whoops
    • I hosted a minecraft server and I modded it, and there is always an error on the console which closes the server. If someone knows how to repair it, it would be amazing. Thank you. I paste the crash report down here: ---- Minecraft Crash Report ---- WARNING: coremods are present:   llibrary (llibrary-core-1.0.11-1.12.2.jar)   WolfArmorCore (WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar)   AstralCore (astralsorcery-1.12.2-1.10.27.jar)   CreativePatchingLoader (CreativeCore_v1.10.71_mc1.12.2.jar)   SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.8.jar)   ForgelinPlugin (Forgelin-1.8.4.jar)   midnight (themidnight-0.3.5.jar)   FutureMC (Future-MC-0.2.19.jar)   SpartanWeaponry-MixinLoader (SpartanWeaponry-1.12.2-1.5.3.jar)   Backpacked (backpacked-1.4.3-1.12.2.jar)   LoadingPlugin (Reskillable-1.12.2-1.13.0.jar)   LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar) Contact their authors BEFORE contacting forge // There are four lights! Time: 3/28/24 12:17 PM Description: Exception in server tick loop net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient     at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:89)     at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:612)     at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)     at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)     at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595)     at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:98)     at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:333)     at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:125)     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486)     at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient     at java.lang.Class.getDeclaredMethods0(Native Method)     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)     at java.lang.Class.privateGetPublicMethods(Class.java:2902)     at java.lang.Class.getMethods(Class.java:1615)     at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:82)     at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:82)     ... 31 more Caused by: java.lang.ClassNotFoundException: net.minecraft.client.multiplayer.WorldClient     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)     at java.lang.ClassLoader.loadClass(ClassLoader.java:418)     at java.lang.ClassLoader.loadClass(ClassLoader.java:351)     ... 37 more Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@4e558728 from coremod FMLCorePlugin     at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:260)     at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)     ... 39 more Caused by: java.lang.RuntimeException: Attempted to load class bsb for invalid side SERVER     at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62)     at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:256)     ... 41 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Linux (amd64) version 5.10.0-28-cloud-amd64     Java Version: 1.8.0_382, Temurin     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin     Memory: 948745536 bytes (904 MB) / 1564999680 bytes (1492 MB) up to 7635730432 bytes (7282 MB)     JVM Flags: 2 total; -Xmx8192M -Xms256M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP 9.42 Powered by Forge 14.23.5.2860 63 mods loaded, 63 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     | State | ID                 | Version                 | Source                                                | Signature                                |     |:----- |:------------------ |:----------------------- |:----------------------------------------------------- |:---------------------------------------- |     | LC    | minecraft          | 1.12.2                  | minecraft.jar                                         | None                                     |     | LC    | mcp                | 9.42                    | minecraft.jar                                         | None                                     |     | LC    | FML                | 8.0.99.99               | forge-1.12.2-14.23.5.2860.jar                         | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | forge              | 14.23.5.2860            | forge-1.12.2-14.23.5.2860.jar                         | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | creativecoredummy  | 1.0.0                   | minecraft.jar                                         | None                                     |     | LC    | backpacked         | 1.4.2                   | backpacked-1.4.3-1.12.2.jar                           | None                                     |     | LC    | itemblacklist      | 1.4.3                   | ItemBlacklist-1.4.3.jar                               | None                                     |     | LC    | securitycraft      | v1.9.8                  | [1.12.2] SecurityCraft v1.9.8.jar                     | None                                     |     | LC    | aiimprovements     | 0.0.1.3                 | AIImprovements-1.12-0.0.1b3.jar                       | None                                     |     | LC    | jei                | 4.16.1.301              | jei_1.12.2-4.16.1.301.jar                             | None                                     |     | LC    | appleskin          | 1.0.14                  | AppleSkin-mc1.12-1.0.14.jar                           | None                                     |     | LC    | baubles            | 1.5.2                   | Baubles-1.12-1.5.2.jar                                | None                                     |     | LC    | astralsorcery      | 1.10.27                 | astralsorcery-1.12.2-1.10.27.jar                      | a0f0b759d895c15ceb3e3bcb5f3c2db7c582edf0 |     | LC    | attributefix       | 1.0.12                  | AttributeFix-Forge-1.12.2-1.0.12.jar                  | None                                     |     | LC    | atum               | 2.0.20                  | Atum-1.12.2-2.0.20.jar                                | None                                     |     | LC    | bloodmoon          | 1.5.3                   | Bloodmoon-MC1.12.2-1.5.3.jar                          | d72e0dd57935b3e9476212aea0c0df352dd76291 |     | LC    | forgelin           | 1.8.4                   | Forgelin-1.8.4.jar                                    | None                                     |     | LC    | bountiful          | 2.2.2                   | Bountiful-2.2.2.jar                                   | None                                     |     | LC    | camera             | 1.0.10                  | camera-1.0.10.jar                                     | None                                     |     | LC    | chisel             | MC1.12.2-1.0.2.45       | Chisel-MC1.12.2-1.0.2.45.jar                          | None                                     |     | LC    | collective         | 3.0                     | collective-1.12.2-3.0.jar                             | None                                     |     | LC    | reskillable        | 1.12.2-1.13.0           | Reskillable-1.12.2-1.13.0.jar                         | None                                     |     | LC    | compatskills       | 1.12.2-1.17.0           | CompatSkills-1.12.2-1.17.0.jar                        | None                                     |     | LC    | creativecore       | 1.10.0                  | CreativeCore_v1.10.71_mc1.12.2.jar                    | None                                     |     | LC    | customnpcs         | 1.12                    | CustomNPCs_1.12.2-(05Jul20).jar                       | None                                     |     | LC    | darknesslib        | 1.1.2                   | DarknessLib-1.12.2-1.1.2.jar                          | 220f10d3a93b3ff5fbaa7434cc629d863d6751b9 |     | LC    | dungeonsmod        | @VERSION@               | DungeonsMod-1.12.2-1.0.8.jar                          | None                                     |     | LC    | enhancedvisuals    | 1.3.0                   | EnhancedVisuals_v1.4.4_mc1.12.2.jar                   | None                                     |     | LC    | extrautils2        | 1.0                     | extrautils2-1.12-1.9.9.jar                            | None                                     |     | LC    | futuremc           | 0.2.6                   | Future-MC-0.2.19.jar                                  | None                                     |     | LC    | geckolib3          | 3.0.30                  | geckolib-forge-1.12.2-3.0.31.jar                      | None                                     |     | LC    | gottschcore        | 1.15.1                  | GottschCore-mc1.12.2-f14.23.5.2859-v1.15.1.jar        | None                                     |     | LC    | hardcorerevival    | 1.2.0                   | HardcoreRevival_1.12.2-1.2.0.jar                      | None                                     |     | LC    | waila              | 1.8.26                  | Hwyla-1.8.26-B41_1.12.2.jar                           | None                                     |     | LE    | imsm               | 1.12                    | Instant Massive Structures Mod 1.12.2.jar             | None                                     |     | L     | journeymap         | 1.12.2-5.7.1p2          | journeymap-1.12.2-5.7.1p2.jar                         | None                                     |     | L     | mobsunscreen       | @version@               | mobsunscreen-1.12.2-3.1.5.jar                         | None                                     |     | L     | morpheus           | 1.12.2-3.5.106          | Morpheus-1.12.2-3.5.106.jar                           | None                                     |     | L     | llibrary           | 1.7.20                  | llibrary-1.7.20-1.12.2.jar                            | None                                     |     | L     | mowziesmobs        | 1.5.8                   | mowziesmobs-1.5.8.jar                                 | None                                     |     | L     | nocubessrparmory   | 3.0.0                   | NoCubes_SRP_Combat_Addon_3.0.0.jar                    | None                                     |     | L     | nocubessrpnests    | 3.0.0                   | NoCubes_SRP_Nests_Addon_3.0.0.jar                     | None                                     |     | L     | nocubessrpsurvival | 3.0.0                   | NoCubes_SRP_Survival_Addon_3.0.0.jar                  | None                                     |     | L     | nocubesrptweaks    | V4.1                    | nocubesrptweaks-V4.1.jar                              | None                                     |     | L     | patchouli          | 1.0-23.6                | Patchouli-1.0-23.6.jar                                | None                                     |     | L     | artifacts          | 1.1.2                   | RLArtifacts-1.1.2.jar                                 | None                                     |     | L     | rsgauges           | 1.2.8                   | rsgauges-1.12.2-1.2.8.jar                             | None                                     |     | L     | rustic             | 1.1.7                   | rustic-1.1.7.jar                                      | None                                     |     | L     | silentlib          | 3.0.13                  | SilentLib-1.12.2-3.0.14+168.jar                       | None                                     |     | L     | scalinghealth      | 1.3.37                  | ScalingHealth-1.12.2-1.3.42+147.jar                   | None                                     |     | L     | lteleporters       | 1.12.2-3.0.2            | simpleteleporters-1.12.2-3.0.2.jar                    | None                                     |     | L     | spartanshields     | 1.5.5                   | SpartanShields-1.12.2-1.5.5.jar                       | None                                     |     | L     | spartanweaponry    | 1.5.3                   | SpartanWeaponry-1.12.2-1.5.3.jar                      | None                                     |     | L     | srparasites        | 1.9.18                  | SRParasites-1.12.2v1.9.18.jar                         | None                                     |     | L     | treasure2          | 2.2.0                   | Treasure2-mc1.12.2-f14.23.5.2859-v2.2.1.jar           | None                                     |     | L     | treeharvester      | 4.0                     | treeharvester_1.12.2-4.0.jar                          | None                                     |     | L     | twilightforest     | 3.11.1021               | twilightforest-1.12.2-3.11.1021-universal.jar         | None                                     |     | L     | variedcommodities  | 1.12.2                  | VariedCommodities_1.12.2-(31Mar23).jar                | None                                     |     | L     | voicechat          | 1.12.2-2.4.32           | voicechat-forge-1.12.2-2.4.32.jar                     | None                                     |     | L     | wolfarmor          | 3.8.0                   | WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar | None                                     |     | L     | worldborder        | 2.3                     | worldborder_1.12.2-2.3.jar                            | None                                     |     | L     | midnight           | 0.3.5                   | themidnight-0.3.5.jar                                 | None                                     |     | L     | structurize        | 1.12.2-0.10.277-RELEASE | structurize-1.12.2-0.10.277-RELEASE.jar               | None                                     |     Loaded coremods (and transformers):  llibrary (llibrary-core-1.0.11-1.12.2.jar)   net.ilexiconn.llibrary.server.core.plugin.LLibraryTransformer   net.ilexiconn.llibrary.server.core.patcher.LLibraryRuntimePatcher WolfArmorCore (WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar)    AstralCore (astralsorcery-1.12.2-1.10.27.jar)    CreativePatchingLoader (CreativeCore_v1.10.71_mc1.12.2.jar)    SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.8.jar)    ForgelinPlugin (Forgelin-1.8.4.jar)    midnight (themidnight-0.3.5.jar)   com.mushroom.midnight.core.transformer.MidnightClassTransformer FutureMC (Future-MC-0.2.19.jar)   thedarkcolour.futuremc.asm.CoreTransformer SpartanWeaponry-MixinLoader (SpartanWeaponry-1.12.2-1.5.3.jar)    Backpacked (backpacked-1.4.3-1.12.2.jar)   com.mrcrayfish.backpacked.asm.BackpackedTransformer LoadingPlugin (Reskillable-1.12.2-1.13.0.jar)   codersafterdark.reskillable.base.asm.ClassTransformer LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar)   lumien.bloodmoon.asm.ClassTransformer     Profiler Position: N/A (disabled)     Is Modded: Definitely; Server brand changed to 'fml,forge'     Type: Dedicated Server (map_server.txt)
    • When i add mods like falling leaves, visuality and kappas shaders, even if i restart Minecraft they dont show up in the mods menu and they dont work
    • Delete the forge-client.toml file in your config folder  
    • If you are using AMD/ATI, get the latest drivers from their website - do not update via system  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.