3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-27 00:22:53 +01:00

Rename Protocol1_9To1_10 to ...1_9_4...

Dieser Commit ist enthalten in:
Matsv 2016-10-15 17:12:01 +02:00
Ursprung aada25b865
Commit 5f316f242e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 97CEC2A2EA31350F
6 geänderte Dateien mit 13 neuen und 13 gelöschten Zeilen

Datei anzeigen

@ -10,7 +10,7 @@
package nl.matsv.viabackwards; 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.ProtocolRegistry;
import us.myles.ViaVersion.api.protocol.ProtocolVersion; import us.myles.ViaVersion.api.protocol.ProtocolVersion;
@ -23,7 +23,7 @@ public interface ViaBackwardsPlatform {
*/ */
default void init() { default void init() {
ViaBackwards.init(this); 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());
} }
/** /**

Datei anzeigen

@ -21,7 +21,7 @@ import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
@Getter @Getter
public class Protocol1_9To1_10 extends BackwardsProtocol { public class Protocol1_9_4To1_10 extends BackwardsProtocol {
private EntityPackets entityPackets; // Required for the item rewriter private EntityPackets entityPackets; // Required for the item rewriter
protected void registerPackets() { protected void registerPackets() {

Datei anzeigen

@ -116,7 +116,7 @@ public class ChunkSection1_10 implements ChunkSection {
* </ul> * </ul>
* *
* @param input The buffer to read from. * @param input The buffer to read from.
* @throws Exception * @throws Exception If it fails to read
*/ */
public void readBlocks(ByteBuf input) throws Exception { public void readBlocks(ByteBuf input) throws Exception {
palette.clear(); palette.clear();

Datei anzeigen

@ -11,7 +11,7 @@
package nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets; package nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets;
import nl.matsv.viabackwards.api.rewriters.BlockItemRewriter; 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_10;
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.chunks.Chunk1_10Type; import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.chunks.Chunk1_10Type;
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.chunks.ChunkSection1_10; 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; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
// TODO REWRITE PLUGINS MESSAGE ITEMS // 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 */ /* Item packets */
// Set slot packet // Set slot packet

Datei anzeigen

@ -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.exceptions.RemovedValueException;
import nl.matsv.viabackwards.api.rewriters.EntityRewriter; import nl.matsv.viabackwards.api.rewriters.EntityRewriter;
import nl.matsv.viabackwards.api.storage.EntityTracker; 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.PacketWrapper;
import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_9; import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_9;
import us.myles.ViaVersion.api.remapper.PacketHandler; 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.packets.State;
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; 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 @Override
protected void registerPackets(Protocol1_9To1_10 protocol) { protected void registerPackets(Protocol1_9_4To1_10 protocol) {
// Spawn Object // Spawn Object
protocol.registerOutgoing(State.PLAY, 0x00, 0x00, new PacketRemapper() { protocol.registerOutgoing(State.PLAY, 0x00, 0x00, new PacketRemapper() {

Datei anzeigen

@ -11,7 +11,7 @@
package nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets; package nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets;
import nl.matsv.viabackwards.api.rewriters.SoundIdRewriter; 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.PacketWrapper;
import us.myles.ViaVersion.api.remapper.PacketHandler; import us.myles.ViaVersion.api.remapper.PacketHandler;
import us.myles.ViaVersion.api.remapper.PacketRemapper; 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.api.type.Type;
import us.myles.ViaVersion.packets.State; 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) { protected static ValueTransformer<Float, Short> toOldPitch = new ValueTransformer<Float, Short>(Type.UNSIGNED_BYTE) {
public Short transform(PacketWrapper packetWrapper, Float inputValue) throws Exception { public Short transform(PacketWrapper packetWrapper, Float inputValue) throws Exception {
return (short) Math.round(inputValue * 63.5F); return (short) Math.round(inputValue * 63.5F);
@ -27,7 +27,7 @@ public class SoundPackets extends SoundIdRewriter<Protocol1_9To1_10> {
}; };
@Override @Override
protected void registerPackets(Protocol1_9To1_10 protocol) { protected void registerPackets(Protocol1_9_4To1_10 protocol) {
// Named sound effect // Named sound effect
protocol.registerOutgoing(State.PLAY, 0x19, 0x19, new PacketRemapper() { protocol.registerOutgoing(State.PLAY, 0x19, 0x19, new PacketRemapper() {
@Override @Override