Howdy
You might find this useful
https://github.com/TheGreyGhost/MinecraftByExample
See MBE30, MBE31, MB32
These are GUI which are based around containers but the basic principles are still the same even if you don't have a container. It should help you get a start on understanding how the vanilla GUI work.
Cheers
TGG
Hello
How I find the new name when it has changed version (eg from 1.12 to 1.16):
1) Find the code in 1.12 which calls .isMaterialInBB(); for example
EntityLlamaSpit:onUpdate....->
if (!this.world.isMaterialInBB(this.getEntityBoundingBox(), Material.AIR))
{
this.setDead();
}
else if (this.isInWater())
{
this.setDead();
}
2) Look at EntityLlamaSpit in 1.16.4: (LlamaSpitEntity::tick )
if (this.world.func_234853_a_(this.getBoundingBox()).noneMatch(AbstractBlock.AbstractBlockState::isAir)) {
this.remove();
} else if (this.isInWaterOrBubbleColumn()) {
this.remove();
} else {
-TGG