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

Rename some classes

Dieser Commit ist enthalten in:
Matsv 2017-06-13 13:59:48 +02:00
Ursprung 0f52fdf3b6
Commit da84e30936
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 97CEC2A2EA31350F
12 geänderte Dateien mit 25 neuen und 25 gelöschten Zeilen

Datei anzeigen

@ -13,10 +13,10 @@ package nl.matsv.viabackwards.protocol.protocol1_10to1_11;
import lombok.Getter;
import nl.matsv.viabackwards.api.BackwardsProtocol;
import nl.matsv.viabackwards.api.entities.storage.EntityTracker;
import nl.matsv.viabackwards.protocol.protocol1_10to1_11.packets.BlockItemPackets;
import nl.matsv.viabackwards.protocol.protocol1_10to1_11.packets.BlockItemPackets1_11;
import nl.matsv.viabackwards.protocol.protocol1_10to1_11.packets.EntityPackets1_11;
import nl.matsv.viabackwards.protocol.protocol1_10to1_11.packets.PlayerPackets;
import nl.matsv.viabackwards.protocol.protocol1_10to1_11.packets.SoundPackets;
import nl.matsv.viabackwards.protocol.protocol1_10to1_11.packets.PlayerPackets1_11;
import nl.matsv.viabackwards.protocol.protocol1_10to1_11.packets.SoundPackets1_11;
import nl.matsv.viabackwards.protocol.protocol1_10to1_11.storage.WindowTracker;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
@ -25,14 +25,14 @@ public class Protocol1_10To1_11 extends BackwardsProtocol {
@Getter
private EntityPackets1_11 entityPackets; // Required for the item rewriter
@Getter
private BlockItemPackets blockItemPackets;
private BlockItemPackets1_11 blockItemPackets;
@Override
protected void registerPackets() {
(entityPackets = new EntityPackets1_11()).register(this);
new PlayerPackets().register(this);
(blockItemPackets = new BlockItemPackets()).register(this);
new SoundPackets().register(this);
new PlayerPackets1_11().register(this);
(blockItemPackets = new BlockItemPackets1_11()).register(this);
new SoundPackets1_11().register(this);
}
@Override

Datei anzeigen

@ -37,7 +37,7 @@ import us.myles.viaversion.libs.opennbt.tag.builtin.StringTag;
import java.util.Arrays;
import java.util.Optional;
public class BlockItemPackets extends BlockItemRewriter<Protocol1_10To1_11> {
public class BlockItemPackets1_11 extends BlockItemRewriter<Protocol1_10To1_11> {
@Override
protected void registerPackets(Protocol1_10To1_11 protocol) {
/* Item packets */

Datei anzeigen

@ -19,7 +19,7 @@ import us.myles.ViaVersion.api.type.Type;
import us.myles.ViaVersion.packets.State;
import us.myles.ViaVersion.protocols.protocol1_11to1_10.Protocol1_11To1_10;
public class PlayerPackets {
public class PlayerPackets1_11 {
private static final ValueTransformer<Short, Float> toNewFloat = new ValueTransformer<Short, Float>(Type.FLOAT) {
@Override
public Float transform(PacketWrapper wrapper, Short inputValue) throws Exception {

Datei anzeigen

@ -18,7 +18,7 @@ import us.myles.ViaVersion.api.remapper.PacketRemapper;
import us.myles.ViaVersion.api.type.Type;
import us.myles.ViaVersion.packets.State;
public class SoundPackets extends SoundRewriter<Protocol1_10To1_11> {
public class SoundPackets1_11 extends SoundRewriter<Protocol1_10To1_11> {
@Override
protected void registerPackets(Protocol1_10To1_11 protocol) {
// Named sound effect

Datei anzeigen

@ -14,7 +14,7 @@ import lombok.Getter;
import nl.matsv.viabackwards.api.BackwardsProtocol;
import nl.matsv.viabackwards.api.entities.storage.EntityTracker;
import nl.matsv.viabackwards.protocol.protocol1_11to1_11_1.packets.EntityPackets1_11_1;
import nl.matsv.viabackwards.protocol.protocol1_11to1_11_1.packets.ItemPackets;
import nl.matsv.viabackwards.protocol.protocol1_11to1_11_1.packets.ItemPackets1_11_1;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
@ -25,7 +25,7 @@ public class Protocol1_11To1_11_1 extends BackwardsProtocol {
@Override
protected void registerPackets() {
(entityPackets = new EntityPackets1_11_1()).register(this);
new ItemPackets().register(this);
new ItemPackets1_11_1().register(this);
}
@Override

Datei anzeigen

@ -21,7 +21,7 @@ import us.myles.ViaVersion.api.remapper.PacketRemapper;
import us.myles.ViaVersion.api.type.Type;
import us.myles.ViaVersion.packets.State;
public class ItemPackets extends BlockItemRewriter<Protocol1_11To1_11_1> {
public class ItemPackets1_11_1 extends BlockItemRewriter<Protocol1_11To1_11_1> {
@Override
protected void registerPackets(Protocol1_11To1_11_1 protocol) {

Datei anzeigen

@ -25,7 +25,7 @@ public class Protocol1_11_1To1_12 extends BackwardsProtocol {
@Override
protected void registerPackets() {
new ChangedPacketIds().register(this);
new ChangedPacketIds1_12().register(this);
(entityPackets = new EntityPackets1_12()).register(this);
(blockItemPackets = new BlockItemPackets1_12()).register(this);
new SoundPackets1_12().register(this);

Datei anzeigen

@ -17,7 +17,7 @@ import us.myles.ViaVersion.api.remapper.PacketHandler;
import us.myles.ViaVersion.api.remapper.PacketRemapper;
import us.myles.ViaVersion.packets.State;
public class ChangedPacketIds extends Rewriter<Protocol1_11_1To1_12> {
public class ChangedPacketIds1_12 extends Rewriter<Protocol1_11_1To1_12> {
@Override
protected void registerPackets(Protocol1_11_1To1_12 p) {

Datei anzeigen

@ -13,23 +13,23 @@ package nl.matsv.viabackwards.protocol.protocol1_9_4to1_10;
import lombok.Getter;
import nl.matsv.viabackwards.api.BackwardsProtocol;
import nl.matsv.viabackwards.api.entities.storage.EntityTracker;
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets.BlockItemPackets;
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets.ChangedPackets;
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets.BlockItemPackets1_10;
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets.ChangedPackets1_10;
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets.EntityPackets1_10;
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets.SoundPackets;
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.packets.SoundPackets1_10;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
@Getter
public class Protocol1_9_4To1_10 extends BackwardsProtocol {
private EntityPackets1_10 entityPackets; // Required for the item rewriter
private BlockItemPackets blockItemPackets;
private BlockItemPackets1_10 blockItemPackets;
protected void registerPackets() {
new ChangedPackets().register(this);
new SoundPackets().register(this);
new ChangedPackets1_10().register(this);
new SoundPackets1_10().register(this);
(entityPackets = new EntityPackets1_10()).register(this);
(blockItemPackets = new BlockItemPackets()).register(this);
(blockItemPackets = new BlockItemPackets1_10()).register(this);
}
public void init(UserConnection user) {

Datei anzeigen

@ -25,7 +25,7 @@ import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.chunks.Chunk1_9_3_
import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.types.Chunk1_9_3_4Type;
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
public class BlockItemPackets extends BlockItemRewriter<Protocol1_9_4To1_10> {
public class BlockItemPackets1_10 extends BlockItemRewriter<Protocol1_9_4To1_10> {
protected void registerPackets(Protocol1_9_4To1_10 protocol) {
/* Item packets */

Datei anzeigen

@ -15,7 +15,7 @@ import us.myles.ViaVersion.api.remapper.PacketRemapper;
import us.myles.ViaVersion.api.type.Type;
import us.myles.ViaVersion.packets.State;
public class ChangedPackets {
public class ChangedPackets1_10 {
public void register(BackwardsProtocol protocol) {
/* ServerBound packets */

Datei anzeigen

@ -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 SoundRewriter<Protocol1_9_4To1_10> {
public class SoundPackets1_10 extends SoundRewriter<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);