Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fabric 1.19.3 compatibility and Korean translation #46

Open
wants to merge 3 commits into
base: fabric
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'fabric-loom' version '1.1-SNAPSHOT'
}

sourceCompatibility = JavaVersion.VERSION_17
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ archives_base_name = autofish

# Fabric Properties
# check these on https://modmuss50.me/fabric.html or https://fabricmc.net/use
minecraft_version=1.19
yarn_mappings=1.19+build.4
loader_version=0.14.8
minecraft_version=1.19.3
yarn_mappings=1.19.3+build.5
loader_version=0.14.13

#Fabric API
fabric_version=0.56.1+1.19
fabric_version=0.73.2+1.19.3

#Cloth Config API
cloth_config_version=7.0.65
cloth_config_version=9.0.94
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.network.packet.s2c.play.EntityVelocityUpdateS2CPacket;
import net.minecraft.network.packet.s2c.play.GameMessageS2CPacket;
import net.minecraft.network.packet.s2c.play.PlaySoundIdS2CPacket;
import net.minecraft.network.packet.s2c.play.PlaySoundS2CPacket;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
Expand All @@ -23,11 +22,6 @@ public void onPlaySound(PlaySoundS2CPacket playSoundS2CPacket_1, CallbackInfo ci
if (client.isOnThread()) FabricModAutofish.getInstance().handlePacket(playSoundS2CPacket_1);
}

@Inject(method = "onPlaySoundId", at = @At("HEAD"))
public void onPlaySoundId(PlaySoundIdS2CPacket playSoundIdS2CPacket_1, CallbackInfo ci) {
if (client.isOnThread()) FabricModAutofish.getInstance().handlePacket(playSoundIdS2CPacket_1);
}

