New Traits + Balancing.

Cascade: Random breaking of blocks around initial block.
Fracture: Random breaking of max. 9 blocks in direction.
Dark: Heals tool, but gives weak- and darkness.
Glimmer: Gives a chance of night vision effect.
Analysing: ++More EXP, less drops!
This commit is contained in:
Robert Sosnitzka
2016-06-20 01:01:07 +02:00
parent 30dba5a0c4
commit 0506ec6dbf
10 changed files with 137 additions and 23 deletions

View File

@@ -8,7 +8,7 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
@@ -32,7 +32,7 @@ group = "com.sosnitzka.ztic_addon" // http://maven.apache.org/guides/mini/guide-
archivesBaseName = "ztic_addon"
minecraft {
version = "1.9-12.16.1.1907"
version = "1.9.4-12.17.0.1968"
runDir = "run"
// the mappings can be changed at any time, and must be in the following format.
@@ -40,21 +40,21 @@ minecraft {
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not allways work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "stable_24"
mappings = "snapshot_20160531"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
replace "@VERSION@", project.version
}
dependencies {
deobfCompile "codechicken:CodeChickenLib:1.9-2.0.1.32:deobf"
deobfCompile "codechicken:CodeChickenCore:1.9-2.0.1.60:deobf"
deobfCompile "codechicken:CodeChickenLib:1.9.4-2.0.2.39:deobf"
deobfCompile "codechicken:CodeChickenCore:1.9.4-2.0.3.65:deobf"
//deobfCompile "codechicken:NotEnoughItems:1.9-${nei_version}:dev"
deobfCompile "slimeknights.mantle:Mantle:1.9-0.10.1.jenkins140:deobf"
deobfCompile "slimeknights.mantle:Mantle:1.9.4-0.10.2.jenkins149:deobf"
//Old: deobfCompile "slimeknights.mantle:Mantle:1.9-0.10.0.jenkins132:deobf"
deobfCompile "mezz.jei:jei_1.9:3.3.3.197"
//deobfCompile "slimeknights:TConstruct:1.9-2.3.0.jenkins193:deobf"
compile files('libs/TConstruct-1.9-2.3.1.DEV.1d4c1de-deobf.jar')
deobfCompile "mezz.jei:jei_1.9.4:3.6.7.216"
deobfCompile "slimeknights:TConstruct:1.9.4-2.3.2.jenkins255:deobf"
//compile files('libs/TConstruct-1.9-2.3.1.DEV.1d4c1de-deobf.jar')
}
//noinspection GroovyAssignabilityCheck

View File

@@ -10,7 +10,7 @@ import static com.sosnitzka.ztic_addon.ZTiC.*;
public class Materials {
public static Material arcanite = new Material("arcanite", TextFormatting.LIGHT_PURPLE);
public static Material tiberium = new Material("tiberium", TextFormatting.LIGHT_PURPLE).addTrait(instable);
public static Material prometheum = new Material("prometheum", TextFormatting.LIGHT_PURPLE);
public static Material prometheum = new Material("prometheum", TextFormatting.LIGHT_PURPLE).addTrait(dark);
public static Material rubium = new Material("rubium", TextFormatting.LIGHT_PURPLE);
public static Material violium = new Material("violium", TextFormatting.DARK_GREEN).addTrait(analysing);
public static Material bismuth = new Material("bismuth", TextFormatting.DARK_GREEN);
@@ -23,7 +23,7 @@ public class Materials {
public static Material ignitite = new Material("ignitite", TextFormatting.AQUA);
public static Material palladium = new Material("palladium", TextFormatting.AQUA);
public static Material eternite = new Material("eternite", TextFormatting.AQUA);
public static Material mythril = new Material("mythril", TextFormatting.AQUA).addTrait(pulverizing, HeadMaterialStats.TYPE);
public static Material mythril = new Material("mythril", TextFormatting.GRAY).addTrait(pulverizing, HeadMaterialStats.TYPE);
public static Material astrium = new Material("astrium", TextFormatting.LIGHT_PURPLE);
public static Material nitronite = new Material("nitronite", TextFormatting.LIGHT_PURPLE);
@@ -32,10 +32,10 @@ public class Materials {
public static Material imperomite = new Material("imperomite", TextFormatting.DARK_GREEN);
public static Material cryptogen = new Material("cryptogen", TextFormatting.DARK_GREEN);
public static Material fractoryte = new Material("fractoryte", TextFormatting.DARK_RED).addTrait(frature, HeadMaterialStats.TYPE);
public static Material seismodium = new Material("seismodium", TextFormatting.DARK_GREEN);
public static Material seismodium = new Material("seismodium", TextFormatting.DARK_GREEN).addTrait(cascade, HeadMaterialStats.TYPE);
public static Material terramite = new Material("terramite", TextFormatting.GRAY);
public static Material lumixyl = new Material("lumixyl", TextFormatting.GRAY).addTrait(glimmer);
public static Material solarium = new Material("solarium", TextFormatting.GRAY).addTrait(garishly);
public static Material lumixyl = new Material("lumixyl", TextFormatting.YELLOW).addTrait(glimmer);
public static Material solarium = new Material("solarium", TextFormatting.RED).addTrait(garishly);
public static Material dyonite = new Material("dyonite", TextFormatting.GRAY);
public static Material ultranite = new Material("ultranite", TextFormatting.AQUA);
public static Material nucleum = new Material("nucleum", TextFormatting.AQUA);

View File

@@ -43,6 +43,8 @@ public class ZTiC {
public static final AbstractTrait garishly = new TraitGarishly();
public static final AbstractTrait pulverizing = new TraitPulverizing();
public static final AbstractTrait analysing = new TraitAnalysing();
public static final AbstractTrait cascade = new TraitCascade();
public static final AbstractTrait dark = new TraitDark();
static final String MODID = "ztic_addon";
static final String VERSION = "@VERSION@";

View File

@@ -0,0 +1,55 @@
package com.sosnitzka.ztic_addon.traits;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World;
import slimeknights.tconstruct.library.traits.AbstractTrait;
import slimeknights.tconstruct.library.utils.ToolHelper;
/**
* Created by Robert on 03.06.2016.
*/
public class TraitCascade extends AbstractTrait {
public TraitCascade() {
super("cascade", TextFormatting.DARK_GRAY);
}
@Override
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 = pos.getX();
double y = pos.getY();
double z = pos.getZ();
for (int i = random.nextInt(50); i > 0; i--) {
int r = random.nextInt(3);
int d = random.nextBoolean() ? 1 : -1;
if (r == 0) x += d;
if (r == 1) y += d;
if (r == 2) z += d;
BlockPos nextBlock = new BlockPos(x, y, z);
if (world.getBlockState(nextBlock) == world.getBlockState(pos)) {
world.destroyBlock(nextBlock, true);
x = nextBlock.getX();
y = nextBlock.getY();
z = nextBlock.getZ();
ToolHelper.damageTool(tool, random.nextInt(2), player);
}
}
}
}
private float calcBonus(ItemStack tool) {
int durability = ToolHelper.getCurrentDurability(tool);
int maxDurability = ToolHelper.getMaxDurability(tool);
return (0.4f) / (maxDurability - 50) * (durability) + 0.55f;
}
}

View File

@@ -0,0 +1,43 @@
package com.sosnitzka.ztic_addon.traits;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.MobEffects;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import slimeknights.tconstruct.library.traits.AbstractTrait;
import slimeknights.tconstruct.library.utils.ToolHelper;
/**
* Created by Robert on 03.06.2016.
*/
public class TraitDark extends AbstractTrait {
public TraitDark() {
super("dark", TextFormatting.DARK_GRAY);
MinecraftForge.EVENT_BUS.register(this);
}
@Override
public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase player, boolean wasEffective) {
if (random.nextFloat() <= 0.1) {
player.addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, 300));
player.addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, 300));
ToolHelper.healTool(tool, random.nextInt(51) + 10, null);
}
}
@Override
public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, boolean wasCritical, boolean wasHit) {
if (random.nextFloat() <= 0.1) {
player.addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, 300));
player.addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, 300));
ToolHelper.healTool(tool, random.nextInt(51) + 10, null);
}
}
}

