Small fixes, push to v1.8

This commit is contained in:
Sn0wStorm 2019-08-18 22:45:12 +02:00
parent 3ee9ced789
commit 4cd2da083c
15 changed files with 29 additions and 6 deletions

View File

@ -4,7 +4,7 @@
<groupId>com.dre</groupId>
<artifactId>brewery</artifactId>
<version>1.7.2</version>
<version>1.8</version>
<name>Brewery</name>
<properties>

View File

@ -86,6 +86,7 @@ oldMat: true
# distillruns: Wie oft destilliert werden muss für vollen Alkoholgehalt (0=ohne Destillieren)
# distilltime: Wie lange (in sekunden) ein Destillations-Durchlauf braucht (0=Standard Zeit von 40 sek) MC Standard wäre 20 sek
# wood: Holz des Fasses 0=alle Holzsorten 1=Birke 2=Eiche 3=Jungel 4=Fichte 5=Akazie 6=Schwarzeiche
# Das Minecraft Fass besteht aus Eiche
# age: Zeit in Minecraft-Tagen, die das Getränk im Fass reifen muss 0= kein reifen
# color: Farbe des Getränks nach destillieren/reifen.
# Benutzbare Farben: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY

View File

@ -83,6 +83,7 @@ oldMat: true
# distillruns: How often it has to be distilled for full alcohol (0=without distilling)
# distilltime: How long (in seconds) one distill-run takes (0=Default time of 40 sec) MC Default would be 20 sec
# wood: Wood of the barrel 0=any 1=Birch 2=Oak 3=Jungle 4=Spruce 5=Acacia 6=Dark Oak
# The Minecraft barrel is made of oak
# age: Time in Minecraft-days, the potion has to age in a barrel 0=no aging
# color: Color of the potion after distilling/aging.
# Usable Colors: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY

View File

@ -84,6 +84,7 @@ oldMat: true
# distillruns: Combien de fois le breuvage devra être distillé pour un alcool de qualité (0=Ne pas distiller)
# distilltime: How long (in seconds) one distill-run takes (0=Default time of 40 sec) MC Default would be 20 sec
# wood: Type de bois du baril 0=aucun 1=Bouleau 2=Chêne 3=Jungle 4=Pin 5=Acacia 6=Chêne Noir
# The Minecraft barrel is made of oak
# age: Temps en jours de Minecraft, la potion devra être âgée dans un baril. 0=Pas besoin d'âge
# color: Couleur de la potion après distillation/avoir laissé vieillir.
# Couleurs disponibles: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY (Dans l'ordre : Rouge foncé, Rouge, Rouge clair, Orange, Rose, Bleu, Cyan, Eau, Vert, Noir, Gris, Gris clair)

View File

@ -83,6 +83,7 @@ oldMat: true
# distillruns: Quanto spesso deve essere distillato per ottenere la versione perfetta con il volume alcolico impostato (0=non serve distillare).
# distilltime: How long (in seconds) one distill-run takes (0=Default time of 40 sec) MC Default would be 20 sec
# wood: Legno del barile 0=qualiasi 1=Betulla 2=Quercia 3=Mogano 4=Abete 5=Acacia 6=Quercia nera
# The Minecraft barrel is made of oak
# age: Tempo in giorni di Minecraft per cui la pozione deve essere invecchiata in un barile (0=nessun invecchiamento).
# color: Colore della pozione dopo essere stata distillata/invecchiata
# Colori utilizzabili: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY

View File

@ -82,6 +82,7 @@ version: '1.8'
# distillruns: Wie oft destilliert werden muss für vollen Alkoholgehalt (0=ohne Destillieren)
# distilltime: Wie lange (in sekunden) ein Destillations-Durchlauf braucht (0=Standard Zeit von 40 sek) MC Standard wäre 20 sek
# wood: Holz des Fasses 0=alle Holzsorten 1=Birke 2=Eiche 3=Jungel 4=Fichte 5=Akazie 6=Schwarzeiche
# Das Minecraft Fass besteht aus Eiche
# age: Zeit in Minecraft-Tagen, die das Getränk im Fass reifen muss 0= kein reifen
# color: Farbe des Getränks nach destillieren/reifen.
# Benutzbare Farben: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY

View File

@ -79,6 +79,7 @@ version: '1.8'
# distillruns: How often it has to be distilled for full alcohol (0=without distilling)
# distilltime: How long (in seconds) one distill-run takes (0=Default time of 40 sec) MC Default would be 20 sec
# wood: Wood of the barrel 0=any 1=Birch 2=Oak 3=Jungle 4=Spruce 5=Acacia 6=Dark Oak
# The Minecraft barrel is made of oak
# age: Time in Minecraft-days, the potion has to age in a barrel 0=no aging
# color: Color of the potion after distilling/aging.
# Usable Colors: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY

View File

@ -80,6 +80,7 @@ version: '1.8'
# distillruns: Combien de fois le breuvage devra être distillé pour un alcool de qualité (0=Ne pas distiller)
# distilltime: How long (in seconds) one distill-run takes (0=Default time of 40 sec) MC Default would be 20 sec
# wood: Type de bois du baril 0=aucun 1=Bouleau 2=Chêne 3=Jungle 4=Pin 5=Acacia 6=Chêne Noir
# The Minecraft barrel is made of oak
# age: Temps en jours de Minecraft, la potion devra être âgée dans un baril. 0=Pas besoin d'âge
# color: Couleur de la potion après distillation/avoir laissé vieillir.
# Couleurs disponibles: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY (Dans l'ordre : Rouge foncé, Rouge, Rouge clair, Orange, Rose, Bleu, Cyan, Eau, Vert, Noir, Gris, Gris clair)

