Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
677a82142f | |||
4a84587f71 |
@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
|
||||
loader_version=0.16.0
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.2.1
|
||||
mod_version = 1.2.3
|
||||
maven_group = com.kasetoatz
|
||||
archives_base_name = TridentHacks
|
||||
|
||||
|
@ -68,7 +68,7 @@ public class Config {
|
||||
json.addProperty("returnToSameSlot", returnToSameSlot);
|
||||
json.addProperty("riptideOnMessage", riptideOnMessage);
|
||||
json.addProperty("riptideOffMessage", riptideOffMessage);
|
||||
try (FileWriter writer = new FileWriter(new File(TridentHacks.client.runDirectory, "config/tridenthacks.json")))
|
||||
try (FileWriter writer = new FileWriter(file))
|
||||
{
|
||||
gson.toJson(json, writer);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.kasetoatz.tridenthacks.mixin;
|
||||
import com.kasetoatz.tridenthacks.config.Config;
|
||||
import com.kasetoatz.tridenthacks.TridentHacks;
|
||||
import net.minecraft.client.network.ClientPlayerEntity;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.network.ClientConnection;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
|
||||
@ -22,7 +23,7 @@ public abstract class ClientConnectionMixin {
|
||||
ClientPlayerEntity player = TridentHacks.client.player;
|
||||
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();
|
||||
}
|
||||
|
@ -25,13 +25,16 @@ public class TridentItemMixin {
|
||||
if (Config.toggleRiptide)
|
||||
{
|
||||
PlayerEntity player = TridentHacks.client.player;
|
||||
if (TridentHacks.noNormalRiptide() && user == player && user.getItemUseTime() > 10)
|
||||
if (user == player && user.getItemUseTime() > 10)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
else if (Config.returnToSameSlot && !TridentHacks.hasRiptide)
|
||||
{
|
||||
PlayerEntity player = TridentHacks.client.player;
|
||||
|
Reference in New Issue
Block a user