I recently faced the problem of creating a 3D model (block) with inventory.
I create a block, export the mod, everything is fine, but only when I turn on the inventory I get out an error and in the error says that my block can not have an inventory. How to make your custom block has its inventory ?
P.s Sorry for bad English.
Screen - https://www.screencast.com/t/pg0PXp6S
Grandle log:
F:\Install\MCreator\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_bedsideTable.java:194: error: method createNewTileEntity(World,int) is already defined in class BlockBedsideTable
public TileEntity createNewTileEntity(World var1, int var2) {
^
F:\Install\MCreator\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_bedsideTable.java:342: error: class TileEntityCustom is already defined in class mcreator_bedsideTable
public static class TileEntityCustom extends TileEntity implements IInventory {
^
F:\Install\MCreator\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_bedsideTable.java:114: error: cannot find symbol
for (int i1 = 0; i1 < tilecustom.getSizeInventory(); ++i1) {
^
symbol: method getSizeInventory()
location: variable tilecustom of type TileEntityCustom
F:\Install\MCreator\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_bedsideTable.java:115: error: cannot find symbol
ItemStack itemstack = tilecustom.getStackInSlot(i1);
^
symbol: method getStackInSlot(int)
location: variable tilecustom of type TileEntityCustom
F:\Install\MCreator\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_bedsideTable.java:159: error: incompatible types: TileEntityCustom cannot be converted to IInventory
return Container.calcRedstoneFromInventory((TileEntityCustom) tileentity);
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
5 errorsFAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
MCreator 1.7.3 is very old and has some bugs that most likely won't be fixed for Minecraft 1.7.10. Consider using a newer version of MCreator.