mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-10-26 14:24:22 +00:00
Fix some particles being missing
This commit is contained in:
3 files changed
+38
-26
No files matched your search
+8
-12
@@ -20,6 +20,8 @@ import vazkii.botania.api.subtile.RadiusDescriptor;
|
||||
import vazkii.botania.api.subtile.SubTileGenerating;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.network.PacketBotaniaEffect;
|
||||
import vazkii.botania.common.network.PacketHandler;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -31,22 +33,16 @@ public class SubTileEntropinnyum extends SubTileGenerating {
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(mana == 0) {
|
||||
if(!supertile.getWorld().isRemote && mana == 0) {
|
||||
List<EntityTNTPrimed> tnts = supertile.getWorld().getEntitiesWithinAABB(EntityTNTPrimed.class, new AxisAlignedBB(supertile.getPos().add(-RANGE, -RANGE, -RANGE), supertile.getPos().add(RANGE + 1, RANGE + 1, RANGE + 1)));
|
||||
for(EntityTNTPrimed tnt : tnts) {
|
||||
if(tnt.getFuse() == 1 && !tnt.isDead && !supertile.getWorld().getBlockState(new BlockPos(tnt)).getMaterial().isLiquid()) {
|
||||
if(!supertile.getWorld().isRemote) {
|
||||
tnt.playSound(SoundEvents.ENTITY_GENERIC_EXPLODE, 0.2F, (1F + (supertile.getWorld().rand.nextFloat() - supertile.getWorld().rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
tnt.setDead();
|
||||
mana += getMaxMana();
|
||||
sync();
|
||||
}
|
||||
tnt.playSound(SoundEvents.ENTITY_GENERIC_EXPLODE, 0.2F, (1F + (supertile.getWorld().rand.nextFloat() - supertile.getWorld().rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
tnt.setDead();
|
||||
mana += getMaxMana();
|
||||
sync();
|
||||
|
||||
for(int i = 0; i < 50; i++)
|
||||
Botania.proxy.sparkleFX(tnt.worldObj, tnt.posX + Math.random() * 4 - 2, tnt.posY + Math.random() * 4 - 2, tnt.posZ + Math.random() * 4 - 2, 1F, (float) Math.random() * 0.25F, (float) Math.random() * 0.25F, (float) (Math.random() * 0.65F + 1.25F), 12);
|
||||
|
||||
supertile.getWorld().spawnParticle(EnumParticleTypes.EXPLOSION_HUGE, tnt.posX, tnt.posY, tnt.posZ, 1D, 0D, 0D);
|
||||
return;
|
||||
PacketHandler.sendToNearby(supertile.getWorld(), supertile.getPos(), new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.ENTROPINNYUM, tnt.posX, tnt.posY, tnt.posZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ import vazkii.botania.api.mana.IManaPool;
|
||||
import vazkii.botania.api.sound.BotaniaSoundEvents;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import vazkii.botania.common.network.PacketBotaniaEffect;
|
||||
import vazkii.botania.common.network.PacketHandler;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
@@ -70,19 +72,7 @@ public class ItemBlackLotus extends ItemMod implements IManaDissolvable {
|
||||
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(item.worldObj, tile.getPos());
|
||||
}
|
||||
|
||||
for(int i = 0; i < 50; i++) {
|
||||
float r = (float) Math.random() * 0.25F;
|
||||
float g = 0F;
|
||||
float b = (float) Math.random() * 0.25F;
|
||||
float s = 0.45F * (float) Math.random() * 0.25F;
|
||||
|
||||
float m = 0.045F;
|
||||
float mx = ((float) Math.random() - 0.5F) * m;
|
||||
float my = (float) Math.random() * m;
|
||||
float mz = ((float) Math.random() - 0.5F) * m;
|
||||
|
||||
Botania.proxy.wispFX(item.worldObj, item.posX, tile.getPos().getY() + 0.5F, item.posZ, r, g, b, s, mx, my, mz);
|
||||
}
|
||||
PacketHandler.sendToNearby(item.worldObj, item, new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.BLACK_LOTUS_DISSOLVE, item.posX, tile.getPos().getY() + 0.5, item.posZ));
|
||||
item.playSound(BotaniaSoundEvents.blackLotus, 0.5F, t2 ? 0.1F : 1F);
|
||||
}
|
||||
|
||||
|
||||
@@ -216,6 +216,30 @@ public class PacketBotaniaEffect implements IMessage {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ENTROPINNYUM: {
|
||||
for(int i = 0; i < 50; i++)
|
||||
Botania.proxy.sparkleFX(world, message.x + Math.random() * 4 - 2, message.y + Math.random() * 4 - 2, message.z + Math.random() * 4 - 2, 1F, (float) Math.random() * 0.25F, (float) Math.random() * 0.25F, (float) (Math.random() * 0.65F + 1.25F), 12);
|
||||
|
||||
world.spawnParticle(EnumParticleTypes.EXPLOSION_HUGE, message.x, message.y, message.z, 1D, 0D, 0D);
|
||||
break;
|
||||
}
|
||||
case BLACK_LOTUS_DISSOLVE: {
|
||||
for(int i = 0; i < 50; i++) {
|
||||
float r = (float) Math.random() * 0.35F;
|
||||
float g = 0F;
|
||||
float b = (float) Math.random() * 0.35F;
|
||||
float s = 0.45F * (float) Math.random() * 0.25F;
|
||||
|
||||
float m = 0.045F;
|
||||
float mx = ((float) Math.random() - 0.5F) * m;
|
||||
float my = (float) Math.random() * m;
|
||||
float mz = ((float) Math.random() - 0.5F) * m;
|
||||
|
||||
Botania.proxy.wispFX(world, message.x, message.y, message.z, r, g, b, s, mx, my, mz);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -233,7 +257,9 @@ public class PacketBotaniaEffect implements IMessage {
|
||||
SPARK_NET_INDICATOR(2), // Arg: Entity ID from, Entity ID towards
|
||||
SPARK_MANA_FLOW(2), // Arg: Entity ID from, Entity ID towards
|
||||
ENCHANTER_CRAFT(0),
|
||||
ENCHANTER_DESTROY(0);
|
||||
ENCHANTER_DESTROY(0),
|
||||
ENTROPINNYUM(0),
|
||||
BLACK_LOTUS_DISSOLVE(0);
|
||||
|
||||
private final int argCount;
|
||||
|
||||
|
||||
Reference in new issue
Block a user