custom particles
This commit is contained in:
13 files changed
+140
-15
No files matched your search
@@ -3,12 +3,13 @@ package com.jenny.enhancedexplosives.entities.arrows;
|
||||
import com.jenny.enhancedexplosives.entities.entities;
|
||||
import com.jenny.enhancedexplosives.items.items;
|
||||
import com.jenny.enhancedexplosives.config.ConfigClient;
|
||||
import com.jenny.enhancedexplosives.particles.particles;
|
||||
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class concussiveArrow extends baseArrow{
|
||||
@@ -43,12 +44,13 @@ public class concussiveArrow extends baseArrow{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnParticles() {
|
||||
public void spawnParticles(float partialTicks) {
|
||||
for (int i = 1; i <= ConfigClient.arrowParticleCount; i++) {
|
||||
double x = getX() + (double) level().getRandom().nextInt(-10, 11) / 10;
|
||||
double y = getY() + (double) level().getRandom().nextInt(-10, 11) / 10;
|
||||
double z = getZ() + (double) level().getRandom().nextInt(-10, 11) / 10;
|
||||
level().addParticle(ParticleTypes.WAX_ON, x, y, z, this.getDeltaMovement().x, this.getDeltaMovement().y, this.getDeltaMovement().z);
|
||||
Vec3 pos = getPosition(partialTicks);
|
||||
double x = pos.x + (double) level().getRandom().nextInt(-5, 6) / 10;
|
||||
double y = pos.y + (double) level().getRandom().nextInt(-5, 6) / 10;
|
||||
double z = pos.z + (double) level().getRandom().nextInt(-5, 6) / 10;
|
||||
level().addParticle(particles.CONCUSSIVE_ARROW_PARTICLE.get(), x, y, z, this.getDeltaMovement().x, this.getDeltaMovement().y, this.getDeltaMovement().z);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user