Skip to content

Commit

Permalink
Merge pull request #327 from FTBTeam/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
desht authored Nov 7, 2024
2 parents 4a97153 + b70dbe9 commit 476436a
Show file tree
Hide file tree
Showing 20 changed files with 50 additions and 63 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ 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).

## [2101.1.3]

### Changed
* Overhauled and cleaned up many icon textures

### Fixed
* Do some extra client-side map init checks which should resolve some issues with clients switching server, using technologies like Velocity proxy

## [2101.1.2]

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ protected void apply(JsonObject object, ResourceManager resourceManager, Profile
|| block instanceof FireBlock
|| block instanceof ButtonBlock
|| block instanceof TorchBlock && !(block instanceof RedstoneTorchBlock)
|| block instanceof StainedGlassPaneBlock
) {
BLOCK_ID_TO_COLOR_MAP.put(id, BlockColors.IGNORED);
} else if (block instanceof GrassBlock) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public void addWidgets() {
@Override
public void alignWidgets() {
removeAllClaims.setPosAndSize(2, 2, 12, 12);
adminButton.setPosAndSize(18, 2, 12, 12);
adminButton.setPosAndSize(18, 1, 12, 12);

closeButton.setPosAndSize(width - 16, 2, 12, 12);
mouseReferenceButton.setPosAndSize(width - 32, 2, 12, 12);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
import dev.ftb.mods.ftblibrary.icon.ImageIcon;
import dev.ftb.mods.ftblibrary.math.MathUtils;
import dev.ftb.mods.ftblibrary.math.XZ;
import dev.ftb.mods.ftblibrary.ui.*;
import dev.ftb.mods.ftblibrary.ui.Button;
import dev.ftb.mods.ftblibrary.ui.GuiHelper;
import dev.ftb.mods.ftblibrary.ui.Panel;
import dev.ftb.mods.ftblibrary.ui.ScreenWrapper;
import dev.ftb.mods.ftblibrary.ui.Theme;
import dev.ftb.mods.ftblibrary.ui.input.Key;
import dev.ftb.mods.ftblibrary.ui.input.MouseButton;
import dev.ftb.mods.ftblibrary.util.TimeUtils;
Expand All @@ -38,7 +42,15 @@
import net.minecraft.world.level.ChunkPos;
import org.lwjgl.glfw.GLFW;

import java.util.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.EnumMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.UUID;
import java.util.stream.Collectors;

import static dev.ftb.mods.ftbchunks.net.RequestChunkChangePacket.ChunkChangeOp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import dev.ftb.mods.ftblibrary.ui.SimpleButton;
import dev.ftb.mods.ftblibrary.ui.TextField;
import dev.ftb.mods.ftblibrary.ui.Theme;
import dev.ftb.mods.ftblibrary.ui.ToggleableButton;
import dev.ftb.mods.ftblibrary.ui.misc.AbstractThreePanelScreen;
import dev.ftb.mods.ftblibrary.util.TooltipList;
import dev.ftb.mods.ftblibrary.util.client.ClientTextComponentUtils;
Expand Down Expand Up @@ -122,7 +123,7 @@ public class InfoEntry extends Panel {

public InfoEntry(MinimapInfoComponent infoComponent, Panel panel) {
super(panel);
hideButton = ToggleVisibilityButton.create(this, !isComponentDisabled(infoComponent), (enabled) -> setComponentEnabled(infoComponent, enabled));
hideButton = new ToggleableButton(this, !isComponentDisabled(infoComponent), Icons.VISIBILITY_SHOW, Icons.VISIBILITY_HIDE, (widget, newState) -> setComponentEnabled(infoComponent, newState));
down = new SortScreenButton(InfoEntry.this, Component.translatable("ftbchunks.gui.move_up"), Icons.UP, (widget, button) -> move(false, isShiftKeyDown()));
up = new SortScreenButton(InfoEntry.this, Component.translatable("ftbchunks.gui.move_down"), Icons.DOWN, (widget, button) -> move(true, isShiftKeyDown()));
configButton = new SimpleButton(InfoEntry.this, Component.translatable("gui.settings"), Icons.SETTINGS, (widget, button) -> {
Expand Down Expand Up @@ -169,7 +170,7 @@ public void addWidgets() {
public void alignWidgets() {
down.setPosAndSize(6, height / 6 + 1, 6, 8);
up.setPosAndSize(6, height / 6 + 11, 6, 8);
hideButton.setPosAndSize(width - 18, height / 6, 12, 12);
hideButton.setPosAndSize(width - 18, height / 6 + 2, 12, 12);
field.setPosAndSize(16, 8, width - 37, height);
field.setPosAndSize(16, 8, width - 37, height);
if(!infoComponent.getConfigComponents().isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public void draw(MapType mapType, GuiGraphics graphics, int x, int y, int w, int
Player player = Minecraft.getInstance().player;
graphics.pose().pushPose();
graphics.pose().translate(x + w / 2f, y + h / 2f, 0F);
graphics.pose().scale(2f, 2f, 2f);
float scale = mapType == MapType.LARGE_MAP ? 2.5F : 2F;
graphics.pose().scale(scale, scale, scale);
graphics.pose().mulPose(Axis.ZP.rotationDegrees(player.getYRot() + 180F));
POINTER.draw(graphics, - w / 2, -h / 2, w, h);
graphics.pose().popPose();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import dev.ftb.mods.ftblibrary.ui.SimpleButton;
import dev.ftb.mods.ftblibrary.ui.TextField;
import dev.ftb.mods.ftblibrary.ui.Theme;
import dev.ftb.mods.ftblibrary.ui.ToggleableButton;
import dev.ftb.mods.ftblibrary.ui.input.Key;
import dev.ftb.mods.ftblibrary.ui.input.MouseButton;
import dev.ftb.mods.ftblibrary.ui.misc.AbstractButtonListScreen;
Expand Down Expand Up @@ -88,7 +89,7 @@ private void computeWaypointTextWidth() {

private void toggleAll(boolean collapsed) {
boolean allOpen = this.collapsed.values().stream().noneMatch(b -> b);
//Don't try and re-render if everything is already open
// Don't try and re-render if everything is already open
if (allOpen && !collapsed) {
return;
}
Expand Down Expand Up @@ -272,7 +273,7 @@ public RowPanel(Panel panel, WaypointImpl wp) {

@Override
public void addWidgets() {
add(hideButton = ToggleVisibilityButton.create(this, !wp.isHidden(), hidden -> wp.setHidden(!hidden)));
add(hideButton = new ToggleableButton(this, !wp.isHidden(), (widget, newState) -> wp.setHidden(!newState)));

add(nameField = new TextField(this).setTrim().setColor(Color4I.rgb(wp.getColor())).addFlags(Theme.SHADOW));

Expand Down Expand Up @@ -306,8 +307,8 @@ public void setWidth(int newWidth) {

int yOff = (this.height - getTheme().getFontHeight()) / 2 + 1;

hideButton.setPosAndSize(farRight - 8 - 16, 1, 12, 12);
deleteButton.setPosAndSize(farRight - 8, 1, 12, 12);
hideButton.setPosAndSize(farRight - 8 - 16, 3, 12, 12);
deleteButton.setPosAndSize(farRight - 8, 3, 12, 12);

distField.setPos(hideButton.getPosX() - 5 - distField.width, yOff);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ public static Optional<MapManager> getInstance() {
}

public static void startUp(UUID serverId) {
// Ensure if existing manager instance is cleaned up first
// Necessary if player is switching servers, e.g. with Velocity proxy or similar
shutdown();

Path dir = Platform.getGameFolder().resolve("local/ftbchunks/data/" + serverId);
if (Files.notExists(dir)) {
try {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified common/src/main/resources/assets/ftbchunks/textures/player.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"texture": {
"blur": true
"blur": false
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"texture": {
"blur": true
"blur": false
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"texture": {
"blur": true
"blur": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,11 @@
"lily_pad": "#208030",
"dead_bush": "#A89061",
"glass": "#CCE5E4",
"cherry_leaves": "#b390a4"
"cherry_leaves": "#b390a4",
"glass_pane": "ignored",
"comparator": "ignored",
"repeater": "ignored",
"end_rod": "ignored",
"chain": "ignored",
"lever": "ignored"
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ readable_name=FTB Chunks
maven_group=dev.ftb.mods
mod_author=FTB Team

mod_version=2101.1.2
mod_version=2101.1.3
minecraft_version=1.21.1

# Deps
Expand All @@ -21,7 +21,7 @@ fabric_api_version=0.102.1+1.21.1
fabric_api_version_range=>=0.100.1+1.21
architectury_api_version=13.0.6

ftb_library_version=2101.1.4
ftb_library_version=2101.1.5
ftb_teams_version=2101.1.0

curseforge_id_forge=314906
Expand Down

0 comments on commit 476436a

Please sign in to comment.