Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ org.gradle.debug=false
## 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.6
minecraft_version=1.21.10
# 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,1.22)
# The Neo version must agree with the Minecraft version to get a valid artifact
neo_version=21.6.11-beta
neo_version=21.10.64
# The Neo version range can use any version of Neo as bounds
neo_version_range=[21,)
# The loader version range can only use the major version of FML as bounds
loader_version_range=[4,)

cloth_config_version = [19,)
cloth_config_version = [20,)

cloth_config_version_num = 19.0.147
cloth_config_version_num = 20.0.149

# Uncomment this to activate parchment
#neogradle.subsystems.parchment.minecraftVersion=1.21.1
Expand All @@ -36,12 +36,12 @@ mod_name=XPlus AutoFish
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=GPL-3.0
# The mod version. See https://semver.org/
mod_version=1.3.6-neoforged
mod_version=1.3.7-neoforged
# 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
mod_group_id=com.wudji
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
mod_authors=Wudji
mod_authors=LochTech
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
mod_description=Automatically reel and recast the fishing rod.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent;
import net.neoforged.jarjar.nio.util.Lazy;
import net.neoforged.neoforge.common.util.Lazy;
import net.neoforged.neoforge.client.event.ClientTickEvent;
import net.neoforged.neoforge.client.event.RegisterKeyMappingsEvent;
import net.neoforged.neoforge.common.NeoForge;
Expand All @@ -31,7 +31,7 @@ public class NeoForgedModXPlusAutofish
// Define mod id in a common place for everything to reference
public static final String MODID = "autofish";
public static final Lazy<KeyMapping> CONFIG_SCREEN_MAPPING = Lazy.of(() ->
new KeyMapping("key.autofish.open_gui", GLFW.GLFW_KEY_V, "XPlus Autofish"));
new KeyMapping("key.autofish.open_gui", GLFW.GLFW_KEY_V, net.minecraft.client.KeyMapping.Category.GAMEPLAY));
// Directly reference a slf4j logger
private static final Logger LOGGER = LogUtils.getLogger();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void handlePacket(XPlusAutofish autofish, Packet<?> packet, Minecraft min

// Wait until the bobber has rose in the water.
// Prevent remarking the bobber rise timestamp until it is reset by catching.
if (hasHitWater && bobberRiseTimestamp == 0 && velocityPacket.getYa() > 0) {
if (hasHitWater && bobberRiseTimestamp == 0 && velocityPacket.getMovement().y > 0) {
// Mark the time in which the bobber began to rise.
bobberRiseTimestamp = autofish.timeMillis;
}
Expand All @@ -58,7 +58,7 @@ public void handlePacket(XPlusAutofish autofish, Packet<?> packet, Minecraft min

// If the bobber has been in the water long enough, start detecting the bobber movement.
if (hasHitWater && bobberRiseTimestamp != 0 && timeInWater > START_CATCHING_AFTER_THRESHOLD) {
if (velocityPacket.getXa() == 0 && velocityPacket.getZa() == 0 && velocityPacket.getYa() < PACKET_MOTION_Y_THRESHOLD) {
if (velocityPacket.getMovement().x == 0 && velocityPacket.getMovement().z == 0 && velocityPacket.getMovement().y < PACKET_MOTION_Y_THRESHOLD) {
// Catch the fish
autofish.catchFish();

Expand Down