Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.16.4] Tile Registration


Recommended Posts

Hello, I am having issues registering my tile entity. Here is my code as well as a link to the code in my github. The IDE is complaining that 'TileEntityType.Builder.create' has invalid arguments

 

// Tiles
public static final DeferredRegister<TileEntityType<?>> TILE_ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.TILE_ENTITIES, GOCurrency.MODID);
public static final RegistryObject<TileEntityType<VendingTile>> TILE_VENDING = TILE_ENTITY_TYPES.register("vending_te",
        () -> TileEntityType.Builder.create(VendingTile::new, BLOCK_VENDING.get()).build(null));

 

https://github.com/Beardlessbrady/Currency-Mod/blob/95230ca4ee2d290b3e5f3ef81810a27f73137625/src/main/java/com/beardlessbrady/gocurrency/handlers/CommonRegistry.java#L42-L43

Link to post
Share on other sites
public VendingTile(TileEntityType<?> tileEntityTypeIn)

You don't need an argument in the constructor of your tile entity as in this case is not used since you are passing the TileEntityType to the super class:

 super(CommonRegistry.TILE_VENDING.get());

 

Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port

Link to post
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.

Guest
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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.