#ParticleProblem
1 messages · Page 1 of 1 (latest)
On the local host(the big image) wthe wings display fine but on the Server(pebblehost) it doesnt display right!
Here is my Code (ImageParticles just converts an image to particles) :
BufferedImage wingimg = null;
BufferedInputStream wingsin;
try {
wingsin = new BufferedInputStream(new URL(wm.getSelectedWingfromPlayer(p).getWingURL()).openStream());
wingimg = ImageIO.read(wingsin);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
ImageParticles wing =new ImageParticles(wingimg,1);
wing.setAnchor(wm.getSelectedWingfromPlayer(p).getWingXOffSet(),wm.getSelectedWingfromPlayer(p).getWingYOffSet());
wing.setDisplayRatio(0.1);
Vector dist = p.getEyeLocation().getDirection();
dist.multiply(-0.5);
Location location = p.getEyeLocation().add(dist).subtract(0,0.5,0);
Map<Location, Color> particle = wing.getParticles(location,25,location.getYaw());
for(Location spot:particle.keySet()) {
Color color = particle.get(spot);
Particle.DustOptions dustOptions = new Particle.DustOptions(color, 1);
for(Player pp : Bukkit.getOnlinePlayers()) {
PlayerDataManager pdm2 = new PlayerDataManager(pp.getUniqueId());
if(pdm2.getBooleanValue("canseewings")) {
pp.spawnParticle(Particle.REDSTONE,spot,0,0,0,0,1,dustOptions);
}
}
}
}
ok
Code for the Wings: https://pastebin.com/64EUJh2y
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.