Compare commits

..

29 commits

Author SHA1 Message Date
2fd9ff974f Fix README.md 2024-11-05 20:33:32 +09:00
57486b8d90 Fix typo in README.md 2024-11-05 20:29:34 +09:00
9cbfc9cb8a Update README.md 2024-11-05 18:08:11 +09:00
6e06fc1942 Update FAQ.md 2024-11-05 17:53:30 +09:00
8b8a9f890e Update update.json 2024-11-05 17:42:51 +09:00
8c3132e97d Update Reproducibility.md 2024-11-05 17:39:16 +09:00
009822531a Update Changelog
All checks were successful
Build TurnBasedMC and create Release / check-release-exists (push) Successful in 2s
Build TurnBasedMC and create Release / build-and-create-release (push) Successful in 1m31s
2024-11-05 17:22:04 +09:00
aee0f1b569 Update version to 1.26.5, NeoForge 21.1.74 2024-11-05 17:19:53 +09:00
a6b905c01f Change Config to add new entries in-place
Now, if changes are added to the default Config, they should be appended
to the existing config file instead of replacing it. All missing values
will be populated with defaults as well.
2024-11-05 17:19:53 +09:00
ee37b83769 Update ClientConfigGui to quit to "parentScreen" 2024-11-05 16:35:00 +09:00
6af44e07ca Add haste_speed and slow_speed to entity config 2024-11-01 15:36:42 +09:00
7e323e8dc4 Update Changelog.md 2024-11-01 15:15:55 +09:00
0ce44d79b5 Update update.json 2024-11-01 14:41:50 +09:00
4f9c96ce03 Update Reproducibility.md 2024-11-01 14:27:17 +09:00
fd89a9c3c2 Update README.md
All checks were successful
Build TurnBasedMC and create Release / check-release-exists (push) Successful in 1s
Build TurnBasedMC and create Release / build-and-create-release (push) Successful in 1m28s
2024-11-01 14:14:32 +09:00
171b912f1c Fix erronous double-line of code 2024-11-01 14:13:38 +09:00
01df575767 Update Changelog.md 2024-11-01 14:12:17 +09:00
dfe27109be Version NeoForge 1.26.4-MC-1.21.1 2024-11-01 13:26:24 +09:00
676955503c Allow Players to have "attack effect" 2024-11-01 13:16:00 +09:00
6625a495ca 2/2 Player-specific TBMM battle config
Add support for custom stats per-player by player username.
2024-11-01 13:15:39 +09:00
2c369a125a 1/2 Player-specific TBMM battle config
Add support for custom stats per-player by player username.
2024-11-01 13:15:24 +09:00
c58ca0fe37 Update to NeoForge 21.1.73 (MC 1.21.1) 2024-11-01 13:14:05 +09:00
58a9be3251 Update README.md 2024-10-29 17:59:22 +09:00
ea6451e558 Update Reproducibility.md 2024-10-25 16:14:35 +09:00
1c119aa5db Update update.json 2024-10-25 16:10:34 +09:00
d39a15a4e2 Update Changelog.md 2024-10-25 15:50:39 +09:00
0294198192 Update Changelog.md
All checks were successful
Build TurnBasedMC and create Release / check-release-exists (push) Successful in 1s
Build TurnBasedMC and create Release / build-and-create-release (push) Successful in 19s
2024-10-25 15:39:27 +09:00
aaefb62501 Bump version to 1.26.3-MC-1.21.1 2024-10-25 15:39:27 +09:00
367c407ec9 Minor tweak to "Ping" packet
This commit changes the "Ping" packet to not create a client-side Battle
instance if it does not exist when the packet is received.
2024-10-25 15:31:23 +09:00
6 changed files with 11 additions and 19 deletions

View file

@ -82,7 +82,7 @@ configured for them.)
Simply invoke `./gradlew build` in the mod directory and after some time the
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

View file

@ -13,17 +13,17 @@ parchment_mappings_version=2024.07.28
# Environment Properties
# 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
minecraft_version=1.21.3
minecraft_version=1.21.1
# 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
# 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
neo_version=21.3.11-beta
neo_version=21.1.74
# 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
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.
mod_license=MIT
# 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.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

View file

@ -168,7 +168,7 @@ public class ClientProxy extends CommonProxy {
parentComponent.getSiblings().add(prefix);
parentComponent.getSiblings().add(text);
// 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
@ -181,7 +181,7 @@ public class ClientProxy extends CommonProxy {
parentComponent.getSiblings().add(prefix);
parentComponent.getSiblings().add(text);
// 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) {

View file

@ -6,7 +6,6 @@ import com.burnedkirby.TurnBasedMinecraft.common.networking.PacketBattlePing;
import net.minecraft.resources.ResourceKey;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.Entity;
@ -1226,13 +1225,7 @@ public class Battle {
final int nextItemToUse = next.itemToUse;
final int prevItem = ((Player)nextEntity).getInventory().selected;
((Player)nextEntity).getInventory().selected = nextItemToUse;
InteractionResult interactionResult = targetItem.use(nextEntity.level(), (Player)nextEntity, InteractionHand.MAIN_HAND);
if (interactionResult instanceof InteractionResult.Success resultSuccess) {
ItemStack transformed = resultSuccess.heldItemTransformedTo();
if (transformed != null) {
((Player) nextEntity).getInventory().setItem(nextItemToUse, transformed);
}
}
((Player)nextEntity).getInventory().setItem(nextItemToUse, targetItem.use(nextEntity.level(), (Player)nextEntity, InteractionHand.MAIN_HAND).getObject());
((Player)nextEntity).getInventory().selected = prevItem;
}
}

View file

@ -41,7 +41,7 @@ import org.apache.logging.log4j.Logger;
public class TurnBasedMinecraftMod {
public static final String MODID = "com_burnedkirby_turnbasedminecraft";
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 DEFAULT_CONFIG_FILENAME = "TBM_Config_DEFAULT.toml";
public static final String CONFIG_DIRECTORY = "config/TurnBasedMinecraft/";

View file

@ -1,6 +1,5 @@
package com.burnedkirby.TurnBasedMinecraft.common;
import net.minecraft.core.component.DataComponents;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
@ -69,6 +68,6 @@ public class Utility
}
public static boolean isItemEdible(ItemStack itemStack, @Nullable LivingEntity entity) {
return itemStack.get(DataComponents.CONSUMABLE) != null;
return itemStack.getFoodProperties(entity) != null;
}
}