|
@@ -4,6 +4,8 @@ import java.util.ArrayList;
|
|
import me.hammerle.snuviscript.code.ScriptManager;
|
|
import me.hammerle.snuviscript.code.ScriptManager;
|
|
import me.km.utils.Location;
|
|
import me.km.utils.Location;
|
|
import me.km.utils.Mapper;
|
|
import me.km.utils.Mapper;
|
|
|
|
+import net.minecraft.entity.player.PlayerEntity;
|
|
|
|
+import net.minecraft.entity.player.ServerPlayerEntity;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.particles.*;
|
|
import net.minecraft.particles.*;
|
|
import net.minecraft.world.server.ServerWorld;
|
|
import net.minecraft.world.server.ServerWorld;
|
|
@@ -33,6 +35,17 @@ public class ParticleCommands {
|
|
double offZ = in.length >= 7 ? in[6].getDouble(sc) : 0.0;
|
|
double offZ = in.length >= 7 ? in[6].getDouble(sc) : 0.0;
|
|
((ServerWorld) l.getWorld()).spawnParticle(data, l.getX(), l.getY(), l.getZ(), count, offX, offY, offZ, speed);
|
|
((ServerWorld) l.getWorld()).spawnParticle(data, l.getX(), l.getY(), l.getZ(), count, offX, offY, offZ, speed);
|
|
});
|
|
});
|
|
|
|
+ sm.registerConsumer("particle.spawnplayer", (sc, in) -> {
|
|
|
|
+ Location l = ((Location) in[0].get(sc));
|
|
|
|
+ IParticleData data = ((IParticleData) in[1].get(sc));
|
|
|
|
+ ServerPlayerEntity p = (ServerPlayerEntity) in[2].get(sc);
|
|
|
|
+ int count = in.length >= 4 ? in[3].getInt(sc) : 1;
|
|
|
|
+ double speed = in.length >= 5 ? in[4].getDouble(sc) : 0.0;
|
|
|
|
+ double offX = in.length >= 6 ? in[5].getDouble(sc) : 0.0;
|
|
|
|
+ double offY = in.length >= 7 ? in[6].getDouble(sc) : 0.0;
|
|
|
|
+ double offZ = in.length >= 8 ? in[7].getDouble(sc) : 0.0;
|
|
|
|
+ ((ServerWorld) l.getWorld()).spawnParticle(p, data, true, l.getX(), l.getY(), l.getZ(), count, offX, offY, offZ, speed);
|
|
|
|
+ });
|
|
sm.registerConsumer("particle.spawncircle", (sc, in) -> {
|
|
sm.registerConsumer("particle.spawncircle", (sc, in) -> {
|
|
Location l = ((Location) in[0].get(sc));
|
|
Location l = ((Location) in[0].get(sc));
|
|
IParticleData data = ((IParticleData) in[1].get(sc));
|
|
IParticleData data = ((IParticleData) in[1].get(sc));
|