View File

@ -79,6 +79,7 @@ version: '1.8'
# distillruns: Quanto spesso deve essere distillato per ottenere la versione perfetta con il volume alcolico impostato (0=non serve distillare).
# distilltime: How long (in seconds) one distill-run takes (0=Default time of 40 sec) MC Default would be 20 sec
# wood: Legno del barile 0=qualiasi 1=Betulla 2=Quercia 3=Mogano 4=Abete 5=Acacia 6=Quercia nera
# The Minecraft barrel is made of oak
# age: Tempo in giorni di Minecraft per cui la pozione deve essere invecchiata in un barile (0=nessun invecchiamento).
# color: Colore della pozione dopo essere stata distillata/invecchiata
# Colori utilizzabili: DARK_RED, RED, BRIGHT_RED, ORANGE, PINK, BLUE, CYAN, WATER, GREEN, BLACK, GREY, BRIGHT_GREY

View File

@ -80,6 +80,7 @@ version: '1.8'
# distillruns: 饮品需要在酿造台上蒸馏的次数(0=无需蒸馏).
# distilltime: 每次蒸馏所需要耗费的时间(0=默认值, 即40秒), MC默认则为20秒/
# wood: 木桶所需要的木质 0=任意 1=桦木 2=橡木 3=丛林木 4=云杉木 5=金合欢木 6=深色橡木
# The Minecraft barrel is made of 橡木
# age: 饮品需要在木桶中熟成所需要的时间(MC天). 0=无需熟成.
# color: 饮品制成后的颜色.
# 可用颜色列表:

View File

@ -1,5 +1,5 @@
name: Brewery
version: 1.7.2
version: 1.8
main: com.dre.brewery.P
softdepend: [LWC, LogBlock, WorldGuard, GriefPrevention, Vault, Citadel]
authors: [Milan Albrecht, Frank Baumann, ProgrammerDan, Daniel Saukel]

View File

@ -25,10 +25,12 @@ public class MCBarrel {
private byte brews = -1; // How many Brewery Brews are in this Barrel
private final Inventory inv;
private final int invSize;
public MCBarrel(Inventory inv) {
this.inv = inv;
invSize = inv.getSize();
}
@ -56,7 +58,7 @@ public class MCBarrel {
if (item != null) {
Brew brew = Brew.get(item);
if (brew != null) {
if (brews < maxBrews) {
if (brews < maxBrews || maxBrews < 0) {
// The time is in minutes, but brew.age() expects time in mc-days
brew.age(item, ((float) time) / 20f, OAK);
}
@ -99,6 +101,10 @@ public class MCBarrel {
// There are still methods to place more Brews in that would be too tedious to catch.
// This is only for direct visual Notification, the age routine above will never age more than 6 brews in any case.
public void clickInv(InventoryClickEvent event) {
if (maxBrews >= invSize || maxBrews < 0) {
// There are enough brews allowed to fill the inventory, we don't need to keep track
return;
}
boolean adding = false;
switch (event.getAction()) {
case PLACE_ALL:

View File

@ -1161,7 +1161,11 @@ public class ConfigUpdater {
}
}
if (index != -1) {
addLines(index + 1, "# Halte ein Item in der Hand und benutze /brew configname um dessen Material herauszufinden und für ein Rezept zu benutzen");
addLines(index + 1, "# Halte ein Item in der Hand und benutze /brew ItemName um dessen Material herauszufinden und für ein Rezept zu benutzen");
}
index = indexOfStart("# wood: Holz des Fasses");
if (index != -1) {
addLines(index + 1, "# Das Minecraft Fass besteht aus Eiche");
}
if (P.use1_13) updateMaterialDescriptions(true);
}
@ -1210,6 +1214,10 @@ public class ConfigUpdater {
if (index != -1) {
addLines(index + 1, "# With an item in your hand, use /brew ItemName to get its material for use in a recipe");
}
index = indexOfStart("# wood: Wood of the barrel");
if (index != -1) {
addLines(index + 1, "# The Minecraft barrel is made of oak");
}
if (P.use1_13) updateMaterialDescriptions(false);
}

View File

@ -43,7 +43,7 @@ public class CommandListener implements CommandExecutor {
p.msg(sender, p.languageReader.get("Error_NoPermissions"));
}
} else if (cmd.equalsIgnoreCase("configname") || cmd.equalsIgnoreCase("itemname")) {
} else if (cmd.equalsIgnoreCase("configname") || cmd.equalsIgnoreCase("itemname") || cmd.equalsIgnoreCase("iteminfo")) {
if (sender.hasPermission("brewery.cmd.reload")) {
cmdItemName(sender);

View File

@ -310,7 +310,7 @@ public class InventoryListener implements Listener {
if (event.getSlot() > 2) {
return;
}
} else if (!(event.getInventory().getHolder() instanceof Barrel) && !(event.getInventory().getHolder() instanceof org.bukkit.block.Barrel)) {
} else if (!(event.getInventory().getHolder() instanceof Barrel) && !(P.use1_14 && event.getInventory().getHolder() instanceof org.bukkit.block.Barrel)) {
return;
}