3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-11-20 06:50:10 +01:00

Cancel Shulker Decleration @ Update Block Entity & rewrite some sounds

Dieser Commit ist enthalten in:
Matsv 2017-06-01 15:03:27 +02:00
Ursprung 5ef109c037
Commit f33c694dd3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 97CEC2A2EA31350F
2 geänderte Dateien mit 24 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -237,6 +237,26 @@ public class BlockItemPackets extends BlockItemRewriter<Protocol1_10To1_11> {
}
);
// Update Block Entity
protocol.registerOutgoing(State.PLAY, 0x09, 0x09, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.POSITION); // 0 - Position
map(Type.UNSIGNED_BYTE); // 1 - Action
map(Type.NBT); // 2 - NBT
handler(new PacketHandler() {
@Override
public void handle(PacketWrapper wrapper) throws Exception {
// Remove on shulkerbox decleration TODO convert to normal chest to make it work correctly?
if (wrapper.get(Type.UNSIGNED_BYTE, 0) == 10) {
wrapper.cancel();
}
}
});
}
});
protocol.getEntityPackets().registerMetaHandler().handle(e -> {
Metadata data = e.getData();
@ -253,7 +273,7 @@ public class BlockItemPackets extends BlockItemRewriter<Protocol1_10To1_11> {
for (int i = 219; i < 235; i++)
rewriteBlockItem(i,
new Item((short) 54, (byte) 1, (short) 0, getNamedTag("1.11 Shulker Box (Color #" + (i - 219) + ")")),
new Block(i, 1));
new Block(54, 1));
// Observer to Dispenser TODO facing position?
rewriteBlockItem(218, new Item((short) 23, (byte) 1, (short) 0, getNamedTag("1.11 Observer")), new Block(23, 0));

Datei anzeigen

@ -69,10 +69,10 @@ public class SoundPackets extends SoundRewriter<Protocol1_10To1_11> {
protected void registerRewrites() {
// TODO find good replacement sounds
// Automatically generated from PAaaS
added(85, -1); // block.shulker_box.close
added(86, -1); // block.shulker_box.open
added(85, 121, 0.5f); // block.shulker_box.close -> block.wooden_trapdoor.close
added(86, 122, 0.5f); // block.shulker_box.open -> block.wooden_trapdoor.open
added(176, -1); // entity.elder_guardian.flop
added(176, 227); // entity.elder_guardian.flop -> entity.guardian.flop
removed(196); // entity.experience_orb.touch