Class Particle
java.lang.Object
hm.zelha.particlesfx.particles.parents.Particle
- All Implemented Interfaces:
IParticle
- Direct Known Subclasses:
ParticleAngry,ParticleAsh,ParticleAshWhite,ParticleBlockBreak,ParticleBlockCrumble,ParticleBlockDust,ParticleBlockMarker,ParticleCherryLeaves,ParticleCrimsonSpore,ParticleCurrentDown,ParticleDustColored,ParticleEffect,ParticleEffectColored,ParticleEnderSignal,ParticleExplosion,ParticleExplosionEmitter,ParticleFlash,ParticleGlow,ParticleGust,ParticleGustEmitterLarge,ParticleGustEmitterSmall,ParticleGustSmall,ParticleHappy,ParticleHeart,ParticleHoney,ParticleInfested,ParticleInstantEffect,ParticleLava,ParticleLavaPop,ParticleMycelium,ParticleNectar,ParticleNote,ParticleNull,ParticleObsidianTear,ParticleOmenRaid,ParticleOmenTrial,ParticlePaleOakLeaves,ParticleShriek,ParticleSonicBoom,ParticleSplash,ParticleSporeBlossom,ParticleSweepAttack,ParticleUnderwater,ParticleWarpedSpore,ParticleWater,ParticleWitch,TravellingParticle
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected final org.bukkit.util.Vectorprotected final org.bukkit.util.Vectorprotected doubleprotected doubleprotected doubleprotected net.minecraft.core.particles.ParticleParamprotected intprotected final ThreadLocalRandomprotected doubleprotected final org.bukkit.util.Vector -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Particleclone()voiddisplay(org.bukkit.Location location) protected voiddisplay(org.bukkit.Location location, List<org.bukkit.craftbukkit.v1_21_R3.entity.CraftPlayer> players) voiddisplayForPlayers(org.bukkit.Location location, List<UUID> players) voiddisplayForPlayers(org.bukkit.Location location, org.bukkit.entity.Player... players) protected org.bukkit.util.VectorintgetCount()protected org.bukkit.util.VectorgetOffsets(org.bukkit.Location location) Meant to be overridden by child classes to modify the offset values of the packet sent to the player.doubledoubledoubleprotected intMeant to be overridden by child classes to modify the count value of the packet sent to the player.protected floatMeant to be overridden by child classes to modify the speed value of the packet sent to the player.intdoublegetSpeed()protected net.minecraft.network.protocol.PacketgetStrangePacket(org.bukkit.Location location) Meant to be overridden by child classes when a different packet is needed to display the particle.protected org.bukkit.util.VectorgetXYZ(org.bukkit.Location location) Meant to be overridden by child classes to modify the X/Y/Z values of the packet sent to the player.voidsetCount(int count) voidsetOffset(double x, double y, double z) voidsetOffsetX(double offsetX) voidsetOffsetY(double offsetY) voidsetOffsetZ(double offsetZ) setRadius(int radius) setSpeed(double speed)
-
Field Details
-
rng
-
fakeOffsetHelper
protected final org.bukkit.util.Vector fakeOffsetHelper -
xyzHelper
protected final org.bukkit.util.Vector xyzHelper -
offsetHelper
protected final org.bukkit.util.Vector offsetHelper -
particle
protected net.minecraft.core.particles.ParticleParam particle -
offsetX
protected double offsetX -
offsetY
protected double offsetY -
offsetZ
protected double offsetZ -
speed
protected double speed -
count
protected int count -
radius
protected int radius
-
-
Constructor Details
-
Particle
-
-
Method Details
-
display
public void display(org.bukkit.Location location) -
displayForPlayers
public void displayForPlayers(org.bukkit.Location location, org.bukkit.entity.Player... players) - Specified by:
displayForPlayersin interfaceIParticle
-
displayForPlayers
- Specified by:
displayForPlayersin interfaceIParticle
-
inherit
-
clone
-
display
protected void display(org.bukkit.Location location, List<org.bukkit.craftbukkit.v1_21_R3.entity.CraftPlayer> players) -
generateFakeOffset
protected org.bukkit.util.Vector generateFakeOffset()- Returns:
- a vector meant to be added to a location to mimic particle offset
-
getXYZ
protected org.bukkit.util.Vector getXYZ(org.bukkit.Location location) Meant to be overridden by child classes to modify the X/Y/Z values of the packet sent to the player.- Parameters:
location- the location passed into the display method- Returns:
- the xyzHelper with the modified X/Y/Z values
-
getOffsets
protected org.bukkit.util.Vector getOffsets(org.bukkit.Location location) Meant to be overridden by child classes to modify the offset values of the packet sent to the player.- Parameters:
location- the location passed into the display method- Returns:
- the offsetHelper with the modified offset values
-
getPacketSpeed
protected float getPacketSpeed()Meant to be overridden by child classes to modify the speed value of the packet sent to the player.- Returns:
- the modified speed value
-
getPacketCount
protected int getPacketCount()Meant to be overridden by child classes to modify the count value of the packet sent to the player.- Returns:
- the modified count value
-
getStrangePacket
protected net.minecraft.network.protocol.Packet getStrangePacket(org.bukkit.Location location) Meant to be overridden by child classes when a different packet is needed to display the particle.- Parameters:
location- the location passed into the display method- Returns:
- the different packet
-
setOffset
public void setOffset(double x, double y, double z) -
setOffsetX
public void setOffsetX(double offsetX) - Specified by:
setOffsetXin interfaceIParticle
-
setOffsetY
public void setOffsetY(double offsetY) - Specified by:
setOffsetYin interfaceIParticle
-
setOffsetZ
public void setOffsetZ(double offsetZ) - Specified by:
setOffsetZin interfaceIParticle
-
setSpeed
-
setCount
public void setCount(int count) -
setRadius
-
getOffsetX
public double getOffsetX()- Specified by:
getOffsetXin interfaceIParticle
-
getOffsetY
public double getOffsetY()- Specified by:
getOffsetYin interfaceIParticle
-
getOffsetZ
public double getOffsetZ()- Specified by:
getOffsetZin interfaceIParticle
-
getSpeed
public double getSpeed() -
getCount
public int getCount() -
getRadius
public int getRadius()
-