Adjusted tiberium ore, removed vanilla smelting recipes, adjusted three traits (one left), description for materials added

This commit is contained in:
Robert Sosnitzka
2016-07-20 01:41:39 +02:00
parent 74e3baa05c
commit db49a2c74e
7 changed files with 84 additions and 14 deletions

View File

@@ -34,7 +34,7 @@ public class BlockTiberium extends BasicBlock {
@Override
public int quantityDropped(IBlockState state, int fortune, Random random) {
return MathHelper.getRandomIntegerInRange(random, 1, MathHelper.getRandomIntegerInRange(random, 1, 5 + fortune));
return MathHelper.getRandomIntegerInRange(random, 1, MathHelper.getRandomIntegerInRange(random, 2, 4 + fortune));
}
@Override

View File

@@ -12,11 +12,14 @@ import static com.sosnitzka.taiga.Items.*;
public class Smelting {
public static void register() {
GameRegistry.addSmelting(slagironOre, new ItemStack(slagironIngot), 1.0F);
GameRegistry.addSmelting(new ItemStack(slagironIngot), new ItemStack(iron_nugget), 0);
GameRegistry.addSmelting(new ItemStack(slaggoldIngot), new ItemStack(Items.GOLD_NUGGET), 0);
GameRegistry.addSmelting(new ItemStack(tiberiumShardInstable), new ItemStack(tiberiumShardStable), 0.2F);
GameRegistry.addSmelting(slaggoldOre, new ItemStack(slaggoldIngot), 1.0F);
GameRegistry.addSmelting(slagironIngot, new ItemStack(iron_nugget), 0);
GameRegistry.addSmelting(slaggoldIngot, new ItemStack(Items.GOLD_NUGGET), 0);
GameRegistry.addSmelting(tiberiumShardInstable, new ItemStack(tiberiumShardStable), 0.2F);
GameRegistry.addSmelting(tiberiumOre, new ItemStack(tiberiumShardStable, 3), RandomUtils.nextFloat(0F, 2F));
GameRegistry.addSmelting(titaniteOre, new ItemStack(titaniteIngot), RandomUtils.nextFloat(0F, 2F));
// Removed until TiC put its own ores back in.
/* GameRegistry.addSmelting(titaniteOre, new ItemStack(titaniteIngot), RandomUtils.nextFloat(0F, 2F));
GameRegistry.addSmelting(arcaniteOre, new ItemStack(arcaniteIngot), RandomUtils.nextFloat(0F, 2F));
GameRegistry.addSmelting(adamantiteOre, new ItemStack(adamantiteIngot), RandomUtils.nextFloat(0F, 2F));
GameRegistry.addSmelting(violiumOre, new ItemStack(violiumIngot), RandomUtils.nextFloat(0F, 2F));
@@ -29,9 +32,9 @@ public class Smelting {
GameRegistry.addSmelting(mythrilOre, new ItemStack(mythrilIngot), RandomUtils.nextFloat(0F, 2F));
GameRegistry.addSmelting(palladiumOre, new ItemStack(palladiumIngot), RandomUtils.nextFloat(0F, 2F));
GameRegistry.addSmelting(prometheumOre, new ItemStack(prometheumIngot), RandomUtils.nextFloat(0F, 2F));
GameRegistry.addSmelting(tiberiumOre, new ItemStack(tiberiumShardStable, 2), RandomUtils.nextFloat(0F, 2F));
GameRegistry.addSmelting(vibraniumOre, new ItemStack(vibraniumIngot), RandomUtils.nextFloat(0F, 2F));
GameRegistry.addSmelting(rubiumOre, new ItemStack(rubiumIngot), RandomUtils.nextFloat(0F, 2F));
*/
}
}

View File

@@ -20,8 +20,10 @@ public class TraitBlind extends AbstractTrait {
public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase player, boolean wasEffective) {
int time = (int) world.getWorldTime();
if (random.nextFloat() <= 0.05 || (random.nextFloat() <= 0.1 && isNight(time))) {
player.addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, random.nextInt(400) + 200));
player.addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, random.nextInt(400) + 200));
if (random.nextBoolean())
player.addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, random.nextInt(200) + 100));
else
player.addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, random.nextInt(200) + 100));
}
}
@@ -29,8 +31,10 @@ public class TraitBlind extends AbstractTrait {
public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, boolean wasCritical, boolean wasHit) {
int time = (int) player.getEntityWorld().getWorldTime();
if (random.nextFloat() <= 0.05 || (random.nextFloat() <= 0.1 && isNight(time))) {
player.addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, random.nextInt(400) + 200));
player.addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, random.nextInt(400) + 200));
if (random.nextBoolean())
player.addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, random.nextInt(400) + 200));
else
player.addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, random.nextInt(400) + 200));
}
}

View File

@@ -1,5 +1,7 @@
package com.sosnitzka.taiga.traits;
import com.sosnitzka.taiga.util.TickTask;
import com.sosnitzka.taiga.util.TickTaskHandler;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
@@ -19,14 +21,17 @@ public class TraitCascade extends AbstractTrait {
public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase player, boolean wasEffective) {
float f = random.nextFloat();
float b = 0.99F * calcBonus(tool);
if (!world.isRemote && tool.canHarvestBlock(state) && f <= b) {
double x, y, z, sx, sy, sz;
sx = x = pos.getX();
sy = y = pos.getY();
sz = z = pos.getZ();
for (int i = random.nextInt(ToolHelper.getCurrentDurability(tool)); i > 0; i--) {
for (int i = random.nextInt((int) (ToolHelper.getCurrentDurability(tool) * 1.5f)); i > 0; i--) {
TickTaskHandler.getInstance().addTask(new TickTask(20, new Runnable() {
@Override
public void run() {
}
}));
int r = random.nextInt(3);
int d = random.nextBoolean() ? 1 : -1;
if (r == 0) x += d;
@@ -44,8 +49,11 @@ public class TraitCascade extends AbstractTrait {
y = sy;
z = sz;
}
}
}
}
private float calcBonus(ItemStack tool) {

View File

@@ -33,7 +33,7 @@ public class TraitFragile extends AbstractTrait {
sx = x = pos.getX();
sy = y = pos.getY();
sz = z = pos.getZ();
for (int i = random.nextInt(50) + 50; i > 0; i--) {
for (int i = random.nextInt(10) + 9; i > 0; i--) {
int r = random.nextInt(3);
int d = random.nextBoolean() ? 1 : -1;
if (r == 0) x += d;