mirror of
https://github.com/DieReicheErethons/Brewery.git
synced 2025-01-23 21:21:20 +01:00
Negative alc Fixes
This commit is contained in:
parent
01c498a608
commit
02f2e0c966
@ -440,6 +440,7 @@ recipes:
|
||||
cookingtime: 2
|
||||
color: BLACK
|
||||
difficulty: 3
|
||||
alcohol: -6
|
||||
lore: + &8Bestimmt schon eine Woche alt
|
||||
effects:
|
||||
- REGENERATION/1/2-5
|
||||
|
@ -438,6 +438,7 @@ recipes:
|
||||
cookingtime: 2
|
||||
color: BLACK
|
||||
difficulty: 3
|
||||
alcohol: -6
|
||||
effects:
|
||||
- REGENERATION/1/2-5
|
||||
- SPEED/1/30-140
|
||||
|
@ -429,6 +429,7 @@ recipes:
|
||||
cookingtime: 2
|
||||
color: BLACK
|
||||
difficulty: 3
|
||||
alcohol: -6
|
||||
effects:
|
||||
- REGENERATION/1/2-5
|
||||
- SPEED/1/30-140
|
||||
|
@ -740,6 +740,7 @@ recipes:
|
||||
cookingtime: 2
|
||||
color: BLACK
|
||||
difficulty: 3
|
||||
alcohol: -6
|
||||
lore: + &8Bestimmt schon eine Woche alt
|
||||
effects:
|
||||
- REGENERATION/1/2-5
|
||||
@ -844,7 +845,7 @@ recipes:
|
||||
# Pumpkin Spice Bier,
|
||||
# Melonen Vodka
|
||||
|
||||
# Es gibt noch viele Minecraft Items wie Ranken und items von anderen plugins die sich gut als Zutaten machen würden
|
||||
# Es gibt noch viele Minecraft Items wie Ranken, Milch und items von anderen plugins die sich gut als Zutaten machen würden
|
||||
|
||||
|
||||
|
||||
|
@ -840,7 +840,7 @@ recipes:
|
||||
# Pumpkin Spice Beer,
|
||||
# Melon Vodka
|
||||
|
||||
# There are a lot of items in Minecraft like Vines and items added by plugins that would make great ingredients.
|
||||
# There are a lot of items in Minecraft like Vines, Milk and items added by plugins that would make great ingredients.
|
||||
|
||||
|
||||
# -- Plugin Compatibility --
|
||||
|
@ -840,7 +840,7 @@ recipes:
|
||||
# Pumpkin Spice Beer,
|
||||
# Melon Vodka
|
||||
|
||||
# There are a lot of items in Minecraft like Vines and items added by plugins that would make great ingredients.
|
||||
# There are a lot of items in Minecraft like Vines, Milk and items added by plugins that would make great ingredients.
|
||||
|
||||
|
||||
# -- Plugin Compatibility --
|
||||
|
@ -846,7 +846,7 @@ recipes:
|
||||
# Pumpkin Spice Beer,
|
||||
# Melon Vodka
|
||||
|
||||
# There are a lot of items in Minecraft like Vines and items added by plugins that would make great ingredients.
|
||||
# There are a lot of items in Minecraft like Vines, Milk and items added by plugins that would make great ingredients.
|
||||
|
||||
|
||||
# -- Compatibilité entre Plugins --
|
||||
|
@ -739,6 +739,7 @@ recipes:
|
||||
cookingtime: 2
|
||||
color: BLACK
|
||||
difficulty: 3
|
||||
alcohol: -6
|
||||
lore: + &8Probably a week old
|
||||
effects:
|
||||
- REGENERATION/1/2-5
|
||||
@ -839,7 +840,7 @@ eggnog:
|
||||
# Pumpkin Spice Beer,
|
||||
# Melon Vodka
|
||||
|
||||
# There are a lot of items in Minecraft like Vines and items added by plugins that would make great ingredients.
|
||||
# There are a lot of items in Minecraft like Vines, Milk and items added by plugins that would make great ingredients.
|
||||
|
||||
|
||||
# -- Compatibilità con altri plugin --
|
||||
|
@ -743,6 +743,7 @@ recipes:
|
||||
cookingtime: 2
|
||||
color: BLACK
|
||||
difficulty: 3
|
||||
alcohol: -6
|
||||
lore: + &8Probably a week old
|
||||
effects:
|
||||
- REGENERATION/1/2-5
|
||||
@ -820,7 +821,7 @@ recipes:
|
||||
# cookingtime: 1
|
||||
# color: BLACK
|
||||
# difficulty: 4
|
||||
# alcohol: -6
|
||||
# alcohol: -8
|
||||
# effects:
|
||||
# - REGENERATION/30
|
||||
# - SPEED/10
|
||||
@ -843,7 +844,7 @@ recipes:
|
||||
# Pumpkin Spice Beer,
|
||||
# Melon Vodka
|
||||
|
||||
# There are a lot of items in Minecraft like Vines and items added by plugins that would make great ingredients.
|
||||
# There are a lot of items in Minecraft like Vines, Milk and items added by plugins that would make great ingredients.
|
||||
|
||||
|
||||
# -- 插件兼容性 --
|
||||
|
@ -182,6 +182,7 @@ public class BPlayer {
|
||||
|
||||
applyEffects(effects, player, PlayerEffectEvent.EffectType.DRINK);
|
||||
if (brewAlc < 0) {
|
||||
// If the Drink has negative alcohol, drain some alcohol
|
||||
bPlayer.drain(player, -brewAlc);
|
||||
} else if (brewAlc > 0) {
|
||||
bPlayer.drunkeness += brewAlc;
|
||||
@ -190,21 +191,25 @@ public class BPlayer {
|
||||
} else {
|
||||
bPlayer.quality += brewAlc;
|
||||
}
|
||||
|
||||
|
||||
applyEffects(getQualityEffects(quality, brewAlc), player, PlayerEffectEvent.EffectType.QUALITY);
|
||||
}
|
||||
|
||||
|
||||
if (bPlayer.drunkeness > 100) {
|
||||
bPlayer.drinkCap(player);
|
||||
}
|
||||
bPlayer.syncToSQL(false);
|
||||
|
||||
|
||||
if (BConfig.showStatusOnDrink) {
|
||||
bPlayer.showDrunkeness(player);
|
||||
// Only show the Player his drunkeness if he is already drunk, or this drink changed his drunkeness
|
||||
if (brewAlc != 0 || bPlayer.drunkeness > 0) {
|
||||
bPlayer.showDrunkeness(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (bPlayer.drunkeness <= 0) {
|
||||
bPlayer.remove();
|
||||
} else {
|
||||
bPlayer.syncToSQL(false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user