Skip to content

Commit

Permalink
WM1.36.0 MM23.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
rfresh2 committed Oct 23, 2023
1 parent aaab816 commit a76aa15
Show file tree
Hide file tree
Showing 11 changed files with 181 additions and 167 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/fabric-1.20.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
branches:
- "fabric-1.20.1"
env:
WORLDMAP_VERSION: "1.35.0"
MINIMAP_VERSION: "23.8.3"
WORLDMAP_VERSION: "1.36.0"
MINIMAP_VERSION: "23.8.4"
MINECRAFT_VERSION: "1.20.1"
MINECRAFT_VERSION_SHORT: "1.20"
MOD_LOADER: "Fabric"
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ dependencies {
jarLibs "com.github.collarmc:pounce:0e8492b68e"
jarLibs 'org.xerial:sqlite-jdbc:3.43.0.0'

modImplementation "maven.modrinth:xaeros-world-map:1.35.0_Fabric_1.20"
modImplementation "maven.modrinth:xaeros-minimap:23.8.3_Fabric_1.20"
modCompileOnly files("libs/BetterPvP_23.8.3_Fabric_1.20.jar")
modImplementation "maven.modrinth:xaeros-world-map:1.36.0_Fabric_1.20"
modImplementation "maven.modrinth:xaeros-minimap:23.8.4_Fabric_1.20"
modCompileOnly files("libs/BetterPvP_23.8.4_Fabric_1.20.jar")
modImplementation files("libs/baritone-api-fabric-1.20.1-elytra-beta-v1.jar")
modCompileOnly "maven.modrinth:waystones:14.0.2+fabric-1.20"
modCompileOnly "maven.modrinth:balm:7.1.4+fabric-1.20.1"
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/java/xaeroplus/XaeroPlus.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class XaeroPlus implements ClientModInitializer {
public static final Logger LOGGER = LoggerFactory.getLogger("XaeroPlus");
public static final EventBus EVENT_BUS = new EventBus(Runnable::run);
public static AtomicBoolean initialized = new AtomicBoolean(false);
private static final String compatibleMinimapVersion = "23.8.3";
private static final String compatibleMinimapVersion = "23.8.4";

public static void initialize() {
if (initialized.compareAndSet(false, true)) {
Expand Down
45 changes: 24 additions & 21 deletions src/main/java/xaeroplus/mixin/client/MixinGuiMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ public abstract class MixinGuiMap extends ScreenBase implements IRightClickableE
ButtonWidget switchToNetherButton;
ButtonWidget switchToOverworldButton;
ButtonWidget switchToEndButton;

@Final
@Shadow
private static Text FULL_RELOAD_IN_PROGRESS = Text.translatable("gui.xaero_full_reload_in_progress");
@Final
@Shadow
private static final double ZOOM_STEP = 1.2;
Expand Down Expand Up @@ -894,15 +896,8 @@ public void render(DrawContext guiGraphics, int scaledMouseX, int scaledMouseY,
region.getParent().setShouldCheckForUpdatesRecursive(true);
}

if (!region.recacheHasBeenRequested()
&& !region.reloadHasBeenRequested()
&& !region.isRefreshing()
&& (
region.getLoadState() == 4
|| region.getLoadState() == 2 && region.isBeingWritten()
|| region.getLoadState() == 0
)
&& (
if (region.canRequestReload_unsynced()
&& (
reloadEverything && region.getReloadVersion() != globalReloadVersion
|| region.getCacheHashCode() != globalRegionCacheHashCode
|| region.caveStartOutdated(globalCaveStart, globalCaveDepth)
Expand Down Expand Up @@ -1218,13 +1213,7 @@ public void render(DrawContext guiGraphics, int scaledMouseX, int scaledMouseY,
LeveledRegion<?> nextToLoad = this.mapProcessor.getMapSaveLoad().getNextToLoadByViewing();
boolean shouldRequest = false;
if (nextToLoad != null) {
synchronized(nextToLoad) {
if (!nextToLoad.reloadHasBeenRequested()
&& !nextToLoad.hasRemovableSourceData()
&& (!(nextToLoad instanceof MapRegion) || !((MapRegion)nextToLoad).isRefreshing())) {
shouldRequest = true;
}
}
shouldRequest = nextToLoad.shouldAllowAnotherRegionToLoad();
} else {
shouldRequest = true;
}
Expand Down Expand Up @@ -1256,10 +1245,7 @@ public void render(DrawContext guiGraphics, int scaledMouseX, int scaledMouseY,
MapRegion region = this.regionBuffer.get(i);
if (region != nextToLoad || this.regionBuffer.size() <= 1) {
synchronized(region) {
if (!region.reloadHasBeenRequested()
&& !region.recacheHasBeenRequested()
&& (!(region instanceof MapRegion) || !region.isRefreshing())
&& (region.getLoadState() == 0 || region.getLoadState() == 4 || region.getLoadState() == 2 && region.isBeingWritten())) {
if (region.canRequestReload_unsynced()) {
if (region.getLoadState() == 2) {
region.requestRefresh(this.mapProcessor);
} else {
Expand Down Expand Up @@ -1707,6 +1693,23 @@ public void render(DrawContext guiGraphics, int scaledMouseX, int scaledMouseY,
);
}

if (this.dimension.getFullReloader() != null && !mc.options.hudHidden) {
subtleTooltipOffset += 12;
MapRenderHelper.drawCenteredStringWithBackground(
guiGraphics,
mc.textRenderer,
FULL_RELOAD_IN_PROGRESS,
this.width / 2,
this.height - subtleTooltipOffset,
-1,
0.0F,
0.0F,
0.0F,
0.4F,
backgroundVertexBuffer
);
}

if (WorldMap.settings.displayCaveModeStart && !mc.options.hudHidden) {
subtleTooltipOffset += 12;
if (globalCaveStart != Integer.MAX_VALUE && globalCaveStart != Integer.MIN_VALUE) {
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/xaeroplus/mixin/client/MixinMapProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,8 @@ public MapRegion getMapRegionCustomDimension(int caveLayer, int regX, int regZ,
if (regionDetection != null) {
regionDetection.transferInfoTo(region);
mapLayer.removeRegionDetection(regX, regZ);
} else if (!region.isNormalMapData() && mapDimension.getWorldSaveRegionDetection(regX, regZ) == null) {
RegionDetection worldSaveRegionDetection = new RegionDetection(
} else if (mapLayer.getCompleteRegionDetection(regX, regZ) == null) {
RegionDetection perpetualRegionDetection = new RegionDetection(
region.getWorldId(),
region.getDimId(),
region.getMwId(),
Expand All @@ -550,8 +550,10 @@ public MapRegion getMapRegionCustomDimension(int caveLayer, int regX, int regZ,
this.getGlobalVersion(),
true
);
mapDimension.addWorldSaveRegionDetection(worldSaveRegionDetection);
mapLayer.removeRegionDetection(regX, regZ);
mapLayer.tryAddingToCompleteRegionDetection(perpetualRegionDetection);
if (!region.isNormalMapData()) {
mapLayer.removeRegionDetection(regX, regZ);
}
}

if (!region.hasHadTerrain()) {
Expand Down
Loading

0 comments on commit a76aa15

Please sign in to comment.