这是我的代码的一部分。它向我显示了多个错误:
Description Resource Path Location Type
PackageType cannot be resolved to a variable ParticleEffect.java /ArrowTrails/src/ParticleEffect line 219 Java Problem
Description Resource Path Location Type
PacketType cannot be resolved ParticleEffect.java /ArrowTrails/src/ParticleEffect line 216 Java Problem
Description Resource Path Location Type
ReflectionHandler cannot be resolved ParticleEffect.java /ArrowTrails/src/ParticleEffect line 216 Java Problem
出了什么问题?我希望你能帮助我。
static {
for (ParticleEffect p : values())
NAME_MAP.put(p.name, p);
try {
packetPlayOutWorldParticles = ReflectionHandler.getConstructor(PacketType.PLAY_OUT_WORLD_PARTICLES.getPacket(), String.class, float.class, float.class, float.class, float.class, float.class,
float.class, float.class, int.class);
getHandle = ReflectionHandler.getMethod("CraftPlayer", SubPackageType.ENTITY, "getHandle");
playerConnection = ReflectionHandler.getField("EntityPlayer", PackageType.MINECRAFT_SERVER, "playerConnection");
sendPacket = ReflectionHandler.getMethod(playerConnection.getType(), "sendPacket", ReflectionHandler.getClass("Packet", PackageType.MINECRAFT_SERVER));
} catch (Exception e) {
e.printStackTrace();
}
}