Skip to content

Commit

Permalink
spotlessApply (#21)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub GTNH Actions <>
  • Loading branch information
github-actions[bot] authored Sep 16, 2024
1 parent a4e3ed6 commit 1cada15
Showing 1 changed file with 32 additions and 32 deletions.
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

0 comments on commit 1cada15

Please sign in to comment.