3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 16:12:42 +01:00

Fixed uncraftable potion conversions from 1.8 to 1.9

Dieser Commit ist enthalten in:
joserobjr 2016-06-08 10:31:03 -03:00
Ursprung e3510d01d6
Commit a79533bf72

Datei anzeigen

@ -248,13 +248,14 @@ public class ItemRewriter {
if(cached != null) { if(cached != null) {
return cached; return cached;
} }
if(damage == 0) {
return "water";
}
int effect = damage & 0xF; int effect = damage & 0xF;
int name = damage & 0x3F; int name = damage & 0x3F;
boolean enhanced = (damage & 0x20) > 0; boolean enhanced = (damage & 0x20) > 0;
boolean extended = (damage & 0x40) > 0; boolean extended = (damage & 0x40) > 0;
boolean drinkable = (damage & 0x2000) > 0;
//boolean splash = (damage & 0x4000) > 0;
boolean canEnhance = true; boolean canEnhance = true;
boolean canExtend = true; boolean canExtend = true;
@ -278,16 +279,12 @@ public class ItemRewriter {
default: default:
canEnhance = false; canExtend = false;
switch (name) { switch (name) {
case 0: id="mundane"; break;
case 16: id="awkward"; break; case 16: id="awkward"; break;
case 32: id="thick"; break; case 32: id="thick"; break;
default: default: id="empty";
if(drinkable) {
id = "mundane";
}
else {
id = "water";
}
} }
} }
@ -298,9 +295,6 @@ public class ItemRewriter {
else if(canExtend && extended) { else if(canExtend && extended) {
id = "long_" + id; id = "long_" + id;
} }
//if(splash)
// potion.splash();
} }
return id; return id;