Spigot 1.21.3 Support: Fix block states

Leaves fix was applied to 1.21 as well. getMaterial() was removed in 1.20 so has been removed from that version onwards as well.
This commit is contained in:
jacob1 2024-11-09 22:17:04 -05:00
parent 4e409a80c7
commit 67e6423517
No known key found for this signature in database
GPG key ID: 4E58A32D510E1995
6 changed files with 8 additions and 13 deletions

View file

@ -185,7 +185,6 @@ public class BukkitVersionHelperSpigot120_2 extends BukkitVersionHelper {
//Log.info("statename=" + bname + "[" + sb + "], lightAtten=" + lightAtten);
// Fill in base attributes
bld.setBaseState(lastbs).setStateIndex(idx).setBlockName(bname).setStateName(sb).setAttenuatesLight(lightAtten);
if (bd.w() != null) { bld.setMaterial(bd.w().toString()); }
if (bd.e()) { bld.setSolid(); }
if (bd.i()) { bld.setAir(); }
if (bd.a(TagsBlock.t)) { bld.setLog(); }