forked from TAIGA/TAIGA
made naming of Unstable/Instable trait consistent
added translating options for harvest levels Signed-off-by: Giovanni Harting <539@idlegandalf.com>
This commit is contained in:
@@ -19,7 +19,7 @@ public class MaterialTraits {
|
|||||||
public static final int VIBRANIUM = 7;
|
public static final int VIBRANIUM = 7;
|
||||||
|
|
||||||
// Init of new traits
|
// Init of new traits
|
||||||
public static final AbstractTrait instable = new TraitInstable();
|
public static final AbstractTrait instable = new TraitUnstable();
|
||||||
public static final AbstractTrait naturebound = new TraitNatureBound();
|
public static final AbstractTrait naturebound = new TraitNatureBound();
|
||||||
public static final AbstractTrait softy = new TraitSofty();
|
public static final AbstractTrait softy = new TraitSofty();
|
||||||
public static final AbstractTrait curvature = new TraitCurvature();
|
public static final AbstractTrait curvature = new TraitCurvature();
|
||||||
|
@@ -5,6 +5,7 @@ import com.sosnitzka.taiga.proxy.CommonProxy;
|
|||||||
import com.sosnitzka.taiga.recipes.CraftingRegistry;
|
import com.sosnitzka.taiga.recipes.CraftingRegistry;
|
||||||
import com.sosnitzka.taiga.recipes.SmeltingRegistry;
|
import com.sosnitzka.taiga.recipes.SmeltingRegistry;
|
||||||
import com.sosnitzka.taiga.world.WorldGen;
|
import com.sosnitzka.taiga.world.WorldGen;
|
||||||
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||||
@@ -65,9 +66,9 @@ public class TAIGA {
|
|||||||
// GameRegistry.registerFuelHandler(new FuelHandler()); Registeres fuels' burn times
|
// GameRegistry.registerFuelHandler(new FuelHandler()); Registeres fuels' burn times
|
||||||
|
|
||||||
// Adds new harvest levels' names
|
// Adds new harvest levels' names
|
||||||
harvestLevelNames.put(DURANITE, TextFormatting.DARK_GREEN + "Duranite");
|
harvestLevelNames.put(DURANITE, I18n.format("harvestlevel.duranite", TextFormatting.GREEN, TextFormatting.RESET));
|
||||||
harvestLevelNames.put(VALYRIUM, TextFormatting.GOLD + "Valyrium");
|
harvestLevelNames.put(VALYRIUM, I18n.format("harvestlevel.valyrium", TextFormatting.GOLD, TextFormatting.RESET));
|
||||||
harvestLevelNames.put(VIBRANIUM, TextFormatting.DARK_PURPLE + "Vibranium");
|
harvestLevelNames.put(VIBRANIUM, I18n.format("harvestlevel.vibranium", TextFormatting.DARK_PURPLE, TextFormatting.RESET));
|
||||||
|
|
||||||
Blocks.register(true);
|
Blocks.register(true);
|
||||||
|
|
||||||
|
@@ -24,8 +24,8 @@ public class TraitDiffuse extends AbstractTrait {
|
|||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onBlockBreak(BlockEvent.BreakEvent event) {
|
public void onBlockBreak(BlockEvent.BreakEvent event) {
|
||||||
EntityPlayer player = event.getPlayer();
|
EntityPlayer player = event.getPlayer();
|
||||||
if (!player.getEntityWorld().isRemote && TinkerUtil.hasTrait(TagUtil.getTagSafe(player.getHeldItemMainhand())
|
if (!player.getEntityWorld().isRemote && TinkerUtil.hasTrait(TagUtil.getTagSafe(player.getHeldItemMainhand()),
|
||||||
, this.identifier)) {
|
this.identifier)) {
|
||||||
event.setExpToDrop((int) this.getUpdateXP(event.getExpToDrop()));
|
event.setExpToDrop((int) this.getUpdateXP(event.getExpToDrop()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,16 +20,15 @@ import slimeknights.tconstruct.library.utils.TinkerUtil;
|
|||||||
import slimeknights.tconstruct.library.utils.ToolHelper;
|
import slimeknights.tconstruct.library.utils.ToolHelper;
|
||||||
|
|
||||||
|
|
||||||
public class TraitInstable extends AbstractTrait {
|
public class TraitUnstable extends AbstractTrait {
|
||||||
|
|
||||||
public TraitInstable() {
|
public TraitUnstable() {
|
||||||
super("instable", TextFormatting.DARK_RED);
|
super("unstable", TextFormatting.DARK_RED);
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
MinecraftForge.EVENT_BUS.register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase
|
public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase player, boolean wasEffective) {
|
||||||
player, boolean wasEffective) {
|
|
||||||
if (random.nextFloat() <= 0.03) {
|
if (random.nextFloat() <= 0.03) {
|
||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
if (random.nextBoolean()) {
|
if (random.nextBoolean()) {
|
||||||
@@ -41,8 +40,7 @@ public class TraitInstable extends AbstractTrait {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, boolean
|
public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, boolean wasCritical, boolean wasHit) {
|
||||||
wasCritical, boolean wasHit) {
|
|
||||||
BlockPos pos = target.getPosition();
|
BlockPos pos = target.getPosition();
|
||||||
if (random.nextFloat() <= 0.04) {
|
if (random.nextFloat() <= 0.04) {
|
||||||
if (!player.getEntityWorld().isRemote) {
|
if (!player.getEntityWorld().isRemote) {
|
||||||
@@ -59,8 +57,7 @@ public class TraitInstable extends AbstractTrait {
|
|||||||
World w = event.getEntity().getEntityWorld();
|
World w = event.getEntity().getEntityWorld();
|
||||||
if (random.nextFloat() < 0.05 && !w.isRemote && event.getSource().getTrueSource() instanceof EntityPlayer) {
|
if (random.nextFloat() < 0.05 && !w.isRemote && event.getSource().getTrueSource() instanceof EntityPlayer) {
|
||||||
EntityPlayer player = (EntityPlayer) event.getSource().getTrueSource();
|
EntityPlayer player = (EntityPlayer) event.getSource().getTrueSource();
|
||||||
if (event.getEntity() instanceof EntityMob && TinkerUtil.hasTrait(TagUtil.getTagSafe(player
|
if (event.getEntity() instanceof EntityMob && TinkerUtil.hasTrait(TagUtil.getTagSafe(player.getHeldItemMainhand()), identifier)) {
|
||||||
.getHeldItemMainhand()), identifier)) {
|
|
||||||
ItemStack i = new ItemStack(Items.GUNPOWDER, random.nextInt(2));
|
ItemStack i = new ItemStack(Items.GUNPOWDER, random.nextInt(2));
|
||||||
event.getDrops().add(0, new EntityItem(w, event.getEntity().posX, event.getEntity().posY, event
|
event.getDrops().add(0, new EntityItem(w, event.getEntity().posX, event.getEntity().posY, event
|
||||||
.getEntity().posZ, i));
|
.getEntity().posZ, i));
|
@@ -12,9 +12,8 @@ import java.util.function.Predicate;
|
|||||||
|
|
||||||
public class WorldGenMinable extends net.minecraft.world.gen.feature.WorldGenMinable {
|
public class WorldGenMinable extends net.minecraft.world.gen.feature.WorldGenMinable {
|
||||||
private final IBlockState oreBlock;
|
private final IBlockState oreBlock;
|
||||||
/**
|
|
||||||
* The number of com.sosnitzka.taiga.blocks to generate.
|
// The number of com.sosnitzka.taiga.blocks to generate.
|
||||||
*/
|
|
||||||
private final int numberOfBlocks;
|
private final int numberOfBlocks;
|
||||||
private final Predicate<IBlockState> predicate;
|
private final Predicate<IBlockState> predicate;
|
||||||
|
|
||||||
|
@@ -309,8 +309,8 @@ modifier.heroic.name=Heldenhaft
|
|||||||
modifier.heroic.desc=§oBis zum Tod.§r\Am Ende wirst du stark!
|
modifier.heroic.desc=§oBis zum Tod.§r\Am Ende wirst du stark!
|
||||||
modifier.hollow.name=Hohl
|
modifier.hollow.name=Hohl
|
||||||
modifier.hollow.desc=§oBraindead!§r\Gehirnmatsche
|
modifier.hollow.desc=§oBraindead!§r\Gehirnmatsche
|
||||||
modifier.instable.name=Instabil
|
modifier.unstable.name=Instabil
|
||||||
modifier.instable.desc=§oWTF?§r\Es ist so instabil und brennt auf der Haut.
|
modifier.unstable.desc=§oWTF?§r\Es ist so instabil und brennt auf der Haut.
|
||||||
modifier.naturebound.name=Naturverbunden
|
modifier.naturebound.name=Naturverbunden
|
||||||
modifier.naturebound.desc=§oDu bist eins mit der Natur!§r\Repariert und so.
|
modifier.naturebound.desc=§oDu bist eins mit der Natur!§r\Repariert und so.
|
||||||
modifier.pulverizing.name=Pulverisierend
|
modifier.pulverizing.name=Pulverisierend
|
||||||
|
@@ -325,8 +325,8 @@ modifier.heroic.name=Heroic
|
|||||||
modifier.heroic.desc=§oUntil you'll die.§r\nWhen the end is near, you grow stronger.
|
modifier.heroic.desc=§oUntil you'll die.§r\nWhen the end is near, you grow stronger.
|
||||||
modifier.hollow.name=Hollow
|
modifier.hollow.name=Hollow
|
||||||
modifier.hollow.desc=§oBraindead!§r\nMakes your enemies brainless.
|
modifier.hollow.desc=§oBraindead!§r\nMakes your enemies brainless.
|
||||||
modifier.instable.name=Unstable
|
modifier.unstable.name=Unstable
|
||||||
modifier.instable.desc=§oCan you feel this?§r\nSeriously, this is completely unstable! Expect explosions!
|
modifier.unstable.desc=§oCan you feel this?§r\nSeriously, this is completely unstable! Expect explosions!
|
||||||
modifier.naturebound.name=Naturebound
|
modifier.naturebound.name=Naturebound
|
||||||
modifier.naturebound.desc=§oYou are one with your surrounding!§r\nRepairs the tool on several blocks.
|
modifier.naturebound.desc=§oYou are one with your surrounding!§r\nRepairs the tool on several blocks.
|
||||||
modifier.pulverizing.name=Pulverizing
|
modifier.pulverizing.name=Pulverizing
|
||||||
@@ -368,4 +368,8 @@ gui.taiga_configuration.mainTitle=TAIGA Configuration
|
|||||||
itemGroup.taiga_block=TAIGA Blocks
|
itemGroup.taiga_block=TAIGA Blocks
|
||||||
itemGroup.taiga_item=TAIGA Items
|
itemGroup.taiga_item=TAIGA Items
|
||||||
|
|
||||||
key.taiga.alt_action=Mod Tool
|
key.taiga.alt_action=Mod Tool
|
||||||
|
|
||||||
|
harvestlevel.valyrium=%1$sValyrium%2$s
|
||||||
|
harvestlevel.duranite=%1$sDuranite%2$s
|
||||||
|
harvestlevel.vibranium=%1$sVibranium%2$s
|
@@ -325,8 +325,8 @@ modifier.heroic.name=英勇
|
|||||||
modifier.heroic.desc=§o至死方休。§r\n在生命结束前,你会变得更强壮。
|
modifier.heroic.desc=§o至死方休。§r\n在生命结束前,你会变得更强壮。
|
||||||
modifier.hollow.name=虚伪
|
modifier.hollow.name=虚伪
|
||||||
modifier.hollow.desc=§o吃掉了你的脑子!§r\n粉碎脑子!
|
modifier.hollow.desc=§o吃掉了你的脑子!§r\n粉碎脑子!
|
||||||
modifier.instable.name=不稳定
|
modifier.unstable.name=不稳定
|
||||||
modifier.instable.desc=§o你真的这么觉得?§r\n真的,它很不稳定!
|
modifier.unstable.desc=§o你真的这么觉得?§r\n真的,它很不稳定!
|
||||||
modifier.naturebound.name=自然之束
|
modifier.naturebound.name=自然之束
|
||||||
modifier.naturebound.desc=§o你与自然融为一体!§r\n以自然之名复原。
|
modifier.naturebound.desc=§o你与自然融为一体!§r\n以自然之名复原。
|
||||||
modifier.pulverizing.name=摧毁
|
modifier.pulverizing.name=摧毁
|
||||||
|
@@ -325,8 +325,8 @@ modifier.heroic.name=英勇
|
|||||||
modifier.heroic.desc=§o至死不屈。§r\n當末日來臨, 你將變得更強。
|
modifier.heroic.desc=§o至死不屈。§r\n當末日來臨, 你將變得更強。
|
||||||
modifier.hollow.name=中空
|
modifier.hollow.name=中空
|
||||||
modifier.hollow.desc=§o腦死!§r\n讓你的敵人變笨。
|
modifier.hollow.desc=§o腦死!§r\n讓你的敵人變笨。
|
||||||
modifier.instable.name=不穩定
|
modifier.unstable.name=不穩定
|
||||||
modifier.instable.desc=§o你感覺得到嗎?§r\n說真的, 這東西十分不穩定! 有可能會爆炸!
|
modifier.unstable.desc=§o你感覺得到嗎?§r\n說真的, 這東西十分不穩定! 有可能會爆炸!
|
||||||
modifier.naturebound.name=自然綁定
|
modifier.naturebound.name=自然綁定
|
||||||
modifier.naturebound.desc=§o你是周遭的一份子!§r\n在幾個方塊上修復工具。
|
modifier.naturebound.desc=§o你是周遭的一份子!§r\n在幾個方塊上修復工具。
|
||||||
modifier.pulverizing.name=粉碎
|
modifier.pulverizing.name=粉碎
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
"description": "An addon for Tinkers' Construct! 32 New Materials including 16 various alloys.",
|
"description": "An addon for Tinkers' Construct! 32 New Materials including 16 various alloys.",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
"mcversion": "${mcversion}",
|
"mcversion": "${mcversion}",
|
||||||
"url": "https://github.com/Zkaface/TAIGA",
|
"url": "https://gitlab.harting.hosting/TeamFRM/TAIGA",
|
||||||
"updateUrl": "",
|
"updateUrl": "",
|
||||||
"authorList": ["Zkaface", "Chefe"],
|
"authorList": ["Zkaface", "Chefe"],
|
||||||
"credits": "Chefe. He's there, if you need him. Sometimes.",
|
"credits": "Chefe. He's there, if you need him. Sometimes.",
|
||||||
|
Reference in New Issue
Block a user