mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-19 14:59:27 +00:00
Target new mappings, build on Protocol without adventure
This commit is contained in:
@@ -26,7 +26,7 @@ dependencies {
|
||||
}
|
||||
|
||||
repositories {
|
||||
// mavenLocal()
|
||||
mavenLocal()
|
||||
|
||||
mavenCentral()
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ import org.geysermc.geyser.level.block.type.Block;
|
||||
import org.geysermc.geyser.level.block.type.BlockState;
|
||||
import org.geysermc.geyser.level.block.type.FlowerPotBlock;
|
||||
import org.geysermc.geyser.registry.BlockRegistries;
|
||||
import org.geysermc.geyser.registry.populator.conversion.Conversion843_827;
|
||||
import org.geysermc.geyser.registry.type.BlockMappings;
|
||||
import org.geysermc.geyser.registry.type.GeyserBedrockBlock;
|
||||
|
||||
@@ -118,9 +119,9 @@ public final class BlockRegistryPopulator {
|
||||
|
||||
private static void registerBedrockBlocks() {
|
||||
var blockMappers = ImmutableMap.<ObjectIntPair<String>, Remapper>builder()
|
||||
.put(ObjectIntPair.of("1_21_90", Bedrock_v818.CODEC.getProtocolVersion()), tag -> tag)
|
||||
.put(ObjectIntPair.of("1_21_90", Bedrock_v819.CODEC.getProtocolVersion()), tag -> tag)
|
||||
.put(ObjectIntPair.of("1_21_100", Bedrock_v827.CODEC.getProtocolVersion()), tag -> tag)
|
||||
.put(ObjectIntPair.of("1_21_90", Bedrock_v818.CODEC.getProtocolVersion()), Conversion843_827::remapBlock)
|
||||
.put(ObjectIntPair.of("1_21_90", Bedrock_v819.CODEC.getProtocolVersion()), Conversion843_827::remapBlock)
|
||||
.put(ObjectIntPair.of("1_21_100", Bedrock_v827.CODEC.getProtocolVersion()), Conversion843_827::remapBlock)
|
||||
.put(ObjectIntPair.of("1_21_110", Bedrock_v843.CODEC.getProtocolVersion()), tag -> tag) // TODO conversion?
|
||||
.build();
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ import org.geysermc.geyser.item.type.Item;
|
||||
import org.geysermc.geyser.level.block.property.Properties;
|
||||
import org.geysermc.geyser.registry.BlockRegistries;
|
||||
import org.geysermc.geyser.registry.Registries;
|
||||
import org.geysermc.geyser.registry.populator.conversion.Conversion843_827;
|
||||
import org.geysermc.geyser.registry.type.BlockMappings;
|
||||
import org.geysermc.geyser.registry.type.GeyserBedrockBlock;
|
||||
import org.geysermc.geyser.registry.type.GeyserMappingItem;
|
||||
@@ -104,6 +105,10 @@ public class ItemRegistryPopulator {
|
||||
public PaletteVersion(String version, int protocolVersion, Map<Item, Item> javaOnlyItems) {
|
||||
this(version, protocolVersion, javaOnlyItems, (item, mapping) -> mapping);
|
||||
}
|
||||
|
||||
public PaletteVersion(String version, int protocolVersion, Remapper remapper) {
|
||||
this(version, protocolVersion, Collections.emptyMap(), remapper);
|
||||
}
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
@@ -114,10 +119,10 @@ public class ItemRegistryPopulator {
|
||||
|
||||
public static void populate() {
|
||||
List<PaletteVersion> paletteVersions = new ArrayList<>(6);
|
||||
paletteVersions.add(new PaletteVersion("1_21_90", Bedrock_v818.CODEC.getProtocolVersion(), Map.of(Items.MUSIC_DISC_LAVA_CHICKEN, Items.MUSIC_DISC_CHIRP)));
|
||||
paletteVersions.add(new PaletteVersion("1_21_93", Bedrock_v819.CODEC.getProtocolVersion()));
|
||||
paletteVersions.add(new PaletteVersion("1_21_100", Bedrock_v827.CODEC.getProtocolVersion()));
|
||||
paletteVersions.add(new PaletteVersion("1_21_110", Bedrock_v827.CODEC.getProtocolVersion())); // TODO fallbacks
|
||||
paletteVersions.add(new PaletteVersion("1_21_90", Bedrock_v818.CODEC.getProtocolVersion(), Map.of(Items.MUSIC_DISC_LAVA_CHICKEN, Items.MUSIC_DISC_CHIRP), Conversion843_827::remapItem));
|
||||
paletteVersions.add(new PaletteVersion("1_21_93", Bedrock_v819.CODEC.getProtocolVersion(), Conversion843_827::remapItem));
|
||||
paletteVersions.add(new PaletteVersion("1_21_100", Bedrock_v827.CODEC.getProtocolVersion(), Conversion843_827::remapItem));
|
||||
paletteVersions.add(new PaletteVersion("1_21_110", Bedrock_v827.CODEC.getProtocolVersion()));
|
||||
|
||||
GeyserBootstrap bootstrap = GeyserImpl.getInstance().getBootstrap();
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2025 GeyserMC. http://geysermc.org
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* @author GeyserMC
|
||||
* @link https://github.com/GeyserMC/Geyser
|
||||
*/
|
||||
|
||||
package org.geysermc.geyser.registry.populator.conversion;
|
||||
|
||||
import org.cloudburstmc.nbt.NbtMap;
|
||||
import org.cloudburstmc.nbt.NbtMapBuilder;
|
||||
import org.geysermc.geyser.item.Items;
|
||||
import org.geysermc.geyser.item.type.Item;
|
||||
import org.geysermc.geyser.registry.type.GeyserMappingItem;
|
||||
|
||||
public class Conversion843_827 {
|
||||
|
||||
public static NbtMap remapBlock(NbtMap nbtMap) {
|
||||
final String name = nbtMap.getString("name");
|
||||
if (name.equals("minecraft:iron_chain")) {
|
||||
return ConversionHelper.withName(nbtMap, "chain");
|
||||
} else if (name.equals("minecraft:lightning_rod")) {
|
||||
NbtMapBuilder statesWithoutPoweredBit = nbtMap.getCompound("states").toBuilder();
|
||||
statesWithoutPoweredBit.remove("powered_bit");
|
||||
return nbtMap.toBuilder()
|
||||
.putCompound("states", statesWithoutPoweredBit.build())
|
||||
.build();
|
||||
}
|
||||
|
||||
return nbtMap;
|
||||
}
|
||||
|
||||
public static GeyserMappingItem remapItem(Item item, GeyserMappingItem mapping) {
|
||||
if (item == Items.CHAIN) {
|
||||
return mapping.withBedrockIdentifier("minecraft:chain");
|
||||
}
|
||||
return mapping;
|
||||
}
|
||||
}
|
||||
Submodule core/src/main/resources/mappings updated: 01a320f40a...7a2c6ec2a4
@@ -9,9 +9,9 @@ netty = "4.2.3.Final"
|
||||
guava = "29.0-jre"
|
||||
gson = "2.3.1" # Provided by Spigot 1.8.8
|
||||
websocket = "1.5.1"
|
||||
protocol-connection = "3.0.0.Beta8-20250920.213606-5"
|
||||
protocol-common = "3.0.0.Beta8-20250920.213606-5"
|
||||
protocol-codec = "3.0.0.Beta8-20250920.213606-5"
|
||||
protocol-connection = "3.0.0.Beta8-NO-ADVENTURE-SNAPSHOT"
|
||||
protocol-common = "3.0.0.Beta8-NO-ADVENTURE-SNAPSHOT"
|
||||
protocol-codec = "3.0.0.Beta8-NO-ADVENTURE-SNAPSHOT"
|
||||
raknet = "1.0.0.CR3-20250811.214335-20"
|
||||
minecraftauth = "4.1.1"
|
||||
mcprotocollib = "1.21.7-20250915.111046-6"
|
||||
|
||||
Reference in New Issue
Block a user