Jump to content

1.18.2 Block Entity Help


Recommended Posts

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.

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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 Terms of Use.