3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-27 00:22:53 +01:00

Handle observer facing position

Dieser Commit ist enthalten in:
Matsv 2017-06-13 21:06:07 +02:00
Ursprung 469936308c
Commit b6bf2cd950
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 97CEC2A2EA31350F
2 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -43,7 +43,7 @@ public interface ViaBackwardsPlatform {
*/ */
Logger getLogger(); Logger getLogger();
// TODO remove or better implement on full release // TODO remove or better implement later
default boolean isOutdated() { default boolean isOutdated() {
Class<?> clazz = null; Class<?> clazz = null;
try { try {

Datei anzeigen

@ -401,8 +401,8 @@ public class BlockItemPackets1_11 extends BlockItemRewriter<Protocol1_10To1_11>
return tag; return tag;
}); });
// Observer to Dispenser TODO facing position? // Observer to Dispenser
rewrite(218).repItem(new Item((short) 23, (byte) 1, (short) 0, getNamedTag("1.11 Observer"))).repBlock(new Block(23, 0)); rewrite(218).repItem(new Item((short) 23, (byte) 1, (short) 0, getNamedTag("1.11 Observer"))).repBlock(new Block(23, -1));
// Handle spawner block entity // Handle spawner block entity
rewrite(52).blockEntityHandler((b, tag) -> { rewrite(52).blockEntityHandler((b, tag) -> {
@ -445,7 +445,7 @@ public class BlockItemPackets1_11 extends BlockItemRewriter<Protocol1_10To1_11>
} }
// TODO improve the llama inventory part // TODO improve the llama inventory part
public int getNewSlotId(ChestedHorseStorage storage, int slotId) { private int getNewSlotId(ChestedHorseStorage storage, int slotId) {
int totalSlots = !storage.isChested() ? 38 : 53; int totalSlots = !storage.isChested() ? 38 : 53;
int strength = storage.isChested() ? storage.getLiamaStrength() : 0; int strength = storage.isChested() ? storage.getLiamaStrength() : 0;
int startNonExistingFormula = 2 + 3 * strength; int startNonExistingFormula = 2 + 3 * strength;
@ -458,7 +458,7 @@ public class BlockItemPackets1_11 extends BlockItemRewriter<Protocol1_10To1_11>
return slotId; return slotId;
} }
public int getOldSlotId(ChestedHorseStorage storage, int slotId) { private int getOldSlotId(ChestedHorseStorage storage, int slotId) {
int strength = storage.isChested() ? storage.getLiamaStrength() : 0; int strength = storage.isChested() ? storage.getLiamaStrength() : 0;
int startNonExistingFormula = 2 + 3 * strength; int startNonExistingFormula = 2 + 3 * strength;
int endNonExistingFormula = 2 + 3 * (storage.isChested() ? 5 : 0); int endNonExistingFormula = 2 + 3 * (storage.isChested() ? 5 : 0);
@ -473,7 +473,7 @@ public class BlockItemPackets1_11 extends BlockItemRewriter<Protocol1_10To1_11>
return slotId; return slotId;
} }
public Item getNewItem(ChestedHorseStorage storage, int slotId, Item current) { private Item getNewItem(ChestedHorseStorage storage, int slotId, Item current) {
int strength = storage.isChested() ? storage.getLiamaStrength() : 0; int strength = storage.isChested() ? storage.getLiamaStrength() : 0;
int startNonExistingFormula = 2 + 3 * strength; int startNonExistingFormula = 2 + 3 * strength;
int endNonExistingFormula = 2 + 3 * (storage.isChested() ? 5 : 0); int endNonExistingFormula = 2 + 3 * (storage.isChested() ? 5 : 0);