Skip to content
Merged

Dev #370

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1b0d1a7
chore: moved entity face icon code over to ftb library 2101.1.21
desht Sep 10, 2025
c028d04
build: version -> 2101.1.11
desht Sep 10, 2025
ccd1dde
feat: waypoints now support translation keys
desht Sep 12, 2025
5e6bad0
build: update ftb library dep version
desht Sep 24, 2025
70e6356
chore: changelog updated
desht Sep 24, 2025
086edcc
Create es_es.json and update es_mx.json (#365)
ArrivedBog593 Sep 24, 2025
52a8374
Create es_es.json and update es_mx.json (#365)
ArrivedBog593 Sep 24, 2025
02b445f
chore: started update to 1.21.8
desht Sep 25, 2025
f64b714
chore: started update to 1.21.8
desht Sep 25, 2025
7f75393
feat: more porting :tada:
MichaelHillcox Sep 25, 2025
ea62988
chore: more porting
MichaelHillcox Sep 25, 2025
6a50a69
feat: all the non-rendering classes now sorted
MichaelHillcox Sep 26, 2025
b21c35b
feat: it compiles but there is a long way until correct map rendering
MichaelHillcox Sep 26, 2025
9c81aaf
chore: rendering is complicated!
MichaelHillcox Sep 26, 2025
e888e08
feat: custom min y level to start scanning from
MichaelHillcox Oct 10, 2025
14f2f31
fix: snapshots
MichaelHillcox Oct 10, 2025
a31b343
chore: version bump
MichaelHillcox Oct 10, 2025
7b0799b
feat: overridable min_y levels for dimensions with ceilings
MichaelHillcox Oct 25, 2025
5a0ce8f
Update common/src/main/java/dev/ftb/mods/ftbchunks/client/FTBChunksCl…
MichaelHillcox Oct 25, 2025
3cb5ed0
fix: improve lookup time
MichaelHillcox Oct 25, 2025
5b75aa2
fix: more minor code improvements
MichaelHillcox Oct 25, 2025
f1eb31f
fix: remove boxing
MichaelHillcox Oct 25, 2025
c38bb65
fix: address pr concerns
MichaelHillcox Oct 26, 2025
367cd60
fix: wrong version bump
MichaelHillcox Oct 27, 2025
4d4e170
feat: fire event to allow custom min-Y calculator registration
desht Oct 27, 2025
23d6a29
build: version -> 2101.1.13
desht Oct 27, 2025
7d05034
chore: update changelog
MichaelHillcox Oct 27, 2025
df9e48d
chore: more java doc for new min-Y event
desht Oct 28, 2025
3b399d6
build: version -> 2101.1.14
desht Oct 28, 2025
9ad786e
fix: hopefully fix a race condition with stale region purge
desht Dec 11, 2025
e2786bb
build: update ftb library/teams dep versions
desht Dec 11, 2025
3165b2d
Merge branch '1.21.1/dev' into dev
MichaelHillcox Jan 9, 2026
3bafdd0
fix: port issues
MichaelHillcox Jan 9, 2026
95755c9
chore: well it compiles again 21.11
MichaelHillcox Jan 9, 2026
4f7dee9
feat: more porting and move over to the latest Lib version post refac…
MichaelHillcox Jan 14, 2026
3841a65
feat: almost working map
MichaelHillcox Jan 14, 2026
c4f552c
fix: post fixing mess
MichaelHillcox Jan 14, 2026
8b7c474
fix: most of the main render components are back... Most. Masking loo…
MichaelHillcox Jan 14, 2026
614ebe4
chore: some map rendering fixes
desht Jan 22, 2026
0888559
fix: drop lastChunkX/Y check from MinimapRegionCutoutTexture
desht Jan 23, 2026
d9366b7
fix: get on-screen waypoints working again
desht Jan 26, 2026
32a2790
chore: a whole bunch more cleanup
desht Jan 27, 2026
8fa3c12
chore: attempt to use shader for the minimap mask.
MichaelHillcox Jan 29, 2026
c6bfcd6
chore: big giant cleanup of FTBChunksClient
desht Jan 30, 2026
b510169
chore: a load more cleanup
desht Feb 2, 2026
b7d4c05
chore: make minimap_blur mode work again
desht Feb 3, 2026
77918d0
chore: a bunch more code cleanup
desht Feb 5, 2026
3334d29
chore: a bit of client config reorg & other cleanup
desht Feb 9, 2026
a789a1f
fix: sync custom claim problems to client as well as standard ones
desht Feb 9, 2026
51ca0fd
feat: added claim modes in chunk claiming screen
desht Feb 9, 2026
a24e4b3
chore: chunk claiming mode now persists in client config
desht Feb 9, 2026
aca4fc5
feat: added new ChunksUpdatedFromServerEvent event
desht Jan 19, 2026
002c0a4
feat: allow non-admins to see (but not change) server config
desht Feb 9, 2026
64691b5
feat: some ftb backup3 integration (neoforge)
desht Feb 9, 2026
f087e03
chore: some translation key rearrangement for configs
desht Feb 10, 2026
3d237d2
fix: ensure claim limits are updated when player leaves teams
desht Feb 17, 2026
22dd16e
chore: replaced all GLFW constants with InputConstants
desht Feb 18, 2026
5f32656
build: updated dep versions
desht Feb 27, 2026
05323e9
fix: sync a player's claim limits to them when they leave a party
desht Feb 25, 2026
5e7f2f9
chore: remove some commented code
desht Feb 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Java CI - Build on Push

on:
push:
branches: [ main, dev, "1.*" ]
branches: [ main, dev, "1.**" ]
workflow_dispatch:
inputs:
skip_maven_publish:
Expand Down
34 changes: 31 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,34 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2111.1.0]

### Changed

## [2101.1.13]

### Added
* An API `CustomMinYEvent` event to register custom `min-y` providers

### Removed
* Remove the previously added support for custom min-y per chunk scanning. This does not effect the global min-y already available

## [2101.1.12]

### Added
* Added support for a user defined minimum `y` level to start the surface block scanning from. This allows the scanning to start from a `y` level other than the worlds lowest point.

## [2101.1.11]

### Added
* Translation keys may now be used as waypoint text; the translated text will be shown where applicable
* Primarily useful for adding localized waypoints via command or API

### Changed
* Moved a lot of entity face icon loading code into FTB Library
* No player-visible changes here
* This release requires FTB Library 2101.1.21+

## [2101.1.10]

### Added
Expand Down Expand Up @@ -298,7 +326,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Periodically, least-recently accessed region data is released from RAM, requiring reload from disk on the next access. Every 300 seconds by default; can be tuned in client config.
* When the large map screen is closed, regions furthest from the player are released from RAM, down to 32 loaded regions by default; also tunable in client config.
* Map zoom-out is limited where the ratio of the number of known (explored) regions to available JVM memory is poor. Limiting zoom-out reduces the number of regions which need to be loaded in memory at a given moment. This can be disabled in client config if you prefer.
* New client config settings are available in the "Memory Usage" section of the client config; tuning them is a trade-off between RAM usage and disk activity. However, even when tuned toward lower RAM usage, the level of disk activity should not be a major concern.
* New client config settings are available in the "Memory Usage" section of the client config; tuning them is a trade-off between RAM usage and disk activity. However, even when tuned toward lower RAM usage, the level of disk activity should not be a major concern.

## [1902.3.20]

Expand All @@ -319,7 +347,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Fixed
* Fixed a crash with fake player mods which use buckets to pick up water in protected chunks
* Fixed interaction with Fabric mods which do block placement protection by firing the FAPI block break event directly (thanks @TelepathicGrunt)
* Example mod: Bumblezone
* Example mod: Bumblezone
* Architectury currently handles this via its own mixin


Expand Down Expand Up @@ -415,7 +443,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* This means player heads will only be visible to team-mates and allies by default; if you're not in a party team but want to be visible on the map, set your "Location Visibility" to "Public" in team settings.
* Player heads can now be tracked on the map at any range, not just inside the default entity tracking range
* The same visibility restrictions apply as above, via "Location Visibility"
* Added server-side config item `long_range_tracker_interval` which controls how frequently long-range tracking data is sent by the server to clients; default is every 20 ticks (for players who are moving).
* Added server-side config item `long_range_tracker_interval` which controls how frequently long-range tracking data is sent by the server to clients; default is every 20 ticks (for players who are moving).
* Set this to 0 to disable long-tracking entirely
* Be careful about setting this to very low (non-zero) values; it can cause extra server and network load, especially on very busy servers
* Added entity interaction protection as a Team setting
Expand Down
10 changes: 8 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false
id "me.modmuss50.mod-publish-plugin" version "0.5.1"
id "dev.architectury.loom" version "1.13-SNAPSHOT" apply false
id "me.modmuss50.mod-publish-plugin" version "1.1.0"
}

apply from: 'https://raw.githubusercontent.com/FTBTeam/mods-meta/main/gradle/changelog.gradle'
Expand Down Expand Up @@ -62,6 +62,12 @@ allprojects {
includeGroup "dev.ftb.mods"
}
}
maven {
url = "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
}

java {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package dev.ftb.mods.ftbchunks;

import dev.ftb.mods.ftbchunks.api.LevelMinYCalculator;
import dev.ftb.mods.ftbchunks.api.event.CustomMinYEvent;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.Level;

import java.util.List;
import java.util.OptionalInt;
import java.util.concurrent.CopyOnWriteArrayList;

public class CustomMinYRegistryImpl implements CustomMinYEvent.CustomMinYRegistry {
private static final CustomMinYRegistryImpl serverInstance = new CustomMinYRegistryImpl();
private static final CustomMinYRegistryImpl clientInstance = new CustomMinYRegistryImpl();

private final List<LevelMinYCalculator> calculators = new CopyOnWriteArrayList<>(); // needs to be threadsafe

public static CustomMinYRegistryImpl getInstance(boolean isClientSide) {
return isClientSide ? clientInstance : serverInstance;
}

public void register(LevelMinYCalculator calculator) {
calculators.add(calculator);
}

public int getMinYAt(Level level, BlockPos pos) {
for (var calc : calculators) {
OptionalInt h = calc.getLevelMinY(level, pos);
if (h.isPresent()) {
return h.getAsInt();
}
}
return level.getMinY();
}
}
Original file line number Diff line number Diff line change
@@ -1,97 +1,58 @@
package dev.ftb.mods.ftbchunks;

import com.mojang.logging.LogUtils;
import com.mojang.serialization.Codec;
import dev.ftb.mods.ftbchunks.client.gui.EntityIconSettingsScreen;
import dev.ftb.mods.ftblibrary.config.ConfigCallback;
import dev.ftb.mods.ftblibrary.config.ConfigGroup;
import dev.ftb.mods.ftblibrary.config.ConfigValue;
import dev.ftb.mods.ftblibrary.snbt.SNBTCompoundTag;
import dev.ftb.mods.ftblibrary.snbt.config.BaseValue;
import dev.ftb.mods.ftblibrary.snbt.config.SNBTConfig;
import dev.ftb.mods.ftblibrary.ui.Widget;
import dev.ftb.mods.ftblibrary.ui.input.MouseButton;
import net.minecraft.ResourceLocationException;
import dev.ftb.mods.ftblibrary.client.config.ConfigCallback;
import dev.ftb.mods.ftblibrary.client.config.EditableConfigGroup;
import dev.ftb.mods.ftblibrary.client.config.editable.EditableConfigValue;
import dev.ftb.mods.ftblibrary.client.gui.input.MouseButton;
import dev.ftb.mods.ftblibrary.client.gui.widget.Widget;
import dev.ftb.mods.ftblibrary.config.value.AbstractMapValue;
import dev.ftb.mods.ftblibrary.config.value.Config;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.Identifier;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.EntityType;
import org.jetbrains.annotations.Nullable;
import org.apache.commons.lang3.mutable.MutableInt;
import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;

import java.util.HashMap;
import java.util.Map;

public class EntityTypeBoolMapValue extends BaseValue<Map<ResourceKey<EntityType<?>>, Boolean>> {

public class EntityTypeBoolMapValue extends AbstractMapValue<Boolean> {
private static final Logger LOGGER = LogUtils.getLogger();

public EntityTypeBoolMapValue(@Nullable SNBTConfig c, String n, Map<ResourceKey<EntityType<?>>, Boolean> def) {
super(c, n, def);
super.set(new HashMap<>(def));
}

@Override
public void write(SNBTCompoundTag tag) {
Map<ResourceKey<EntityType<?>>, Boolean> map = get();
SNBTCompoundTag mapTag = new SNBTCompoundTag();

for (Map.Entry<ResourceKey<EntityType<?>>, Boolean> entry : map.entrySet()) {
mapTag.putBoolean(entry.getKey().location().toString(), entry.getValue());
}

tag.put(key, mapTag);
}

@Override
public void read(SNBTCompoundTag tag) {
Map<ResourceKey<EntityType<?>>, Boolean> map = new HashMap<>();

SNBTCompoundTag compound = tag.getCompound(key);
for (String key : compound.getAllKeys()) {
try {
ResourceLocation parse = ResourceLocation.parse(key);
map.put(ResourceKey.create(Registries.ENTITY_TYPE, parse), compound.getBoolean(key));
} catch (ResourceLocationException e) {
LOGGER.error("Failed to parse {} skipping", key, e);
}
}

set(map);
public EntityTypeBoolMapValue(Config parent, String key, Map<String, Boolean> defaultValue) {
super(parent, key, defaultValue, Codec.BOOL);
}

@Override
public void createClientConfig(ConfigGroup group) {
group.add(key, new EntityTypeBoolMapConfigValue(), get(), stringBooleanMap -> {
}, defaultValue);
protected @Nullable EditableConfigValue<?> fillClientConfig(EditableConfigGroup group) {
return group.add(key, new EntityTypeBoolMapConfigValue(), get(), stringBooleanMap -> {}, defaultValue);
}

public static class EntityTypeBoolMapConfigValue extends ConfigValue<Map<ResourceKey<EntityType<?>>, Boolean>> {

public static class EntityTypeBoolMapConfigValue extends EditableConfigValue<Map<String, Boolean>> {
@Override
public void onClicked(Widget clickedWidget, MouseButton button, ConfigCallback callback) {
new EntityIconSettingsScreen(false).openGui();
}

@Override
public Component getStringForGUI(@Nullable Map<ResourceKey<EntityType<?>>, Boolean> v) {
if (v == null) {
return super.getStringForGUI(null);
}
int enabled = 0;
int disabled = 0;
for (ResourceKey<EntityType<?>> entityTypeResourceKey : v.keySet()) {
EntityType<?> entityType = BuiltInRegistries.ENTITY_TYPE.get(entityTypeResourceKey);
if (entityType != null) {
public Component getStringForGUI(Map<String, Boolean> v) {
MutableInt enabled = new MutableInt();
MutableInt disabled = new MutableInt();
for (String entityTypeResourceKey : v.keySet()) {
BuiltInRegistries.ENTITY_TYPE.get(ResourceKey.create(Registries.ENTITY_TYPE, Identifier.parse(entityTypeResourceKey))).ifPresent(holder -> {
if (v.get(entityTypeResourceKey)) {
enabled++;
enabled.increment();
} else {
disabled++;
disabled.increment();
}
}
});
}
return Component.translatable("ftbchunks.gui.enabled_disabled_count", enabled, disabled);
return Component.translatable("ftbchunks.gui.enabled_disabled_count", enabled.get(), disabled.get());
}
}

Expand Down
3 changes: 1 addition & 2 deletions common/src/main/java/dev/ftb/mods/ftbchunks/FTBCUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public static boolean isRail(Block block) {
throw new AssertionError();
}


/**
* Used after various events have been cancelled server-side; client may already have updated the held item for the
* player, but it needs to be brought back in sync with the server.
Expand All @@ -24,7 +23,7 @@ public static boolean isRail(Block block) {
public static void forceHeldItemSync(ServerPlayer sp, InteractionHand hand) {
if (sp.connection != null) {
switch (hand) {
case MAIN_HAND -> sp.connection.send(new ClientboundContainerSetSlotPacket(-2, 0, sp.getInventory().selected, sp.getItemInHand(hand)));
case MAIN_HAND -> sp.connection.send(new ClientboundContainerSetSlotPacket(-2, 0, sp.getInventory().getSelectedSlot(), sp.getItemInHand(hand)));
case OFF_HAND -> sp.connection.send(new ClientboundContainerSetSlotPacket(-2, 0, Inventory.SLOT_OFFHAND, sp.getItemInHand(hand)));
}
}
Expand Down
Loading