Compare commits
23 commits
neoforge
...
neoforge-1
Author | SHA1 | Date | |
---|---|---|---|
009822531a | |||
aee0f1b569 | |||
a6b905c01f | |||
ee37b83769 | |||
6af44e07ca | |||
7e323e8dc4 | |||
0ce44d79b5 | |||
4f9c96ce03 | |||
fd89a9c3c2 | |||
171b912f1c | |||
01df575767 | |||
dfe27109be | |||
676955503c | |||
6625a495ca | |||
2c369a125a | |||
c58ca0fe37 | |||
58a9be3251 | |||
ea6451e558 | |||
1c119aa5db | |||
d39a15a4e2 | |||
0294198192 | |||
aaefb62501 | |||
367c407ec9 |
9 changed files with 18 additions and 76 deletions
5
FAQ.md
5
FAQ.md
|
@ -79,11 +79,6 @@ command](https://youtu.be/9xkbHNWkcIY).
|
||||||
|
|
||||||
## I updated the mod, but now my config changes are back to default, what happened?
|
## I updated the mod, but now my config changes are back to default, what happened?
|
||||||
|
|
||||||
*As of Version 1.26.5 and onwards, this should happen less often!*
|
|
||||||
Version 1.26.5 introduces more robust config updating such that entries that
|
|
||||||
exist in the default config, but not in the current config will be appended to
|
|
||||||
the current config.
|
|
||||||
|
|
||||||
Sometimes, I add new mob entries to the config, and increment the version
|
Sometimes, I add new mob entries to the config, and increment the version
|
||||||
number of the config. When the server/client starts, it checks the default
|
number of the config. When the server/client starts, it checks the default
|
||||||
config's version number with the existing config's version number. If the
|
config's version number with the existing config's version number. If the
|
||||||
|
|
12
README.md
12
README.md
|
@ -36,14 +36,10 @@ The config file `.minecraft/config/TurnBasedMinecraft/TBM_Config.toml` is commen
|
||||||
with info on what each option does. ~~It will also be moved if a newer version
|
with info on what each option does. ~~It will also be moved if a newer version
|
||||||
of this mod has a newer version of the config file (usually renamed with a
|
of this mod has a newer version of the config file (usually renamed with a
|
||||||
timestamp).~~ ~~I will try my best to not move the previous version config, but rather
|
timestamp).~~ ~~I will try my best to not move the previous version config, but rather
|
||||||
edit the previous version config to have new options.~~ ~~When a new config version is made,
|
edit the previous version config to have new options.~~ When a new config version is made,
|
||||||
usually because a new entry has been added, the existing config is renamed to a file with
|
usually because a new entry has been added, the existing config is renamed to a file with
|
||||||
a timestamp in the filename of when it was replaced. One can set a config option in the
|
a timestamp in the filename of when it was replaced. One can set a config option in the
|
||||||
config to prevent it being overwritten if necessary.~~
|
config to prevent it being overwritten if necessary.
|
||||||
|
|
||||||
*As of version 1.26.5 of this mod, this should happen less frequently!*
|
|
||||||
Version 1.26.5 introduces changes that allow entries that exist in the default
|
|
||||||
config but not in the current config to be appended in the current config.
|
|
||||||
|
|
||||||
Some options in the config file only affect the Server, and ~~some only affect the Client~~.
|
Some options in the config file only affect the Server, and ~~some only affect the Client~~.
|
||||||
Client config has been moved to a
|
Client config has been moved to a
|
||||||
|
@ -82,7 +78,7 @@ configured for them.)
|
||||||
|
|
||||||
Simply invoke `./gradlew build` in the mod directory and after some time the
|
Simply invoke `./gradlew build` in the mod directory and after some time the
|
||||||
finished jar will be saved at
|
finished jar will be saved at
|
||||||
`build/libs/TurnBasedMinecraft-NeoForge-1.26.5-all.jar`
|
`build/libs/TurnBasedMinecraft-NeoForge-1.26.5-MC-1.21.1-all.jar`
|
||||||
|
|
||||||
# Reproducibility
|
# Reproducibility
|
||||||
|
|
||||||
|
@ -100,7 +96,7 @@ which is licensed under the [MIT License](https://github.com/kevinstadler/JavaMP
|
||||||
|
|
||||||
# Frequently Asked Questions
|
# Frequently Asked Questions
|
||||||
|
|
||||||
[See the FAQ page.](https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/FAQ.md)
|
[See the FAQ page.](https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/master/FAQ.md)
|
||||||
|
|
||||||
# Related Videos
|
# Related Videos
|
||||||
|
|
||||||
|
|
|
@ -4,45 +4,6 @@ Starting with version 1.24.0 of this mod, this file will list what version of
|
||||||
Java was used to compile the jars. In theory, using the same version of Java
|
Java was used to compile the jars. In theory, using the same version of Java
|
||||||
should result in an identical jar due to reproducible builds.
|
should result in an identical jar due to reproducible builds.
|
||||||
|
|
||||||
## NeoForge 1.26.5
|
|
||||||
|
|
||||||
$ java --version
|
|
||||||
openjdk 21.0.5 2024-10-15
|
|
||||||
OpenJDK Runtime Environment (build 21.0.5+11)
|
|
||||||
OpenJDK 64-Bit Server VM (build 21.0.5+11, mixed mode, sharing)
|
|
||||||
|
|
||||||
$ javac --version
|
|
||||||
javac 21.0.5
|
|
||||||
|
|
||||||
$ sha256sum build/libs/TurnBasedMinecraft-NeoForge-1.26.5-all.jar
|
|
||||||
b02d0abf6f2fbc5c3b718b548309efacb159ec8f86c7d2d653fc0b73234e761a build/libs/TurnBasedMinecraft-NeoForge-1.26.5-all.jar
|
|
||||||
|
|
||||||
## NeoForge 1.26.5-MC-1.21.1
|
|
||||||
|
|
||||||
$ java --version
|
|
||||||
openjdk 21.0.5 2024-10-15
|
|
||||||
OpenJDK Runtime Environment (build 21.0.5+11)
|
|
||||||
OpenJDK 64-Bit Server VM (build 21.0.5+11, mixed mode, sharing)
|
|
||||||
|
|
||||||
$ javac --version
|
|
||||||
javac 21.0.5
|
|
||||||
|
|
||||||
$ sha256sum build/libs/TurnBasedMinecraft-NeoForge-1.26.5-MC-1.21.1-all.jar
|
|
||||||
c529ebe3dd48608afd27e3393b201036ce84d3be0a850cdf48039fbc4820629e build/libs/TurnBasedMinecraft-NeoForge-1.26.5-MC-1.21.1-all.jar
|
|
||||||
|
|
||||||
## Forge 1.26.5
|
|
||||||
|
|
||||||
$ java --version
|
|
||||||
openjdk 21.0.5 2024-10-15
|
|
||||||
OpenJDK Runtime Environment (build 21.0.5+11)
|
|
||||||
OpenJDK 64-Bit Server VM (build 21.0.5+11, mixed mode, sharing)
|
|
||||||
|
|
||||||
$ javac --version
|
|
||||||
javac 21.0.5
|
|
||||||
|
|
||||||
$ sha256sum build/libs/TurnBasedMinecraft-Forge-1.26.5-all.jar
|
|
||||||
c8ed6e2e9a433c40901d41ec604bc6260fc5b231f5d3859832ecbe76b0f5a9e2 build/libs/TurnBasedMinecraft-Forge-1.26.5-all.jar
|
|
||||||
|
|
||||||
## NeoForge 1.26.4
|
## NeoForge 1.26.4
|
||||||
|
|
||||||
$ java --version
|
$ java --version
|
||||||
|
|
|
@ -13,17 +13,17 @@ parchment_mappings_version=2024.07.28
|
||||||
# Environment Properties
|
# Environment Properties
|
||||||
# You can find the latest versions here: https://projects.neoforged.net/neoforged/neoforge
|
# You can find the latest versions here: https://projects.neoforged.net/neoforged/neoforge
|
||||||
# The Minecraft version must agree with the Neo version to get a valid artifact
|
# The Minecraft version must agree with the Neo version to get a valid artifact
|
||||||
minecraft_version=1.21.3
|
minecraft_version=1.21.1
|
||||||
|
|
||||||
# The Minecraft version range can use any release version of Minecraft as bounds.
|
# The Minecraft version range can use any release version of Minecraft as bounds.
|
||||||
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
|
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
|
||||||
# as they do not follow standard versioning conventions.
|
# as they do not follow standard versioning conventions.
|
||||||
minecraft_version_range=[1.21.3, 1.22)
|
minecraft_version_range=[1.21.1, 1.22)
|
||||||
|
|
||||||
# The Neo version must agree with the Minecraft version to get a valid artifact
|
# The Neo version must agree with the Minecraft version to get a valid artifact
|
||||||
neo_version=21.3.11-beta
|
neo_version=21.1.74
|
||||||
# The Neo version range can use any version of Neo as bounds
|
# The Neo version range can use any version of Neo as bounds
|
||||||
neo_version_range=[21.3.0,)
|
neo_version_range=[21.1.0,)
|
||||||
# The loader version range can only use the major version of FML as bounds
|
# The loader version range can only use the major version of FML as bounds
|
||||||
loader_version_range=[4,)
|
loader_version_range=[4,)
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ mod_name=TurnBasedMinecraftMod
|
||||||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||||
mod_license=MIT
|
mod_license=MIT
|
||||||
# The mod version. See https://semver.org/
|
# The mod version. See https://semver.org/
|
||||||
mod_version=1.26.5
|
mod_version=1.26.5-MC-1.21.1
|
||||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||||
# This should match the base package used for the mod sources.
|
# This should match the base package used for the mod sources.
|
||||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
|
|
|
@ -168,7 +168,7 @@ public class ClientProxy extends CommonProxy {
|
||||||
parentComponent.getSiblings().add(prefix);
|
parentComponent.getSiblings().add(prefix);
|
||||||
parentComponent.getSiblings().add(text);
|
parentComponent.getSiblings().add(text);
|
||||||
// UUID is required by sendMessage, but appears to be unused, so just give dummy UUID
|
// UUID is required by sendMessage, but appears to be unused, so just give dummy UUID
|
||||||
Minecraft.getInstance().player.displayClientMessage(parentComponent, false);
|
Minecraft.getInstance().player.sendSystemMessage(parentComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -181,7 +181,7 @@ public class ClientProxy extends CommonProxy {
|
||||||
parentComponent.getSiblings().add(prefix);
|
parentComponent.getSiblings().add(prefix);
|
||||||
parentComponent.getSiblings().add(text);
|
parentComponent.getSiblings().add(text);
|
||||||
// UUID is required by sendMessage, but appears to be unused, so just give dummy UUID
|
// UUID is required by sendMessage, but appears to be unused, so just give dummy UUID
|
||||||
Minecraft.getInstance().player.displayClientMessage(parentComponent, false);
|
Minecraft.getInstance().player.sendSystemMessage(parentComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkBattleTypes(boolean entityLeft) {
|
private void checkBattleTypes(boolean entityLeft) {
|
||||||
|
|
|
@ -6,7 +6,6 @@ import com.burnedkirby.TurnBasedMinecraft.common.networking.PacketBattlePing;
|
||||||
import net.minecraft.resources.ResourceKey;
|
import net.minecraft.resources.ResourceKey;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.InteractionResult;
|
|
||||||
import net.minecraft.world.damagesource.DamageSource;
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
import net.minecraft.world.effect.MobEffects;
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
|
@ -1226,13 +1225,7 @@ public class Battle {
|
||||||
final int nextItemToUse = next.itemToUse;
|
final int nextItemToUse = next.itemToUse;
|
||||||
final int prevItem = ((Player)nextEntity).getInventory().selected;
|
final int prevItem = ((Player)nextEntity).getInventory().selected;
|
||||||
((Player)nextEntity).getInventory().selected = nextItemToUse;
|
((Player)nextEntity).getInventory().selected = nextItemToUse;
|
||||||
InteractionResult interactionResult = targetItem.use(nextEntity.level(), (Player)nextEntity, InteractionHand.MAIN_HAND);
|
((Player)nextEntity).getInventory().setItem(nextItemToUse, targetItem.use(nextEntity.level(), (Player)nextEntity, InteractionHand.MAIN_HAND).getObject());
|
||||||
if (interactionResult instanceof InteractionResult.Success resultSuccess) {
|
|
||||||
ItemStack transformed = resultSuccess.heldItemTransformedTo();
|
|
||||||
if (transformed != null) {
|
|
||||||
((Player) nextEntity).getInventory().setItem(nextItemToUse, transformed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
((Player)nextEntity).getInventory().selected = prevItem;
|
((Player)nextEntity).getInventory().selected = prevItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
public class TurnBasedMinecraftMod {
|
public class TurnBasedMinecraftMod {
|
||||||
public static final String MODID = "com_burnedkirby_turnbasedminecraft";
|
public static final String MODID = "com_burnedkirby_turnbasedminecraft";
|
||||||
public static final String NAME = "Turn Based Minecraft Mod";
|
public static final String NAME = "Turn Based Minecraft Mod";
|
||||||
public static final String VERSION = "1.26.5";
|
public static final String VERSION = "1.26.5-MC-1.21.1";
|
||||||
public static final String CONFIG_FILENAME = "TBM_Config.toml";
|
public static final String CONFIG_FILENAME = "TBM_Config.toml";
|
||||||
public static final String DEFAULT_CONFIG_FILENAME = "TBM_Config_DEFAULT.toml";
|
public static final String DEFAULT_CONFIG_FILENAME = "TBM_Config_DEFAULT.toml";
|
||||||
public static final String CONFIG_DIRECTORY = "config/TurnBasedMinecraft/";
|
public static final String CONFIG_DIRECTORY = "config/TurnBasedMinecraft/";
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.burnedkirby.TurnBasedMinecraft.common;
|
package com.burnedkirby.TurnBasedMinecraft.common;
|
||||||
|
|
||||||
import net.minecraft.core.component.DataComponents;
|
|
||||||
import net.minecraft.core.registries.Registries;
|
import net.minecraft.core.registries.Registries;
|
||||||
import net.minecraft.resources.ResourceKey;
|
import net.minecraft.resources.ResourceKey;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
@ -69,6 +68,6 @@ public class Utility
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isItemEdible(ItemStack itemStack, @Nullable LivingEntity entity) {
|
public static boolean isItemEdible(ItemStack itemStack, @Nullable LivingEntity entity) {
|
||||||
return itemStack.get(DataComponents.CONSUMABLE) != null;
|
return itemStack.getFoodProperties(entity) != null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
10
update.json
10
update.json
|
@ -1,12 +1,10 @@
|
||||||
{
|
{
|
||||||
"homepage": "https://github.com/Stephen-Seo/TurnBasedMinecraftMod",
|
"homepage": "https://github.com/Stephen-Seo/TurnBasedMinecraftMod",
|
||||||
"1.21.3": {
|
"1.21.3": {
|
||||||
"1.26.5": "Config improvements, NeoForge 21.3.11-beta.\n https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/Changelog.md",
|
|
||||||
"1.26.4": "Add player-specific config, NeoForge 21.3.6-beta.\n https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/Changelog.md",
|
"1.26.4": "Add player-specific config, NeoForge 21.3.6-beta.\n https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/Changelog.md",
|
||||||
"1.26.3": "Ported to NeoForge 21.3.2-beta (MC 1.21.3), minor tweak to packet.\n https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/Changelog.md"
|
"1.26.3": "Ported to NeoForge 21.3.2-beta (MC 1.21.3), minor tweak to packet.\n https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/Changelog.md"
|
||||||
},
|
},
|
||||||
"1.21.1": {
|
"1.21.1": {
|
||||||
"1.26.5-MC-1.21.1": "Config improvements, NeoForge 21.1.74.\n https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/Changelog.md",
|
|
||||||
"1.26.4-MC-1.21.1": "Add player-specific config, NeoForge 21.1.73.\n https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/Changelog.md",
|
"1.26.4-MC-1.21.1": "Add player-specific config, NeoForge 21.1.73.\n https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/Changelog.md",
|
||||||
"1.26.3-MC-1.21.1": "Minor tweak to packet.\n https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/Changelog.md",
|
"1.26.3-MC-1.21.1": "Minor tweak to packet.\n https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/Changelog.md",
|
||||||
"1.26.2": "Display Entities on attack menu in BattleGUI.\n https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/Changelog.md",
|
"1.26.2": "Display Entities on attack menu in BattleGUI.\n https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/Changelog.md",
|
||||||
|
@ -14,9 +12,9 @@
|
||||||
"1.26.0": "Ported to NeoForge 21.1.69, client config.\n https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/Changelog.md"
|
"1.26.0": "Ported to NeoForge 21.1.69, client config.\n https://github.com/Stephen-Seo/TurnBasedMinecraftMod/blob/neoforge/Changelog.md"
|
||||||
},
|
},
|
||||||
"promos": {
|
"promos": {
|
||||||
"1.21.3-latest": "1.26.5",
|
"1.21.3-latest": "1.26.4",
|
||||||
"1.21.3-recommended": "1.26.5",
|
"1.21.3-recommended": "1.26.4",
|
||||||
"1.21.1-latest": "1.26.5-MC-1.21.1",
|
"1.21.1-latest": "1.26.4-MC-1.21.1",
|
||||||
"1.21.1-recommended": "1.26.5-MC-1.21.1"
|
"1.21.1-recommended": "1.26.4-MC-1.21.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue