Skip to content

Commit 0735ddb

Browse files
committed
a quick run
1 parent 075c0ef commit 0735ddb

13 files changed

Lines changed: 13580 additions & 135 deletions

File tree

README.md

Lines changed: 0 additions & 79 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest-Version: 1.0
2+
Minecraft-Version-Id: 1.6.4
3+

custom_mappings/mappings/mappings.tiny

Lines changed: 13476 additions & 0 deletions
Large diffs are not rendered by default.

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Project name (required)
2-
name=My Addon
2+
name=Some Translation Fixes
33

44
minecraft_version = 1.6.4
55
yarn_mappings = 1.6.4+build.420
66
loader_version = 0.14.19
77

88
mod_version = 1.0.0
9-
maven_group = net.fabricmc
10-
archives_base_name = fabric-example-mod
9+
maven_group = com.msg
10+
archives_base_name = some-translation-fixes
1111

1212
org.gradle.jvmargs=-Xmx4g

src/main/java/btw/community/example/ExampleAddon.java renamed to src/main/java/com/msg/stfx/SomeTranslationFixes.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
package btw.community.example;
1+
package com.msg.stfx;
22

33
import btw.AddonHandler;
44
import btw.BTWAddon;
55

6-
public class ExampleAddon extends BTWAddon {
7-
private static ExampleAddon instance;
6+
public class SomeTranslationFixes extends BTWAddon {
7+
private static SomeTranslationFixes instance;
88

9-
public ExampleAddon() {
9+
public SomeTranslationFixes() {
1010
super();
1111
}
1212

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
package com.msg.stfx.mixin;
2+
3+
import net.minecraft.src.ItemPotion;
4+
import net.minecraft.src.ItemStack;
5+
import net.minecraft.src.PotionHelper;
6+
import net.minecraft.src.StatCollector;
7+
8+
import java.util.List;
9+
10+
import org.spongepowered.asm.mixin.Mixin;
11+
import org.spongepowered.asm.mixin.injection.At;
12+
import org.spongepowered.asm.mixin.injection.Inject;
13+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
14+
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
15+
16+
@Mixin(ItemPotion.class)
17+
public class PotionKeys {
18+
19+
@Inject(
20+
method = "getItemDisplayName",
21+
at = @At(value = "RETURN", ordinal = 1),
22+
cancellable = true,
23+
locals = LocalCapture.CAPTURE_FAILEXCEPTION
24+
)
25+
private void splashPotion(
26+
ItemStack stack,
27+
CallbackInfoReturnable<String> cir,
28+
String var2,
29+
List var3,
30+
String var4
31+
) {
32+
33+
if (var2!= ""){
34+
35+
String newKey = var4 + ".grenade";
36+
String splashStr = StatCollector.translateToLocal(newKey).trim();
37+
38+
if (splashStr != newKey) cir.setReturnValue(splashStr);
39+
}
40+
41+
}
42+
43+
@Inject(
44+
method = "getItemDisplayName",
45+
at = @At(value = "RETURN", ordinal = 2),
46+
cancellable = true
47+
)
48+
private void noEffectPotion(
49+
ItemStack stack,
50+
CallbackInfoReturnable<String> cir
51+
) {
52+
53+
String newKey = PotionHelper.func_77905_c(stack.getItemDamage()).replace("potion", "brew");
54+
String potStr = StatCollector.translateToLocal(newKey).trim();
55+
56+
if (potStr != newKey) cir.setReturnValue(potStr);
57+
58+
}
59+
}

src/main/java/net/fabricmc/example/ExampleMod.java

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/main/java/net/fabricmc/example/mixin/ExampleMixin.java

Lines changed: 0 additions & 16 deletions
This file was deleted.
-3.39 KB
Binary file not shown.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
potion.absorption.postfix.grenade=Thuốc hấp thụ có thể ném được
2+
potion.blindness.postfix.grenade=Thuốc mù quáng có thể ném được
3+
potion.damageBoost.postfix.grenade=Thuốc sức mạnh có thể ném được
4+
potion.digSlowDown.postfix.grenade=Thuốc đào chậm có thể ném được
5+
potion.digSpeed.postfix.grenade=Thuốc đào nhanh có thể ném được
6+
potion.fireResistance.postfix.grenade=Thuốc kháng lửa có thể ném được
7+
potion.harm.postfix.grenade=Thuốc sát thương có thể ném được
8+
potion.heal.postfix.grenade=Thuốc hồi máu có thể ném được
9+
potion.healthBoost.postfix.grenade=Thuốc tăng sinh lực có thể ném được
10+
potion.hunger.postfix.grenade=Thuốc ngộ độc thực phẩm có thể ném được
11+
potion.invisibility.postfix.grenade=Thuốc tàng hình có thể ném được
12+
potion.jump.postfix.grenade=Thuốc nhảy cao có thể ném được
13+
potion.moveSlowdown.postfix.grenade=Thuốc chậm rãi có thể ném được
14+
potion.moveSpeed.postfix.grenade=Thuốc tăng tốc có thể ném được
15+
potion.nightVision.postfix.grenade=Thuốc nhìn trong bóng tối có thể ném được
16+
potion.poison.postfix.grenade=Thuốc độc tố có thể ném được
17+
potion.waterBreathing.postfix.grenade=Thuốc thở dưới nước có thể ném được
18+
potion.weakness.postfix.grenade=Thuốc yếu đuối có thể ném được
19+
potion.regeneration.postfix.grenade=Thuốc hồi phục có thể ném được
20+
21+
brew.prefix.mundane=Thuốc trần tục
22+
brew.prefix.awkward=Thuốc kì quặc
23+
potion.prefix.thick=Thuốc dày đặc

0 commit comments

Comments
 (0)