mirror of
https://github.com/BentoBoxWorld/Boxed.git
synced 2024-12-03 13:23:32 +01:00
Merge branch 'develop' into on_demand_structures
This commit is contained in:
commit
d86c7386b5
32
pom.xml
32
pom.xml
@ -65,7 +65,7 @@
|
|||||||
<!-- Do not change unless you want different name for local builds. -->
|
<!-- Do not change unless you want different name for local builds. -->
|
||||||
<build.number>-LOCAL</build.number>
|
<build.number>-LOCAL</build.number>
|
||||||
<!-- This allows to change between versions. -->
|
<!-- This allows to change between versions. -->
|
||||||
<build.version>2.5.0</build.version>
|
<build.version>2.6.1</build.version>
|
||||||
|
|
||||||
<sonar.projectKey>BentoBoxWorld_Boxed</sonar.projectKey>
|
<sonar.projectKey>BentoBoxWorld_Boxed</sonar.projectKey>
|
||||||
<sonar.organization>bentobox-world</sonar.organization>
|
<sonar.organization>bentobox-world</sonar.organization>
|
||||||
@ -172,28 +172,30 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Spigot NMS. Used for chunk deletion and pasting. -->
|
<!-- Spigot NMS. Used for chunk deletion and pasting. -->
|
||||||
<dependency>
|
|
||||||
<groupId>org.spigotmc</groupId>
|
<dependency>
|
||||||
<artifactId>spigot</artifactId>
|
|
||||||
<version>${spigot.version}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.spigotmc.....</groupId>
|
|
||||||
<artifactId>spigot</artifactId>
|
|
||||||
<version>1.21-R0.1-SNAPSHOT</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.spigotmc....</groupId>
|
<groupId>org.spigotmc....</groupId>
|
||||||
<artifactId>spigot</artifactId>
|
<artifactId>spigot</artifactId>
|
||||||
<version>1.20.6-R0.1-SNAPSHOT</version>
|
<version>1.20.6-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.spigotmc</groupId>
|
||||||
|
<artifactId>spigot</artifactId>
|
||||||
|
<version>${spigot.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.spigotmc.....</groupId>
|
||||||
|
<artifactId>spigot</artifactId>
|
||||||
|
<version>1.21-R0.1-SNAPSHOT</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc.</groupId>
|
<groupId>org.spigotmc.</groupId>
|
||||||
<artifactId>spigot</artifactId>
|
<artifactId>spigot</artifactId>
|
||||||
<version>1.20.3-R0.1-SNAPSHOT</version>
|
<version>1.20.4-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -23,18 +23,22 @@ public abstract class AbstractMetaData {
|
|||||||
if (updatePacketMethod != null) {
|
if (updatePacketMethod != null) {
|
||||||
// Invoke the method to get the PacketPlayOutTileEntityData object
|
// Invoke the method to get the PacketPlayOutTileEntityData object
|
||||||
updatePacketMethod.setAccessible(true);
|
updatePacketMethod.setAccessible(true);
|
||||||
PacketPlayOutTileEntityData packet = (PacketPlayOutTileEntityData) updatePacketMethod.invoke(te);
|
Object object = updatePacketMethod.invoke(te);
|
||||||
|
PacketPlayOutTileEntityData packet = (PacketPlayOutTileEntityData) object;
|
||||||
|
//if (object instanceof PacketPlayOutTileEntityData packet) {
|
||||||
|
// Access the private field for the NBTTagCompound getter in PacketPlayOutTileEntityData
|
||||||
|
Field fieldC = packet.getClass().getDeclaredField(field);
|
||||||
|
fieldC.setAccessible(true);
|
||||||
|
NBTTagCompound nbtTag = (NBTTagCompound) fieldC.get(packet);
|
||||||
|
|
||||||
// Access the private field for the NBTTagCompound getter in PacketPlayOutTileEntityData
|
return nbtTag.toString(); // This will show what you want
|
||||||
Field fieldC = packet.getClass().getDeclaredField(field);
|
//} else {
|
||||||
fieldC.setAccessible(true);
|
// throw new ClassNotFoundException(
|
||||||
NBTTagCompound nbtTag = (NBTTagCompound) fieldC.get(packet);
|
// object.getClass().getCanonicalName() + " is not a PacketPlayOutTileEntityData");
|
||||||
|
//}
|
||||||
return nbtTag.toString(); // This will show what you want
|
|
||||||
}
|
}
|
||||||
} catch (NoSuchMethodException e) {
|
|
||||||
System.out.println("The method '" + method + "' does not exist in the TileEntity class.");
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
System.out.println("The method '" + method + "' does not exist in the TileEntity class.");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
@ -15,7 +15,6 @@ public class GetMetaData extends AbstractMetaData {
|
|||||||
Location w = block.getLocation();
|
Location w = block.getLocation();
|
||||||
CraftWorld cw = (CraftWorld) w.getWorld(); // CraftWorld is NMS one
|
CraftWorld cw = (CraftWorld) w.getWorld(); // CraftWorld is NMS one
|
||||||
TileEntity te = cw.getHandle().c_(new BlockPosition(w.getBlockX(), w.getBlockY(), w.getBlockZ()));
|
TileEntity te = cw.getHandle().c_(new BlockPosition(w.getBlockX(), w.getBlockY(), w.getBlockZ()));
|
||||||
|
return getData(te, "au_", "tag");
|
||||||
return getData(te, "j", "c");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user