diff --git a/LICENSE_GENERAL_MIT b/LICENSE_GENERAL_MIT new file mode 100644 index 00000000..4dac4292 --- /dev/null +++ b/LICENSE_GENERAL_MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/build.gradle b/build.gradle index f6715ba7..fb45dcab 100644 --- a/build.gradle +++ b/build.gradle @@ -85,7 +85,7 @@ jar { } { exclude "META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA" } - from("LICENSE") { - rename { "${it}_${project.archivesBaseName}" } - } + from("LICENSE") { rename { "${it}_${project.archivesBaseName}" } } + from("LICENSE_multiconnect") { rename { "${it}_${project.archivesBaseName}" } } + from("LICENSE_GENERAL_MIT") { rename { "${it}_${project.archivesBaseName}" } } } diff --git a/gradle.properties b/gradle.properties index 7a529739..e5db0fcc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ yarn_mappings=1.19.3+build.5 loader_version=0.14.14 # viafabricplus -mod_version=1.6.1 +mod_version=1.7.1 maven_group=de.florianmichael archives_base_name=viafabricplus @@ -22,7 +22,7 @@ snake_yml_version=2.0 # raphimc libs vialegacy_version=2.2.8 -viaaprilfools_version=2.0.5 +viaaprilfools_version=2.0.6 # lenni0451 libs mcstructs_text_version=2.2.0 diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/LegacySounds.java b/src/main/java/de/florianmichael/viafabricplus/definition/LegacySounds.java new file mode 100644 index 00000000..69d8b810 --- /dev/null +++ b/src/main/java/de/florianmichael/viafabricplus/definition/LegacySounds.java @@ -0,0 +1,10 @@ +package de.florianmichael.viafabricplus.definition; + +import net.minecraft.sound.SoundEvent; +import net.minecraft.util.Identifier; + +public class LegacySounds { + + public static final Identifier RANDOM_HURT_ID = new Identifier("viafabricplus", "random.hurt"); + public static final SoundEvent RANDOM_HURT = SoundEvent.of(RANDOM_HURT_ID); +} diff --git a/src/main/java/de/florianmichael/viafabricplus/definition/c0_30/ClassicWorldHeightInjection.java b/src/main/java/de/florianmichael/viafabricplus/definition/c0_30/ClassicWorldHeightInjection.java index b71d1f7f..06f6a64f 100644 --- a/src/main/java/de/florianmichael/viafabricplus/definition/c0_30/ClassicWorldHeightInjection.java +++ b/src/main/java/de/florianmichael/viafabricplus/definition/c0_30/ClassicWorldHeightInjection.java @@ -23,7 +23,7 @@ import java.util.BitSet; import java.util.List; @SuppressWarnings("DataFlowIssue") -// Copyright RaphiMC/RK_01 - GPL v3 LICENSE +// Copyright RaphiMC/RK_01 - LICENSE file public class ClassicWorldHeightInjection { public static PacketHandler handleJoinGame(final PacketHandler parentRemapper) { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinBipedEntityModel.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinBipedEntityModel.java similarity index 95% rename from src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinBipedEntityModel.java rename to src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinBipedEntityModel.java index 08c2bdd7..81b7c33c 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinBipedEntityModel.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinBipedEntityModel.java @@ -1,4 +1,4 @@ -package de.florianmichael.viafabricplus.injection.mixin.fixes.visual; +package de.florianmichael.viafabricplus.injection.mixin.fixes; import de.florianmichael.viafabricplus.settings.groups.VisualSettings; import net.minecraft.client.model.ModelPart; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinChestBlockEntityRenderer.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinChestBlockEntityRenderer.java new file mode 100644 index 00000000..e5055d96 --- /dev/null +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinChestBlockEntityRenderer.java @@ -0,0 +1,25 @@ +package de.florianmichael.viafabricplus.injection.mixin.fixes; + +import de.florianmichael.vialoadingbase.ViaLoadingBase; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.block.entity.LidOpenable; +import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.render.block.entity.ChestBlockEntityRenderer; +import net.minecraft.client.util.math.MatrixStack; +import net.raphimc.vialegacy.api.LegacyProtocolVersion; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +// Copyright Gaming32 - LICENSE_GENERAL_MIT file +@Mixin(ChestBlockEntityRenderer.class) +public class MixinChestBlockEntityRenderer { + + @Inject(method = "render(Lnet/minecraft/block/entity/BlockEntity;FLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;II)V", at = @At("HEAD"), cancellable = true) + public void dontRender(T entity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, CallbackInfo ci) { + if (tickDelta != 0 && ViaLoadingBase.getClassWrapper().getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersion.b1_7tob1_7_3)) { + ci.cancel(); + } + } +} diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinClientPlayNetworkHandler.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinClientPlayNetworkHandler.java index d6c98150..e0fbffd3 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinClientPlayNetworkHandler.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinClientPlayNetworkHandler.java @@ -2,6 +2,7 @@ package de.florianmichael.viafabricplus.injection.mixin.fixes; import com.mojang.authlib.GameProfile; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; +import de.florianmichael.viafabricplus.settings.groups.VisualSettings; import de.florianmichael.vialoadingbase.ViaLoadingBase; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.DownloadingTerrainScreen; @@ -127,4 +128,9 @@ public abstract class MixinClientPlayNetworkHandler { instance.warn(s, o); } } + + @Redirect(method = "onServerMetadata", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/s2c/play/ServerMetadataS2CPacket;isSecureChatEnforced()Z")) + public boolean removeSecureChatWarning(ServerMetadataS2CPacket instance) { + return instance.isSecureChatEnforced() || VisualSettings.getClassWrapper().disableSecureChatWarning.getValue(); + } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinItemRenderer.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinItemRenderer.java similarity index 94% rename from src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinItemRenderer.java rename to src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinItemRenderer.java index c9a54683..6d123d43 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinItemRenderer.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinItemRenderer.java @@ -1,4 +1,4 @@ -package de.florianmichael.viafabricplus.injection.mixin.fixes.visual; +package de.florianmichael.viafabricplus.injection.mixin.fixes; import de.florianmichael.viafabricplus.settings.groups.VisualSettings; import net.minecraft.client.render.item.ItemModels; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinChestBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinChestBlock.java new file mode 100644 index 00000000..49d2e165 --- /dev/null +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinChestBlock.java @@ -0,0 +1,39 @@ +package de.florianmichael.viafabricplus.injection.mixin.fixes.block; + +import de.florianmichael.vialoadingbase.ViaLoadingBase; +import net.minecraft.block.*; +import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.block.entity.ChestBlockEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.util.shape.VoxelShapes; +import net.minecraft.world.BlockView; +import net.raphimc.vialegacy.api.LegacyProtocolVersion; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import java.util.function.Supplier; + +@Mixin(ChestBlock.class) +public abstract class MixinChestBlock extends AbstractChestBlock { + + protected MixinChestBlock(Settings settings, Supplier> blockEntityTypeSupplier) { + super(settings, blockEntityTypeSupplier); + } + + @Inject(method = "getOutlineShape", at = @At("HEAD"), cancellable = true) + public void changeShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context, CallbackInfoReturnable cir) { + if (ViaLoadingBase.getClassWrapper().getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersion.r1_4_2)) { + cir.setReturnValue(VoxelShapes.fullCube()); + } + } + + @Inject(method = "getRenderType", at = @At("HEAD"), cancellable = true) + public void changeRenderType(BlockState state, CallbackInfoReturnable cir) { + if (ViaLoadingBase.getClassWrapper().getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersion.b1_7tob1_7_3)) { + cir.setReturnValue(BlockRenderType.MODEL); + } + } +} diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinFenceBlock.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinFenceBlock.java index 310c9d2a..d856125c 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinFenceBlock.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/block/MixinFenceBlock.java @@ -2,15 +2,24 @@ package de.florianmichael.viafabricplus.injection.mixin.fixes.block; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import de.florianmichael.vialoadingbase.ViaLoadingBase; -import net.minecraft.block.FenceBlock; +import net.minecraft.block.*; import net.minecraft.util.ActionResult; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.world.BlockView; +import net.raphimc.vialegacy.api.LegacyProtocolVersion; import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(FenceBlock.class) -public class MixinFenceBlock { +public class MixinFenceBlock extends HorizontalConnectingBlock { + + protected MixinFenceBlock(float radius1, float radius2, float boundingHeight1, float boundingHeight2, float collisionHeight, Settings settings) { + super(radius1, radius2, boundingHeight1, boundingHeight2, collisionHeight, settings); + } @Inject(method = "onUse", at = @At("HEAD"), cancellable = true) private void injectOnUse(CallbackInfoReturnable ci) { @@ -18,4 +27,15 @@ public class MixinFenceBlock { ci.setReturnValue(ActionResult.SUCCESS); } } + + @Unique + private static final VoxelShape viafabricplus_fence_shape_b1_8_1 = Block.createCuboidShape(0, 0, 0, 16, 32, 16); + + @Override + public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { + if (ViaLoadingBase.getClassWrapper().getTargetVersion().isOlderThan(LegacyProtocolVersion.r1_0_0tor1_0_1)) { + return viafabricplus_fence_shape_b1_8_1; + } + return super.getCollisionShape(state, world, pos, context); + } } 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 a24228c5..d75ebdb6 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 @@ -2,9 +2,11 @@ package de.florianmichael.viafabricplus.injection.mixin.fixes.entity; import com.mojang.authlib.GameProfile; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; +import de.florianmichael.viafabricplus.definition.v1_8_x.ArmorPointsDefinition; import de.florianmichael.viafabricplus.definition.v1_8_x.IdlePacketExecutor; import de.florianmichael.viafabricplus.injection.access.IClientPlayerEntity; import de.florianmichael.viafabricplus.settings.groups.DebugSettings; +import de.florianmichael.viafabricplus.settings.groups.VisualSettings; import de.florianmichael.vialoadingbase.ViaLoadingBase; import net.minecraft.client.MinecraftClient; import net.minecraft.client.input.Input; @@ -186,6 +188,14 @@ public abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity } } + @Override + public int getArmor() { + if (VisualSettings.getClassWrapper().emulateArmorHud.getValue()) { + return ArmorPointsDefinition.sum(); + } + return super.getArmor(); + } + @Override public void viafabricplus_cancelSwingOnce() { protocolhack_areSwingCanceledThisTick = true; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/entity/MixinPlayerEntity.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/entity/MixinPlayerEntity.java index 88af00fc..01ad8a96 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/entity/MixinPlayerEntity.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/entity/MixinPlayerEntity.java @@ -1,13 +1,17 @@ package de.florianmichael.viafabricplus.injection.mixin.fixes.entity; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; +import de.florianmichael.viafabricplus.definition.LegacySounds; +import de.florianmichael.viafabricplus.settings.groups.VisualSettings; import de.florianmichael.vialoadingbase.ViaLoadingBase; import net.minecraft.entity.EntityDimensions; import net.minecraft.entity.EntityPose; import net.minecraft.entity.EntityType; import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.player.PlayerAbilities; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.sound.SoundEvent; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; @@ -80,4 +84,12 @@ public abstract class MixinPlayerEntity extends LivingEntity { ci.setReturnValue(1f); } } + + // Copyright Gaming32 - LICENSE_GENERAL_MIT file + @Inject(method = "getHurtSound", at = @At("HEAD"), cancellable = true) + public void replaceSound(DamageSource source, CallbackInfoReturnable cir) { + if (VisualSettings.getClassWrapper().replaceHurtSoundWithOOFSound.getValue()) { + cir.setReturnValue(LegacySounds.RANDOM_HURT); + } + } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinBlockItem.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinBlockItem.java index e19e63bc..6c78bda0 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinBlockItem.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinBlockItem.java @@ -17,7 +17,7 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -// Copyright Earthcomputer - MIT LICENSE +// Copyright (c) 2019 Joseph Burton (Earthcomputer) - LICENSE_multiconnect file @Mixin(BlockItem.class) public class MixinBlockItem { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinHeldItemRenderer.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinHeldItemRenderer.java index 0d47b5ed..ee4baaed 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinHeldItemRenderer.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinHeldItemRenderer.java @@ -18,7 +18,7 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Slice; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -// Copyright Earthcomputer - MIT LICENSE +// Copyright (c) 2019 Joseph Burton (Earthcomputer) - LICENSE_multiconnect file @Mixin(HeldItemRenderer.class) public class MixinHeldItemRenderer { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinItemPlacementContext.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinItemPlacementContext.java index 37ed4122..6269a4c9 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinItemPlacementContext.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinItemPlacementContext.java @@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -// Copyright Earthcomputer - MIT LICENSE +// Copyright (c) 2019 Joseph Burton (Earthcomputer) - LICENSE_multiconnect file @Mixin(ItemPlacementContext.class) public class MixinItemPlacementContext { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinSwordItem.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinSwordItem.java index 6cec9f63..e0df621b 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinSwordItem.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/item/MixinSwordItem.java @@ -13,7 +13,7 @@ import net.minecraft.util.UseAction; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; -// Copyright Earthcomputer - MIT LICENSE +// Copyright (c) 2019 Joseph Burton (Earthcomputer) - LICENSE_multiconnect file @Mixin(SwordItem.class) public class MixinSwordItem extends ToolItem { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinChatScreen.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinChatScreen.java index f9ba7f7a..0fd0df6d 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinChatScreen.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinChatScreen.java @@ -1,12 +1,16 @@ package de.florianmichael.viafabricplus.injection.mixin.fixes.screen; import de.florianmichael.viafabricplus.definition.ChatLengthDefinition; +import de.florianmichael.viafabricplus.settings.groups.VisualSettings; +import net.minecraft.client.gui.hud.ChatHud; +import net.minecraft.client.gui.hud.MessageIndicator; import net.minecraft.client.gui.screen.ChatScreen; import net.minecraft.client.gui.widget.TextFieldWidget; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(ChatScreen.class) @@ -18,4 +22,12 @@ public class MixinChatScreen { public void changeChatLength(CallbackInfo ci) { this.chatField.setMaxLength(ChatLengthDefinition.getMaxLength()); } + + @Redirect(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/ChatHud;getIndicatorAt(DD)Lnet/minecraft/client/gui/hud/MessageIndicator;")) + public MessageIndicator removeIndicator(ChatHud instance, double mouseX, double mouseY) { + if (VisualSettings.getClassWrapper().hideSignatureIndicator.getValue()) { + return null; + } + return instance.getIndicatorAt(mouseX, mouseY); + } } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinCommandBlockScreen.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinCommandBlockScreen.java similarity index 94% rename from src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinCommandBlockScreen.java rename to src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinCommandBlockScreen.java index b41c72ad..8273886b 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinCommandBlockScreen.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinCommandBlockScreen.java @@ -1,4 +1,4 @@ -package de.florianmichael.viafabricplus.injection.mixin.fixes.visual; +package de.florianmichael.viafabricplus.injection.mixin.fixes.screen; import de.florianmichael.viafabricplus.settings.groups.VisualSettings; import net.minecraft.block.entity.CommandBlockBlockEntity; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinCreativeInventoryScreen.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinCreativeInventoryScreen.java similarity index 92% rename from src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinCreativeInventoryScreen.java rename to src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinCreativeInventoryScreen.java index 24cc6e4b..3f615479 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinCreativeInventoryScreen.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinCreativeInventoryScreen.java @@ -1,4 +1,4 @@ -package de.florianmichael.viafabricplus.injection.mixin.fixes.visual; +package de.florianmichael.viafabricplus.injection.mixin.fixes.screen; import de.florianmichael.viafabricplus.definition.c0_30.ClassicItemSelectionScreen; import de.florianmichael.viafabricplus.settings.groups.VisualSettings; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinJigsawBlockScreen.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinJigsawBlockScreen.java similarity index 96% rename from src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinJigsawBlockScreen.java rename to src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinJigsawBlockScreen.java index 74f7e6ad..c98dadbc 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinJigsawBlockScreen.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/MixinJigsawBlockScreen.java @@ -1,4 +1,4 @@ -package de.florianmichael.viafabricplus.injection.mixin.fixes.visual; +package de.florianmichael.viafabricplus.injection.mixin.fixes.screen; import de.florianmichael.viafabricplus.settings.groups.VisualSettings; import net.minecraft.block.entity.JigsawBlockEntity; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinChatHud.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/hud/MixinChatHud.java similarity index 92% rename from src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinChatHud.java rename to src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/hud/MixinChatHud.java index 19c16586..8c7c47ac 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinChatHud.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/screen/hud/MixinChatHud.java @@ -1,4 +1,4 @@ -package de.florianmichael.viafabricplus.injection.mixin.fixes.visual; +package de.florianmichael.viafabricplus.injection.mixin.fixes.screen.hud; import de.florianmichael.viafabricplus.settings.groups.VisualSettings; import net.minecraft.client.gui.hud.ChatHud; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinProtocolVersion.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinProtocolVersion.java index 93044d82..fc996c22 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinProtocolVersion.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinProtocolVersion.java @@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import java.util.HashMap; import java.util.Map; -// Copyright RaphiMC/RK_01 - GPL v3 LICENSE +// Copyright RaphiMC/RK_01 - LICENSE file @Mixin(value = ProtocolVersion.class, remap = false) public abstract class MixinProtocolVersion { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_12to1_11_1/MixinChatItemRewriter.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_12to1_11_1/MixinChatItemRewriter.java index 42924c61..37a3b315 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_12to1_11_1/MixinChatItemRewriter.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_12to1_11_1/MixinChatItemRewriter.java @@ -13,7 +13,7 @@ import java.util.logging.Level; import java.util.regex.Matcher; import java.util.regex.Pattern; -// Copyright RaphiMC/RK_01 - GPL v3 LICENSE +// Copyright RaphiMC/RK_01 - LICENSE file @Mixin(value = ChatItemRewriter.class, remap = false) public abstract class MixinChatItemRewriter { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_13to1_12_2/MixinWorldPackets1_13.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_13to1_12_2/MixinWorldPackets1_13.java index 8e7cd479..e2aabad4 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_13to1_12_2/MixinWorldPackets1_13.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_13to1_12_2/MixinWorldPackets1_13.java @@ -6,7 +6,7 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -// Copyright RaphiMC/RK_01 - GPL v3 LICENSE +// Copyright RaphiMC/RK_01 - LICENSE file @Mixin(value = WorldPackets.class, remap = false) public abstract class MixinWorldPackets1_13 { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_16_2to1_16_1/MixinWorldPackets_2.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_16_2to1_16_1/MixinWorldPackets_2.java index a1c4474e..a3093bf7 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_16_2to1_16_1/MixinWorldPackets_2.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_16_2to1_16_1/MixinWorldPackets_2.java @@ -5,7 +5,7 @@ import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.Constant; import org.spongepowered.asm.mixin.injection.ModifyConstant; -// Copyright RaphiMC/RK_01 - GPL v3 LICENSE +// Copyright RaphiMC/RK_01 - LICENSE file @Mixin(value = WorldPackets.class, remap = false) public abstract class MixinWorldPackets_2 { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_17to1_16_4/MixinEntityPackets1_17.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_17to1_16_4/MixinEntityPackets1_17.java index 1a807b43..9144234c 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_17to1_16_4/MixinEntityPackets1_17.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_17to1_16_4/MixinEntityPackets1_17.java @@ -12,7 +12,7 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; @SuppressWarnings({"unchecked", "rawtypes"}) -// Copyright RaphiMC/RK_01 - GPL v3 LICENSE +// Copyright RaphiMC/RK_01 - LICENSE file @Mixin(value = EntityPackets.class, remap = false) public abstract class MixinEntityPackets1_17 { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_17to1_16_4/MixinWorldPackets1_17.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_17to1_16_4/MixinWorldPackets1_17.java index 504267f0..85354d16 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_17to1_16_4/MixinWorldPackets1_17.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_17to1_16_4/MixinWorldPackets1_17.java @@ -12,7 +12,7 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; @SuppressWarnings({"unchecked", "rawtypes"}) -// Copyright RaphiMC/RK_01 - GPL v3 LICENSE +// Copyright RaphiMC/RK_01 - LICENSE file @Mixin(value = WorldPackets.class, remap = false) public abstract class MixinWorldPackets1_17 { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_18_2to1_18/MixinProtocol1_18_2To1_18.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_18_2to1_18/MixinProtocol1_18_2To1_18.java index f0a8c9ed..ea95cc70 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_18_2to1_18/MixinProtocol1_18_2To1_18.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_18_2to1_18/MixinProtocol1_18_2To1_18.java @@ -14,7 +14,7 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @SuppressWarnings("DataFlowIssue") -// Copyright RaphiMC/RK_01 - GPL v3 LICENSE +// Copyright RaphiMC/RK_01 - LICENSE file @Mixin(value = Protocol1_18_2To1_18.class, remap = false) public class MixinProtocol1_18_2To1_18 extends AbstractProtocol { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinChunk1_8Type.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinChunk1_8Type.java index 0a5085bf..0f8ed5cc 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinChunk1_8Type.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinChunk1_8Type.java @@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.Redirect; import java.util.ArrayList; import java.util.logging.Level; -// Copyright RaphiMC/RK_01 - GPL v3 LICENSE +// Copyright RaphiMC/RK_01 - LICENSE file @Mixin(value = Chunk1_8Type.class, remap = false) public abstract class MixinChunk1_8Type { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinEntityPackets_6_1.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinEntityPackets_6_1.java index 35a1ce45..5ea8a52e 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinEntityPackets_6_1.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinEntityPackets_6_1.java @@ -8,7 +8,7 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -// Copyright RaphiMC/RK_01 - GPL v3 LICENSE +// Copyright RaphiMC/RK_01 - LICENSE file @Mixin(targets = "com.viaversion.viaversion.protocols.protocol1_9to1_8.packets.EntityPackets$6$1", remap = false) public abstract class MixinEntityPackets_6_1 { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinEntityTracker1_9.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinEntityTracker1_9.java index 5b22fc5b..c81e694d 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinEntityTracker1_9.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinEntityTracker1_9.java @@ -7,7 +7,7 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Slice; -// Copyright RaphiMC/RK_01 - GPL v3 LICENSE +// Copyright RaphiMC/RK_01 - LICENSE file @Mixin(value = EntityTracker1_9.class, remap = false) public abstract class MixinEntityTracker1_9 { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinMetadataRewriter1_9To1_8.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinMetadataRewriter1_9To1_8.java index 0114397f..0a2cd3ee 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinMetadataRewriter1_9To1_8.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/protocol1_9to1_8/MixinMetadataRewriter1_9To1_8.java @@ -12,7 +12,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import java.util.List; -// Copyright RaphiMC/RK_01 - GPL v3 LICENSE +// Copyright RaphiMC/RK_01 - LICENSE file @Mixin(value = MetadataRewriter1_9To1_8.class, remap = false) public abstract class MixinMetadataRewriter1_9To1_8 { diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinChatScreen.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinChatScreen.java deleted file mode 100644 index acf4cc63..00000000 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinChatScreen.java +++ /dev/null @@ -1,21 +0,0 @@ -package de.florianmichael.viafabricplus.injection.mixin.fixes.visual; - -import de.florianmichael.viafabricplus.settings.groups.VisualSettings; -import net.minecraft.client.gui.hud.ChatHud; -import net.minecraft.client.gui.hud.MessageIndicator; -import net.minecraft.client.gui.screen.ChatScreen; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -@Mixin(ChatScreen.class) -public class MixinChatScreen { - - @Redirect(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/ChatHud;getIndicatorAt(DD)Lnet/minecraft/client/gui/hud/MessageIndicator;")) - public MessageIndicator removeIndicator(ChatHud instance, double mouseX, double mouseY) { - if (VisualSettings.getClassWrapper().hideSignatureIndicator.getValue()) { - return null; - } - return instance.getIndicatorAt(mouseX, mouseY); - } -} diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinClientPlayNetworkHandler.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinClientPlayNetworkHandler.java deleted file mode 100644 index c06088c5..00000000 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinClientPlayNetworkHandler.java +++ /dev/null @@ -1,17 +0,0 @@ -package de.florianmichael.viafabricplus.injection.mixin.fixes.visual; - -import de.florianmichael.viafabricplus.settings.groups.VisualSettings; -import net.minecraft.client.network.ClientPlayNetworkHandler; -import net.minecraft.network.packet.s2c.play.ServerMetadataS2CPacket; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -@Mixin(ClientPlayNetworkHandler.class) -public class MixinClientPlayNetworkHandler { - - @Redirect(method = "onServerMetadata", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/s2c/play/ServerMetadataS2CPacket;isSecureChatEnforced()Z")) - public boolean removeSecureChatWarning(ServerMetadataS2CPacket instance) { - return instance.isSecureChatEnforced() || VisualSettings.getClassWrapper().disableSecureChatWarning.getValue(); - } -} diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinClientPlayerEntity.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinClientPlayerEntity.java deleted file mode 100644 index 66ebdc97..00000000 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/visual/MixinClientPlayerEntity.java +++ /dev/null @@ -1,25 +0,0 @@ -package de.florianmichael.viafabricplus.injection.mixin.fixes.visual; - -import com.mojang.authlib.GameProfile; -import de.florianmichael.viafabricplus.definition.v1_8_x.ArmorPointsDefinition; -import de.florianmichael.viafabricplus.settings.groups.VisualSettings; -import net.minecraft.client.network.AbstractClientPlayerEntity; -import net.minecraft.client.network.ClientPlayerEntity; -import net.minecraft.client.world.ClientWorld; -import org.spongepowered.asm.mixin.Mixin; - -@Mixin(ClientPlayerEntity.class) -public class MixinClientPlayerEntity extends AbstractClientPlayerEntity { - - public MixinClientPlayerEntity(ClientWorld world, GameProfile profile) { - super(world, profile); - } - - @Override - public int getArmor() { - if (VisualSettings.getClassWrapper().emulateArmorHud.getValue()) { - return ArmorPointsDefinition.sum(); - } - return super.getArmor(); - } -} diff --git a/src/main/java/de/florianmichael/viafabricplus/settings/groups/VisualSettings.java b/src/main/java/de/florianmichael/viafabricplus/settings/groups/VisualSettings.java index 66102bbb..185df8da 100644 --- a/src/main/java/de/florianmichael/viafabricplus/settings/groups/VisualSettings.java +++ b/src/main/java/de/florianmichael/viafabricplus/settings/groups/VisualSettings.java @@ -25,6 +25,9 @@ public class VisualSettings extends SettingGroup { public final ProtocolSyncBooleanSetting emulateArmorHud = new ProtocolSyncBooleanSetting(this, "Emulate Armor hud", ProtocolRange.andOlder(ProtocolVersion.v1_8)); public final ProtocolSyncBooleanSetting removeNewerFeaturesFromCommandBlockScreen = new ProtocolSyncBooleanSetting(this, "Remove newer features from Command block screen", ProtocolRange.andOlder(ProtocolVersion.v1_8)); + // r1_0_0tor1_0_1 -> b1_8tob1_8_1 + public final ProtocolSyncBooleanSetting replaceHurtSoundWithOOFSound = new ProtocolSyncBooleanSetting(this, "Replace hurt sound with OOF sound", ProtocolRange.andOlder(LegacyProtocolVersion.b1_8tob1_8_1)); + // a1_0_15 -> c0_28toc0_30 public final ProtocolSyncBooleanSetting replaceCreativeInventory = new ProtocolSyncBooleanSetting(this, "Replace creative inventory", ProtocolRange.andOlder(LegacyProtocolVersion.c0_28toc0_30)); public final ProtocolSyncBooleanSetting oldWalkingAnimation = new ProtocolSyncBooleanSetting(this, "Old walking animation", ProtocolRange.andOlder(LegacyProtocolVersion.c0_28toc0_30)); diff --git a/src/main/resources/assets/minecraft/blockstates/chest.json b/src/main/resources/assets/minecraft/blockstates/chest.json new file mode 100644 index 00000000..4aec7582 --- /dev/null +++ b/src/main/resources/assets/minecraft/blockstates/chest.json @@ -0,0 +1,55 @@ +{ + "variants": { + "type=single": { + "model": "viafabricplus:block/chest_single" + }, + "type=left,facing=south": { + "model": "viafabricplus:block/chest_right", + "rotation": { + "y": -90 + } + }, + "type=left,facing=east": { + "model": "viafabricplus:block/chest_right", + "rotation": { + "y": -90 + } + }, + "type=left,facing=north": { + "model": "viafabricplus:block/chest_right", + "rotation": { + "y": 180 + } + }, + "type=left,facing=west": { + "model": "viafabricplus:block/chest_right", + "rotation": { + "y": 90 + } + }, + "type=right,facing=south": { + "model": "viafabricplus:block/chest_left", + "rotation": { + "y": -90 + } + }, + "type=right,facing=east": { + "model": "viafabricplus:block/chest_left", + "rotation": { + "y": -90 + } + }, + "type=right,facing=north": { + "model": "viafabricplus:block/chest_left", + "rotation": { + "y": 180 + } + }, + "type=right,facing=west": { + "model": "viafabricplus:block/chest_left", + "rotation": { + "y": 90 + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/viafabricplus/models/block/chest_left.json b/src/main/resources/assets/viafabricplus/models/block/chest_left.json new file mode 100644 index 00000000..7c08e658 --- /dev/null +++ b/src/main/resources/assets/viafabricplus/models/block/chest_left.json @@ -0,0 +1,24 @@ +{ + "credit": "Gaming32", + "textures": { + "0": "viafabricplus:block/chest_end", + "1": "viafabricplus:block/chest_left_front", + "2": "viafabricplus:block/chest_single_side", + "3": "viafabricplus:block/chest_left_back", + "particle": "viafabricplus:block/chest_end" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#missing"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/viafabricplus/models/block/chest_right.json b/src/main/resources/assets/viafabricplus/models/block/chest_right.json new file mode 100644 index 00000000..f4e8971e --- /dev/null +++ b/src/main/resources/assets/viafabricplus/models/block/chest_right.json @@ -0,0 +1,24 @@ +{ + "credit": "Gaming32", + "textures": { + "0": "viafabricplus:block/chest_right_front", + "1": "viafabricplus:block/chest_end", + "2": "viafabricplus:block/chest_single_side", + "3": "viafabricplus:block/chest_right_back", + "particle": "viafabricplus:block/chest_end" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#3"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#missing"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/viafabricplus/models/block/chest_single.json b/src/main/resources/assets/viafabricplus/models/block/chest_single.json new file mode 100644 index 00000000..2d1ef3f3 --- /dev/null +++ b/src/main/resources/assets/viafabricplus/models/block/chest_single.json @@ -0,0 +1,23 @@ +{ + "credit": "Gaming32", + "textures": { + "0": "viafabricplus:block/chest_end", + "1": "viafabricplus:block/chest_single_front", + "2": "viafabricplus:block/chest_single_side", + "particle": "viafabricplus:block/chest_end" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/viafabricplus/sounds.json b/src/main/resources/assets/viafabricplus/sounds.json new file mode 100644 index 00000000..ccedb447 --- /dev/null +++ b/src/main/resources/assets/viafabricplus/sounds.json @@ -0,0 +1,7 @@ +{ + "random.hurt": { + "sounds": [ + "viafabricplus:random/hurt" + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/viafabricplus/sounds/random/hurt.ogg b/src/main/resources/assets/viafabricplus/sounds/random/hurt.ogg new file mode 100644 index 00000000..b4cbc12e Binary files /dev/null and b/src/main/resources/assets/viafabricplus/sounds/random/hurt.ogg differ diff --git a/src/main/resources/assets/viafabricplus/textures/block/chest_end.png b/src/main/resources/assets/viafabricplus/textures/block/chest_end.png new file mode 100644 index 00000000..9f66db86 Binary files /dev/null and b/src/main/resources/assets/viafabricplus/textures/block/chest_end.png differ diff --git a/src/main/resources/assets/viafabricplus/textures/block/chest_left_back.png b/src/main/resources/assets/viafabricplus/textures/block/chest_left_back.png new file mode 100644 index 00000000..c141fda9 Binary files /dev/null and b/src/main/resources/assets/viafabricplus/textures/block/chest_left_back.png differ diff --git a/src/main/resources/assets/viafabricplus/textures/block/chest_left_front.png b/src/main/resources/assets/viafabricplus/textures/block/chest_left_front.png new file mode 100644 index 00000000..39d178b7 Binary files /dev/null and b/src/main/resources/assets/viafabricplus/textures/block/chest_left_front.png differ diff --git a/src/main/resources/assets/viafabricplus/textures/block/chest_right_back.png b/src/main/resources/assets/viafabricplus/textures/block/chest_right_back.png new file mode 100644 index 00000000..8cf79d53 Binary files /dev/null and b/src/main/resources/assets/viafabricplus/textures/block/chest_right_back.png differ diff --git a/src/main/resources/assets/viafabricplus/textures/block/chest_right_front.png b/src/main/resources/assets/viafabricplus/textures/block/chest_right_front.png new file mode 100644 index 00000000..6dbf9c38 Binary files /dev/null and b/src/main/resources/assets/viafabricplus/textures/block/chest_right_front.png differ diff --git a/src/main/resources/assets/viafabricplus/textures/block/chest_single_front.png b/src/main/resources/assets/viafabricplus/textures/block/chest_single_front.png new file mode 100644 index 00000000..7e8c4afd Binary files /dev/null and b/src/main/resources/assets/viafabricplus/textures/block/chest_single_front.png differ diff --git a/src/main/resources/assets/viafabricplus/textures/block/chest_single_side.png b/src/main/resources/assets/viafabricplus/textures/block/chest_single_side.png new file mode 100644 index 00000000..045d3ef9 Binary files /dev/null and b/src/main/resources/assets/viafabricplus/textures/block/chest_single_side.png differ diff --git a/src/main/resources/viafabricplus.mixins.json b/src/main/resources/viafabricplus.mixins.json index 31727e83..b05ac22e 100644 --- a/src/main/resources/viafabricplus.mixins.json +++ b/src/main/resources/viafabricplus.mixins.json @@ -30,6 +30,7 @@ "fixes.block.MixinBlockView", "fixes.block.MixinBrewingStandBlock", "fixes.block.MixinCauldronBlock", + "fixes.block.MixinChestBlock", "fixes.block.MixinEndPortalBlock", "fixes.block.MixinEndPortalFrameBlock", "fixes.block.MixinFarmlandBlock", @@ -129,18 +130,19 @@ "defaultRequire": 1 }, "client": [ - "bridge.MixinOptionsScreen", "bridge.MixinConnectScreen", "bridge.MixinDownloadingTerrainScreen", + "bridge.MixinOptionsScreen", + "fixes.MixinChestBlockEntityRenderer", "fixes.screen.MixinChatScreen", - "fixes.visual.MixinBipedEntityModel", - "fixes.visual.MixinChatHud", + "fixes.MixinBipedEntityModel", + "fixes.screen.hud.MixinChatHud", "fixes.visual.MixinChatScreen", "fixes.visual.MixinClientPlayerEntity", "fixes.visual.MixinClientPlayNetworkHandler", - "fixes.visual.MixinCommandBlockScreen", - "fixes.visual.MixinCreativeInventoryScreen", - "fixes.visual.MixinItemRenderer", - "fixes.visual.MixinJigsawBlockScreen" + "fixes.screen.MixinCommandBlockScreen", + "fixes.screen.MixinCreativeInventoryScreen", + "fixes.MixinItemRenderer", + "fixes.screen.MixinJigsawBlockScreen" ] }