Skip to content

Commit

Permalink
Merge branch '1.20.4' into 1.20.6
Browse files Browse the repository at this point in the history
# Conflicts:
#	settings.gradle.kts
  • Loading branch information
rfresh2 committed Oct 21, 2024
2 parents 13e2f3d + 4112223 commit 1fcabeb
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 121 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ private void createMetadataTable() {
private void createHighlightsTableIfNotExists(ResourceKey<Level> dimension) {
try (var statement = connection.createStatement()) {
statement.executeUpdate("CREATE TABLE IF NOT EXISTS \"" + getTableName(dimension) + "\" (x INTEGER, z INTEGER, foundTime INTEGER)");

// cleanup oopsie typo in 2.15 v0 to v1 migration
statement.executeUpdate("DROP INDEX IF EXISTS \"unique_xz" + getTableName(dimension) + "\"");

statement.executeUpdate("CREATE UNIQUE INDEX IF NOT EXISTS \"unique_xz_" + getTableName(dimension) + "\" ON \"" + getTableName(dimension) + "\" (x, z)");
} catch (Exception e) {
XaeroPlus.LOGGER.error("Error creating highlights table for db: {} in dimension: {}", databaseName, dimension.location());
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,28 @@
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import xaero.common.minimap.radar.MinimapRadarList;
import xaero.common.minimap.radar.category.setting.EntityRadarCategorySettings;
import xaero.common.minimap.render.radar.element.RadarRenderContext;
import xaero.common.minimap.render.radar.element.RadarRenderProvider;
import xaero.hud.HudSession;
import xaeroplus.Globals;
import xaeroplus.feature.extensions.IScreenRadarRenderContext;
import xaero.hud.minimap.element.render.MinimapElementRenderLocation;
import xaeroplus.settings.Settings;

import java.util.Objects;

@Mixin(value = RadarRenderProvider.class, remap = false)
public class MixinRadarRenderProvider {

@Shadow
private MinimapRadarList currentList;

@Inject(method = "setupContextAndGetNext(ILxaero/common/minimap/render/radar/element/RadarRenderContext;)Lnet/minecraft/world/entity/Entity;", at = @At(
@Inject(method = "setupContextAndGetNext(Lxaero/hud/minimap/element/render/MinimapElementRenderLocation;Lxaero/common/minimap/render/radar/element/RadarRenderContext;)Lnet/minecraft/world/entity/Entity;", at = @At(
value = "RETURN"
), remap = true) // $REMAP
public void setupContextAndGetNextInject(final int location, final RadarRenderContext context, final CallbackInfoReturnable<Entity> cir) {
public void forceEntityRadarRenderSettings(final MinimapElementRenderLocation location, final RadarRenderContext context, final CallbackInfoReturnable<Entity> cir) {
final Entity e = cir.getReturnValue();
if (e instanceof Player) {
if (!Objects.equals(e, Minecraft.getInstance().player)) {
if (Settings.REGISTRY.alwaysRenderPlayerIconOnRadar.get()) {
context.icon = true;
}
if (Settings.REGISTRY.alwaysRenderPlayerWithNameOnRadar.get()) {
context.name = true;
}
}
if (!(e instanceof Player)) return;
if (e == Minecraft.getInstance().player) return;
if (Settings.REGISTRY.alwaysRenderPlayerIconOnRadar.get()) {
context.icon = true;
}

if (!((IScreenRadarRenderContext) (Object) context).isWorldMap()) {
context.nameScale = HudSession.getCurrentSession().getHudMod().getSettings().getDotNameScale() * Globals.minimapScaleMultiplier / Globals.minimapSizeMultiplier;
context.iconScale = this.currentList.getCategory().getSettingValue(EntityRadarCategorySettings.ICON_SCALE) * Globals.minimapScaleMultiplier / Globals.minimapSizeMultiplier;
if (Settings.REGISTRY.alwaysRenderPlayerWithNameOnRadar.get()) {
context.name = true;
}
}
}
3 changes: 0 additions & 3 deletions common/src/main/resources/xaeroplus.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"MixinImprovedFramebuffer",
"MixinKeyEventHandler",
"MixinLeveledRegion",
"MixinMapElementRenderHandler",
"MixinMapPixel",
"MixinMapProcessor",
"MixinMapSaveLoad",
Expand All @@ -45,7 +44,6 @@
"MixinMapWriter",
"MixinMinimap",
"MixinMinimapElementMapRendererHandler",
"MixinMinimapElementRendererHandler",
"MixinMinimapFBORenderer",
"MixinMinimapModSettings",
"MixinMinimapOption",
Expand All @@ -57,7 +55,6 @@
"MixinModClientEvents",
"MixinOverlay",
"MixinPatreon",
"MixinRadarRenderContext",
"MixinRadarRenderProvider",
"MixinSupportXaeroMinimap",
"MixinSupportXaeroWorldmap",
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pluginManagement {
}
}
gradle.extra.apply {
set("mod_version", "2.24.4")
set("mod_version", "2.24.5")
set("minecraft_version", "1.20.6")
set("parchment_version", "2024.06.16")
set("worldmap_version_fabric", "1.39.0")
Expand Down

0 comments on commit 1fcabeb

Please sign in to comment.