From ad922725f1f5e4d1e827fdbebf9e10744d0cb23a Mon Sep 17 00:00:00 2001 From: OliverSchlueter Date: Sat, 3 Aug 2024 12:18:59 +0200 Subject: [PATCH] no paperweight --- implementation_1_20_6/build.gradle.kts | 6 +----- .../fancyholograms/hologram/version/Hologram1_20_6.java | 7 ++----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/implementation_1_20_6/build.gradle.kts b/implementation_1_20_6/build.gradle.kts index 94f30dd7..440c6196 100644 --- a/implementation_1_20_6/build.gradle.kts +++ b/implementation_1_20_6/build.gradle.kts @@ -1,16 +1,12 @@ plugins { id("java-library") - id("io.papermc.paperweight.userdev") version "1.7.1" } val minecraftVersion = "1.20.6" -paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION - - dependencies { - paperweight.paperDevBundle("$minecraftVersion-R0.1-SNAPSHOT") + compileOnly("io.papermc.paper:paper-api:$minecraftVersion-R0.1-SNAPSHOT") compileOnly(project(":api")) compileOnly("de.oliver:FancyLib:${findProperty("fancyLibVersion")}") diff --git a/implementation_1_20_6/src/main/java/de/oliver/fancyholograms/hologram/version/Hologram1_20_6.java b/implementation_1_20_6/src/main/java/de/oliver/fancyholograms/hologram/version/Hologram1_20_6.java index 76a08281..0b776ff7 100644 --- a/implementation_1_20_6/src/main/java/de/oliver/fancyholograms/hologram/version/Hologram1_20_6.java +++ b/implementation_1_20_6/src/main/java/de/oliver/fancyholograms/hologram/version/Hologram1_20_6.java @@ -10,8 +10,6 @@ import de.oliver.fancysitula.api.entities.FS_RealPlayer; import de.oliver.fancysitula.api.entities.FS_TextDisplay; import de.oliver.fancysitula.factories.FancySitula; -import net.minecraft.util.Brightness; -import net.minecraft.world.entity.Display.TextDisplay; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -77,7 +75,7 @@ public void update() { // background final var background = textData.getBackground(); if (background == null) { - textDisplay.setBackground(TextDisplay.INITIAL_BACKGROUND); + textDisplay.setBackground(1073741824); // default background } else if (background == Hologram.TRANSPARENT) { textDisplay.setBackground(0); } else { @@ -112,8 +110,7 @@ public void update() { // brightness if (displayData.getBrightness() != null) { - Brightness brightness = new Brightness(displayData.getBrightness().getBlockLight(), displayData.getBrightness().getSkyLight()); - fsDisplay.setBrightnessOverride(brightness.pack()); + fsDisplay.setBrightnessOverride(displayData.getBrightness().getBlockLight() << 4 | displayData.getBrightness().getSkyLight() << 20); } // entity transformation