From c5461964be6db8d05837432ca977182e4a2e7277 Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Mon, 20 Feb 2023 01:57:03 +0100 Subject: [PATCH] added missing licenses and fixed namings --- .../ItemReleaseVersionDefinition.java | 21 +++++++ .../definition/PackFormatsDefinition.java | 21 +++++++ .../definition/v1_14_4/Meta18Storage.java | 21 +++++++ .../v1_19_0/MessageMetadataModel.java | 21 +++++++ .../definition/v1_19_0/MessageSigner.java | 21 +++++++ .../model/SignatureUpdatableModel.java | 21 +++++++ .../v1_19_0/model/SignatureUpdaterModel.java | 21 +++++++ .../provider/CommandArgumentsProvider.java | 21 +++++++ .../v1_19_0/storage/AbstractChatSession.java | 21 +++++++ .../v1_19_0/storage/ChatSession1_19_0.java | 21 +++++++ .../definition/v1_19_2/MessageBodyModel.java | 21 +++++++ .../v1_19_2/MessageHeaderModel.java | 40 +++++++------ .../v1_19_2/storage/ChatSession1_19_2.java | 21 +++++++ .../injection/access/IClientConnection.java | 21 +++++++ .../injection/access/IClientPlayerEntity.java | 23 ++++++- .../injection/access/IMinecraftClient.java | 25 +++++++- .../injection/access/IPacketWrapperImpl.java | 23 ++++++- .../injection/access/IPublicKeyData.java | 26 +++++++- .../injection/access/IScreenHandler.java | 23 ++++++- .../mixin/base/MixinClientConnection_1.java | 2 + .../MixinClientPlayerInteractionManager.java | 4 +- .../mixin/fixes/MixinMinecraftClient.java | 4 +- .../MixinPlayerPublicKey_PublicKeyData.java | 4 +- .../mixin/fixes/MixinProfileKeysImpl.java | 2 +- ...MixinAbstractBlock_AbstractBlockState.java | 2 +- .../mixin/fixes/block/MixinAnvilBlock.java | 8 ++- .../mixin/fixes/block/MixinBedBlock.java | 4 +- .../fixes/block/MixinBrewingStandBlock.java | 4 +- .../mixin/fixes/block/MixinCauldronBlock.java | 4 +- .../fixes/block/MixinEndPortalBlock.java | 8 +-- .../fixes/block/MixinEndPortalFrameBlock.java | 4 +- .../mixin/fixes/block/MixinFarmlandBlock.java | 4 +- .../mixin/fixes/block/MixinHopperBlock.java | 10 ++-- .../mixin/fixes/block/MixinLadderBlock.java | 16 ++--- .../mixin/fixes/block/MixinLilyPadBlock.java | 4 +- .../mixin/fixes/block/MixinPaneBlock.java | 24 ++++---- .../fixes/block/MixinPistonHeadBlock.java | 60 +++++++++---------- .../mixin/fixes/block/MixinSnowBlock.java | 4 +- .../mixin/fixes/block/MixinWallBlock.java | 17 +++--- .../fixes/entity/MixinClientPlayerEntity.java | 2 +- .../mixin/fixes/input/MixinKeyboard.java | 2 +- .../mixin/fixes/input/MixinMouse.java | 2 +- .../fixes/screen/MixinConnectScreen_1.java | 2 +- .../screenhandler/MixinScreenHandler.java | 2 +- .../viaversion/MixinPacketWrapperImpl.java | 2 +- .../viafabricplus/platform/ProtocolRange.java | 21 +++++++ .../translator/ItemTranslator.java | 2 +- .../viafabricplus/value/AbstractValue.java | 21 +++++++ .../viafabricplus/value/ValueHolder.java | 21 +++++++ .../value/impl/BooleanValue.java | 21 +++++++ .../value/impl/ProtocolSyncBooleanValue.java | 21 +++++++ 51 files changed, 616 insertions(+), 125 deletions(-) diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/ItemReleaseVersionDefinition.java b/src/main/java/de/florianmichael/viafabricplus/definition/ItemReleaseVersionDefinition.java index c1677faf..574e51d2 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/ItemReleaseVersionDefinition.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/ItemReleaseVersionDefinition.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.definition; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/PackFormatsDefinition.java b/src/main/java/de/florianmichael/viafabricplus/definition/PackFormatsDefinition.java index d1ded1b5..7421cb1c 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/PackFormatsDefinition.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/PackFormatsDefinition.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.definition; import com.mojang.bridge.game.PackType; diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/v1_14_4/Meta18Storage.java b/src/main/java/de/florianmichael/viafabricplus/definition/v1_14_4/Meta18Storage.java index 648dd1a6..cd23f13c 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/v1_14_4/Meta18Storage.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/v1_14_4/Meta18Storage.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.definition.v1_14_4; import com.viaversion.viaversion.api.connection.StoredObject; diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/MessageMetadataModel.java b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/MessageMetadataModel.java index b5265108..1cd6bf63 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/MessageMetadataModel.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/MessageMetadataModel.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.definition.v1_19_0; public record MessageMetadataModel(String plain, long timestamp, long salt) { diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/MessageSigner.java b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/MessageSigner.java index 3b6c9f3a..24d4dc59 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/MessageSigner.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/MessageSigner.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.definition.v1_19_0; import de.florianmichael.viafabricplus.definition.v1_19_0.model.SignatureUpdatableModel; diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/model/SignatureUpdatableModel.java b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/model/SignatureUpdatableModel.java index bc143b1a..1b757c88 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/model/SignatureUpdatableModel.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/model/SignatureUpdatableModel.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.definition.v1_19_0.model; public interface SignatureUpdatableModel { diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/model/SignatureUpdaterModel.java b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/model/SignatureUpdaterModel.java index 5003d3fa..d197c6cd 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/model/SignatureUpdaterModel.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/model/SignatureUpdaterModel.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.definition.v1_19_0.model; public interface SignatureUpdaterModel { diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/provider/CommandArgumentsProvider.java b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/provider/CommandArgumentsProvider.java index 52a6b466..90066da5 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/provider/CommandArgumentsProvider.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/provider/CommandArgumentsProvider.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.definition.v1_19_0.provider; import com.viaversion.viaversion.api.platform.providers.Provider; diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/storage/AbstractChatSession.java b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/storage/AbstractChatSession.java index 11e3cfd3..cd42db7f 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/storage/AbstractChatSession.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/storage/AbstractChatSession.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.definition.v1_19_0.storage; import com.viaversion.viaversion.api.connection.StoredObject; diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/storage/ChatSession1_19_0.java b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/storage/ChatSession1_19_0.java index deaa2c9a..d7bf94e6 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/storage/ChatSession1_19_0.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_0/storage/ChatSession1_19_0.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.definition.v1_19_0.storage; import com.viaversion.viaversion.api.connection.UserConnection; diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_2/MessageBodyModel.java b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_2/MessageBodyModel.java index acce15c5..dd1ae1f2 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_2/MessageBodyModel.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_2/MessageBodyModel.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.definition.v1_19_2; import com.google.common.hash.Hashing; diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_2/MessageHeaderModel.java b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_2/MessageHeaderModel.java index c8ed1501..23e42399 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_2/MessageHeaderModel.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_2/MessageHeaderModel.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.definition.v1_19_2; import de.florianmichael.viafabricplus.definition.v1_19_0.model.SignatureUpdaterModel; @@ -6,14 +27,7 @@ import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.UUID; -public class MessageHeaderModel { - private final UUID sender; - private final byte[] precedingSignature; - - public MessageHeaderModel(UUID sender, byte[] precedingSignature) { - this.sender = sender; - this.precedingSignature = precedingSignature; - } +public record MessageHeaderModel(UUID sender, byte[] precedingSignature) { public byte[] toByteArray(final UUID uuid) { final byte[] data = new byte[16]; @@ -30,15 +44,7 @@ public class MessageHeaderModel { updater.update(precedingSignature); } - updater.update(toByteArray(getSender())); + updater.update(toByteArray(sender())); updater.update(bodyDigest); } - - public UUID getSender() { - return sender; - } - - public byte[] getPrecedingSignature() { - return precedingSignature; - } } diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_2/storage/ChatSession1_19_2.java b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_2/storage/ChatSession1_19_2.java index 020c38f4..82e54600 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_2/storage/ChatSession1_19_2.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/v1_19_2/storage/ChatSession1_19_2.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.definition.v1_19_2.storage; import com.viaversion.viaversion.api.connection.UserConnection; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/access/IClientConnection.java b/src/main/java/de/florianmichael/viafabricplus/injection/access/IClientConnection.java index f5f30812..7e9af6e8 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/access/IClientConnection.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/access/IClientConnection.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.injection.access; public interface IClientConnection { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/access/IClientPlayerEntity.java b/src/main/java/de/florianmichael/viafabricplus/injection/access/IClientPlayerEntity.java index a470a740..54379567 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/access/IClientPlayerEntity.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/access/IClientPlayerEntity.java @@ -1,6 +1,27 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.injection.access; public interface IClientPlayerEntity { - void protocolhack_cancelSwingOnce(); + void viafabricplus_cancelSwingOnce(); } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/access/IMinecraftClient.java b/src/main/java/de/florianmichael/viafabricplus/injection/access/IMinecraftClient.java index 09c3a03c..fb719216 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/access/IMinecraftClient.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/access/IMinecraftClient.java @@ -1,7 +1,28 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.injection.access; public interface IMinecraftClient { - void protocolhack_trackKeyboardInteraction(final Runnable interaction); - void protocolhack_trackMouseInteraction(final Runnable interaction); + void viafabricplus_trackKeyboardInteraction(final Runnable interaction); + void viafabricplus_trackMouseInteraction(final Runnable interaction); } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/access/IPacketWrapperImpl.java b/src/main/java/de/florianmichael/viafabricplus/injection/access/IPacketWrapperImpl.java index f49a3f24..f39b3c88 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/access/IPacketWrapperImpl.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/access/IPacketWrapperImpl.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.injection.access; import com.viaversion.viaversion.api.type.Type; @@ -7,5 +28,5 @@ import java.util.Deque; public interface IPacketWrapperImpl { - Deque, Object>> ep$readableObjects(); + Deque, Object>> viafabricplus_readableObjects(); } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/access/IPublicKeyData.java b/src/main/java/de/florianmichael/viafabricplus/injection/access/IPublicKeyData.java index fb84f056..c57936f3 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/access/IPublicKeyData.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/access/IPublicKeyData.java @@ -1,10 +1,30 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.injection.access; import java.nio.ByteBuffer; public interface IPublicKeyData { - ByteBuffer protocolhack_get1_19_0Key(); - - void protocolhack_set1_19_0Key(final ByteBuffer oldKey); + ByteBuffer viafabricplus_get1_19_0Key(); + void viafabricplus_set1_19_0Key(final ByteBuffer oldKey); } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/access/IScreenHandler.java b/src/main/java/de/florianmichael/viafabricplus/injection/access/IScreenHandler.java index 1c49ce53..0b200cec 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/access/IScreenHandler.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/access/IScreenHandler.java @@ -1,6 +1,27 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.injection.access; public interface IScreenHandler { - short protocolhack_getAndIncrementLastActionId(); + short viafabricplus_getAndIncrementLastActionId(); } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinClientConnection_1.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinClientConnection_1.java index e351f5ce..d15d3762 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinClientConnection_1.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/base/MixinClientConnection_1.java @@ -24,6 +24,7 @@ package de.florianmichael.viafabricplus.injection.mixin.base; import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.connection.UserConnectionImpl; import com.viaversion.viaversion.protocol.ProtocolPipelineImpl; +import de.florianmichael.viafabricplus.ViaFabricPlus; import de.florianmichael.vialoadingbase.netty.CustomViaDecodeHandler; import de.florianmichael.vialoadingbase.netty.CustomViaEncodeHandler; import de.florianmichael.vialoadingbase.netty.NettyConstants; @@ -49,6 +50,7 @@ public class MixinClientConnection_1 { if (channel instanceof SocketChannel) { // Creating the user connection final UserConnection user = new UserConnectionImpl(channel, true); + channel.attr(ViaFabricPlus.LOCAL_USER_CONNECTION).set(user); // Creating the pipeline new ProtocolPipelineImpl(user); diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinClientPlayerInteractionManager.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinClientPlayerInteractionManager.java index 25a06502..c71ad773 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinClientPlayerInteractionManager.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinClientPlayerInteractionManager.java @@ -76,7 +76,7 @@ public abstract class MixinClientPlayerInteractionManager { private void injectAttackEntity(PlayerEntity player, Entity target, CallbackInfo ci) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_8) && player instanceof IClientPlayerEntity) { player.swingHand(Hand.MAIN_HAND); - ((IClientPlayerEntity) player).protocolhack_cancelSwingOnce(); + ((IClientPlayerEntity) player).viafabricplus_cancelSwingOnce(); } } @@ -119,7 +119,7 @@ public abstract class MixinClientPlayerInteractionManager { clickSlotPacket.write(Type.SHORT, (short) clickSlot.getSlot()); clickSlotPacket.write(Type.BYTE, (byte) clickSlot.getButton()); assert client.player != null; - clickSlotPacket.write(Type.SHORT, ((IScreenHandler) client.player.currentScreenHandler).protocolhack_getAndIncrementLastActionId()); + clickSlotPacket.write(Type.SHORT, ((IScreenHandler) client.player.currentScreenHandler).viafabricplus_getAndIncrementLastActionId()); clickSlotPacket.write(Type.VAR_INT, clickSlot.getActionType().ordinal()); clickSlotPacket.write(Type.FLAT_VAR_INT_ITEM, ItemTranslator.minecraftToViaVersion(clickSlotPacket.user(), slotItemBeforeModification, ProtocolVersion.v1_16.getVersion())); diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinMinecraftClient.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinMinecraftClient.java index 601b917b..0f82ed1b 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinMinecraftClient.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinMinecraftClient.java @@ -138,12 +138,12 @@ public abstract class MixinMinecraftClient implements IMinecraftClient { } @Override - public void protocolhack_trackKeyboardInteraction(Runnable interaction) { + public void viafabricplus_trackKeyboardInteraction(Runnable interaction) { this.protocolhack_keyboardInteractions.add(interaction); } @Override - public void protocolhack_trackMouseInteraction(Runnable interaction) { + public void viafabricplus_trackMouseInteraction(Runnable interaction) { this.protocolhack_mouseInteractions.add(interaction); } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinPlayerPublicKey_PublicKeyData.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinPlayerPublicKey_PublicKeyData.java index 1db1134c..0a4393ee 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinPlayerPublicKey_PublicKeyData.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinPlayerPublicKey_PublicKeyData.java @@ -35,12 +35,12 @@ public class MixinPlayerPublicKey_PublicKeyData implements IPublicKeyData { private ByteBuffer protocolhack_1_19_0Key; @Override - public ByteBuffer protocolhack_get1_19_0Key() { + public ByteBuffer viafabricplus_get1_19_0Key() { return protocolhack_1_19_0Key; } @Override - public void protocolhack_set1_19_0Key(ByteBuffer byteBuffer) { + public void viafabricplus_set1_19_0Key(ByteBuffer byteBuffer) { this.protocolhack_1_19_0Key = byteBuffer; } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinProfileKeysImpl.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinProfileKeysImpl.java index 3b46a087..842f633b 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinProfileKeysImpl.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinProfileKeysImpl.java @@ -35,6 +35,6 @@ public class MixinProfileKeysImpl { @Inject(method = "decodeKeyPairResponse", at = @At("RETURN")) private static void trackLegacyKey(KeyPairResponse keyPairResponse, CallbackInfoReturnable cir) { - ((IPublicKeyData) (Object) cir.getReturnValue()).protocolhack_set1_19_0Key(keyPairResponse.getLegacyPublicKeySignature()); + ((IPublicKeyData) (Object) cir.getReturnValue()).viafabricplus_set1_19_0Key(keyPairResponse.getLegacyPublicKeySignature()); } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinAbstractBlock_AbstractBlockState.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinAbstractBlock_AbstractBlockState.java index 021248e1..d49a8ee6 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinAbstractBlock_AbstractBlockState.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinAbstractBlock_AbstractBlockState.java @@ -42,7 +42,7 @@ public abstract class MixinAbstractBlock_AbstractBlockState { protected abstract BlockState asBlockState(); @Inject(method = "getHardness", at = @At("RETURN"), cancellable = true) - public void injectGetHardness(BlockView world, BlockPos pos, CallbackInfoReturnable cir) { + public void changeHardness(BlockView world, BlockPos pos, CallbackInfoReturnable cir) { final BlockState state = this.asBlockState(); if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_12_2)) { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinAnvilBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinAnvilBlock.java index 782fd0df..23fcb77b 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinAnvilBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinAnvilBlock.java @@ -44,9 +44,11 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinAnvilBlock { @Unique - private static final VoxelShape protocolhack_X_AXIS_SHAPE_1_12_2 = Block.createCuboidShape(0, 0, 2, 16, 16, 14); + private static final VoxelShape viafabricplus_x_axis_shape_v1_12_2 = Block.createCuboidShape(0, 0, 2, 16, 16, 14); + @Unique - private static final VoxelShape protocolhack_Z_AXIS_SHAPE_1_12_2 = Block.createCuboidShape(2, 0, 0, 14, 16, 16); + private static final VoxelShape viafabricplus_z_axis_shape_v1_12_2 = Block.createCuboidShape(2, 0, 0, 14, 16, 16); + @Shadow @Final public static DirectionProperty FACING; @@ -54,7 +56,7 @@ public class MixinAnvilBlock { @Inject(method = "getOutlineShape", at = @At("HEAD"), cancellable = true) public void injectGetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context, CallbackInfoReturnable cir) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_12_2)) { - cir.setReturnValue(state.get(FACING).getAxis() == Direction.Axis.X ? protocolhack_X_AXIS_SHAPE_1_12_2 : protocolhack_Z_AXIS_SHAPE_1_12_2); + cir.setReturnValue(state.get(FACING).getAxis() == Direction.Axis.X ? viafabricplus_x_axis_shape_v1_12_2 : viafabricplus_z_axis_shape_v1_12_2); } } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinBedBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinBedBlock.java index c330de40..58b2b978 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinBedBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinBedBlock.java @@ -42,7 +42,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinBedBlock { @Unique - private final static VoxelShape protocolhack_BED_SHAPE_1_13_2 = Block.createCuboidShape(0, 0, 0, 16, 9, 16); + private final static VoxelShape viafabricplus_bed_shape_v1_13_2 = Block.createCuboidShape(0, 0, 0, 16, 9, 16); @Inject(method = "bounceEntity", at = @At("HEAD"), cancellable = true) public void injectBounceEntity(Entity entity, CallbackInfo ci) { @@ -55,7 +55,7 @@ public class MixinBedBlock { public void injectGetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context, CallbackInfoReturnable cir) { if (ViaLoadingBase.getClassWrapper() != null) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_13_2)) { - cir.setReturnValue(protocolhack_BED_SHAPE_1_13_2); + cir.setReturnValue(viafabricplus_bed_shape_v1_13_2); } } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinBrewingStandBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinBrewingStandBlock.java index 12d6a994..632bd361 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinBrewingStandBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinBrewingStandBlock.java @@ -41,7 +41,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinBrewingStandBlock { @Unique - private static final VoxelShape protocolhack_BASE_SHAPE_1_12_2 = VoxelShapes.union( + private static final VoxelShape viafabricplus_base_shape_v1_12_2 = VoxelShapes.union( Block.createCuboidShape(0, 0, 0, 16, 2, 16) /* Base */, Block.createCuboidShape(7, 0, 7, 9, 14, 9) /* Stick */ ); @@ -49,7 +49,7 @@ public class MixinBrewingStandBlock { @Inject(method = "getOutlineShape", at = @At("HEAD"), cancellable = true) public void injectGetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context, CallbackInfoReturnable cir) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_12_2)) { - cir.setReturnValue(protocolhack_BASE_SHAPE_1_12_2); + cir.setReturnValue(viafabricplus_base_shape_v1_12_2); } } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinCauldronBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinCauldronBlock.java index b5244a66..b2002015 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinCauldronBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinCauldronBlock.java @@ -40,7 +40,7 @@ import java.util.Map; public abstract class MixinCauldronBlock extends AbstractCauldronBlock { @Unique - private final static VoxelShape protocolhack_CAULDRON_SHAPE_1_12_2 = VoxelShapes.combineAndSimplify( + private final static VoxelShape viafabricplus_cauldron_shape_v1_12_2 = VoxelShapes.combineAndSimplify( VoxelShapes.fullCube(), Block.createCuboidShape(2.0D, 5.0D, 2.0D, 14.0D, 16.0D, 14.0D), BooleanBiFunction.ONLY_FIRST @@ -53,7 +53,7 @@ public abstract class MixinCauldronBlock extends AbstractCauldronBlock { @Override public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_12_2)) { - return protocolhack_CAULDRON_SHAPE_1_12_2; + return viafabricplus_cauldron_shape_v1_12_2; } return super.getOutlineShape(state, world, pos, context); } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinEndPortalBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinEndPortalBlock.java index 38bccaf1..2efee2b5 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinEndPortalBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinEndPortalBlock.java @@ -43,10 +43,10 @@ public abstract class MixinEndPortalBlock extends BlockWithEntity { @Final protected static VoxelShape SHAPE; @Unique - private final VoxelShape protocolhack_SHAPE_1_8 = Block.createCuboidShape(0.0, 0.0, 0.0, 16.0, 1.0, 16.0); + private final VoxelShape viafabricplus_shape_v1_8_x = Block.createCuboidShape(0.0, 0.0, 0.0, 16.0, 1.0, 16.0); @Unique - private final VoxelShape protocolhack_SHAPE_1_16_5 = Block.createCuboidShape(0.0, 0.0, 0.0, 16.0, 12.0, 16.0); + private final VoxelShape viafabricplus_shape_v1_16_5 = Block.createCuboidShape(0.0, 0.0, 0.0, 16.0, 12.0, 16.0); protected MixinEndPortalBlock(Settings settings) { super(settings); @@ -57,10 +57,10 @@ public abstract class MixinEndPortalBlock extends BlockWithEntity { if (MinecraftClient.getInstance() == null || MinecraftClient.getInstance().world == null) return; if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_8)) { - cir.setReturnValue(protocolhack_SHAPE_1_8); + cir.setReturnValue(viafabricplus_shape_v1_8_x); } else if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_16_4)) { - cir.setReturnValue(protocolhack_SHAPE_1_16_5); + cir.setReturnValue(viafabricplus_shape_v1_16_5); } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinEndPortalFrameBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinEndPortalFrameBlock.java index 6cf63f02..406d4b3d 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinEndPortalFrameBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinEndPortalFrameBlock.java @@ -44,12 +44,12 @@ public class MixinEndPortalFrameBlock { @Final protected static VoxelShape FRAME_WITH_EYE_SHAPE; @Unique - private final VoxelShape protocolhack_EYE_SHAPE_1_12_2 = Block.createCuboidShape(5.0, 13.0, 5.0, 11.0, 16.0, 11.0); + private final VoxelShape viafabricplus_eye_shape_v1_12_2 = Block.createCuboidShape(5.0, 13.0, 5.0, 11.0, 16.0, 11.0); @Redirect(method = "getOutlineShape", at = @At(value = "FIELD", target = "Lnet/minecraft/block/EndPortalFrameBlock;FRAME_WITH_EYE_SHAPE:Lnet/minecraft/util/shape/VoxelShape;")) public VoxelShape redirectGetOutlineShape() { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_12_2)) { - return VoxelShapes.union(FRAME_SHAPE, protocolhack_EYE_SHAPE_1_12_2); + return VoxelShapes.union(FRAME_SHAPE, viafabricplus_eye_shape_v1_12_2); } return FRAME_WITH_EYE_SHAPE; } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinFarmlandBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinFarmlandBlock.java index 51ad3c2d..f8168994 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinFarmlandBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinFarmlandBlock.java @@ -43,7 +43,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinFarmlandBlock extends Block { @Unique - private static final VoxelShape protocolhack_SHAPE_1_9_4 = VoxelShapes.fullCube(); + private static final VoxelShape viafabricplus_shape_v1_9_4 = VoxelShapes.fullCube(); @Shadow @Final protected static VoxelShape SHAPE; @@ -55,7 +55,7 @@ public class MixinFarmlandBlock extends Block { @Inject(method = "getOutlineShape", at = @At("HEAD"), cancellable = true) public void injectGetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context, CallbackInfoReturnable cir) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_9_3)) { - cir.setReturnValue(protocolhack_SHAPE_1_9_4); + cir.setReturnValue(viafabricplus_shape_v1_9_4); } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinHopperBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinHopperBlock.java index 4ed7f2b8..a25d6e0f 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinHopperBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinHopperBlock.java @@ -42,25 +42,25 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinHopperBlock { @Unique - private final static VoxelShape protocolhack_INSIDE_SHAPE_1_12_2 = Block.createCuboidShape(2, 10, 2, 14, 16, 14); + private final static VoxelShape viafabricplus_inside_shape_v1_12_2 = Block.createCuboidShape(2, 10, 2, 14, 16, 14); @Unique - private final static VoxelShape protocolhack_HOPPER_SHAPE_1_12_2 = VoxelShapes.combineAndSimplify( + private final static VoxelShape viafabricplus_hopper_shape_v1_12_2 = VoxelShapes.combineAndSimplify( VoxelShapes.fullCube(), - protocolhack_INSIDE_SHAPE_1_12_2, + viafabricplus_inside_shape_v1_12_2, BooleanBiFunction.ONLY_FIRST); @Inject(method = "getOutlineShape", at = @At("HEAD"), cancellable = true) public void injectGetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context, CallbackInfoReturnable cir) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_12_2)) { - cir.setReturnValue(protocolhack_HOPPER_SHAPE_1_12_2); + cir.setReturnValue(viafabricplus_hopper_shape_v1_12_2); } } @Inject(method = "getRaycastShape", at = @At("HEAD"), cancellable = true) public void injectGetRaycastShape(BlockState state, BlockView world, BlockPos pos, CallbackInfoReturnable cir) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_12_2)) { - cir.setReturnValue(protocolhack_INSIDE_SHAPE_1_12_2); + cir.setReturnValue(viafabricplus_inside_shape_v1_12_2); } } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinLadderBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinLadderBlock.java index 08ef370e..a1f04f69 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinLadderBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinLadderBlock.java @@ -40,25 +40,25 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinLadderBlock { @Unique - private static final VoxelShape protocolhack_EAST_SHAPE_1_8 = Block.createCuboidShape(0, 0, 0, 2, 16, 16); + private static final VoxelShape viafabricplus_east_shape_v1_8_x = Block.createCuboidShape(0, 0, 0, 2, 16, 16); @Unique - private static final VoxelShape protocolhack_WEST_SHAPE_1_8 = Block.createCuboidShape(14, 0, 0, 16, 16, 16); + private static final VoxelShape viafabricplus_west_shape_v1_8_x = Block.createCuboidShape(14, 0, 0, 16, 16, 16); @Unique - private static final VoxelShape protocolhack_SOUTH_SHAPE_1_8 = Block.createCuboidShape(0, 0, 0, 16, 16, 2); + private static final VoxelShape viafabricplus_south_shape_v1_8_x = Block.createCuboidShape(0, 0, 0, 16, 16, 2); @Unique - private static final VoxelShape protocolhack_NORTH_SHAPE_1_8 = Block.createCuboidShape(0, 0, 14, 16, 16, 16); + private static final VoxelShape viafabricplus_north_shape_v1_8_x = Block.createCuboidShape(0, 0, 14, 16, 16, 16); @Inject(method = "getOutlineShape", at = @At("HEAD"), cancellable = true) private void injectGetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context, CallbackInfoReturnable ci) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_8)) { switch (state.get(LadderBlock.FACING)) { - case NORTH -> ci.setReturnValue(protocolhack_NORTH_SHAPE_1_8); - case SOUTH -> ci.setReturnValue(protocolhack_SOUTH_SHAPE_1_8); - case WEST -> ci.setReturnValue(protocolhack_WEST_SHAPE_1_8); - default -> ci.setReturnValue(protocolhack_EAST_SHAPE_1_8); + case NORTH -> ci.setReturnValue(viafabricplus_north_shape_v1_8_x); + case SOUTH -> ci.setReturnValue(viafabricplus_south_shape_v1_8_x); + case WEST -> ci.setReturnValue(viafabricplus_west_shape_v1_8_x); + default -> ci.setReturnValue(viafabricplus_east_shape_v1_8_x); } } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinLilyPadBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinLilyPadBlock.java index 10aba98d..bfb8b7f7 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinLilyPadBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinLilyPadBlock.java @@ -40,12 +40,12 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinLilyPadBlock { @Unique - private static final VoxelShape protocolhack_SHAPE_1_8 = Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 0.015625D /* 1 / 64 */ * 16, 16.0D); + private static final VoxelShape viafabricplus_shape_v1_8_x = Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 0.015625D /* 1 / 64 */ * 16, 16.0D); @Inject(method = "getOutlineShape", at = @At("HEAD"), cancellable = true) public void changeBoundingBox(BlockState state, BlockView world, BlockPos pos, ShapeContext context, CallbackInfoReturnable cir) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_8)) { - cir.setReturnValue(protocolhack_SHAPE_1_8); + cir.setReturnValue(viafabricplus_shape_v1_8_x); } } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinPaneBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinPaneBlock.java index 92c709f4..c98cedd2 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinPaneBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinPaneBlock.java @@ -55,22 +55,22 @@ public class MixinPaneBlock extends HorizontalConnectingBlock { } @Unique - private final VoxelShape protocolhack_WEST_SHAPE_1_8 = Block.createCuboidShape(0, 0, 7, 8, 16, 9); + private final VoxelShape viafabricplus_west_shape_v1_8_x = Block.createCuboidShape(0, 0, 7, 8, 16, 9); @Unique - private final VoxelShape protocolhack_EAST_SHAPE_1_8 = Block.createCuboidShape(8, 0, 7, 16, 16, 9); + private final VoxelShape viafabricplus_east_shape_v1_8_x = Block.createCuboidShape(8, 0, 7, 16, 16, 9); @Unique - private final VoxelShape protocolhack_WEST_EAST_COMBINED_SHAPE_1_8 = Block.createCuboidShape(0, 0, 7, 16, 16, 9); + private final VoxelShape viafabricplus_west_east_combined_shape_v1_8_x = Block.createCuboidShape(0, 0, 7, 16, 16, 9); @Unique - private final VoxelShape protocolhack_NORTH_SHAPE_1_8 = Block.createCuboidShape(7, 0, 0, 9, 16, 8); + private final VoxelShape viafabricplus_north_shape_v1_8_x = Block.createCuboidShape(7, 0, 0, 9, 16, 8); @Unique - private final VoxelShape protocolhack_SOUTH_SHAPE_1_8 = Block.createCuboidShape(7, 0, 8, 9, 16, 16); + private final VoxelShape viafabricplus_south_shape_v1_8_x = Block.createCuboidShape(7, 0, 8, 9, 16, 16); @Unique - private final VoxelShape protocolhack_NORTH_SOUTH_COMBINED_SHAPE_1_8 = Block.createCuboidShape(7, 0, 0, 9, 16, 16); + private final VoxelShape viafabricplus_north_south_combined_shape_v1_8_x = Block.createCuboidShape(7, 0, 0, 9, 16, 16); @Unique public VoxelShape protocolhack_get1_8Shape(BlockState state) { @@ -83,19 +83,19 @@ public class MixinPaneBlock extends HorizontalConnectingBlock { if ((!isWestFacing || !isEastFacing) && (isWestFacing || isEastFacing || isNorthFacing || isSouthFacing)) { if (isWestFacing) - finalShape = VoxelShapes.union(finalShape, protocolhack_WEST_SHAPE_1_8); + finalShape = VoxelShapes.union(finalShape, viafabricplus_west_shape_v1_8_x); else if (isEastFacing) - finalShape = VoxelShapes.union(finalShape, protocolhack_EAST_SHAPE_1_8); + finalShape = VoxelShapes.union(finalShape, viafabricplus_east_shape_v1_8_x); } else - finalShape = VoxelShapes.union(finalShape, protocolhack_WEST_EAST_COMBINED_SHAPE_1_8); + finalShape = VoxelShapes.union(finalShape, viafabricplus_west_east_combined_shape_v1_8_x); if ((!isNorthFacing || !isSouthFacing) && (isWestFacing || isEastFacing || isNorthFacing || isSouthFacing)) { if (isNorthFacing) - finalShape = VoxelShapes.union(finalShape, protocolhack_NORTH_SHAPE_1_8); + finalShape = VoxelShapes.union(finalShape, viafabricplus_north_shape_v1_8_x); else if (isSouthFacing) - finalShape = VoxelShapes.union(finalShape, protocolhack_SOUTH_SHAPE_1_8); + finalShape = VoxelShapes.union(finalShape, viafabricplus_south_shape_v1_8_x); } else - finalShape = VoxelShapes.union(finalShape, protocolhack_NORTH_SOUTH_COMBINED_SHAPE_1_8); + finalShape = VoxelShapes.union(finalShape, viafabricplus_north_south_combined_shape_v1_8_x); return finalShape; } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinPistonHeadBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinPistonHeadBlock.java index 77c7127d..af9a450f 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinPistonHeadBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinPistonHeadBlock.java @@ -45,78 +45,76 @@ public class MixinPistonHeadBlock extends FacingBlock { @Inject(method = "getOutlineShape", at = @At("HEAD"), cancellable = true) public void injectGetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context, CallbackInfoReturnable cir) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_12_2)) - cir.setReturnValue(getCoreShape_1_8(state)); + cir.setReturnValue(viafabricplus_getCoreShape_v1_8_x(state)); } @Override public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_8)) - return VoxelShapes.union(getHeadShape_1_8(state), getCoreShape_1_8(state)); + return VoxelShapes.union(viafabricplus_getHeadShape_v1_8_x(state), viafabricplus_getCoreShape_v1_8_x(state)); return super.getCollisionShape(state, world, pos, context); } @Unique - private final VoxelShape protocolhack_CORE_DOWN_SHAPE_1_8 = Block.createCuboidShape(6, 4, 6, 10, 16, 10); + private final VoxelShape viafabricplus_core_down_shape_v1_8_x = Block.createCuboidShape(6, 4, 6, 10, 16, 10); @Unique - private final VoxelShape protocolhack_CORE_UP_SHAPE_1_8 = Block.createCuboidShape(6, 0, 6, 10, 12, 10); + private final VoxelShape viafabricplus_core_up_shape_v1_8_x = Block.createCuboidShape(6, 0, 6, 10, 12, 10); @Unique - private final VoxelShape protocolhack_CORE_NORTH_SHAPE_1_8 = Block.createCuboidShape(4, 6, 4, 12, 10, 16); + private final VoxelShape viafabricplus_core_north_shape_v1_8_x = Block.createCuboidShape(4, 6, 4, 12, 10, 16); @Unique - private final VoxelShape protocolhack_CORE_SOUTH_SHAPE_1_8 = Block.createCuboidShape(4, 6, 0, 12, 10, 12); + private final VoxelShape viafabricplus_core_south_shape_v1_8_x = Block.createCuboidShape(4, 6, 0, 12, 10, 12); @Unique - private final VoxelShape protocolhack_CORE_WEST_SHAPE_1_8 = Block.createCuboidShape(6, 4, 4, 10, 12, 16); + private final VoxelShape viafabricplus_core_west_shape_v1_8_x = Block.createCuboidShape(6, 4, 4, 10, 12, 16); @Unique - private final VoxelShape protocolhack_CORE_EAST_SHAPE_1_8 = Block.createCuboidShape(0, 6, 4, 12, 10, 12); + private final VoxelShape viafabricplus_core_east_shape_v1_8_x = Block.createCuboidShape(0, 6, 4, 12, 10, 12); @Unique - private VoxelShape getCoreShape_1_8(BlockState state) { + private VoxelShape viafabricplus_getCoreShape_v1_8_x(BlockState state) { final Direction direction = state.get(FACING); return switch (direction) { - case DOWN -> protocolhack_CORE_DOWN_SHAPE_1_8; - case UP -> protocolhack_CORE_UP_SHAPE_1_8; - case NORTH -> protocolhack_CORE_NORTH_SHAPE_1_8; - case SOUTH -> protocolhack_CORE_SOUTH_SHAPE_1_8; - case WEST -> protocolhack_CORE_WEST_SHAPE_1_8; - case EAST -> protocolhack_CORE_EAST_SHAPE_1_8; + case DOWN -> viafabricplus_core_down_shape_v1_8_x; + case UP -> viafabricplus_core_up_shape_v1_8_x; + case NORTH -> viafabricplus_core_north_shape_v1_8_x; + case SOUTH -> viafabricplus_core_south_shape_v1_8_x; + case WEST -> viafabricplus_core_west_shape_v1_8_x; + case EAST -> viafabricplus_core_east_shape_v1_8_x; }; } @Unique - private final VoxelShape protocolhack_HEAD_DOWN_SHAPE_1_8 = Block.createCuboidShape(0, 0, 0, 16, 4, 16); + private final VoxelShape viafabricplus_head_down_shape_v1_8_x = Block.createCuboidShape(0, 0, 0, 16, 4, 16); @Unique - private final VoxelShape protocolhack_HEAD_UP_SHAPE_1_8 = Block.createCuboidShape(0, 12, 0, 16, 16, 16); + private final VoxelShape viafabricplus_head_up_shape_v1_8_x = Block.createCuboidShape(0, 12, 0, 16, 16, 16); @Unique - private final VoxelShape protocolhack_HEAD_NORTH_SHAPE_1_8 = Block.createCuboidShape(0, 0, 0, 16, 16, 4); + private final VoxelShape viafabricplus_head_north_shape_v1_8_x = Block.createCuboidShape(0, 0, 0, 16, 16, 4); @Unique - private final VoxelShape protocolhack_HEAD_SOUTH_SHAPE_1_8 = Block.createCuboidShape(0, 0, 12, 16, 16, 16); + private final VoxelShape viafabricplus_head_south_shape_v1_8_x = Block.createCuboidShape(0, 0, 12, 16, 16, 16); @Unique - private final VoxelShape protocolhack_HEAD_WEST_SHAPE_1_8 = Block.createCuboidShape(0, 0, 0, 4, 16, 16); + private final VoxelShape viafabricplus_head_west_shape_v1_8_x = Block.createCuboidShape(0, 0, 0, 4, 16, 16); @Unique - private final VoxelShape protocolhack_HEAD_EAST_SHAPE_1_8 = Block.createCuboidShape(12, 0, 0, 16, 16, 16); + private final VoxelShape viafabricplus_head_east_shape_v1_8_x = Block.createCuboidShape(12, 0, 0, 16, 16, 16); @Unique - private VoxelShape getHeadShape_1_8(BlockState state) { - final Direction direction = state.get(FACING); - - return switch (direction) { - case DOWN -> protocolhack_HEAD_DOWN_SHAPE_1_8; - case UP -> protocolhack_HEAD_UP_SHAPE_1_8; - case NORTH -> protocolhack_HEAD_NORTH_SHAPE_1_8; - case SOUTH -> protocolhack_HEAD_SOUTH_SHAPE_1_8; - case WEST -> protocolhack_HEAD_WEST_SHAPE_1_8; - case EAST -> protocolhack_HEAD_EAST_SHAPE_1_8; + private VoxelShape viafabricplus_getHeadShape_v1_8_x(BlockState state) { + return switch (state.get(FACING)) { + case DOWN -> viafabricplus_head_down_shape_v1_8_x; + case UP -> viafabricplus_head_up_shape_v1_8_x; + case NORTH -> viafabricplus_head_north_shape_v1_8_x; + case SOUTH -> viafabricplus_head_south_shape_v1_8_x; + case WEST -> viafabricplus_head_west_shape_v1_8_x; + case EAST -> viafabricplus_head_east_shape_v1_8_x; }; } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinSnowBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinSnowBlock.java index 7e7960c7..5defbeb5 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinSnowBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinSnowBlock.java @@ -43,7 +43,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinSnowBlock { @Unique - private static final VoxelShape[] protocolhack_LAYERS_TO_SHAPE_1_12_2 = new VoxelShape[]{ + private static final VoxelShape[] viafabricplus_layers_to_shape_v1_12_2 = new VoxelShape[]{ Block.createCuboidShape(0, -0.00001 /* Bypass for Minecraft-Fixes */, 0, 16, 0, 16), Block.createCuboidShape(0, 0, 0, 16, 2, 16), Block.createCuboidShape(0, 0, 0, 16, 4, 16), @@ -61,7 +61,7 @@ public class MixinSnowBlock { @Inject(method = "getCollisionShape", at = @At("HEAD"), cancellable = true) public void injectGetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context, CallbackInfoReturnable cir) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_12_2)) { - cir.setReturnValue(protocolhack_LAYERS_TO_SHAPE_1_12_2[state.get(LAYERS) - 1]); + cir.setReturnValue(viafabricplus_layers_to_shape_v1_12_2[state.get(LAYERS) - 1]); } } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinWallBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinWallBlock.java index 6be8d5b9..68d5e566 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinWallBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinWallBlock.java @@ -47,7 +47,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class MixinWallBlock extends Block { @Unique - private static final VoxelShape[] protocolhack_SHAPE_BY_INDEX_1_12_2 = new VoxelShape[]{ + private static final VoxelShape[] viafabricplus_shape_by_index_v1_12_2 = new VoxelShape[]{ Block.createCuboidShape(4, 0, 4, 12, 16, 12), Block.createCuboidShape(4, 0, 4, 12, 16, 16), Block.createCuboidShape(0, 0, 4, 12, 16, 12), @@ -69,8 +69,9 @@ public class MixinWallBlock extends Block { Block.createCuboidShape(0, 0, 0, 16, 16, 12), Block.createCuboidShape(0, 0, 0, 16, 16, 16) }; + @Unique - private static final VoxelShape[] protocolhack_CLIP_SHAPE_BY_INDEX_1_12_2 = new VoxelShape[]{ + private static final VoxelShape[] viafabricplus_cip_shape_by_index_v1_12_2 = new VoxelShape[]{ Block.createCuboidShape(4, 0, 4, 12, 24, 12), Block.createCuboidShape(4, 0, 4, 12, 24, 16), Block.createCuboidShape(0, 0, 4, 12, 24, 12), @@ -109,7 +110,7 @@ public class MixinWallBlock extends Block { } @Unique - private static BlockState protocolhack_oldWallPlacementLogic(BlockState state) { + private static BlockState viafabricplus_oldWallPlacementLogic(BlockState state) { boolean addUp = false; if (state.get(WallBlock.NORTH_SHAPE) == WallShape.TALL) { state = state.with(WallBlock.NORTH_SHAPE, WallShape.LOW); @@ -134,7 +135,7 @@ public class MixinWallBlock extends Block { } @Unique - private static int protocolhack_getShapeIndex_1122(BlockState state) { + private static int viafabricplus_getShapeIndex_v1_12_2(BlockState state) { int i = 0; if (state.get(NORTH_SHAPE) != WallShape.NONE) i |= 1 << Direction.NORTH.getHorizontal(); @@ -148,28 +149,28 @@ public class MixinWallBlock extends Block { @Inject(method = "getPlacementState", at = @At("RETURN"), cancellable = true) public void injectGetPlacementState(ItemPlacementContext ctx, CallbackInfoReturnable cir) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_15_2)) { - cir.setReturnValue(protocolhack_oldWallPlacementLogic(cir.getReturnValue())); + cir.setReturnValue(viafabricplus_oldWallPlacementLogic(cir.getReturnValue())); } } @Inject(method = "getStateForNeighborUpdate", at = @At("RETURN"), cancellable = true) public void injectGetStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos, CallbackInfoReturnable cir) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_15_2)) { - cir.setReturnValue(protocolhack_oldWallPlacementLogic(cir.getReturnValue())); + cir.setReturnValue(viafabricplus_oldWallPlacementLogic(cir.getReturnValue())); } } @Inject(method = "getCollisionShape", at = @At("HEAD"), cancellable = true) public void injectGetCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context, CallbackInfoReturnable cir) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_12_2)) { - cir.setReturnValue(protocolhack_CLIP_SHAPE_BY_INDEX_1_12_2[protocolhack_getShapeIndex_1122(state)]); + cir.setReturnValue(viafabricplus_cip_shape_by_index_v1_12_2[viafabricplus_getShapeIndex_v1_12_2(state)]); } } @Inject(method = "getOutlineShape", at = @At("HEAD"), cancellable = true) public void injectGetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context, CallbackInfoReturnable cir) { if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_12_2)) { - cir.setReturnValue(protocolhack_SHAPE_BY_INDEX_1_12_2[protocolhack_getShapeIndex_1122(state)]); + cir.setReturnValue(viafabricplus_shape_by_index_v1_12_2[viafabricplus_getShapeIndex_v1_12_2(state)]); } } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/entity/MixinClientPlayerEntity.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/entity/MixinClientPlayerEntity.java index 0c2a9817..2d25e30a 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/entity/MixinClientPlayerEntity.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/entity/MixinClientPlayerEntity.java @@ -205,7 +205,7 @@ public abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity } @Override - public void protocolhack_cancelSwingOnce() { + public void viafabricplus_cancelSwingOnce() { protocolhack_areSwingCanceledThisTick = true; } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/input/MixinKeyboard.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/input/MixinKeyboard.java index db9eb6e7..8d960acb 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/input/MixinKeyboard.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/input/MixinKeyboard.java @@ -42,7 +42,7 @@ public class MixinKeyboard { @Redirect(method = "*", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/MinecraftClient;execute(Ljava/lang/Runnable;)V")) public void redirectSync(MinecraftClient instance, Runnable runnable) { if (ValueHolder.executeInputsInSync.getValue()) { - ((IMinecraftClient) client).protocolhack_trackKeyboardInteraction(runnable); + ((IMinecraftClient) client).viafabricplus_trackKeyboardInteraction(runnable); return; } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/input/MixinMouse.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/input/MixinMouse.java index bbacf1fe..6a17a11d 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/input/MixinMouse.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/input/MixinMouse.java @@ -39,7 +39,7 @@ public class MixinMouse { @Redirect(method = { "method_29615", "method_22685", "method_22684" }, at = @At(value = "INVOKE", target = "Lnet/minecraft/client/MinecraftClient;execute(Ljava/lang/Runnable;)V")) public void redirectSync(MinecraftClient instance, Runnable runnable) { if (ValueHolder.executeInputsInSync.getValue()) { - ((IMinecraftClient) client).protocolhack_trackMouseInteraction(runnable); + ((IMinecraftClient) client).viafabricplus_trackMouseInteraction(runnable); return; } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinConnectScreen_1.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinConnectScreen_1.java index 7780aab6..5c29e74b 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinConnectScreen_1.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinConnectScreen_1.java @@ -94,7 +94,7 @@ public class MixinConnectScreen_1 { userConnection.put(new ChatSession1_19_2(userConnection, profileKey, playerKeyPair.privateKey())); if (ViaLoadingBase.getTargetVersion() == ProtocolVersion.v1_19) { - final byte[] legacyKey = ((IPublicKeyData) (Object) publicKeyData).protocolhack_get1_19_0Key().array(); + final byte[] legacyKey = ((IPublicKeyData) (Object) publicKeyData).viafabricplus_get1_19_0Key().array(); if (legacyKey != null) { userConnection.put(new ChatSession1_19_0(userConnection, profileKey, playerKeyPair.privateKey(), legacyKey)); } else { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/screenhandler/MixinScreenHandler.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/screenhandler/MixinScreenHandler.java index 5bd220ef..b9b845a8 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/screenhandler/MixinScreenHandler.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/screenhandler/MixinScreenHandler.java @@ -60,7 +60,7 @@ public class MixinScreenHandler implements IScreenHandler { } @Override - public short protocolhack_getAndIncrementLastActionId() { + public short viafabricplus_getAndIncrementLastActionId() { return ++protocolhack_lastActionId; } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viaversion/MixinPacketWrapperImpl.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viaversion/MixinPacketWrapperImpl.java index 2249d189..095de8af 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viaversion/MixinPacketWrapperImpl.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/viaversion/MixinPacketWrapperImpl.java @@ -15,7 +15,7 @@ public class MixinPacketWrapperImpl implements IPacketWrapperImpl { @Shadow @Final private Deque, Object>> readableObjects; @Override - public Deque, Object>> ep$readableObjects() { + public Deque, Object>> viafabricplus_readableObjects() { return this.readableObjects; } } diff --git a/src/main/java/de/florianmichael/viafabricplus/platform/ProtocolRange.java b/src/main/java/de/florianmichael/viafabricplus/platform/ProtocolRange.java index 6a13f8a6..9a7f5fe6 100644 --- a/src/main/java/de/florianmichael/viafabricplus/platform/ProtocolRange.java +++ b/src/main/java/de/florianmichael/viafabricplus/platform/ProtocolRange.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.platform; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; diff --git a/src/main/java/de/florianmichael/viafabricplus/translator/ItemTranslator.java b/src/main/java/de/florianmichael/viafabricplus/translator/ItemTranslator.java index 8d0f7ca2..e9b7295f 100644 --- a/src/main/java/de/florianmichael/viafabricplus/translator/ItemTranslator.java +++ b/src/main/java/de/florianmichael/viafabricplus/translator/ItemTranslator.java @@ -61,6 +61,6 @@ public class ItemTranslator { throw new RuntimeException(e); } - return (Item) ((IPacketWrapperImpl) wrapper).ep$readableObjects().stream().filter(typeObjectPair -> Item.class.equals(typeObjectPair.key().getOutputClass())).findFirst().orElse(null).value(); + return (Item) ((IPacketWrapperImpl) wrapper).viafabricplus_readableObjects().stream().filter(typeObjectPair -> Item.class.equals(typeObjectPair.key().getOutputClass())).findFirst().orElse(null).value(); } } diff --git a/src/main/java/de/florianmichael/viafabricplus/value/AbstractValue.java b/src/main/java/de/florianmichael/viafabricplus/value/AbstractValue.java index 7881c7e6..78191ecb 100644 --- a/src/main/java/de/florianmichael/viafabricplus/value/AbstractValue.java +++ b/src/main/java/de/florianmichael/viafabricplus/value/AbstractValue.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.value; public abstract class AbstractValue { diff --git a/src/main/java/de/florianmichael/viafabricplus/value/ValueHolder.java b/src/main/java/de/florianmichael/viafabricplus/value/ValueHolder.java index 76f94ad5..a589baa4 100644 --- a/src/main/java/de/florianmichael/viafabricplus/value/ValueHolder.java +++ b/src/main/java/de/florianmichael/viafabricplus/value/ValueHolder.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.value; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; diff --git a/src/main/java/de/florianmichael/viafabricplus/value/impl/BooleanValue.java b/src/main/java/de/florianmichael/viafabricplus/value/impl/BooleanValue.java index 695c1d90..d4786e23 100644 --- a/src/main/java/de/florianmichael/viafabricplus/value/impl/BooleanValue.java +++ b/src/main/java/de/florianmichael/viafabricplus/value/impl/BooleanValue.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.value.impl; import de.florianmichael.viafabricplus.value.AbstractValue; diff --git a/src/main/java/de/florianmichael/viafabricplus/value/impl/ProtocolSyncBooleanValue.java b/src/main/java/de/florianmichael/viafabricplus/value/impl/ProtocolSyncBooleanValue.java index 173e1a37..8e1855e1 100644 --- a/src/main/java/de/florianmichael/viafabricplus/value/impl/ProtocolSyncBooleanValue.java +++ b/src/main/java/de/florianmichael/viafabricplus/value/impl/ProtocolSyncBooleanValue.java @@ -1,3 +1,24 @@ +/** + * --FLORIAN MICHAEL PRIVATE LICENCE v1.2-- + * + * This file / project is protected and is the intellectual property of Florian Michael (aka. EnZaXD), + * any use (be it private or public, be it copying or using for own use, be it publishing or modifying) of this + * file / project is prohibited. It requires in that use a written permission with official signature of the owner + * "Florian Michael". "Florian Michael" receives the right to control and manage this file / project. This right is not + * cancelled by copying or removing the license and in case of violation a criminal consequence is to be expected. + * The owner "Florian Michael" is free to change this license. The creator assumes no responsibility for any infringements + * that have arisen, are arising or will arise from this project / file. If this licence is used anywhere, + * the latest version published by the author Florian Michael (aka EnZaXD) always applies automatically. + * + * Changelog: + * v1.0: + * Added License + * v1.1: + * Ownership withdrawn + * v1.2: + * Version-independent validity and automatic renewal + */ + package de.florianmichael.viafabricplus.value.impl; import de.florianmichael.viafabricplus.platform.ProtocolRange;