Skip to content

Commit

Permalink
Update to Minecraft 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
ZockerAxel committed Jun 15, 2024
1 parent aa929a7 commit 9e75bbb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
plugins {
id("java")
id("maven-publish")
id("io.papermc.paperweight.userdev") version "1.6.2"
id("io.papermc.paperweight.userdev") version "1.7.1"
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
}

Expand All @@ -15,7 +15,7 @@ repositories {
}

dependencies {
paperweight.paperDevBundle("1.20.5-R0.1-SNAPSHOT")
paperweight.paperDevBundle("1.21-R0.1-SNAPSHOT")
}

java {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/eu/endercentral/crazy_advancements/NameKey.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package eu.endercentral.crazy_advancements;

import net.minecraft.resources.ResourceLocation;

import java.util.Objects;

import net.minecraft.resources.ResourceLocation;

/**
* Represents a Unique Name
*
Expand Down Expand Up @@ -88,7 +88,7 @@ public boolean isSimilar(NameKey anotherNameKey) {
* @return A {@link ResourceLocation} representation of this NameKey
*/
public ResourceLocation getMinecraftKey() {
if(mcKey == null) mcKey = new ResourceLocation(namespace, key);
if(mcKey == null) mcKey = ResourceLocation.fromNamespaceAndPath(namespace, key);
return mcKey;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static net.minecraft.advancements.Advancement toNmsAdvancement(Advancemen
ItemStack icon = CraftItemStack.asNMSCopy(display.getIcon());

boolean hasBackgroundTexture = display.getBackgroundTexture() != null;
Optional<ResourceLocation> backgroundTexture = hasBackgroundTexture ? Optional.of(new ResourceLocation(display.getBackgroundTexture())) : Optional.empty();
Optional<ResourceLocation> backgroundTexture = hasBackgroundTexture ? Optional.of(ResourceLocation.parse(display.getBackgroundTexture())) : Optional.empty();

float x = generateX(advancement.getTab(), display.generateX());
float y = generateY(advancement.getTab(), display.generateY());
Expand Down

0 comments on commit 9e75bbb

Please sign in to comment.