2 Commits

Author SHA1 Message Date
d9e2b00679 properly rename mod 2024-07-15 23:42:31 +02:00
677a82142f fix some bugs 2024-07-15 23:28:53 +02:00
4 changed files with 11 additions and 7 deletions

View File

@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.16.0 loader_version=0.16.0
# Mod Properties # Mod Properties
mod_version = 1.2.2 mod_version = 1.2.4
maven_group = com.kasetoatz maven_group = com.kasetoatz
archives_base_name = TridentHacks archives_base_name = TridentHacks

View File

@ -3,6 +3,7 @@ package com.kasetoatz.tridenthacks.mixin;
import com.kasetoatz.tridenthacks.config.Config; import com.kasetoatz.tridenthacks.config.Config;
import com.kasetoatz.tridenthacks.TridentHacks; import com.kasetoatz.tridenthacks.TridentHacks;
import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.item.Items;
import net.minecraft.network.ClientConnection; import net.minecraft.network.ClientConnection;
import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket; import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
@ -22,7 +23,7 @@ public abstract class ClientConnectionMixin {
ClientPlayerEntity player = TridentHacks.client.player; ClientPlayerEntity player = TridentHacks.client.player;
if (player != null) if (player != null)
{ {
if (packet instanceof PlayerActionC2SPacket && TridentHacks.noNormalRiptide() && ((PlayerActionC2SPacket)packet).getAction() == PlayerActionC2SPacket.Action.RELEASE_USE_ITEM) if (player.getActiveItem().getItem() == Items.TRIDENT && player.isUsingItem() && packet instanceof PlayerActionC2SPacket && TridentHacks.noNormalRiptide() && ((PlayerActionC2SPacket)packet).getAction() == PlayerActionC2SPacket.Action.RELEASE_USE_ITEM)
{ {
ci.cancel(); ci.cancel();
} }

View File

@ -25,12 +25,15 @@ public class TridentItemMixin {
if (Config.toggleRiptide) if (Config.toggleRiptide)
{ {
PlayerEntity player = TridentHacks.client.player; PlayerEntity player = TridentHacks.client.player;
if (TridentHacks.noNormalRiptide() && user == player && user.getItemUseTime() > 10) if (user == player && user.getItemUseTime() > 10)
{ {
world.playSoundFromEntity(player, SoundEvents.ITEM_TRIDENT_RIPTIDE_3.value(), SoundCategory.PLAYERS, 1.F, 1.F); if (TridentHacks.noNormalRiptide())
{
world.playSoundFromEntity(player, SoundEvents.ITEM_TRIDENT_RIPTIDE_3.value(), SoundCategory.PLAYERS, 1.F, 1.F);
TridentHacks.lastTridentUse = System.currentTimeMillis();
}
TridentHacks.onGround = false;
} }
TridentHacks.lastTridentUse = System.currentTimeMillis();
TridentHacks.onGround = false;
} }
else if (Config.returnToSameSlot && !TridentHacks.hasRiptide) else if (Config.returnToSameSlot && !TridentHacks.hasRiptide)
{ {

View File

@ -2,7 +2,7 @@
"schemaVersion": 1, "schemaVersion": 1,
"id": "tridenthacks", "id": "tridenthacks",
"version": "${version}", "version": "${version}",
"name": "RiptideHacks", "name": "TridentHacks",
"description": "", "description": "",
"authors": [], "authors": [],
"contact": { "contact": {