Fix the apothecary particles

This commit is contained in:
Vincent Lee committed 2017-01-22 19:56:11 -06:00
1 parent 07dd92ed6a
commit 617657e5f8
2 files changed
+15 -10

No files matched your search

@@ -54,6 +54,8 @@ import vazkii.botania.client.core.handler.HUDHandler;
import vazkii.botania.client.core.helper.RenderHelper;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.network.PacketBotaniaEffect;
import vazkii.botania.common.network.PacketHandler;
import javax.annotation.Nonnull;
@@ -128,9 +130,7 @@ public class TileAltar extends TileSimpleInventory implements IPetalApothecary {
for(int i = 0; i < getSizeInventory(); i++)
if(itemHandler.getStackInSlot(i).isEmpty()) {
ItemStack stackToPut = stack.splitStack(1);
stackToPut.setCount(1);
itemHandler.setStackInSlot(i, stackToPut);
itemHandler.setStackInSlot(i, stack.splitStack(1));
didChange = true;
world.playSound(null, pos, SoundEvents.ENTITY_GENERIC_SPLASH, SoundCategory.BLOCKS, 0.1F, 10F);
break;
@@ -211,12 +211,8 @@ public class TileAltar extends TileSimpleInventory implements IPetalApothecary {
private void craftingFanciness() {
world.playSound(null, pos, BotaniaSoundEvents.altarCraft, SoundCategory.BLOCKS, 1F, 1F);
for(int i = 0; i < 25; i++) {
float red = (float) Math.random();
float green = (float) Math.random();
float blue = (float) Math.random();
Botania.proxy.sparkleFX(pos.getX() + 0.5 + Math.random() * 0.4 - 0.2, pos.getY() + 1, pos.getZ() + 0.5 + Math.random() * 0.4 - 0.2, red, green, blue, (float) Math.random(), 10);
}
PacketHandler.sendToNearby(world, getPos(),
new PacketBotaniaEffect(PacketBotaniaEffect.EffectType.APOTHECARY_CRAFT, getPos().getX(), getPos().getY(), getPos().getZ()));
}
public boolean isEmpty() {
@@ -285,6 +285,14 @@ public class PacketBotaniaEffect implements IMessage {
}
}
}
case APOTHECARY_CRAFT: {
for(int i = 0; i < 25; i++) {
float red = (float) Math.random();
float green = (float) Math.random();
float blue = (float) Math.random();
Botania.proxy.sparkleFX(message.x + 0.5 + Math.random() * 0.4 - 0.2, message.y + 1, message.z + 0.5 + Math.random() * 0.4 - 0.2, red, green, blue, (float) Math.random(), 10);
}
}
}
}
});
@@ -306,7 +314,8 @@ public class PacketBotaniaEffect implements IMessage {
ENTROPINNYUM(0),
BLACK_LOTUS_DISSOLVE(0),
BREWERY_FINISH(1), // Arg: RGB
TERRA_PLATE(0);
TERRA_PLATE(0),
APOTHECARY_CRAFT(0);
private final int argCount;