Was following this series of tutorials, was going to make a Block Entity for my mod by copying the code off the tutorial and then changing the names (like i had done for the rest of my mod so far) i then got an error. Link to the tutorial in question Here. Error(s):
Error 1:
MinerMod\src\main\java\com\bccprograming\minermod\init\BlockEntityInit.java:19: error: incompatible types: invalid constructor reference
() -> BlockEntityType.Builder.of(DrillBlock::new, BlockInit.MINERARIUMDRILLER.get()).build(null));
^
constructor DrillBlock in class DrillBlock cannot be applied to given types
required: Properties
found: BlockPos,BlockState
reason: actual and formal argument lists differ in length
Error 2:
MinerMod\src\main\java\com\bccprograming\minermod\init\BlockEntityInit.java:19: error: incompatible types: cannot infer type-variable(s) T
() -> BlockEntityType.Builder.of(DrillBlock::new, BlockInit.MINERARIUMDRILLER.get()).build(null));
^
(argument mismatch; invalid constructor reference
constructor DrillBlock in class DrillBlock cannot be applied to given types
required: Properties
found: BlockPos,BlockState
reason: actual and formal argument lists differ in length)
where T is a type-variable:
T extends BlockEntity declared in method <T>of(BlockEntitySupplier<? extends T>,Block...)
I will not specify where the MinerMod directory is, but it is a copy of the latest 1.18.2 FORGE MDK, just renamed.
Code is available on request.
Rollback Post to RevisionRollBack
Hello! I need help with my Minecraft Mod for 1.18.2. The CurseForge mod is Here.
Was following this series of tutorials, was going to make a Block Entity for my mod by copying the code off the tutorial and then changing the names (like i had done for the rest of my mod so far) i then got an error. Link to the tutorial in question Here. Error(s):
Error 1:
MinerMod\src\main\java\com\bccprograming\minermod\init\BlockEntityInit.java:19: error: incompatible types: invalid constructor reference
() -> BlockEntityType.Builder.of(DrillBlock::new, BlockInit.MINERARIUMDRILLER.get()).build(null));
^
constructor DrillBlock in class DrillBlock cannot be applied to given types
required: Properties
found: BlockPos,BlockState
reason: actual and formal argument lists differ in length
Error 2:
MinerMod\src\main\java\com\bccprograming\minermod\init\BlockEntityInit.java:19: error: incompatible types: cannot infer type-variable(s) T
() -> BlockEntityType.Builder.of(DrillBlock::new, BlockInit.MINERARIUMDRILLER.get()).build(null));
^
(argument mismatch; invalid constructor reference
constructor DrillBlock in class DrillBlock cannot be applied to given types
required: Properties
found: BlockPos,BlockState
reason: actual and formal argument lists differ in length)
where T is a type-variable:
T extends BlockEntity declared in method <T>of(BlockEntitySupplier<? extends T>,Block...)
I will not specify where the MinerMod directory is, but it is a copy of the latest 1.18.2 FORGE MDK, just renamed.
Code is available on request.
Hello! I need help with my Minecraft Mod for 1.18.2. The CurseForge mod is Here.
The forum post for the mod is Here.
You see, i have 2 major errors in my code right now, described on my forum post describing the issue Here.
I was doing something wrong. For those wondering, BlockEntityType.Builder.of needs the Block Entity's constructor, not that of the associated block.
Hello! I need help with my Minecraft Mod for 1.18.2. The CurseForge mod is Here.
The forum post for the mod is Here.
You see, i have 2 major errors in my code right now, described on my forum post describing the issue Here.