Cadiboo / Example-Mod

An example mod created to try and get new modders to use good code practices
GNU Lesser General Public License v3.0
196 stars 41 forks source link

Class must be either be declared abstract or implement abstract method #15

Closed rushiiMachine closed 5 years ago

rushiiMachine commented 5 years ago

Was having trouble not using IHasModel, got linked to your example mod. When using the ModCreativeTabs i get an error from intelliJ like this:

Class 'Anonymous class derived from CustomCreativeTab' must either be declared abstract or implement abstract method 'getTabIconItem()' in 'CreativeTabs'

Here:

public static final CustomCreativeTab CREATIVE_TAB = new CustomCreativeTab(MOD_ID, true) {
    @Override
    public ItemStack createIcon() {
        return TAB_ICON_ITEMSTACK;
    }
};

Also get an error further down the code like this:

Method does not override method from its superclass

Here:

@SideOnly(Side.CLIENT)
@Override
abstract public ItemStack createIcon();

Link to my class: Github

Cadiboo commented 5 years ago

Solved by updating MCP mappings. Relevant forums post http://www.minecraftforge.net/forum/topic/69832-trouble-with-cadiboos-example-mod/