mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
1.18 Bedrock properly works now
This commit is contained in:
parent
5acd9cd2c5
commit
98816f1eaa
5 changed files with 9533 additions and 1 deletions
|
@ -30,6 +30,7 @@ import com.google.common.collect.ImmutableMap;
|
|||
import com.nukkitx.nbt.*;
|
||||
import com.nukkitx.protocol.bedrock.v465.Bedrock_v465;
|
||||
import com.nukkitx.protocol.bedrock.v471.Bedrock_v471;
|
||||
import com.nukkitx.protocol.bedrock.v475.Bedrock_v475;
|
||||
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
||||
import it.unimi.dsi.fastutil.ints.IntSet;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
||||
|
@ -64,7 +65,8 @@ public class BlockRegistryPopulator {
|
|||
static {
|
||||
ImmutableMap.Builder<ObjectIntPair<String>, BiFunction<String, NbtMapBuilder, String>> stateMapperBuilder = ImmutableMap.<ObjectIntPair<String>, BiFunction<String, NbtMapBuilder, String>>builder()
|
||||
.put(ObjectIntPair.of("1_17_30", Bedrock_v465.V465_CODEC.getProtocolVersion()), EMPTY_MAPPER)
|
||||
.put(ObjectIntPair.of("1_17_40", Bedrock_v471.V471_CODEC.getProtocolVersion()), EMPTY_MAPPER);
|
||||
.put(ObjectIntPair.of("1_17_40", Bedrock_v471.V471_CODEC.getProtocolVersion()), EMPTY_MAPPER)
|
||||
.put(ObjectIntPair.of("1_18_0", Bedrock_v475.V475_CODEC.getProtocolVersion()), EMPTY_MAPPER);
|
||||
|
||||
BLOCK_MAPPERS = stateMapperBuilder.build();
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ import com.nukkitx.protocol.bedrock.data.inventory.ItemData;
|
|||
import com.nukkitx.protocol.bedrock.packet.StartGamePacket;
|
||||
import com.nukkitx.protocol.bedrock.v465.Bedrock_v465;
|
||||
import com.nukkitx.protocol.bedrock.v471.Bedrock_v471;
|
||||
import com.nukkitx.protocol.bedrock.v475.Bedrock_v475;
|
||||
import it.unimi.dsi.fastutil.ints.*;
|
||||
import it.unimi.dsi.fastutil.objects.*;
|
||||
import org.geysermc.geyser.GeyserImpl;
|
||||
|
@ -61,6 +62,7 @@ public class ItemRegistryPopulator {
|
|||
PALETTE_VERSIONS = new Object2ObjectOpenHashMap<>();
|
||||
PALETTE_VERSIONS.put("1_17_30", new PaletteVersion(Bedrock_v465.V465_CODEC.getProtocolVersion(), Collections.emptyMap()));
|
||||
PALETTE_VERSIONS.put("1_17_40", new PaletteVersion(Bedrock_v471.V471_CODEC.getProtocolVersion(), Collections.emptyMap()));
|
||||
PALETTE_VERSIONS.put("1_18_0", new PaletteVersion(Bedrock_v475.V475_CODEC.getProtocolVersion(), Collections.emptyMap()));
|
||||
}
|
||||
|
||||
private record PaletteVersion(int protocolVersion, Map<String, String> additionalTranslatedItems) {
|
||||
|
|
BIN
core/src/main/resources/bedrock/block_palette.1_18_0.nbt
Normal file
BIN
core/src/main/resources/bedrock/block_palette.1_18_0.nbt
Normal file
Binary file not shown.
5206
core/src/main/resources/bedrock/creative_items.1_18_0.json
Normal file
5206
core/src/main/resources/bedrock/creative_items.1_18_0.json
Normal file
File diff suppressed because it is too large
Load diff
4322
core/src/main/resources/bedrock/runtime_item_states.1_18_0.json
Normal file
4322
core/src/main/resources/bedrock/runtime_item_states.1_18_0.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue