Skip to content

Commit

Permalink
fix advancements
Browse files Browse the repository at this point in the history
  • Loading branch information
Faithcaio committed Nov 26, 2023
1 parent 10fe337 commit a33dcc1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/
package org.spongepowered.common.bridge.advancements;

import org.checkerframework.checker.nullness.qual.Nullable;
import org.spongepowered.api.advancement.Advancement;

public interface DisplayInfoBridge {
Expand All @@ -33,7 +32,4 @@ public interface DisplayInfoBridge {

void bridge$setAdvancement(Advancement advancement);

@Nullable String bridge$getBackground();

void bridge$setBackground(@Nullable String background);
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,14 @@
import static com.google.common.base.Preconditions.checkState;

import net.minecraft.advancements.DisplayInfo;
import net.minecraft.resources.ResourceLocation;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.spongepowered.api.advancement.Advancement;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.common.bridge.advancements.DisplayInfoBridge;

@Mixin(DisplayInfo.class)
public abstract class DisplayInfoMixin implements DisplayInfoBridge {

// @formatter:off
@Shadow @Final @Mutable @Nullable private ResourceLocation background;
// @formatter:on

@Nullable private Advancement impl$advancement;

@Override
Expand All @@ -56,14 +48,4 @@ public abstract class DisplayInfoMixin implements DisplayInfoBridge {
this.impl$advancement = advancement;
}

@Nullable
@Override
public String bridge$getBackground() {
return this.background == null ? null : this.background.toString();
}

@Override
public void bridge$setBackground(@Nullable String background) {
this.background = background == null ? null : new ResourceLocation(background);
}
}

0 comments on commit a33dcc1

Please sign in to comment.