VanillaTweaks [Fabric & Forge]

VanillaTweaks [Fabric & Forge]

8M Downloads

[BUG] canSurvive method takes as argument its own blockstate not the block below

MehVahdJukaar opened this issue ยท 5 comments

commented

as you can see in BlockStateBase::canSurvive as well as most block member method all take as first arguments their own blockstate. You cant just give it another block as stateholder checks will fail as its violating a contract

commented

Infact you should never call Block member function directly and call the Blockstate ones instead

commented

Fixed the crashes for Minecraft 1.19.4 versions. Fixed by using FakePlayer API provided by the loaders.

commented

while using fake player api is definitely the most compatible way to do such a thing, old issue was bad not because it didnt work in some cases but because it was using some vanilla methods incorrectly resulting in crashes so the fix for that just required to not pass those invalid parameters there while keeping the old implementation for 1.19 / just using fake player for forge

commented

No fix for the 1.19.2 Versions?

commented

No as FakePlayer for fabric isn't available in 1.19.2 so can't fix it.