Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spotless apply for branch revert-preprocess for #20 #21

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
public class MixinAnvilChunkLoader {

@Redirect(
method = "writeChunkToNBT",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/nbt/NBTTagCompound;setByteArray(Ljava/lang/String;[B)V",
ordinal = 0),
require = 1)
method = "writeChunkToNBT",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/nbt/NBTTagCompound;setByteArray(Ljava/lang/String;[B)V",
ordinal = 0),
require = 1)
private void neid$overrideWriteLSBArray(NBTTagCompound nbt, String s, byte[] oldbrokenbytes,
@Local(ordinal = 0) ExtendedBlockStorage ebs) {
@Local(ordinal = 0) ExtendedBlockStorage ebs) {
IExtendedBlockStorageMixin ebsMixin = (IExtendedBlockStorageMixin) ebs;
nbt.setByteArray("Blocks16", ebsMixin.getBlockData());
if (NEIDConfig.PostNeidWorldsSupport) {
Expand Down Expand Up @@ -60,14 +60,14 @@ public class MixinAnvilChunkLoader {
}

@Redirect(
method = "writeChunkToNBT",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/nbt/NBTTagCompound;setByteArray(Ljava/lang/String;[B)V",
ordinal = 2),
require = 1)
method = "writeChunkToNBT",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/nbt/NBTTagCompound;setByteArray(Ljava/lang/String;[B)V",
ordinal = 2),
require = 1)
private void neid$overrideWriteMetadataArray(NBTTagCompound nbt, String s, byte[] oldbrokenbytes,
@Local(ordinal = 0) ExtendedBlockStorage ebs) {
@Local(ordinal = 0) ExtendedBlockStorage ebs) {
IExtendedBlockStorageMixin ebsMixin = (IExtendedBlockStorageMixin) ebs;
nbt.setByteArray("Data16", ebsMixin.getBlockMeta());
if (NEIDConfig.PostNeidWorldsSupport) {
Expand All @@ -92,13 +92,13 @@ public class MixinAnvilChunkLoader {
}

@Redirect(
method = "readChunkFromNBT",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/chunk/storage/ExtendedBlockStorage;setBlockLSBArray([B)V"),
require = 1)
method = "readChunkFromNBT",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/chunk/storage/ExtendedBlockStorage;setBlockLSBArray([B)V"),
require = 1)
private void neid$overrideReadLSBArray(ExtendedBlockStorage ebs, byte[] oldbrokenbytes,
@Local(ordinal = 1) NBTTagCompound nbt) {
@Local(ordinal = 1) NBTTagCompound nbt) {
IExtendedBlockStorageMixin ebsMixin = (IExtendedBlockStorageMixin) ebs;
if (nbt.hasKey("Blocks16")) {
ebsMixin.setBlockData(nbt.getByteArray("Blocks16"), 0);
Expand All @@ -123,24 +123,24 @@ public class MixinAnvilChunkLoader {
}

@Redirect(
method = "readChunkFromNBT",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/nbt/NBTTagCompound;hasKey(Ljava/lang/String;I)Z",
ordinal = 0),
require = 1)
method = "readChunkFromNBT",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/nbt/NBTTagCompound;hasKey(Ljava/lang/String;I)Z",
ordinal = 0),
require = 1)
private boolean neid$overrideReadMSBArray(NBTTagCompound nbttagcompound1, String s, int i) {
return false;
}

@Redirect(
method = "readChunkFromNBT",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/chunk/storage/ExtendedBlockStorage;setBlockMetadataArray(Lnet/minecraft/world/chunk/NibbleArray;)V"),
require = 1)
method = "readChunkFromNBT",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/chunk/storage/ExtendedBlockStorage;setBlockMetadataArray(Lnet/minecraft/world/chunk/NibbleArray;)V"),
require = 1)
private void neid$overrideReadMetadataArray(ExtendedBlockStorage ebs, NibbleArray oldBrokenNibbleArray,
@Local(ordinal = 1) NBTTagCompound nbt) {
@Local(ordinal = 1) NBTTagCompound nbt) {
IExtendedBlockStorageMixin ebsMixin = (IExtendedBlockStorageMixin) ebs;
if (nbt.hasKey("Data16")) {
ebsMixin.setBlockMeta(nbt.getByteArray("Data16"), 0);
Expand Down