Skip to content

Commit

Permalink
Merge pull request #71 from FTBTeam/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
desht authored Aug 15, 2024
2 parents ccd7fe8 + 486cbd6 commit 5be183a
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 30 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ 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.0]

### Changed
* Minecraft 1.21.1 is now required; this no longer supports Minecraft 1.21

### Added
* Sidebar buttons for this and other FTB mods can now be enabled/disabled/rearranged (new functionality in FTB Library 2101.1.0)

## [2100.1.1]

### Fixed
* Fixed `/enderchest` command opening the Ender Chest GUI on target player's screen instead of executing player

## [2100.1.0]

### Changed
* Ported to Minecraft 1.20.6. Support for Fabric and NeoForge.
* Forge support may be re-added if/when Architectury adds support for Forge

## [2006.1.0]

### Changed
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false
id "me.modmuss50.mod-publish-plugin" version "0.5.1"
}

Expand Down Expand Up @@ -109,7 +109,7 @@ publishMods {

// TODO: Migrate to something else
def tag = providers.environmentVariable("TAG").getOrElse("release")
type = tag == "beta" ? BETA : (tag == "alpha" ? ALPHA : STABLE)
type = tag.endsWith("-beta") ? BETA : (tag.endsWith("-alpha") ? ALPHA : STABLE)

def createOptions = (String projectName) -> {
publishOptions {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
package dev.ftb.mods.ftbessentials.commands.groups;

import com.mojang.brigadier.context.CommandContext;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import dev.ftb.mods.ftbessentials.FTBEssentialsPlatform;
import dev.ftb.mods.ftbessentials.commands.FTBCommand;
import dev.ftb.mods.ftbessentials.commands.SimpleCommandPlayer;
import dev.ftb.mods.ftbessentials.commands.impl.cheat.SpeedCommand;
import dev.ftb.mods.ftbessentials.commands.impl.cheat.VirtualInventoryCommand;
import dev.ftb.mods.ftbessentials.config.FTBEConfig;
import dev.ftb.mods.ftbessentials.util.FTBEPlayerData;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.SimpleMenuProvider;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.ChestMenu;

import java.util.List;
Expand Down Expand Up @@ -40,16 +44,18 @@ public class CheatCommands {
new VirtualInventoryCommand(),

// Enderchest
new SimpleCommandPlayer("enderchest", Commands.LEVEL_GAMEMASTERS, FTBEConfig.ENDER_CHEST, (ctx, player) -> enderChest(player))
new SimpleCommandPlayer("enderchest", Commands.LEVEL_GAMEMASTERS, FTBEConfig.ENDER_CHEST, CheatCommands::enderChest)
);

private static void enderChest(ServerPlayer player) {
private static void enderChest(CommandContext<CommandSourceStack> ctx, ServerPlayer player) {
MutableComponent title = Component.translatable("container.enderchest");
if (player != null) {
ServerPlayer srcPlayer = ctx.getSource().getPlayer();
if (player != null && srcPlayer != null) {
title.append(" × ").append(player.getDisplayName());
srcPlayer.openMenu(new SimpleMenuProvider((i, inv, p) -> ChestMenu.threeRows(i, inv, player.getEnderChestInventory()), title));
} else {
ctx.getSource().sendFailure(Component.literal("Unable to open enderchest inventory!"));
}

player.openMenu(new SimpleMenuProvider((i, inv, p) -> ChestMenu.threeRows(i, inv, player.getEnderChestInventory()), title));
}

public static void heal(ServerPlayer player) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"icon": "ftblibrary:icons/bin",
"sort_index": 1000,
"click": [
"command:/trashcan"
],
"required_server_mods": [
"ftbessentials"
]
}
2 changes: 1 addition & 1 deletion fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ processResources {
filesMatching("fabric.mod.json") {
expand "version": project.version,
"archversion": project.architectury_api_version,
"fabricapiversion": project.fabric_api_version,
"fabricapiversionrange": project.fabric_api_version_range,
"mcversion": project.minecraft_version,
"ftblibraryversion": project.ftb_library_version
}
Expand Down
2 changes: 1 addition & 1 deletion fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"ftbessentials-common.mixins.json"
],
"depends": {
"fabric": "*",
"fabric": "${fabricapiversionrange}",
"minecraft": ">=${mcversion}",
"architectury": ">=${archversion}",
"ftblibrary": ">=${ftblibraryversion}"
Expand Down
17 changes: 9 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,24 @@ readable_name=FTB Essentials
archives_base_name=ftb-essentials
maven_group=dev.ftb.mods

minecraft_version=1.21
mod_version=2100.1.0
minecraft_version=1.21.1
mod_version=2101.1.0
mod_author=FTB Team

# Deps
#forge_version=50.0.9
neoforge_version=21.0.8-beta
# https://maven.neoforged.net/#/releases/net/neoforged/fancymodloader/loader
neoforge_version=21.1.9
neoforge_version_range=[21.1.0,)
neoforge_loader_version=4

fabric_loader_version=0.15.11
fabric_api_version=0.100.1+1.21
fabric_api_version=0.100.8+1.21
fabric_api_version_range=>=0.100.1+1.21

architectury_api_version=13.0.1
architectury_api_version=13.0.6

ftb_library_version=2100.1.0-SNAPSHOT
ftb_ranks_version=2100.1.0-SNAPSHOT
ftb_library_version=2101.1.0
ftb_ranks_version=2100.1.0

# common curseforge project for forge and fabric
curseforge_id=410811
2 changes: 1 addition & 1 deletion neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ processResources {

filesMatching("META-INF/neoforge.mods.toml") {
expand "version": project.version,
"neoforgeversion": project.neoforge_version,
"neoforgeversionrange": project.neoforge_version_range,
"neoforgeloaderversion": project.neoforge_loader_version,
"mcversion": project.minecraft_version,
"libraryversion": project.ftb_library_version,
Expand Down
2 changes: 1 addition & 1 deletion neoforge/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ displayTest="IGNORE_SERVER_VERSION"
[[dependencies.ftbessentials]]
modId = "neoforge"
type = "required"
versionRange = "[${neoforgeversion},)"
versionRange = "${neoforgeversionrange}"
ordering = "NONE"
side = "BOTH"

Expand Down

0 comments on commit 5be183a

Please sign in to comment.