mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-14 10:55:20 +01:00
Rename Protocol1_9To1_10 to ...1_9_4...
This commit is contained in:
parent
aada25b865
commit
5f316f242e
@ -10,7 +10,7 @@
|
||||
|
||||
package nl.matsv.viabackwards;
|
||||
|
||||
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.Protocol1_9To1_10;
|
||||
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.Protocol1_9_4To1_10;
|
||||
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
|
||||
import us.myles.ViaVersion.api.protocol.ProtocolVersion;
|
||||
|
||||
@ -23,7 +23,7 @@ public interface ViaBackwardsPlatform {
|
||||
*/
|
||||
default void init() {
|
||||
ViaBackwards.init(this);
|
||||
ProtocolRegistry.registerProtocol(new Protocol1_9To1_10(), Collections.singletonList(ProtocolVersion.v1_9_3.getId()), ProtocolVersion.v1_10.getId());
|
||||
ProtocolRegistry.registerProtocol(new Protocol1_9_4To1_10(), Collections.singletonList(ProtocolVersion.v1_9_3.getId()), ProtocolVersion.v1_10.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -21,7 +21,7 @@ import us.myles.ViaVersion.api.data.UserConnection;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
||||
|
||||
@Getter
|
||||
public class Protocol1_9To1_10 extends BackwardsProtocol {
|
||||
public class Protocol1_9_4To1_10 extends BackwardsProtocol {
|
||||
private EntityPackets entityPackets; // Required for the item rewriter
|
||||
|
||||
protected void registerPackets() {
|
@ -116,7 +116,7 @@ public class ChunkSection1_10 implements ChunkSection {
|
||||
* </ul>
|
||||
*
|
||||
* @param input The buffer to read from.
|
||||
* @throws Exception
|
||||
* @throws Exception If it fails to read
|
||||
*/
|
||||
public void readBlocks(ByteBuf input) throws Exception {
|
||||
palette.clear();
|
||||
|
@ -11,7 +11,7 @@
|
||||
package nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets;
|
||||
|
||||
import nl.matsv.viabackwards.api.rewriters.BlockItemRewriter;
|
||||
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.Protocol1_9To1_10;
|
||||
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.Protocol1_9_4To1_10;
|
||||
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.chunks.Chunk1_10;
|
||||
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.chunks.Chunk1_10Type;
|
||||
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.chunks.ChunkSection1_10;
|
||||
@ -26,9 +26,9 @@ import us.myles.ViaVersion.packets.State;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
||||
|
||||
// TODO REWRITE PLUGINS MESSAGE ITEMS
|
||||
public class BlockItemPackets extends BlockItemRewriter<Protocol1_9To1_10> {
|
||||
public class BlockItemPackets extends BlockItemRewriter<Protocol1_9_4To1_10> {
|
||||
|
||||
protected void registerPackets(Protocol1_9To1_10 protocol) {
|
||||
protected void registerPackets(Protocol1_9_4To1_10 protocol) {
|
||||
/* Item packets */
|
||||
|
||||
// Set slot packet
|
||||
|
@ -13,7 +13,7 @@ package nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets;
|
||||
import nl.matsv.viabackwards.api.exceptions.RemovedValueException;
|
||||
import nl.matsv.viabackwards.api.rewriters.EntityRewriter;
|
||||
import nl.matsv.viabackwards.api.storage.EntityTracker;
|
||||
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.Protocol1_9To1_10;
|
||||
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.Protocol1_9_4To1_10;
|
||||
import us.myles.ViaVersion.api.PacketWrapper;
|
||||
import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_9;
|
||||
import us.myles.ViaVersion.api.remapper.PacketHandler;
|
||||
@ -23,10 +23,10 @@ import us.myles.ViaVersion.api.type.types.version.Types1_9;
|
||||
import us.myles.ViaVersion.packets.State;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
||||
|
||||
public class EntityPackets extends EntityRewriter<Protocol1_9To1_10> {
|
||||
public class EntityPackets extends EntityRewriter<Protocol1_9_4To1_10> {
|
||||
|
||||
@Override
|
||||
protected void registerPackets(Protocol1_9To1_10 protocol) {
|
||||
protected void registerPackets(Protocol1_9_4To1_10 protocol) {
|
||||
|
||||
// Spawn Object
|
||||
protocol.registerOutgoing(State.PLAY, 0x00, 0x00, new PacketRemapper() {
|
||||
|
@ -11,7 +11,7 @@
|
||||
package nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets;
|
||||
|
||||
import nl.matsv.viabackwards.api.rewriters.SoundIdRewriter;
|
||||
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.Protocol1_9To1_10;
|
||||
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.Protocol1_9_4To1_10;
|
||||
import us.myles.ViaVersion.api.PacketWrapper;
|
||||
import us.myles.ViaVersion.api.remapper.PacketHandler;
|
||||
import us.myles.ViaVersion.api.remapper.PacketRemapper;
|
||||
@ -19,7 +19,7 @@ import us.myles.ViaVersion.api.remapper.ValueTransformer;
|
||||
import us.myles.ViaVersion.api.type.Type;
|
||||
import us.myles.ViaVersion.packets.State;
|
||||
|
||||
public class SoundPackets extends SoundIdRewriter<Protocol1_9To1_10> {
|
||||
public class SoundPackets extends SoundIdRewriter<Protocol1_9_4To1_10> {
|
||||
protected static ValueTransformer<Float, Short> toOldPitch = new ValueTransformer<Float, Short>(Type.UNSIGNED_BYTE) {
|
||||
public Short transform(PacketWrapper packetWrapper, Float inputValue) throws Exception {
|
||||
return (short) Math.round(inputValue * 63.5F);
|
||||
@ -27,7 +27,7 @@ public class SoundPackets extends SoundIdRewriter<Protocol1_9To1_10> {
|
||||
};
|
||||
|
||||
@Override
|
||||
protected void registerPackets(Protocol1_9To1_10 protocol) {
|
||||
protected void registerPackets(Protocol1_9_4To1_10 protocol) {
|
||||
// Named sound effect
|
||||
protocol.registerOutgoing(State.PLAY, 0x19, 0x19, new PacketRemapper() {
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user