C&B Not checking isNormalCube(...)
Discomanco opened this issue ยท 8 comments
Can't make bits out of Sky Stone blocks.
Would love to see support for those (mainly Sky Stone Block)
C&B 12.7
Applied Energistics rv4 alpha build 6 (no mention of this in newer builds)
Is there a list of requirements blocks have to meet? Most of the overrides are probably useless for the basic blocks and just delegate it back to super
. Thus I might prefer to look at them and split the class hierarchy for simple blocks and the more advanced ones.
The following methods cannot be overridden
quantityDropped - both methods
quantityDroppedWithBonus
onEntityCollidedWithBlock
And the following conditions must be met
isFullBlock(state) must be true
hasTileEntity(state) must be false
getTickRandomly() must be false
block.hardness must be 0 or higher
the block must return a valid item for Item.getItemFromBlock( block )
I believe this is the full list of requirements,
Hm, none of them are overridden and it should met these conditions. Not 100% certain about the isFullBlock as it goes through a couple of layers, have to check it.
Looked at it and there are essentially 2 issues.
The first one being isFullBlock()
being false for our blocks as minecraft itself initialises it way too early.
The other is using isFullBlock()
as it is deprecated and looks the be replaced by isNormalCube()
, which we actually override.
Not sure what the best option would be. We could also override isFullBlock()
, but it is still marked as deprecated. The other option would be using isNormalCube()
for C&B. It falls back to Block#isFullBlock()
, so it should be fine. But no idea when it was added in regards to backward compatibility.
isNormalCube is probably usable...
the easiest solution is to just simply set 'isFullBlock' later
Yeah, but it is still a bit hacky to have multiple sources of truth for the same property...