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:
2018-06-28 17:01:42 +02:00
parent 05ebd28180
commit 2227b0017e
10 changed files with 29 additions and 28 deletions

View File

@@ -19,7 +19,7 @@ public class MaterialTraits {
public static final int VIBRANIUM = 7;
// 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 softy = new TraitSofty();
public static final AbstractTrait curvature = new TraitCurvature();

View File

@@ -5,6 +5,7 @@ import com.sosnitzka.taiga.proxy.CommonProxy;
import com.sosnitzka.taiga.recipes.CraftingRegistry;
import com.sosnitzka.taiga.recipes.SmeltingRegistry;
import com.sosnitzka.taiga.world.WorldGen;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
@@ -65,9 +66,9 @@ public class TAIGA {
// GameRegistry.registerFuelHandler(new FuelHandler()); Registeres fuels' burn times
// Adds new harvest levels' names
harvestLevelNames.put(DURANITE, TextFormatting.DARK_GREEN + "Duranite");
harvestLevelNames.put(VALYRIUM, TextFormatting.GOLD + "Valyrium");
harvestLevelNames.put(VIBRANIUM, TextFormatting.DARK_PURPLE + "Vibranium");
harvestLevelNames.put(DURANITE, I18n.format("harvestlevel.duranite", TextFormatting.GREEN, TextFormatting.RESET));
harvestLevelNames.put(VALYRIUM, I18n.format("harvestlevel.valyrium", TextFormatting.GOLD, TextFormatting.RESET));
harvestLevelNames.put(VIBRANIUM, I18n.format("harvestlevel.vibranium", TextFormatting.DARK_PURPLE, TextFormatting.RESET));
Blocks.register(true);

View File

@@ -24,8 +24,8 @@ public class TraitDiffuse extends AbstractTrait {
@SubscribeEvent
public void onBlockBreak(BlockEvent.BreakEvent event) {
EntityPlayer player = event.getPlayer();
if (!player.getEntityWorld().isRemote && TinkerUtil.hasTrait(TagUtil.getTagSafe(player.getHeldItemMainhand())
, this.identifier)) {
if (!player.getEntityWorld().isRemote && TinkerUtil.hasTrait(TagUtil.getTagSafe(player.getHeldItemMainhand()),
this.identifier)) {
event.setExpToDrop((int) this.getUpdateXP(event.getExpToDrop()));
}
}

View File

@@ -20,16 +20,15 @@ import slimeknights.tconstruct.library.utils.TinkerUtil;
import slimeknights.tconstruct.library.utils.ToolHelper;
public class TraitInstable extends AbstractTrait {
public class TraitUnstable extends AbstractTrait {
public TraitInstable() {
super("instable", TextFormatting.DARK_RED);
public TraitUnstable() {
super("unstable", TextFormatting.DARK_RED);
MinecraftForge.EVENT_BUS.register(this);
}
@Override
public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase
player, boolean wasEffective) {
public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase player, boolean wasEffective) {
if (random.nextFloat() <= 0.03) {
if (!world.isRemote) {
if (random.nextBoolean()) {
@@ -41,8 +40,7 @@ public class TraitInstable extends AbstractTrait {
}
@Override
public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, boolean
wasCritical, boolean wasHit) {
public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, boolean wasCritical, boolean wasHit) {
BlockPos pos = target.getPosition();
if (random.nextFloat() <= 0.04) {
if (!player.getEntityWorld().isRemote) {
@@ -59,8 +57,7 @@ public class TraitInstable extends AbstractTrait {
World w = event.getEntity().getEntityWorld();
if (random.nextFloat() < 0.05 && !w.isRemote && event.getSource().getTrueSource() instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) event.getSource().getTrueSource();
if (event.getEntity() instanceof EntityMob && TinkerUtil.hasTrait(TagUtil.getTagSafe(player
.getHeldItemMainhand()), identifier)) {
if (event.getEntity() instanceof EntityMob && TinkerUtil.hasTrait(TagUtil.getTagSafe(player.getHeldItemMainhand()), identifier)) {
ItemStack i = new ItemStack(Items.GUNPOWDER, random.nextInt(2));
event.getDrops().add(0, new EntityItem(w, event.getEntity().posX, event.getEntity().posY, event
.getEntity().posZ, i));

View File

@@ -12,9 +12,8 @@ import java.util.function.Predicate;
public class WorldGenMinable extends net.minecraft.world.gen.feature.WorldGenMinable {
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 Predicate<IBlockState> predicate;

View File

@@ -309,8 +309,8 @@ modifier.heroic.name=Heldenhaft
modifier.heroic.desc=§oBis zum Tod.§r\Am Ende wirst du stark!
modifier.hollow.name=Hohl
modifier.hollow.desc=§oBraindead!§r\Gehirnmatsche
modifier.instable.name=Instabil
modifier.instable.desc=§oWTF?§r\Es ist so instabil und brennt auf der Haut.
modifier.unstable.name=Instabil
modifier.unstable.desc=§oWTF?§r\Es ist so instabil und brennt auf der Haut.
modifier.naturebound.name=Naturverbunden
modifier.naturebound.desc=§oDu bist eins mit der Natur!§r\Repariert und so.
modifier.pulverizing.name=Pulverisierend

View File

@@ -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.hollow.name=Hollow
modifier.hollow.desc=§oBraindead!§r\nMakes your enemies brainless.
modifier.instable.name=Unstable
modifier.instable.desc=§oCan you feel this?§r\nSeriously, this is completely unstable! Expect explosions!
modifier.unstable.name=Unstable
modifier.unstable.desc=§oCan you feel this?§r\nSeriously, this is completely unstable! Expect explosions!
modifier.naturebound.name=Naturebound
modifier.naturebound.desc=§oYou are one with your surrounding!§r\nRepairs the tool on several blocks.
modifier.pulverizing.name=Pulverizing
@@ -368,4 +368,8 @@ gui.taiga_configuration.mainTitle=TAIGA Configuration
itemGroup.taiga_block=TAIGA Blocks
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

View File

@@ -325,8 +325,8 @@ modifier.heroic.name=英勇
modifier.heroic.desc=§o至死方休。§r\n在生命结束前你会变得更强壮。
modifier.hollow.name=虚伪
modifier.hollow.desc=§o吃掉了你的脑子§r\n粉碎脑子
modifier.instable.name=不稳定
modifier.instable.desc=§o你真的这么觉得§r\n真的它很不稳定
modifier.unstable.name=不稳定
modifier.unstable.desc=§o你真的这么觉得§r\n真的它很不稳定
modifier.naturebound.name=自然之束
modifier.naturebound.desc=§o你与自然融为一体§r\n以自然之名复原。
modifier.pulverizing.name=摧毁

View File

@@ -325,8 +325,8 @@ modifier.heroic.name=英勇
modifier.heroic.desc=§o至死不屈。§r\n當末日來臨 你將變得更強。
modifier.hollow.name=中空
modifier.hollow.desc=§o腦死§r\n讓你的敵人變笨。
modifier.instable.name=不穩定
modifier.instable.desc=§o你感覺得到嗎§r\n說真的 這東西十分不穩定! 有可能會爆炸!
modifier.unstable.name=不穩定
modifier.unstable.desc=§o你感覺得到嗎§r\n說真的 這東西十分不穩定! 有可能會爆炸!
modifier.naturebound.name=自然綁定
modifier.naturebound.desc=§o你是周遭的一份子§r\n在幾個方塊上修復工具。
modifier.pulverizing.name=粉碎

View File

@@ -4,7 +4,7 @@
"description": "An addon for Tinkers' Construct! 32 New Materials including 16 various alloys.",
"version": "${version}",
"mcversion": "${mcversion}",
"url": "https://github.com/Zkaface/TAIGA",
"url": "https://gitlab.harting.hosting/TeamFRM/TAIGA",
"updateUrl": "",
"authorList": ["Zkaface", "Chefe"],
"credits": "Chefe. He's there, if you need him. Sometimes.",