Use Gourm pitch to give feedback on streak length/displeasure (#3339)

* Use Gourm pitch to give feedback on streak length

* Document eats
This commit is contained in:
Al Winfy authored and GitHub committed 2020-06-25 14:50:18 -05:00
1 parent cb5a8a1b07
commit 595cf74f09
2 files changed
+4 -4

No files matched your search

@@ -46,7 +46,7 @@ public class SubTileGourmaryllis extends TileEntityGeneratingFlower {
private int cooldown = 0;
private int digestingMana = 0;
private List<ItemStack> lastFoods = new LinkedList<>();
private int streakLength = 0;
private int streakLength = -1;
private int lastFoodCount = 0;
public SubTileGourmaryllis() {
@@ -109,7 +109,7 @@ public class SubTileGourmaryllis extends TileEntityGeneratingFlower {
addMana(digestingMana);
digestingMana = 0;
float burpPitch = 1 - (lastFoodCount - 1) * 0.05F;
float burpPitch = (float) Math.pow(2.0, (streakLength == 0 ? -lastFoodCount : streakLength) / 12.0);
getWorld().playSound(null, getEffectivePos(), SoundEvents.ENTITY_PLAYER_BURP, SoundCategory.BLOCKS, 1, burpPitch);
sync();
} else if (cooldown % munchInterval == 0) {