@Inject(method = "onEntityVelocityUpdate", at = @At("HEAD"))
public void onVelocityUpdate(EntityVelocityUpdateS2CPacket entityVelocityUpdateS2CPacket_1, CallbackInfo ci) {
if (client.isOnThread()) FabricModAutofish.getInstance().handlePacket(entityVelocityUpdateS2CPacket_1);
Expand Down
11 changes: 2 additions & 9 deletions src/main/java/troy/autofish/monitor/FishMonitorMPSound.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import net.minecraft.entity.projectile.FishingBobberEntity;
import net.minecraft.network.Packet;
import net.minecraft.network.packet.s2c.play.PlaySoundFromEntityS2CPacket;
import net.minecraft.network.packet.s2c.play.PlaySoundIdS2CPacket;
import net.minecraft.network.packet.s2c.play.PlaySoundS2CPacket;
import troy.autofish.Autofish;

Expand All @@ -23,21 +22,15 @@ public void handleHookRemoved() {
@Override
public void handlePacket(Autofish autofish, Packet<?> packet, MinecraftClient minecraft) {

if (packet instanceof PlaySoundS2CPacket || packet instanceof PlaySoundIdS2CPacket || packet instanceof PlaySoundFromEntityS2CPacket) {
if (packet instanceof PlaySoundS2CPacket || packet instanceof PlaySoundFromEntityS2CPacket) {
//TODO investigate PlaySoundFromEntityS2CPacket; i dont think its ever used for fishing but whatever

String soundName;
double x, y, z;

if (packet instanceof PlaySoundS2CPacket) {
PlaySoundS2CPacket soundPacket = (PlaySoundS2CPacket) packet;
soundName = soundPacket.getSound().getId().toString();
x = soundPacket.getX();
y = soundPacket.getY();
z = soundPacket.getZ();
} else if (packet instanceof PlaySoundIdS2CPacket) {
PlaySoundIdS2CPacket soundPacket = (PlaySoundIdS2CPacket) packet;
soundName = soundPacket.getSoundId().toString();
soundName = soundPacket.getSound().value().getId().toString();
x = soundPacket.getX();
y = soundPacket.getY();
z = soundPacket.getZ();
Expand Down
57 changes: 57 additions & 0 deletions src/main/resources/assets/autofish/lang/ko_kr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"key.autofish.open_gui": "자동낚시 GUI 열기",
"options.autofish.title": "자동낚시 설정",

"options.autofish.toggle.on": "\u00A7aOn",
"options.autofish.toggle.off": "\u00A7eOff",

"options.autofish.enable.title": "자동낚시 활성화",
"options.autofish.enable.tooltip": "자동낚시 모드를 켜거나 끕니다.",

"options.autofish.multirod.title": "여러 낚시대 사용 활성화",
"options.autofish.multirod.tooltip_0": "기존에 사용하던 낚시대가 파괴되면,",
"options.autofish.multirod.tooltip_1": "핫바에 있는 다른 낚시대를 대신하여",
"options.autofish.multirod.tooltip_2": "사용합니다.",

"options.autofish.break_protection.title": "낚시대 파괴 방지 활성화",
"options.autofish.break_protection.tooltip_0": "낚시대의 내구도가 낮으면",
"options.autofish.break_protection.tooltip_1": "자동으로 낚시를 중단합니다.",

"options.autofish.persistent.title": "지속 모드 활성화",
"options.autofish.persistent.tooltip_0": "낚시대를 손에 들고 있을 때마다 항상",
"options.autofish.persistent.tooltip_1": "낚시찌 던지기를 유지하려면 이 기능을 활성화하십시오.",
"options.autofish.persistent.tooltip_2": "10초마다, 낚시찌를 다시 던져야 하는 경우에",
"options.autofish.persistent.tooltip_3": "낚시찌를 다시 던져줍니다.",
"options.autofish.persistent.tooltip_4": "지속 모드는 랙이 걸리는 환경이나 오랫동안",
"options.autofish.persistent.tooltip_5": "낚시를 하고 싶을 때 유용합니다.",

"options.autofish.sound.title": "소리 감지 방식 사용",
"options.autofish.sound.tooltip_0": "\u00A76낚시찌의 움직임을 감지하는 것보다",
"options.autofish.sound.tooltip_1": "\u00A76정확한, 새로운 방식입니다.",
"options.autofish.sound.tooltip_2": "\u00A76이 방식은 낚시찌가 첨벙 거리는 소리를 감지합니다.",
"options.autofish.sound.tooltip_3": "- 이 방식을 사용하려면 던진 낚시찌가",
"options.autofish.sound.tooltip_4": " 플레이어와 충분히 가까워야 합니다.",
"options.autofish.sound.tooltip_5": "- 다른 플레이어의 낚시찌가 당신 근처에",
"options.autofish.sound.tooltip_6": " 있을 경우, 오작동의 우려가 있습니다.",
"options.autofish.sound.tooltip_7": "\u00A7c이 옵션은 멀티플레이에서만",
"options.autofish.sound.tooltip_8": "\u00A7c활성화 됩니다. 싱글플레이에서는 다른 방식을",
"options.autofish.sound.tooltip_9": "\u00A7c사용합니다.",

"options.autofish.multiplayer_compat.title": "감지 방식 고정",
"options.autofish.multiplayer_compat.tooltip_0": "싱글플레이의 경우에도 멀티플레이의",
"options.autofish.multiplayer_compat.tooltip_1": "경우처럼 소리 감지 방식을 이용하도록 강제합니다.",
"options.autofish.multiplayer_compat.tooltip_2": "다른 모드와의 호환성을 위해 사용할 수 있습니다.",

"options.autofish.recast_delay.title": "낚시 간격 (밀리초)",
"options.autofish.recast_delay.value": "%d ms",
"options.autofish.recast_delay.tooltip_0": "낚시에 성공한 뒤, 다음 낚시찌를",
"options.autofish.recast_delay.tooltip_1": "던지기 전까지의 간격을 조절합니다.",

"options.autofish.clear_regex.title": "ClearLag Chat Pattern",
"options.autofish.clear_regex.tooltip_0": "해당 패턴을 채팅에서 감지하면",
"options.autofish.clear_regex.tooltip_1": "낚시찌를 자동으로 다시 던집니다.",
"options.autofish.clear_regex.tooltip_2": "\u00A7a정규 표현식\u00A76의 형식으로 기입하여 주십시오.",

"options.autofish.basic.title": "기본 옵션",
"options.autofish.advanced.title": "고급 옵션"
}