mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-01-03 14:27:51 +01:00
20w30a
This commit is contained in:
parent
2c9ce50312
commit
48f8412440
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>3.1.0-20w29a</version>
|
<version>3.1.0-20w30a</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>3.1.0-20w29a</version>
|
<version>3.1.0-20w30a</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>3.1.0-20w29a</version>
|
<version>3.1.0-20w30a</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>3.1.0-20w29a</version>
|
<version>3.1.0-20w30a</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -107,8 +107,11 @@ public class Entity1_16_2Types {
|
|||||||
WITCH(96, ABSTRACT_MONSTER),
|
WITCH(96, ABSTRACT_MONSTER),
|
||||||
WITHER(97, ABSTRACT_MONSTER),
|
WITHER(97, ABSTRACT_MONSTER),
|
||||||
RAVAGER(67, ABSTRACT_MONSTER),
|
RAVAGER(67, ABSTRACT_MONSTER),
|
||||||
PIGLIN(60, ABSTRACT_MONSTER),
|
|
||||||
PIGLIN_BRUTE(61, ABSTRACT_MONSTER),
|
ABSTRACT_PIGLIN(-1, ABSTRACT_MONSTER),
|
||||||
|
|
||||||
|
PIGLIN(60, ABSTRACT_PIGLIN),
|
||||||
|
PIGLIN_BRUTE(61, ABSTRACT_PIGLIN),
|
||||||
|
|
||||||
HOGLIN(32, ABSTRACT_ANIMAL),
|
HOGLIN(32, ABSTRACT_ANIMAL),
|
||||||
STRIDER(83, ABSTRACT_ANIMAL),
|
STRIDER(83, ABSTRACT_ANIMAL),
|
||||||
|
@ -84,7 +84,7 @@ public class ProtocolVersion {
|
|||||||
register(v1_15_2 = new ProtocolVersion(578, "1.15.2"));
|
register(v1_15_2 = new ProtocolVersion(578, "1.15.2"));
|
||||||
register(v1_16 = new ProtocolVersion(735, "1.16"));
|
register(v1_16 = new ProtocolVersion(735, "1.16"));
|
||||||
register(v1_16_1 = new ProtocolVersion(736, "1.16.1"));
|
register(v1_16_1 = new ProtocolVersion(736, "1.16.1"));
|
||||||
register(v1_16_2 = new ProtocolVersion(741, "1.16.2"));
|
register(v1_16_2 = new ProtocolVersion(743, "1.16.2"));
|
||||||
|
|
||||||
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
|
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
|
||||||
}
|
}
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
package us.myles.ViaVersion.protocols.protocol1_16_2to1_16_1.data;
|
|
||||||
|
|
||||||
import it.unimi.dsi.fastutil.ints.Int2IntMap;
|
|
||||||
import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap;
|
|
||||||
|
|
||||||
public class BiomeMappings {
|
|
||||||
|
|
||||||
private static final Int2IntMap BIOMES = new Int2IntOpenHashMap();
|
|
||||||
|
|
||||||
static {
|
|
||||||
BIOMES.put(127, 51);
|
|
||||||
BIOMES.put(129, 52);
|
|
||||||
BIOMES.put(130, 53);
|
|
||||||
BIOMES.put(131, 54);
|
|
||||||
BIOMES.put(132, 55);
|
|
||||||
BIOMES.put(133, 56);
|
|
||||||
BIOMES.put(134, 57);
|
|
||||||
BIOMES.put(140, 58);
|
|
||||||
BIOMES.put(149, 59);
|
|
||||||
BIOMES.put(151, 60);
|
|
||||||
BIOMES.put(155, 61);
|
|
||||||
BIOMES.put(156, 62);
|
|
||||||
BIOMES.put(157, 63);
|
|
||||||
BIOMES.put(158, 64);
|
|
||||||
BIOMES.put(160, 65);
|
|
||||||
BIOMES.put(161, 66);
|
|
||||||
BIOMES.put(162, 67);
|
|
||||||
BIOMES.put(163, 68);
|
|
||||||
BIOMES.put(164, 69);
|
|
||||||
BIOMES.put(165, 70);
|
|
||||||
BIOMES.put(166, 71);
|
|
||||||
BIOMES.put(167, 72);
|
|
||||||
BIOMES.put(168, 73);
|
|
||||||
BIOMES.put(169, 74);
|
|
||||||
BIOMES.put(170, 75);
|
|
||||||
BIOMES.put(171, 76);
|
|
||||||
BIOMES.put(172, 77);
|
|
||||||
BIOMES.put(173, 78);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Int2IntMap getBiomes() {
|
|
||||||
return BIOMES;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getNewBiomeId(int biomeId) {
|
|
||||||
return BIOMES.getOrDefault(biomeId, biomeId);
|
|
||||||
}
|
|
||||||
}
|
|
@ -19,6 +19,7 @@ public class MappingData {
|
|||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
Via.getPlatform().getLogger().info("Loading 1.16.1 -> 1.16.2 mappings...");
|
Via.getPlatform().getLogger().info("Loading 1.16.1 -> 1.16.2 mappings...");
|
||||||
|
JsonObject diffmapping = MappingDataLoader.loadData("mappingdiff-1.16.1to1.16.2.json");
|
||||||
JsonObject mapping1_16 = MappingDataLoader.loadData("mapping-1.16.json", true);
|
JsonObject mapping1_16 = MappingDataLoader.loadData("mapping-1.16.json", true);
|
||||||
JsonObject mapping1_16_2 = MappingDataLoader.loadData("mapping-1.16.2.json", true);
|
JsonObject mapping1_16_2 = MappingDataLoader.loadData("mapping-1.16.2.json", true);
|
||||||
|
|
||||||
@ -30,7 +31,7 @@ public class MappingData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
oldToNewItems.defaultReturnValue(-1);
|
oldToNewItems.defaultReturnValue(-1);
|
||||||
blockStateMappings = new Mappings(mapping1_16.getAsJsonObject("blockstates"), mapping1_16_2.getAsJsonObject("blockstates"));
|
blockStateMappings = new Mappings(mapping1_16.getAsJsonObject("blockstates"), mapping1_16_2.getAsJsonObject("blockstates"), diffmapping.getAsJsonObject("blockstates"));
|
||||||
blockMappings = new Mappings(mapping1_16.getAsJsonObject("blocks"), mapping1_16_2.getAsJsonObject("blocks"));
|
blockMappings = new Mappings(mapping1_16.getAsJsonObject("blocks"), mapping1_16_2.getAsJsonObject("blocks"));
|
||||||
MappingDataLoader.mapIdentifiers(oldToNewItems, mapping1_16.getAsJsonObject("items"), mapping1_16_2.getAsJsonObject("items"));
|
MappingDataLoader.mapIdentifiers(oldToNewItems, mapping1_16.getAsJsonObject("items"), mapping1_16_2.getAsJsonObject("items"));
|
||||||
soundMappings = new Mappings(mapping1_16.getAsJsonArray("sounds"), mapping1_16_2.getAsJsonArray("sounds"));
|
soundMappings = new Mappings(mapping1_16.getAsJsonArray("sounds"), mapping1_16_2.getAsJsonArray("sounds"));
|
||||||
|
@ -29,6 +29,16 @@ public class MetadataRewriter1_16_2To1_16_1 extends MetadataRewriter {
|
|||||||
int data = (int) metadata.getValue();
|
int data = (int) metadata.getValue();
|
||||||
metadata.setValue(Protocol1_16_2To1_16_1.getNewBlockStateId(data));
|
metadata.setValue(Protocol1_16_2To1_16_1.getNewBlockStateId(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type == null) return;
|
||||||
|
|
||||||
|
if (type.isOrHasParent(Entity1_16_2Types.EntityType.ABSTRACT_PIGLIN)) {
|
||||||
|
if (metadata.getId() == 15) {
|
||||||
|
metadata.setId(16);
|
||||||
|
} else if (metadata.getId() == 16) {
|
||||||
|
metadata.setId(15);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -11,7 +11,6 @@ import us.myles.ViaVersion.api.rewriters.BlockRewriter;
|
|||||||
import us.myles.ViaVersion.api.type.Type;
|
import us.myles.ViaVersion.api.type.Type;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_16_2to1_16_1.ClientboundPackets1_16_2;
|
import us.myles.ViaVersion.protocols.protocol1_16_2to1_16_1.ClientboundPackets1_16_2;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_16_2to1_16_1.Protocol1_16_2To1_16_1;
|
import us.myles.ViaVersion.protocols.protocol1_16_2to1_16_1.Protocol1_16_2To1_16_1;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_16_2to1_16_1.data.BiomeMappings;
|
|
||||||
import us.myles.ViaVersion.protocols.protocol1_16_2to1_16_1.types.Chunk1_16_2Type;
|
import us.myles.ViaVersion.protocols.protocol1_16_2to1_16_1.types.Chunk1_16_2Type;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_16to1_15_2.ClientboundPackets1_16;
|
import us.myles.ViaVersion.protocols.protocol1_16to1_15_2.ClientboundPackets1_16;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_16to1_15_2.types.Chunk1_16Type;
|
import us.myles.ViaVersion.protocols.protocol1_16to1_15_2.types.Chunk1_16Type;
|
||||||
@ -39,14 +38,6 @@ public class WorldPackets {
|
|||||||
Chunk chunk = wrapper.read(new Chunk1_16Type(clientWorld));
|
Chunk chunk = wrapper.read(new Chunk1_16Type(clientWorld));
|
||||||
wrapper.write(new Chunk1_16_2Type(clientWorld), chunk);
|
wrapper.write(new Chunk1_16_2Type(clientWorld), chunk);
|
||||||
|
|
||||||
if (chunk.isBiomeData()) {
|
|
||||||
int[] biomes = chunk.getBiomeData();
|
|
||||||
for (int i = 0; i < biomes.length; i++) {
|
|
||||||
int biome = biomes[i];
|
|
||||||
biomes[i] = BiomeMappings.getNewBiomeId(biome);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int s = 0; s < 16; s++) {
|
for (int s = 0; s < 16; s++) {
|
||||||
ChunkSection section = chunk.getSections()[s];
|
ChunkSection section = chunk.getSections()[s];
|
||||||
if (section == null) continue;
|
if (section == null) continue;
|
||||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"blockstates": {
|
||||||
|
"14886": "minecraft:lantern[hanging=true,waterlogged=false]",
|
||||||
|
"14887": "minecraft:lantern[hanging=false,waterlogged=false]",
|
||||||
|
"14888": "minecraft:soul_lantern[hanging=true,waterlogged=false]",
|
||||||
|
"14889": "minecraft:soul_lantern[hanging=false,waterlogged=false]"
|
||||||
|
}
|
||||||
|
}
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>3.1.0-20w29a</version>
|
<version>3.1.0-20w30a</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>3.1.0-20w29a</version>
|
<version>3.1.0-20w30a</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<name>viaversion-jar</name>
|
<name>viaversion-jar</name>
|
||||||
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<version>3.1.0-20w29a</version>
|
<version>3.1.0-20w30a</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>viaversion-parent</name>
|
<name>viaversion-parent</name>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>3.1.0-20w29a</version>
|
<version>3.1.0-20w30a</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>3.1.0-20w29a</version>
|
<version>3.1.0-20w30a</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>3.1.0-20w29a</version>
|
<version>3.1.0-20w30a</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user