View File

@@ -28,7 +28,7 @@ public class TraitFracture extends AbstractTrait {
if (!world.isRemote && tool.canHarvestBlock(state) && f >= b) {
RayTraceResult mop = ((ToolCore) tool.getItem()).rayTrace(world, (EntityPlayer) player, false);
if (mop == null) return;
for (int i = random.nextInt(5) + 1; i >= 0; i--) {
for (int i = random.nextInt(9) + 1; i >= 0; i--) {
switch (mop.sideHit) {
case UP:
BlockPos next1 = new BlockPos(pos.getX(), pos.getY() - i, pos.getZ());

View File

@@ -41,10 +41,10 @@ public class TraitGarishly extends AbstractTrait {
ItemStack i = null;
switch (r) {
case 0:
i = new ItemStack(Items.BLAZE_POWDER, random.nextInt(3) + 1);
i = new ItemStack(Items.BLAZE_POWDER, random.nextInt(3));
break;
case 1:
i = new ItemStack(Items.BLAZE_ROD, random.nextInt(2) + 1);
i = new ItemStack(Items.BLAZE_ROD, random.nextInt(3));
break;
case 2:
i = new ItemStack(glimmerstone_dust, random.nextInt(3));
@@ -53,10 +53,10 @@ public class TraitGarishly extends AbstractTrait {
i = new ItemStack(luminar_dust, random.nextInt(3));
break;
case 4:
i = new ItemStack(Items.COAL, random.nextInt(3) + 1);
i = new ItemStack(Items.COAL, random.nextInt(3));
break;
case 5:
i = new ItemStack(lignite, random.nextInt(3) + 1);
i = new ItemStack(lignite, random.nextInt(3));
break;
}

View File

@@ -1,10 +1,13 @@
package com.sosnitzka.ztic_addon.traits;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
@@ -29,9 +32,22 @@ public class TraitGlimmer extends AbstractTrait {
EntityPlayer e = (EntityPlayer) entity;
if (TinkerUtil.hasTrait(TagUtil.getTagSafe(e.getHeldItemMainhand()), identifier)) {
e.addPotionEffect(new PotionEffect(MobEffects.GLOWING, 100));
}
}
}
@Override
public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase player, boolean wasEffective) {
if (random.nextFloat() <= 0.02) {
player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 300));
}
}
@Override
public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, boolean wasCritical, boolean wasHit) {
if (random.nextFloat() <= 0.05) {
player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 300));
}
}
}

View File

@@ -2,7 +2,6 @@ package com.sosnitzka.ztic_addon.traits;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.common.MinecraftForge;
import slimeknights.tconstruct.library.traits.AbstractTrait;
@@ -20,9 +19,8 @@ public class TraitResonance extends AbstractTrait {
@Override
public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, boolean wasCritical, boolean wasHit) {
if (random.nextBoolean() && random.nextBoolean()) {
if (random.nextFloat() <= .33) {
target.knockBack(target, random.nextFloat() * random.nextFloat() * 10, player.posX - target.posX, player.posZ - target.posZ);
if (random.nextBoolean()) player.addChatMessage(new TextComponentString("Boinggg!"));
}
}