Skip to content

Commit

Permalink
Forget about adding particles
Browse files Browse the repository at this point in the history
  • Loading branch information
62832 committed Sep 15, 2023
1 parent 354769a commit 5dc8ee6
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions src/main/java/gripe/_90/arseng/me/key/SourceKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@

import java.util.List;

import com.hollingsworth.arsnouveau.client.particle.GlowParticleData;
import com.hollingsworth.arsnouveau.client.particle.ParticleColor;

import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;

Expand Down Expand Up @@ -59,23 +55,6 @@ public void writeToPacket(FriendlyByteBuf data) {}

@Override
public void addDrops(long amount, List<ItemStack> drops, Level level, BlockPos pos) {
if (!(level instanceof ServerLevel serverLevel)) {
return;
}

for (var i = 0; i < Math.min((amount + 999) / 1000, 10); i++) {
var data = GlowParticleData.createData(
ParticleColor.defaultParticleColor(), (float) Math.random() / 3F, 0.8F, 2);
serverLevel.sendParticles(
data,
pos.getX() + 0.3 + Math.random() * 0.5,
pos.getY() + 0.6 + Math.random() * 0.25,
pos.getZ() + Math.random(),
8,
0.1,
0.1,
0.1,
0.04);
}
// Source is voided
}
}

0 comments on commit 5dc8ee6

Please sign in to comment.