File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
src/main/java/world/bentobox/boxed/nms/v1_21_6_R0_1_SNAPSHOT Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ package world .bentobox .boxed .nms .v1_21_6_R0_1_SNAPSHOT ;
2+
3+ import org .bukkit .Location ;
4+ import org .bukkit .block .Block ;
5+ import org .bukkit .craftbukkit .v1_21_R5 .CraftWorld ;
6+
7+ import net .minecraft .core .BlockPosition ;
8+ import net .minecraft .world .level .block .entity .TileEntity ;
9+ import world .bentobox .boxed .nms .AbstractMetaData ;
10+
11+ public class GetMetaData extends AbstractMetaData {
12+
13+ @ Override
14+ public String nmsData (Block block ) {
15+ Location w = block .getLocation ();
16+ CraftWorld cw = (CraftWorld ) w .getWorld (); // CraftWorld is NMS one
17+ // for 1.13+ (we have use WorldServer)
18+ TileEntity te = cw .getHandle ().c_ (new BlockPosition (w .getBlockX (), w .getBlockY (), w .getBlockZ ()));
19+ return getData (te , "getUpdatePacket" , "tag" );
20+ }
21+
22+ }
You can’t perform that action at this time.
0 commit comments