3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

update handlers

Dieser Commit ist enthalten in:
creeper123123321 2018-05-31 17:20:41 -03:00
Ursprung 067da7e1d9
Commit 2ea42eab62
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0AC57D54786721D1
5 geänderte Dateien mit 35 neuen und 35 gelöschten Zeilen

Datei anzeigen

@ -8,11 +8,11 @@ import us.myles.ViaVersion.protocols.protocolsnapshotto1_12_2.providers.BlockEnt
import us.myles.ViaVersion.protocols.protocolsnapshotto1_12_2.storage.BlockStorage;
public class BannerHandler implements BlockEntityProvider.BlockEntityHandler {
private final int WALL_BANNER_START = 7020; // 4 each
private final int WALL_BANNER_STOP = 7083;
private final int WALL_BANNER_START = 7092; // 4 each
private final int WALL_BANNER_STOP = 7155;
private final int BANNER_START = 6764; // 16 each
private final int BANNER_STOP = 7019;
private final int BANNER_START = 6836; // 16 each
private final int BANNER_STOP = 7091;
@Override
public int transform(UserConnection user, CompoundTag tag) {

Datei anzeigen

@ -20,7 +20,7 @@ public class BedHandler implements BlockEntityProvider.BlockEntityHandler {
}
// RED_BED + FIRST_BED
int blockId = storage.get(position).getOriginal() - 882 + 658;
int blockId = storage.get(position).getOriginal() - 954 + 730;
int color = (int) tag.get("color").getValue();
blockId += (color * 16);

Datei anzeigen

@ -12,28 +12,28 @@ public class FlowerPotHandler implements BlockEntityProvider.BlockEntityHandler
private static final Map<Pair<String, Integer>, Integer> flowers = new ConcurrentHashMap<>();
static {
register("minecraft:air", 0, 5175);
register("minecraft:sapling", 0, 5176);
register("minecraft:sapling", 1, 5177);
register("minecraft:sapling", 2, 5178);
register("minecraft:sapling", 3, 5179);
register("minecraft:sapling", 4, 5180);
register("minecraft:sapling", 5, 5181);
register("minecraft:tallgrass", 2, 5182);
register("minecraft:yellow_flower", 0, 5183);
register("minecraft:red_flower", 0, 5184);
register("minecraft:red_flower", 1, 5185);
register("minecraft:red_flower", 2, 5186);
register("minecraft:red_flower", 3, 5187);
register("minecraft:red_flower", 4, 5188);
register("minecraft:red_flower", 5, 5189);
register("minecraft:red_flower", 6, 5190);
register("minecraft:red_flower", 7, 5191);
register("minecraft:red_flower", 8, 5192);
register("minecraft:red_mushroom", 0, 5193);
register("minecraft:brown_mushroom", 0, 5194);
register("minecraft:deadbush", 0, 5195);
register("minecraft:cactus", 0, 5196);
register("minecraft:air", 0, 5247);
register("minecraft:sapling", 0, 5248);
register("minecraft:sapling", 1, 5249);
register("minecraft:sapling", 2, 5250);
register("minecraft:sapling", 3, 5251);
register("minecraft:sapling", 4, 5252);
register("minecraft:sapling", 5, 5253);
register("minecraft:tallgrass", 2, 5254);
register("minecraft:yellow_flower", 0, 5255);
register("minecraft:red_flower", 0, 5256);
register("minecraft:red_flower", 1, 5257);
register("minecraft:red_flower", 2, 5258);
register("minecraft:red_flower", 3, 5259);
register("minecraft:red_flower", 4, 5260);
register("minecraft:red_flower", 5, 5261);
register("minecraft:red_flower", 6, 5262);
register("minecraft:red_flower", 7, 5263);
register("minecraft:red_flower", 8, 5264);
register("minecraft:red_mushroom", 0, 5265);
register("minecraft:brown_mushroom", 0, 5266);
register("minecraft:deadbush", 0, 5267);
register("minecraft:cactus", 0, 5268);
}

Datei anzeigen

@ -8,8 +8,8 @@ import us.myles.ViaVersion.protocols.protocolsnapshotto1_12_2.providers.BlockEnt
import us.myles.ViaVersion.protocols.protocolsnapshotto1_12_2.storage.BlockStorage;
public class SkullHandler implements BlockEntityProvider.BlockEntityHandler {
private final int SKULL_WALL_START = 5357;
private final int SKULL_END = 5476;
private final int SKULL_WALL_START = 5429;
private final int SKULL_END = 5548;
@Override
public int transform(UserConnection user, CompoundTag tag) {
BlockStorage storage = user.get(BlockStorage.class);

Datei anzeigen

@ -17,24 +17,24 @@ public class BlockStorage extends StoredObject {
static {
// Flower pots
whitelist.add(5175);
whitelist.add(5247);
// Add those red beds
for (int i = 0; i < 16; i++)
whitelist.add(882 + i);
whitelist.add(954 + i);
// Add the white banners
for (int i = 0; i < 20; i++)
whitelist.add(6764 + i);
whitelist.add(6836 + i);
// Add the white wall banners
for (int i = 0; i < 4; i++) {
whitelist.add(7020 + i);
whitelist.add(7092 + i);
}
// Skeleton skulls
for (int i = 0; i < 5; i++)
whitelist.add(5357 + i);
whitelist.add(5429 + i);
}
private Map<Position, ReplacementData> blocks = new ConcurrentHashMap<>();