Hi. I am working on a particle cape plugin. When you type the command, it spawns these particles behind your back in a cape shape. Ive been using slikeys particle guide Code:java package plugins.mkezar; import org.bukkit.Location;import org.bukkit.entity.Entity;import de.slikey.effectlib.EffectManager;import de.slikey.effectlib.EffectType;import de.slikey.effectlib.effect.EntityEffect;import de.slikey.effectlib.particle.ParticlePacket.ParticleType;import de.slikey.effectlib.util.RandomUtils; public class FlameEntityEffect extends EntityEffect { public FlameEntityEffect(EffectManager effectManager, Entity entity) {super(effectManager, entity);type = EffectType.REPEATING;period = 1;iterations = 600;} @Overridepublic void onRun() {// Create 10 particles per iterationfor (int i = 0; i < 10; i++) {// Location of effectLocation location = entity.getLocation();// Randomize the location within a circle from 0 to 0.6 radiuslocation.add(RandomUtil.getRandomCircleVector().multiply(RandomUtil.random.nextDouble() * 0.6d));// Randomize heightlocation.add(0, RandomUtil.random.nextFloat() * 2, 0);// Create packet, to send to the playerPacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(ParticleType.FLAME.getParticleName(), (float) location.getX(), (float) location.getY(), (float) location.getZ(), 0, 0, 0, 0, 0);// Sends the effect to every player within "visibleRadiusSquared" radiussendPacket(packet, location, visibleRadiusSquared);}} And i get a lot of bugs. like at PacketPlayOutWorldParticles and a lot of RandomUtil telling me to change to RandomUtils. Plz Help! Thanks <3
Then change it to RandomUtils? If your getting syntax errors your IDE should tell you exactly whats wrong. You have to import classes or you will get an error.
so i replaced it with RandomUtils and if i do import net.minecraft.server.v1_7_R3.PacketPlayOutWorldParticles; it makes other things not work. heres just an overall view of whats happening: #mce_temp_url#
mkezar You have to import every class your using lol and what is visibleRadiusSquared? I don't see you declaring it anywhere
well its not declared anywere in here... https://forums.bukkit.org/threads/e...-the-nice-way-text-image-in-particles.259879/
mkezar Did you just expect the compiler to read your mind and magically know what visibleRadiusSquared equals? First off you should probably go back to basic java before touching an API. Secondly you have to initialize visibleRadiusSquared before using it anywhere.