Jump to content

What happend to the read Method of TileEntities in 1.16?


Texler

Recommended Posts

I am kinda new to the Minecraft modding and was following a tutorial about creating a tile entity. I'm using 1.16.2, while the tutorial was from Version 1.15, since I haven't found anything newer. My problem is, that in the tutorial he uses a read function to access the NBT data, but when I implement it the read funktion is markt as "not Overriding" anything and the super.read as "not implemented" (write works just fine). This is how it would look following the tutorial:

package com.texler.autoct.tileentity;

import com.texler.autoct.util.RegistryHandler;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType;

public class AutoCraftingTableTile extends TileEntity implements ITickableTileEntity {

    public AutoCraftingTableTile(final TileEntityType<?> tileEntityTypeIn) {
        super(tileEntityTypeIn);
    }

    public AutoCraftingTableTile() {
        this(RegistryHandler.AUTO_CRAFTING_TABLE_TILE.get());
    }

    @Override
    public void tick() {}

    @Override
    public CompoundNBT write(CompoundNBT compound) {
        return super.write(compound);
    }

    @Override
    public void read (CompoundNBT compound) {
        super.read(compound);
    }
}

I would appreciate if someone could tell me if I did a mistake or if the read function got replaced by something. I did look around for a few hours and found no information concerning this.

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



×
×
  • Create New...

Important Information

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