forked from TAIGA/TAIGA
fixed some stuff
This commit is contained in:
@@ -4,8 +4,8 @@ import com.google.common.collect.Lists;
|
||||
import com.sosnitzka.ztic_addon.proxy.ServerProxy;
|
||||
import com.sosnitzka.ztic_addon.recipes.Crafting;
|
||||
import com.sosnitzka.ztic_addon.recipes.Smelting;
|
||||
import com.sosnitzka.ztic_addon.traits.*;
|
||||
import com.sosnitzka.ztic_addon.util.FuelHandler;
|
||||
import com.sosnitzka.ztic_addon.util.traits.*;
|
||||
import com.sosnitzka.ztic_addon.world.ZWorldGen;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package com.sosnitzka.ztic_addon.util.traits;
|
||||
package com.sosnitzka.ztic_addon.traits;
|
||||
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
@@ -1,4 +1,4 @@
|
||||
package com.sosnitzka.ztic_addon.util.traits;
|
||||
package com.sosnitzka.ztic_addon.traits;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
@@ -1,4 +1,4 @@
|
||||
package com.sosnitzka.ztic_addon.util.traits;
|
||||
package com.sosnitzka.ztic_addon.traits;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
@@ -1,4 +1,4 @@
|
||||
package com.sosnitzka.ztic_addon.util.traits;
|
||||
package com.sosnitzka.ztic_addon.traits;
|
||||
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import slimeknights.tconstruct.library.traits.AbstractTrait;
|
@@ -1,4 +1,4 @@
|
||||
package com.sosnitzka.ztic_addon.util.traits;
|
||||
package com.sosnitzka.ztic_addon.traits;
|
||||
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import slimeknights.tconstruct.library.traits.AbstractTrait;
|
@@ -1,25 +1,22 @@
|
||||
package com.sosnitzka.ztic_addon.util.traits;
|
||||
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.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
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 14.05.2016.
|
||||
*/
|
||||
|
||||
public class TraitInstable extends AbstractTrait {
|
||||
|
||||
|
||||
public TraitInstable() {
|
||||
super("instable", TextFormatting.DARK_RED);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -27,8 +24,8 @@ public class TraitInstable extends AbstractTrait {
|
||||
if (MathHelper.getRandomIntegerInRange(random, 0, 100) > 2) {
|
||||
if (!world.isRemote) {
|
||||
if (random.nextBoolean()) {
|
||||
Explode(player, pos.getX(), pos.getY(), pos.getZ());
|
||||
} else Explode(null, pos.getX(), pos.getY(), pos.getZ());
|
||||
explode(world, player, pos.getX(), pos.getY(), pos.getZ());
|
||||
} else explode(world, null, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
ToolHelper.damageTool(tool, 11 + random.nextInt(10), null);
|
||||
}
|
||||
@@ -40,15 +37,14 @@ public class TraitInstable extends AbstractTrait {
|
||||
if (MathHelper.getRandomIntegerInRange(random, 0, 100) > 2) {
|
||||
if (!player.getEntityWorld().isRemote) {
|
||||
if (random.nextBoolean()) {
|
||||
Explode(player, pos.getX(), pos.getY(), pos.getZ());
|
||||
} else Explode(target, pos.getX(), pos.getY(), pos.getZ());
|
||||
explode(player.getEntityWorld(), player, pos.getX(), pos.getY(), pos.getZ());
|
||||
} else explode(player.getEntityWorld(), target, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
ToolHelper.damageTool(tool, 3 + random.nextInt(18), null);
|
||||
}
|
||||
}
|
||||
|
||||
private void Explode(EntityLivingBase e, double x, double y, double z) {
|
||||
e.getEntityWorld().newExplosion(e, x, y, z, 1.2f + random.nextFloat() * 5, random.nextBoolean(), true);
|
||||
private void explode(World w, Entity e, double x, double y, double z) {
|
||||
w.newExplosion(e, x, y, z, 1.2f + random.nextFloat() * 5, random.nextBoolean(), true);
|
||||
}
|
||||
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package com.sosnitzka.ztic_addon.util.traits;
|
||||
package com.sosnitzka.ztic_addon.traits;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextFormatting;
|
@@ -1,4 +1,4 @@
|
||||
package com.sosnitzka.ztic_addon.util.traits;
|
||||
package com.sosnitzka.ztic_addon.traits;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
Reference in New Issue
Block a user