Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class blueFlame extends Particle {
- private static TextureAtlasSprite sprite;
- private static ResourceLocation texture = new ResourceLocation("ltn:particles/blueflame");
- public blueFlame(World world, double xCoord, double yCoord, double zCoord, double xSpeed, double ySpeed, double zSpeed)
- {
- super(world, xCoord, yCoord, zCoord, xSpeed, ySpeed, zSpeed);
- this.motionX = xSpeed;
- this.motionY = ySpeed;
- this.motionZ = zSpeed;
- this.posX = xCoord;
- this.posY = yCoord;
- this.posZ = zCoord;
- }
- @SubscribeEvent
- public static void onTextureStitch(TextureStitchEvent.Pre event) {
- sprite = event.getMap().registerSprite(texture);;
- }
- @SideOnly(Side.CLIENT)
- public static class Factory implements IParticleFactory
- {
- public Particle createParticle(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
- {
- return new blueFlame(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
- }
- }
- @Override
- public int getFXLayer()
- {
- return 1;
- }
- @Override
- public void renderParticle(BufferBuilder builder, Entity entity, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ) {
- this.setParticleTexture(this.sprite);
- super.renderParticle(builder, entity, partialTicks, rotationX, rotationZ, rotationYZ, rotationXY, rotationXZ);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement