mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-01 13:43:30 +01:00
Don't load mappings in 1.19.4 protocol
This commit is contained in:
parent
1b4dbc1388
commit
a506b21f56
@ -17,24 +17,22 @@
|
|||||||
*/
|
*/
|
||||||
package com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4;
|
package com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4;
|
||||||
|
|
||||||
import com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4.data.EntityPackets1_19_4;
|
import com.viaversion.viabackwards.api.BackwardsProtocol;
|
||||||
|
import com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4.packets.EntityPackets1_19_4;
|
||||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||||
import com.viaversion.viaversion.api.data.MappingData;
|
|
||||||
import com.viaversion.viaversion.api.data.MappingDataBase;
|
|
||||||
import com.viaversion.viaversion.api.minecraft.entities.Entity1_19_3Types;
|
import com.viaversion.viaversion.api.minecraft.entities.Entity1_19_3Types;
|
||||||
import com.viaversion.viaversion.api.protocol.AbstractProtocol;
|
|
||||||
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||||
import com.viaversion.viaversion.api.type.Type;
|
import com.viaversion.viaversion.api.type.Type;
|
||||||
import com.viaversion.viaversion.data.entity.EntityTrackerBase;
|
import com.viaversion.viaversion.data.entity.EntityTrackerBase;
|
||||||
import com.viaversion.viaversion.protocols.protocol1_19_3to1_19_1.ClientboundPackets1_19_3;
|
import com.viaversion.viaversion.protocols.protocol1_19_3to1_19_1.ClientboundPackets1_19_3;
|
||||||
|
import com.viaversion.viaversion.protocols.protocol1_19_3to1_19_1.Protocol1_19_3To1_19_1;
|
||||||
import com.viaversion.viaversion.protocols.protocol1_19_3to1_19_1.ServerboundPackets1_19_3;
|
import com.viaversion.viaversion.protocols.protocol1_19_3to1_19_1.ServerboundPackets1_19_3;
|
||||||
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.ClientboundPackets1_19_4;
|
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.ClientboundPackets1_19_4;
|
||||||
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.ServerboundPackets1_19_4;
|
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.ServerboundPackets1_19_4;
|
||||||
import com.viaversion.viaversion.rewriter.CommandRewriter;
|
import com.viaversion.viaversion.rewriter.CommandRewriter;
|
||||||
|
|
||||||
public final class Protocol1_19_3To1_19_4 extends AbstractProtocol<ClientboundPackets1_19_4, ClientboundPackets1_19_3, ServerboundPackets1_19_4, ServerboundPackets1_19_3> {
|
public final class Protocol1_19_3To1_19_4 extends BackwardsProtocol<ClientboundPackets1_19_4, ClientboundPackets1_19_3, ServerboundPackets1_19_4, ServerboundPackets1_19_3> {
|
||||||
|
|
||||||
private static final MappingData MAPPINGS = new MappingDataBase("1.19.3", "1.19.3");
|
|
||||||
private final EntityPackets1_19_4 entityRewriter = new EntityPackets1_19_4(this);
|
private final EntityPackets1_19_4 entityRewriter = new EntityPackets1_19_4(this);
|
||||||
|
|
||||||
public Protocol1_19_3To1_19_4() {
|
public Protocol1_19_3To1_19_4() {
|
||||||
@ -44,6 +42,9 @@ public final class Protocol1_19_3To1_19_4 extends AbstractProtocol<ClientboundPa
|
|||||||
@Override
|
@Override
|
||||||
protected void registerPackets() {
|
protected void registerPackets() {
|
||||||
// TODO fallback field in components
|
// TODO fallback field in components
|
||||||
|
executeAsyncAfterLoaded(Protocol1_19_3To1_19_1.class, () -> {
|
||||||
|
});
|
||||||
|
|
||||||
entityRewriter.register();
|
entityRewriter.register();
|
||||||
|
|
||||||
final CommandRewriter commandRewriter = new CommandRewriter(this) {
|
final CommandRewriter commandRewriter = new CommandRewriter(this) {
|
||||||
@ -55,6 +56,16 @@ public final class Protocol1_19_3To1_19_4 extends AbstractProtocol<ClientboundPa
|
|||||||
super.handleArgument(wrapper, argumentType);
|
super.handleArgument(wrapper, argumentType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String argumentType(final int argumentTypeId) {
|
||||||
|
return Protocol1_19_3To1_19_1.MAPPINGS.getArgumentTypeMappings().mappedIdentifier(argumentTypeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int mappedArgumentTypeId(final String mappedArgumentType) {
|
||||||
|
return Protocol1_19_3To1_19_1.MAPPINGS.getArgumentTypeMappings().mappedId(mappedArgumentType);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
commandRewriter.registerDeclareCommands1_19(ClientboundPackets1_19_4.DECLARE_COMMANDS);
|
commandRewriter.registerDeclareCommands1_19(ClientboundPackets1_19_4.DECLARE_COMMANDS);
|
||||||
|
|
||||||
@ -65,9 +76,4 @@ public final class Protocol1_19_3To1_19_4 extends AbstractProtocol<ClientboundPa
|
|||||||
public void init(final UserConnection user) {
|
public void init(final UserConnection user) {
|
||||||
addEntityTracker(user, new EntityTrackerBase(user, Entity1_19_3Types.PLAYER));
|
addEntityTracker(user, new EntityTrackerBase(user, Entity1_19_3Types.PLAYER));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public MappingData getMappingData() {
|
|
||||||
return MAPPINGS;
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -15,7 +15,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4.data;
|
package com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4.packets;
|
||||||
|
|
||||||
import com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4.Protocol1_19_3To1_19_4;
|
import com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4.Protocol1_19_3To1_19_4;
|
||||||
import com.viaversion.viaversion.api.minecraft.entities.Entity1_19_3Types;
|
import com.viaversion.viaversion.api.minecraft.entities.Entity1_19_3Types;
|
@ -3,7 +3,7 @@ metadata.format.version = "1.1"
|
|||||||
[versions]
|
[versions]
|
||||||
|
|
||||||
# ViaVersion
|
# ViaVersion
|
||||||
viaver = "4.6.0-23w03a-SNAPSHOT"
|
viaver = "4.6.0-23w05a-SNAPSHOT"
|
||||||
|
|
||||||
# Common provided
|
# Common provided
|
||||||
netty = "4.0.20.Final"
|
netty = "4.0.20.Final"
|
||||||
|
Loading…
Reference in New Issue
Block a user