Prep for moving to vanilla particle system

This commit is contained in:
Vincent Lee committed 2019-09-14 18:16:13 -05:00
1 parent 4cd4b220d3
commit f0993c20a4
60 files changed
+452 -353

No files matched your search

@@ -24,6 +24,7 @@ import net.minecraft.util.SoundEvents;
import net.minecraft.world.World;
import net.minecraftforge.fml.network.NetworkHooks;
import net.minecraftforge.registries.ObjectHolder;
import vazkii.botania.client.fx.ParticleData;
import vazkii.botania.common.Botania;
import vazkii.botania.common.lib.LibMisc;
@@ -68,13 +69,16 @@ public class EntitySignalFlare extends Entity {
int g = (hex & 0xFF00) >> 8;
int b = hex & 0xFF;
Botania.proxy.setWispFXDistanceLimit(false);
for(int i = 0; i < 3; i++)
Botania.proxy.wispFX(posX, posY, posZ + 0.5, r / 255F, g / 255F, b / 255F, (float) Math.random() * 5 + 1F, (float) (Math.random() - 0.5F), 10F * (float) Math.sqrt(256F / (256F - (float) posY)), (float) (Math.random() - 0.5F));
// todo 1.14 use of client only addParticle version
for(int i = 0; i < 3; i++) {
ParticleData data = ParticleData.wisp((float) Math.random() * 5 + 1F, r / 255F, g / 255F, b / 255F);
world.addParticle(data, true, posX, posY, posZ + 0.5, (float) (Math.random() - 0.5F), 10F * (float) Math.sqrt(256F / (256F - (float) posY)), (float) (Math.random() - 0.5F));
}
for(int i = 0; i < 4; i++)
Botania.proxy.wispFX(posX + 0.5, Math.min(256, getFiredAt() + Botania.proxy.getClientRenderDistance() * 16), posZ + 0.5, r / 255F, g / 255F, b / 255F, (float) Math.random() * 15 + 8F, (float) (Math.random() - 0.5F) * 8F, 0F, (float) (Math.random() - 0.5F) * 8F);
Botania.proxy.setWispFXDistanceLimit(true);
for(int i = 0; i < 4; i++) {
ParticleData data = ParticleData.wisp((float) Math.random() * 15 + 8F, r / 255F, g / 255F, b / 255F);
world.addParticle(data, true, posX + 0.5, Math.min(256, getFiredAt() + Botania.proxy.getClientRenderDistance() * 16), posZ + 0.5, (float) (Math.random() - 0.5F) * 8F, 0F, (float) (Math.random() - 0.5F) * 8F);
}
}
}
}