package de.ellpeck.naturesaura.reg; import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityType; import net.minecraftforge.registries.ForgeRegistryEntry; import java.util.function.Supplier; public class ModTileType implements IModItem { public final TileEntityType type; public final String name; public ModTileType(Supplier supplier, IModItem block) { this.type = TileEntityType.Builder.create(supplier, (Block) block).build(null); this.name = block.getBaseName(); } @Override public String getBaseName() { return this.name; } @Override public ForgeRegistryEntry getRegistryEntry() { return this.type; } }