mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
spotless
This commit is contained in:
1 parent
80d6d2abd8
commit
c4fa3cbbfe
65 files changed
+188
-305
No files matched your search
@@ -203,9 +203,9 @@ public class TConstruct {
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent event) {
|
||||
packetPipeline.initalise();
|
||||
//if (event.getSide() == Side.CLIENT) {
|
||||
// MinecraftForge.EVENT_BUS.register(new EventCloakRender());
|
||||
//}
|
||||
// if (event.getSide() == Side.CLIENT) {
|
||||
// MinecraftForge.EVENT_BUS.register(new EventCloakRender());
|
||||
// }
|
||||
|
||||
DimensionBlacklist.getBadBimensions();
|
||||
GameRegistry.registerWorldGenerator(new SlimeIslandGen(TinkerWorld.slimePool, 2), 2);
|
||||
|
||||
@@ -377,29 +377,12 @@ public class ArmorProxyClient extends ArmorProxyCommon {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(
|
||||
par1 + 0,
|
||||
par2 + par6,
|
||||
this.zLevel,
|
||||
(float) (par3 + 0) * f,
|
||||
(float) (par4 + par6) * f1);
|
||||
par1 + 0, par2 + par6, this.zLevel, (float) (par3 + 0) * f, (float) (par4 + par6) * f1);
|
||||
tessellator.addVertexWithUV(
|
||||
par1 + par5,
|
||||
par2 + par6,
|
||||
this.zLevel,
|
||||
(float) (par3 + par5) * f,
|
||||
(float) (par4 + par6) * f1);
|
||||
par1 + par5, par2 + par6, this.zLevel, (float) (par3 + par5) * f, (float) (par4 + par6) * f1);
|
||||
tessellator.addVertexWithUV(
|
||||
par1 + par5,
|
||||
par2 + 0,
|
||||
this.zLevel,
|
||||
(float) (par3 + par5) * f,
|
||||
(float) (par4 + 0) * f1);
|
||||
tessellator.addVertexWithUV(
|
||||
par1 + 0,
|
||||
par2 + 0,
|
||||
this.zLevel,
|
||||
(float) (par3 + 0) * f,
|
||||
(float) (par4 + 0) * f1);
|
||||
par1 + par5, par2 + 0, this.zLevel, (float) (par3 + par5) * f, (float) (par4 + 0) * f1);
|
||||
tessellator.addVertexWithUV(par1 + 0, par2 + 0, this.zLevel, (float) (par3 + 0) * f, (float) (par4 + 0) * f1);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ public class DryingRack extends InventoryBlock {
|
||||
|
||||
@Override
|
||||
public String[] getTextureNames() {
|
||||
return new String[]{
|
||||
return new String[] {
|
||||
"castingtable_top",
|
||||
"castingtable_side",
|
||||
"castingtable_bottom",
|
||||
|
||||
@@ -27,7 +27,6 @@ public class SlotAccessory extends Slot {
|
||||
*/
|
||||
public boolean isItemValid(ItemStack par1ItemStack) {
|
||||
Item item = (par1ItemStack == null ? null : par1ItemStack.getItem());
|
||||
return (item instanceof IAccessory)
|
||||
&& ((IAccessory) item).canEquipAccessory(par1ItemStack, this.slotID);
|
||||
return (item instanceof IAccessory) && ((IAccessory) item).canEquipAccessory(par1ItemStack, this.slotID);
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,8 @@ public class SlotBehavedOnly extends Slot {
|
||||
|
||||
int stackL = b.getStackLimit(par1ItemStack);
|
||||
|
||||
if (this.inventory.getStackInSlot(this.slotNumber) != null && !this.inventory.getStackInSlot(this.slotNumber).isItemEqual(par1ItemStack)) {
|
||||
if (this.inventory.getStackInSlot(this.slotNumber) != null
|
||||
&& !this.inventory.getStackInSlot(this.slotNumber).isItemEqual(par1ItemStack)) {
|
||||
ItemStack is = this.inventory.getStackInSlot(this.slotNumber);
|
||||
return is.stackSize + par1ItemStack.stackSize <= stackL;
|
||||
} else {
|
||||
|
||||
@@ -63,8 +63,8 @@ public class DiamondApple extends ItemFood {
|
||||
/* Name override */
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack) {
|
||||
return "item.food." +
|
||||
itemNames[
|
||||
return "item.food."
|
||||
+ itemNames[
|
||||
(itemstack.getItemDamage() >= itemNames.length || itemstack.getItemDamage() < 0)
|
||||
? (0)
|
||||
: (itemstack.getItemDamage())];
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package tconstruct.armor.model;
|
||||
|
||||
import java.util.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.*;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
|
||||
@@ -4,7 +4,6 @@ import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.network.ByteBufUtils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.UUID;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
|
||||
@@ -2,7 +2,6 @@ package tconstruct.armor.player;
|
||||
|
||||
import cpw.mods.fml.common.network.ByteBufUtils;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
@@ -50,17 +50,17 @@ public class BlockFalling extends Block {
|
||||
p_149830_2_ + b0,
|
||||
p_149830_3_ + b0,
|
||||
p_149830_4_ + b0)) {
|
||||
//if (!p_149830_1_.isRemote) {
|
||||
// EntityFallingBlock entityfallingblock = new
|
||||
// EntityFallingBlock(p_149830_1_,
|
||||
// (double)((float)p_149830_2_ + 0.5F),
|
||||
// (double)((float)p_149830_3_ + 0.5F),
|
||||
// (double)((float)p_149830_4_ + 0.5F), this,
|
||||
// p_149830_1_.getBlockMetadata(p_149830_2_, p_149830_3_,
|
||||
// p_149830_4_));
|
||||
// this.func_149829_a(entityfallingblock);
|
||||
// p_149830_1_.spawnEntityInWorld(entityfallingblock);
|
||||
//}
|
||||
// if (!p_149830_1_.isRemote) {
|
||||
// EntityFallingBlock entityfallingblock = new
|
||||
// EntityFallingBlock(p_149830_1_,
|
||||
// (double)((float)p_149830_2_ + 0.5F),
|
||||
// (double)((float)p_149830_3_ + 0.5F),
|
||||
// (double)((float)p_149830_4_ + 0.5F), this,
|
||||
// p_149830_1_.getBlockMetadata(p_149830_2_, p_149830_3_,
|
||||
// p_149830_4_));
|
||||
// this.func_149829_a(entityfallingblock);
|
||||
// p_149830_1_.spawnEntityInWorld(entityfallingblock);
|
||||
// }
|
||||
} else {
|
||||
p_149830_1_.setBlockToAir(p_149830_2_, p_149830_3_, p_149830_4_);
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ package tconstruct.blocks.traps;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import mantle.blocks.MantleBlock;
|
||||
import mantle.world.WorldHelper;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -18,9 +20,6 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class Landmine extends MantleBlock {
|
||||
/** The mob type that can trigger this pressure plate. */
|
||||
private EnumCreatureType triggerMobType;
|
||||
|
||||
@@ -67,28 +67,12 @@ public class BreakingFX extends EntityFX {
|
||||
float f14 = 1.0F;
|
||||
par1Tessellator.setColorOpaque_F(f14 * this.particleRed, f14 * this.particleGreen, f14 * this.particleBlue);
|
||||
par1Tessellator.addVertexWithUV(
|
||||
f11 - par3 * f10 - par6 * f10,
|
||||
f12 - par4 * f10,
|
||||
f13 - par5 * f10 - par7 * f10,
|
||||
f6,
|
||||
f9);
|
||||
f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10, f6, f9);
|
||||
par1Tessellator.addVertexWithUV(
|
||||
f11 - par3 * f10 + par6 * f10,
|
||||
f12 + par4 * f10,
|
||||
f13 - par5 * f10 + par7 * f10,
|
||||
f6,
|
||||
f8);
|
||||
f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10, f6, f8);
|
||||
par1Tessellator.addVertexWithUV(
|
||||
f11 + par3 * f10 + par6 * f10,
|
||||
f12 + par4 * f10,
|
||||
f13 + par5 * f10 + par7 * f10,
|
||||
f7,
|
||||
f8);
|
||||
f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10, f7, f8);
|
||||
par1Tessellator.addVertexWithUV(
|
||||
f11 + par3 * f10 - par6 * f10,
|
||||
f12 - par4 * f10,
|
||||
f13 + par5 * f10 - par7 * f10,
|
||||
f7,
|
||||
f9);
|
||||
f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10, f7, f9);
|
||||
}
|
||||
}
|
||||
@@ -211,14 +211,7 @@ public class ArrowRender extends Render {
|
||||
GL11.glColor4f(par5, par6, par7, 1.0F);
|
||||
|
||||
ItemRenderer.renderItemIn2D(
|
||||
tessellator,
|
||||
f5,
|
||||
f6,
|
||||
f4,
|
||||
f7,
|
||||
par2Icon.getIconWidth(),
|
||||
par2Icon.getIconHeight(),
|
||||
f12);
|
||||
tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12);
|
||||
|
||||
if (itemstack.hasEffect(pass)) {
|
||||
GL11.glDepthFunc(GL11.GL_EQUAL);
|
||||
|
||||
@@ -222,14 +222,7 @@ public class DaggerRender extends Render {
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(rotation, 0.0F, 0.0F, 1.0F);
|
||||
ItemRenderer.renderItemIn2D(
|
||||
tessellator,
|
||||
f5,
|
||||
f6,
|
||||
f4,
|
||||
f7,
|
||||
par2Icon.getIconWidth(),
|
||||
par2Icon.getIconHeight(),
|
||||
f12);
|
||||
tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12);
|
||||
|
||||
/*
|
||||
* if (itemstack.hasEffect(pass)) { GL11.glDepthFunc(GL11.GL_EQUAL);
|
||||
@@ -444,25 +437,15 @@ public class DaggerRender extends Render {
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(
|
||||
par2 + 0,
|
||||
par3 + par5,
|
||||
this.zLevel,
|
||||
(f2 + (float) par5 * f4) * f,
|
||||
(f3 + (float) par5) * f1);
|
||||
par2 + 0, par3 + par5, this.zLevel, (f2 + (float) par5 * f4) * f, (f3 + (float) par5) * f1);
|
||||
tessellator.addVertexWithUV(
|
||||
par2 + par4,
|
||||
par3 + par5,
|
||||
this.zLevel,
|
||||
(f2 + (float) par4 + (float) par5 * f4) * f,
|
||||
(f3 + (float) par5) * f1);
|
||||
tessellator.addVertexWithUV(
|
||||
par2 + par4,
|
||||
par3 + 0,
|
||||
this.zLevel,
|
||||
(f2 + (float) par4) * f,
|
||||
(f3 + 0.0F) * f1);
|
||||
tessellator.addVertexWithUV(
|
||||
par2 + 0, par3 + 0, this.zLevel, (f2 + 0.0F) * f, (f3 + 0.0F) * f1);
|
||||
tessellator.addVertexWithUV(par2 + par4, par3 + 0, this.zLevel, (f2 + (float) par4) * f, (f3 + 0.0F) * f1);
|
||||
tessellator.addVertexWithUV(par2 + 0, par3 + 0, this.zLevel, (f2 + 0.0F) * f, (f3 + 0.0F) * f1);
|
||||
tessellator.draw();
|
||||
}
|
||||
}
|
||||
@@ -541,18 +524,10 @@ public class DaggerRender extends Render {
|
||||
public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(
|
||||
par1 + 0, par2 + par5, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());
|
||||
tessellator.addVertexWithUV(
|
||||
par1 + par4,
|
||||
par2 + par5,
|
||||
this.zLevel,
|
||||
par3Icon.getMaxU(),
|
||||
par3Icon.getMaxV());
|
||||
tessellator.addVertexWithUV(
|
||||
par1 + par4, par2 + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());
|
||||
tessellator.addVertexWithUV(
|
||||
par1 + 0, par2 + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV());
|
||||
tessellator.addVertexWithUV(par1 + 0, par2 + par5, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());
|
||||
tessellator.addVertexWithUV(par1 + par4, par2 + par5, this.zLevel, par3Icon.getMaxU(), par3Icon.getMaxV());
|
||||
tessellator.addVertexWithUV(par1 + par4, par2 + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());
|
||||
tessellator.addVertexWithUV(par1 + 0, par2 + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV());
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
|
||||
@@ -184,8 +184,7 @@ public class ItemSlimeBoots extends ItemArmor implements ISpecialArmor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void damageArmor(EntityLivingBase entity, ItemStack armor, DamageSource source, int damage, int slot) {
|
||||
}
|
||||
public void damageArmor(EntityLivingBase entity, ItemStack armor, DamageSource source, int damage, int slot) {}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -233,7 +233,8 @@ public abstract class BowBase extends ToolCore {
|
||||
accessoryIcons1.clear();
|
||||
extraIcons1.clear();
|
||||
effectIcons1.clear();
|
||||
Iterator<Map.Entry<Integer, String>> iterOne = headStrings.entrySet().iterator();
|
||||
Iterator<Map.Entry<Integer, String>> iterOne =
|
||||
headStrings.entrySet().iterator();
|
||||
while (iterOne.hasNext()) {
|
||||
Map.Entry<Integer, String> pairs = iterOne.next();
|
||||
headIcons1.put(pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_1"));
|
||||
@@ -249,8 +250,7 @@ public abstract class BowBase extends ToolCore {
|
||||
iterOne = accessoryStrings.entrySet().iterator();
|
||||
while (iterOne.hasNext()) {
|
||||
Map.Entry<Integer, String> pairs = iterOne.next();
|
||||
accessoryIcons1.put(
|
||||
pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_1"));
|
||||
accessoryIcons1.put(pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_1"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,8 +258,7 @@ public abstract class BowBase extends ToolCore {
|
||||
iterOne = extraStrings.entrySet().iterator();
|
||||
while (iterOne.hasNext()) {
|
||||
Map.Entry<Integer, String> pairs = iterOne.next();
|
||||
extraIcons1.put(
|
||||
pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_1"));
|
||||
extraIcons1.put(pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_1"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,7 +273,8 @@ public abstract class BowBase extends ToolCore {
|
||||
accessoryIcons2.clear();
|
||||
extraIcons2.clear();
|
||||
effectIcons2.clear();
|
||||
Iterator<Map.Entry<Integer, String>> iterTwo = headStrings.entrySet().iterator();
|
||||
Iterator<Map.Entry<Integer, String>> iterTwo =
|
||||
headStrings.entrySet().iterator();
|
||||
while (iterTwo.hasNext()) {
|
||||
Map.Entry<Integer, String> pairs = iterTwo.next();
|
||||
headIcons2.put(pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_2"));
|
||||
@@ -290,8 +290,7 @@ public abstract class BowBase extends ToolCore {
|
||||
iterTwo = accessoryStrings.entrySet().iterator();
|
||||
while (iterTwo.hasNext()) {
|
||||
Map.Entry<Integer, String> pairs = iterTwo.next();
|
||||
accessoryIcons2.put(
|
||||
pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_2"));
|
||||
accessoryIcons2.put(pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_2"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,8 +298,7 @@ public abstract class BowBase extends ToolCore {
|
||||
iterTwo = extraStrings.entrySet().iterator();
|
||||
while (iterTwo.hasNext()) {
|
||||
Map.Entry<Integer, String> pairs = iterTwo.next();
|
||||
extraIcons2.put(
|
||||
pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_2"));
|
||||
extraIcons2.put(pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_2"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,7 +313,8 @@ public abstract class BowBase extends ToolCore {
|
||||
accessoryIcons3.clear();
|
||||
extraIcons3.clear();
|
||||
effectIcons3.clear();
|
||||
Iterator<Map.Entry<Integer, String>> iterThree = headStrings.entrySet().iterator();
|
||||
Iterator<Map.Entry<Integer, String>> iterThree =
|
||||
headStrings.entrySet().iterator();
|
||||
while (iterThree.hasNext()) {
|
||||
Map.Entry<Integer, String> pairs = iterThree.next();
|
||||
headIcons3.put(pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_3"));
|
||||
@@ -331,8 +330,7 @@ public abstract class BowBase extends ToolCore {
|
||||
iterThree = accessoryStrings.entrySet().iterator();
|
||||
while (iterThree.hasNext()) {
|
||||
Map.Entry<Integer, String> pairs = iterThree.next();
|
||||
accessoryIcons3.put(
|
||||
pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_3"));
|
||||
accessoryIcons3.put(pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_3"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,8 +338,7 @@ public abstract class BowBase extends ToolCore {
|
||||
iterThree = extraStrings.entrySet().iterator();
|
||||
while (iterThree.hasNext()) {
|
||||
Map.Entry<Integer, String> pairs = iterThree.next();
|
||||
extraIcons3.put(
|
||||
pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_3"));
|
||||
extraIcons3.put(pairs.getKey(), iconRegister.registerIcon(pairs.getValue() + "_3"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,8 +92,7 @@ public class LumberAxe extends AOEHarvestTool {
|
||||
|
||||
if (wood.isWood(world, x, y, z) || wood.getMaterial() == Material.sponge)
|
||||
if (detectTree(world, x, y, z)) {
|
||||
TreeChopTask chopper =
|
||||
new TreeChopTask(this, stack, new ChunkPosition(x, y, z), player, 128);
|
||||
TreeChopTask chopper = new TreeChopTask(this, stack, new ChunkPosition(x, y, z), player, 128);
|
||||
try {
|
||||
FMLCommonHandler.instance().bus().register(chopper);
|
||||
} catch (LinkageError l) {
|
||||
|
||||
@@ -19,8 +19,7 @@ public class SlimeBounceHandler {
|
||||
private static final double FRAC_BIAS;
|
||||
private static final double[] ASINE_TAB;
|
||||
private static final double[] COS_TAB;
|
||||
public static final IdentityHashMap<EntityLivingBase, BounceInfo> BOUNCING_ENTITIES =
|
||||
new IdentityHashMap<>();
|
||||
public static final IdentityHashMap<EntityLivingBase, BounceInfo> BOUNCING_ENTITIES = new IdentityHashMap<>();
|
||||
|
||||
static {
|
||||
FRAC_BIAS = Double.longBitsToDouble(4805340802404319232L);
|
||||
|
||||
@@ -20,8 +20,7 @@ final class BehaviorDispenseArmorCopy extends BehaviorDefaultDispenseItem {
|
||||
int i = par1IBlockSource.getXInt() + enumfacing.getFrontOffsetX();
|
||||
int j = par1IBlockSource.getYInt() + enumfacing.getFrontOffsetY();
|
||||
int k = par1IBlockSource.getZInt() + enumfacing.getFrontOffsetZ();
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(
|
||||
i, j, k, i + 1, j + 1, k + 1);
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(i, j, k, i + 1, j + 1, k + 1);
|
||||
List list = par1IBlockSource
|
||||
.getWorld()
|
||||
.selectEntitiesWithinAABB(
|
||||
|
||||
@@ -358,8 +358,7 @@ public abstract class ProjectileBase extends EntityArrow implements IEntityAddit
|
||||
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.prevRotationYaw =
|
||||
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch =
|
||||
this.rotationPitch = (float) (Math.atan2(this.motionY, f) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(this.motionY, f) * 180.0D / Math.PI);
|
||||
}
|
||||
|
||||
// we previously hit something. Check if the block is still there.
|
||||
@@ -462,8 +461,7 @@ public abstract class ProjectileBase extends EntityArrow implements IEntityAddit
|
||||
if (entity != null) movingobjectposition = new MovingObjectPosition(entity);
|
||||
|
||||
// did we hit a player?
|
||||
if (movingobjectposition != null
|
||||
&& movingobjectposition.entityHit instanceof EntityPlayer) {
|
||||
if (movingobjectposition != null && movingobjectposition.entityHit instanceof EntityPlayer) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit;
|
||||
|
||||
// can we attack said player?
|
||||
|
||||
@@ -43,7 +43,7 @@ public abstract class ItemModifier {
|
||||
for (ItemStack removeStack : list) {
|
||||
if (craftingStack.getItem() == removeStack.getItem()
|
||||
&& (removeStack.getItemDamage() == Short.MAX_VALUE
|
||||
|| craftingStack.getItemDamage() == removeStack.getItemDamage())) {
|
||||
|| craftingStack.getItemDamage() == removeStack.getItemDamage())) {
|
||||
canCraft = true;
|
||||
list.remove(removeStack);
|
||||
break;
|
||||
|
||||
@@ -3,7 +3,6 @@ package tconstruct.library.tools;
|
||||
import cofh.api.energy.IEnergyContainerItem;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -145,13 +144,9 @@ public class AbilityHelper {
|
||||
|
||||
if (knockback > 0) {
|
||||
entity.addVelocity(
|
||||
-MathHelper.sin(player.rotationYaw * (float) Math.PI / 180.0F)
|
||||
* knockback
|
||||
* 0.5F,
|
||||
-MathHelper.sin(player.rotationYaw * (float) Math.PI / 180.0F) * knockback * 0.5F,
|
||||
0.1D,
|
||||
MathHelper.cos(player.rotationYaw * (float) Math.PI / 180.0F)
|
||||
* knockback
|
||||
* 0.5F);
|
||||
MathHelper.cos(player.rotationYaw * (float) Math.PI / 180.0F) * knockback * 0.5F);
|
||||
player.motionX *= 0.6D;
|
||||
player.motionZ *= 0.6D;
|
||||
player.setSprinting(false);
|
||||
@@ -387,9 +382,9 @@ public class AbilityHelper {
|
||||
tags.getCompoundTag("InfiTool").setInteger("Damage", damage + dam);
|
||||
int toolDamage = (damage * 100 / maxDamage) + 1;
|
||||
int stackDamage = stack.getItemDamage();
|
||||
//if (toolDamage != stackDamage) {
|
||||
// if (toolDamage != stackDamage) {
|
||||
// // stack.setItemDamage((damage * 100 / maxDamage) + 1);
|
||||
//}
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,7 +433,8 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IEq
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item id, CreativeTabs tab, List list) {
|
||||
for (Map.Entry<Integer, tconstruct.library.tools.ToolMaterial> integerToolMaterialEntry : TConstructRegistry.toolMaterials.entrySet()) {
|
||||
for (Map.Entry<Integer, tconstruct.library.tools.ToolMaterial> integerToolMaterialEntry :
|
||||
TConstructRegistry.toolMaterials.entrySet()) {
|
||||
tconstruct.library.tools.ToolMaterial material = integerToolMaterialEntry.getValue();
|
||||
buildTool(integerToolMaterialEntry.getKey(), ToolBuilder.defaultToolName(material, this), list);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package tconstruct.mechworks.blocks;
|
||||
|
||||
import static net.minecraftforge.common.util.ForgeDirection.*;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import mantle.blocks.BlockUtils;
|
||||
import mantle.world.WorldHelper;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -34,11 +38,6 @@ import tconstruct.mechworks.logic.LandmineExplodeLogic;
|
||||
import tconstruct.mechworks.logic.TileEntityLandmine;
|
||||
import tconstruct.world.model.RenderLandmine;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import static net.minecraftforge.common.util.ForgeDirection.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fuj1n
|
||||
@@ -411,7 +410,8 @@ public class BlockLandmine extends BlockContainer {
|
||||
|
||||
private boolean hasItems(World par1World, int par2, int par3, int par4) {
|
||||
TileEntityLandmine te = (TileEntityLandmine) par1World.getTileEntity(par2, par3, par4);
|
||||
return te != null && (te.getStackInSlot(0) != null || te.getStackInSlot(1) != null || te.getStackInSlot(2) != null);
|
||||
return te != null
|
||||
&& (te.getStackInSlot(0) != null || te.getStackInSlot(1) != null || te.getStackInSlot(2) != null);
|
||||
}
|
||||
|
||||
protected int getMineState(World par1World, int par2, int par3, int par4) {
|
||||
|
||||
@@ -31,12 +31,7 @@ public class BehaviorExplosive extends Behavior {
|
||||
}
|
||||
|
||||
par1World.createExplosion(
|
||||
new EntityTNTPrimed(par1World, par2, par3, par4, null),
|
||||
par2,
|
||||
par3,
|
||||
par4,
|
||||
explodeStrenght,
|
||||
true);
|
||||
new EntityTNTPrimed(par1World, par2, par3, par4, null), par2, par3, par4, explodeStrenght, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -35,11 +35,11 @@ public class BehaviorFirework extends Behavior {
|
||||
boolean shouldRun = true;
|
||||
if (triggerer instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) triggerer;
|
||||
//if (player.capabilities.isCreativeMode) {
|
||||
// Remove the bellow comment to make the player in creative
|
||||
// mode not get launched
|
||||
// shouldRun = false;
|
||||
//}
|
||||
// if (player.capabilities.isCreativeMode) {
|
||||
// Remove the bellow comment to make the player in creative
|
||||
// mode not get launched
|
||||
// shouldRun = false;
|
||||
// }
|
||||
}
|
||||
|
||||
if (shouldRun) {
|
||||
|
||||
+5
-5
@@ -39,11 +39,11 @@ public class SpecialStackHandlerRocketFireball extends SpecialStackHandler {
|
||||
boolean shouldRun = true;
|
||||
if (triggerer instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) triggerer;
|
||||
//if (player.capabilities.isCreativeMode) {
|
||||
// Remove the bellow comment to make the player in
|
||||
// creative mode not get launched
|
||||
// shouldRun = false;
|
||||
//}
|
||||
// if (player.capabilities.isCreativeMode) {
|
||||
// Remove the bellow comment to make the player in
|
||||
// creative mode not get launched
|
||||
// shouldRun = false;
|
||||
// }
|
||||
}
|
||||
|
||||
if (shouldRun) {
|
||||
|
||||
@@ -116,7 +116,6 @@ public class TileEntityLandmine extends TileEntity implements IInventory {
|
||||
if (inventory[par1].stackSize == 0) {
|
||||
inventory[par1] = null;
|
||||
}
|
||||
|
||||
}
|
||||
return itemstack;
|
||||
} else {
|
||||
@@ -188,14 +187,14 @@ public class TileEntityLandmine extends TileEntity implements IInventory {
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack) {
|
||||
//// Should automatic camo insertion be allowed.
|
||||
//if (i == 3) {
|
||||
// if (i == 3) {
|
||||
// return false;
|
||||
//} else {
|
||||
// } else {
|
||||
// // Here for mDiyo to decide if he wants automation for
|
||||
// // insertion/extraction of the items to be an option.
|
||||
// // Would be useful for building automated mine laying machines.
|
||||
// return false;
|
||||
//}
|
||||
// }
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,8 +87,7 @@ public class RecipeHandlerAlloying extends RecipeHandlerBase {
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(
|
||||
new RecipeTransferRect(new Rectangle(76, 21, 22, 15), this.getRecipeID()));
|
||||
this.transferRects.add(new RecipeTransferRect(new Rectangle(76, 21, 22, 15), this.getRecipeID()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -146,9 +146,9 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
|
||||
if (tank.position.contains(relMouse)) {
|
||||
if ((tank.fluid != null) && tank.fluid.amount > 0) {
|
||||
if (usage) {
|
||||
return GuiUsageRecipe.openRecipeGui("liquid", new Object[]{tank.fluid});
|
||||
return GuiUsageRecipe.openRecipeGui("liquid", new Object[] {tank.fluid});
|
||||
} else {
|
||||
return GuiCraftingRecipe.openRecipeGui("liquid", new Object[]{tank.fluid});
|
||||
return GuiCraftingRecipe.openRecipeGui("liquid", new Object[] {tank.fluid});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,8 +60,7 @@ public abstract class RecipeHandlerCastingBase extends RecipeHandlerBase {
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(
|
||||
new RecipeTransferRect(new Rectangle(76, 18, 22, 15), this.getRecipeID()));
|
||||
this.transferRects.add(new RecipeTransferRect(new Rectangle(76, 18, 22, 15), this.getRecipeID()));
|
||||
}
|
||||
|
||||
public abstract List<CastingRecipe> getCastingRecipes();
|
||||
|
||||
@@ -47,8 +47,7 @@ public class RecipeHandlerDryingRack extends RecipeHandlerBase {
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(
|
||||
new RecipeTransferRect(new Rectangle(68, 20, 22, 15), this.getRecipeID()));
|
||||
this.transferRects.add(new RecipeTransferRect(new Rectangle(68, 20, 22, 15), this.getRecipeID()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -65,8 +65,7 @@ public class RecipeHandlerMelting extends RecipeHandlerBase {
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(
|
||||
new RecipeTransferRect(new Rectangle(72, 20, 16, 34), this.getRecipeID()));
|
||||
this.transferRects.add(new RecipeTransferRect(new Rectangle(72, 20, 16, 34), this.getRecipeID()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -89,8 +89,7 @@ public class RecipeHandlerToolMaterials extends RecipeHandlerBase {
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(
|
||||
new RecipeTransferRect(new Rectangle(10, 30, 16, 16), this.getRecipeID()));
|
||||
this.transferRects.add(new RecipeTransferRect(new Rectangle(10, 30, 16, 16), this.getRecipeID()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -30,8 +30,7 @@ public class SmelteryDamageSource extends DamageSource {
|
||||
String s = "death." + type + this.damageType;
|
||||
String s1 = s + ".player";
|
||||
return entityliving1 != null && StatCollector.canTranslate(s1)
|
||||
? new ChatComponentTranslation(
|
||||
s1, par1EntityLiving.func_145748_c_(), entityliving1.func_145748_c_())
|
||||
? new ChatComponentTranslation(s1, par1EntityLiving.func_145748_c_(), entityliving1.func_145748_c_())
|
||||
: new ChatComponentTranslation(s, par1EntityLiving.func_145748_c_());
|
||||
}
|
||||
}
|
||||
@@ -669,12 +669,29 @@ public class TinkerSmeltery {
|
||||
}
|
||||
|
||||
// Glass Recipes
|
||||
GameRegistry.addRecipe(
|
||||
new ItemStack(Items.glass_bottle, 3), "# #", " # ", '#', TinkerSmeltery.clearGlass);
|
||||
GameRegistry.addRecipe(new ItemStack(Items.glass_bottle, 3), "# #", " # ", '#', TinkerSmeltery.clearGlass);
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(
|
||||
new ItemStack(Blocks.daylight_detector),
|
||||
"GGG", "QQQ", "WWW", 'G', "blockGlass", 'Q', "gemQuartz", 'W', "slabWood"));
|
||||
GameRegistry.addRecipe(new ItemStack(Blocks.beacon, 1), "GGG", "GSG", "OOO", 'G', TinkerSmeltery.clearGlass, 'S', Items.nether_star, 'O', Blocks.obsidian);
|
||||
"GGG",
|
||||
"QQQ",
|
||||
"WWW",
|
||||
'G',
|
||||
"blockGlass",
|
||||
'Q',
|
||||
"gemQuartz",
|
||||
'W',
|
||||
"slabWood"));
|
||||
GameRegistry.addRecipe(
|
||||
new ItemStack(Blocks.beacon, 1),
|
||||
"GGG",
|
||||
"GSG",
|
||||
"OOO",
|
||||
'G',
|
||||
TinkerSmeltery.clearGlass,
|
||||
'S',
|
||||
Items.nether_star,
|
||||
'O',
|
||||
Blocks.obsidian);
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(
|
||||
new ItemStack(TinkerSmeltery.glassPane, 16, 0), "GGG", "GGG", 'G', TinkerSmeltery.clearGlass));
|
||||
|
||||
@@ -816,7 +833,8 @@ public class TinkerSmeltery {
|
||||
}
|
||||
|
||||
public void addOreDictionarySmelteryRecipes() {
|
||||
List<FluidType> exceptions = Arrays.asList(FluidType.getFluidType("Water"),
|
||||
List<FluidType> exceptions = Arrays.asList(
|
||||
FluidType.getFluidType("Water"),
|
||||
FluidType.getFluidType("Stone"),
|
||||
FluidType.getFluidType("Emerald"),
|
||||
FluidType.getFluidType("Quartz"),
|
||||
|
||||
@@ -95,7 +95,6 @@ public class FilledBucket extends ItemBucket {
|
||||
return new ItemStack(Items.bucket);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
@@ -49,8 +49,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidHandler {
|
||||
boolean flagActiveFaucet = false;
|
||||
|
||||
TileEntity possibleFaucet = worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
|
||||
if (possibleFaucet instanceof FaucetLogic)
|
||||
flagActiveFaucet = ((FaucetLogic) possibleFaucet).active;
|
||||
if (possibleFaucet instanceof FaucetLogic) flagActiveFaucet = ((FaucetLogic) possibleFaucet).active;
|
||||
|
||||
if (ticks == 6) // && !flagActiveFaucet)
|
||||
this.distributeFluids();
|
||||
|
||||
@@ -36,10 +36,10 @@ public class PaneConnectedRender implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0.45D, 0D, 0D, 0.55D, 1D, 1D);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
} //else {
|
||||
// renderer.setRenderBounds(0.45D, 0D, 0.45D, 0.55D, 1D, 0.55D);
|
||||
// renderer.renderStandardBlock(block, x, y, z);
|
||||
//}
|
||||
} // else {
|
||||
// renderer.setRenderBounds(0.45D, 0D, 0.45D, 0.55D, 1D, 0.55D);
|
||||
// renderer.renderStandardBlock(block, x, y, z);
|
||||
// }
|
||||
|
||||
// renderer.setOverrideBlockTexture(sideTexture);
|
||||
|
||||
|
||||
@@ -669,20 +669,24 @@ public class TinkerTools {
|
||||
}
|
||||
|
||||
private void addRecipesForToolBuilder() {
|
||||
ToolBuilder.addNormalToolRecipe(TinkerTools.pickaxe, TinkerTools.pickaxeHead, TinkerTools.toolRod, TinkerTools.binding);
|
||||
ToolBuilder.addNormalToolRecipe(
|
||||
TinkerTools.pickaxe, TinkerTools.pickaxeHead, TinkerTools.toolRod, TinkerTools.binding);
|
||||
ToolBuilder.addNormalToolRecipe(
|
||||
TinkerTools.broadsword, TinkerTools.swordBlade, TinkerTools.toolRod, TinkerTools.wideGuard);
|
||||
ToolBuilder.addNormalToolRecipe(TinkerTools.hatchet, TinkerTools.hatchetHead, TinkerTools.toolRod);
|
||||
ToolBuilder.addNormalToolRecipe(TinkerTools.shovel, TinkerTools.shovelHead, TinkerTools.toolRod);
|
||||
ToolBuilder.addNormalToolRecipe(
|
||||
TinkerTools.longsword, TinkerTools.swordBlade, TinkerTools.toolRod, TinkerTools.handGuard);
|
||||
ToolBuilder.addNormalToolRecipe(TinkerTools.rapier, TinkerTools.swordBlade, TinkerTools.toolRod, TinkerTools.crossbar);
|
||||
ToolBuilder.addNormalToolRecipe(
|
||||
TinkerTools.rapier, TinkerTools.swordBlade, TinkerTools.toolRod, TinkerTools.crossbar);
|
||||
ToolBuilder.addNormalToolRecipe(TinkerTools.frypan, TinkerTools.frypanHead, TinkerTools.toolRod);
|
||||
ToolBuilder.addNormalToolRecipe(TinkerTools.battlesign, TinkerTools.signHead, TinkerTools.toolRod);
|
||||
ToolBuilder.addNormalToolRecipe(
|
||||
TinkerTools.mattock, TinkerTools.hatchetHead, TinkerTools.toolRod, TinkerTools.shovelHead);
|
||||
ToolBuilder.addNormalToolRecipe(TinkerTools.dagger, TinkerTools.knifeBlade, TinkerTools.toolRod, TinkerTools.crossbar);
|
||||
ToolBuilder.addNormalToolRecipe(TinkerTools.cutlass, TinkerTools.swordBlade, TinkerTools.toolRod, TinkerTools.fullGuard);
|
||||
ToolBuilder.addNormalToolRecipe(
|
||||
TinkerTools.dagger, TinkerTools.knifeBlade, TinkerTools.toolRod, TinkerTools.crossbar);
|
||||
ToolBuilder.addNormalToolRecipe(
|
||||
TinkerTools.cutlass, TinkerTools.swordBlade, TinkerTools.toolRod, TinkerTools.fullGuard);
|
||||
ToolBuilder.addNormalToolRecipe(TinkerTools.chisel, TinkerTools.chiselHead, TinkerTools.toolRod);
|
||||
|
||||
ToolBuilder.addNormalToolRecipe(
|
||||
@@ -1361,8 +1365,7 @@ public class TinkerTools {
|
||||
"");
|
||||
if (batHardened != null)
|
||||
TConstructClientRegistry.registerManualModifier("fluxmod", ironpick.copy(), batHardened);
|
||||
if (basicCell != null)
|
||||
TConstructClientRegistry.registerManualModifier("fluxmod2", ironpick.copy(), basicCell);
|
||||
if (basicCell != null) TConstructClientRegistry.registerManualModifier("fluxmod2", ironpick.copy(), basicCell);
|
||||
|
||||
/* Thaumcraft */
|
||||
Object obj = ItemHelper.getStaticItem("itemResource", "thaumcraft.common.config.ConfigItems");
|
||||
|
||||
@@ -15,7 +15,6 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.client.event.sound.SoundLoadEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.client.FlexibleToolRenderer;
|
||||
import tconstruct.client.entity.projectile.*;
|
||||
import tconstruct.client.pages.*;
|
||||
@@ -543,17 +542,17 @@ public class ToolProxyClient extends ToolProxyCommon {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onSound(SoundLoadEvent event) {
|
||||
//try {
|
||||
/*
|
||||
* SoundManager soundmanager = event.manager;
|
||||
* soundmanager.addSound("tinker:frypan_hit.ogg");
|
||||
* soundmanager.addSound("tinker:little_saw.ogg");
|
||||
* soundmanager.addSound("tinker:launcher_clank.ogg");
|
||||
* TConstruct.logger.info("Successfully loaded sounds.");
|
||||
*/
|
||||
//} catch (Exception e) {
|
||||
// try {
|
||||
/*
|
||||
* SoundManager soundmanager = event.manager;
|
||||
* soundmanager.addSound("tinker:frypan_hit.ogg");
|
||||
* soundmanager.addSound("tinker:little_saw.ogg");
|
||||
* soundmanager.addSound("tinker:launcher_clank.ogg");
|
||||
* TConstruct.logger.info("Successfully loaded sounds.");
|
||||
*/
|
||||
// } catch (Exception e) {
|
||||
// TConstruct.logger.error("Failed to register one or more sounds");
|
||||
//}
|
||||
// }
|
||||
|
||||
MinecraftForge.EVENT_BUS.unregister(this);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class CraftingSlab extends InventorySlab {
|
||||
/* Rendering */
|
||||
@Override
|
||||
public String[] getTextureNames() {
|
||||
return new String[]{
|
||||
return new String[] {
|
||||
"craftingstation_top",
|
||||
"craftingstation_slab_side",
|
||||
"craftingstation_bottom",
|
||||
|
||||
@@ -30,7 +30,7 @@ public class CraftingStationBlock extends InventoryBlock {
|
||||
/* Rendering */
|
||||
@Override
|
||||
public String[] getTextureNames() {
|
||||
return new String[]{"craftingstation_top", "craftingstation_side", "craftingstation_bottom"};
|
||||
return new String[] {"craftingstation_top", "craftingstation_side", "craftingstation_bottom"};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,7 +43,7 @@ public class FurnaceSlab extends InventorySlab {
|
||||
|
||||
@Override
|
||||
public String[] getTextureNames() {
|
||||
return new String[]{"furnaceslab_front", "furnaceslab_front_active", "furnaceslab_side", "furnace_top"};
|
||||
return new String[] {"furnaceslab_front", "furnaceslab_front_active", "furnaceslab_side", "furnace_top"};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ToolStationBlock extends InventoryBlock {
|
||||
/* Rendering */
|
||||
@Override
|
||||
public String[] getTextureNames() {
|
||||
return new String[]{
|
||||
return new String[] {
|
||||
"toolstation_top",
|
||||
"toolstation_side",
|
||||
"toolstation_bottom",
|
||||
|
||||
@@ -75,8 +75,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
|
||||
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.prevRotationYaw =
|
||||
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch =
|
||||
this.rotationPitch = (float) (Math.atan2(this.motionY, f) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(this.motionY, f) * 180.0D / Math.PI);
|
||||
}
|
||||
|
||||
Block i = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
@@ -146,8 +145,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
|
||||
|
||||
if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) {
|
||||
ySpeed = 0.3F;
|
||||
AxisAlignedBB axisalignedbb1 =
|
||||
entity1.boundingBox.expand(ySpeed, ySpeed, ySpeed);
|
||||
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(ySpeed, ySpeed, ySpeed);
|
||||
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec3, vec31);
|
||||
|
||||
if (movingobjectposition1 != null) {
|
||||
@@ -165,8 +163,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
|
||||
movingobjectposition = new MovingObjectPosition(entity);
|
||||
}
|
||||
|
||||
if (movingobjectposition != null
|
||||
&& movingobjectposition.entityHit instanceof EntityPlayer) {
|
||||
if (movingobjectposition != null && movingobjectposition.entityHit instanceof EntityPlayer) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit;
|
||||
|
||||
if (entityplayer.capabilities.disableDamage
|
||||
|
||||
@@ -88,7 +88,8 @@ public class LaunchedPotion extends EntityThrowable {
|
||||
|
||||
if (list != null && !list.isEmpty()) {
|
||||
AxisAlignedBB axisalignedbb = this.boundingBox.expand(4.0D, 2.0D, 4.0D);
|
||||
List<EntityLivingBase> list1 = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
|
||||
List<EntityLivingBase> list1 =
|
||||
this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
|
||||
|
||||
if (list1 != null && !list1.isEmpty()) {
|
||||
|
||||
|
||||
@@ -79,11 +79,7 @@ public class BattlesignGui extends GuiScreen {
|
||||
chatFormatting
|
||||
+ (i == currentLine ? "> " : "")
|
||||
+ text[i]
|
||||
+ (i == currentLine
|
||||
? " " + EnumChatFormatting.RESET
|
||||
+ chatFormatting
|
||||
+ "<"
|
||||
: ""),
|
||||
+ (i == currentLine ? " " + EnumChatFormatting.RESET + chatFormatting + "<" : ""),
|
||||
k
|
||||
- fontRendererObj.getStringWidth(
|
||||
(i == currentLine ? "> " : "") + text[i] + (i == currentLine ? " <" : ""))
|
||||
|
||||
@@ -17,7 +17,6 @@ import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.PatternBuilder;
|
||||
import tconstruct.library.tools.ToolMaterial;
|
||||
import tconstruct.library.util.HarvestLevels;
|
||||
import tconstruct.smeltery.inventory.ActiveContainer;
|
||||
import tconstruct.tools.inventory.PartCrafterChestContainer;
|
||||
import tconstruct.tools.logic.PartBuilderLogic;
|
||||
|
||||
|
||||
@@ -183,6 +183,9 @@ public class StencilTableGui extends GuiContainer implements INEIGuiHandler {
|
||||
}
|
||||
|
||||
// is it in the horizontal column of the left buttons?
|
||||
return x + w > this.buttonsLeftRect[0] && x < this.guiLeft && y + h > this.guiTop && y < this.buttonsLeftRect[1];
|
||||
return x + w > this.buttonsLeftRect[0]
|
||||
&& x < this.guiLeft
|
||||
&& y + h > this.guiTop
|
||||
&& y < this.buttonsLeftRect[1];
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,6 @@ import org.lwjgl.opengl.GL11;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.library.client.TConstructClientRegistry;
|
||||
import tconstruct.library.client.ToolGuiElement;
|
||||
import tconstruct.smeltery.inventory.ActiveContainer;
|
||||
import tconstruct.tools.inventory.ToolStationContainer;
|
||||
import tconstruct.tools.logic.ToolStationLogic;
|
||||
import tconstruct.util.network.ToolStationPacket;
|
||||
|
||||
@@ -174,7 +174,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic {
|
||||
if (stack != null) {
|
||||
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(stack);
|
||||
if (result != null && result.getItem() instanceof ItemFood) // Only valid for food
|
||||
return result.copy();
|
||||
return result.copy();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -237,14 +237,7 @@ public class FancyItemRender extends Render {
|
||||
|
||||
GL11.glColor4f(par5, par6, par7, 1.0F);
|
||||
ItemRenderer.renderItemIn2D(
|
||||
tessellator,
|
||||
f5,
|
||||
f6,
|
||||
f4,
|
||||
f7,
|
||||
par2Icon.getIconWidth(),
|
||||
par2Icon.getIconHeight(),
|
||||
f12);
|
||||
tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12);
|
||||
|
||||
if (itemstack.hasEffect(pass)) {
|
||||
GL11.glDepthFunc(GL11.GL_EQUAL);
|
||||
@@ -471,25 +464,15 @@ public class FancyItemRender extends Render {
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(
|
||||
par2 + 0,
|
||||
par3 + par5,
|
||||
this.zLevel,
|
||||
(f2 + (float) par5 * f4) * f,
|
||||
(f3 + (float) par5) * f1);
|
||||
par2 + 0, par3 + par5, this.zLevel, (f2 + (float) par5 * f4) * f, (f3 + (float) par5) * f1);
|
||||
tessellator.addVertexWithUV(
|
||||
par2 + par4,
|
||||
par3 + par5,
|
||||
this.zLevel,
|
||||
(f2 + (float) par4 + (float) par5 * f4) * f,
|
||||
(f3 + (float) par5) * f1);
|
||||
tessellator.addVertexWithUV(
|
||||
par2 + par4,
|
||||
par3 + 0,
|
||||
this.zLevel,
|
||||
(f2 + (float) par4) * f,
|
||||
(f3 + 0.0F) * f1);
|
||||
tessellator.addVertexWithUV(
|
||||
par2 + 0, par3 + 0, this.zLevel, (f2 + 0.0F) * f, (f3 + 0.0F) * f1);
|
||||
tessellator.addVertexWithUV(par2 + par4, par3 + 0, this.zLevel, (f2 + (float) par4) * f, (f3 + 0.0F) * f1);
|
||||
tessellator.addVertexWithUV(par2 + 0, par3 + 0, this.zLevel, (f2 + 0.0F) * f, (f3 + 0.0F) * f1);
|
||||
tessellator.draw();
|
||||
}
|
||||
}
|
||||
@@ -568,18 +551,10 @@ public class FancyItemRender extends Render {
|
||||
public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(
|
||||
par1 + 0, par2 + par5, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());
|
||||
tessellator.addVertexWithUV(
|
||||
par1 + par4,
|
||||
par2 + par5,
|
||||
this.zLevel,
|
||||
par3Icon.getMaxU(),
|
||||
par3Icon.getMaxV());
|
||||
tessellator.addVertexWithUV(
|
||||
par1 + par4, par2 + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());
|
||||
tessellator.addVertexWithUV(
|
||||
par1 + 0, par2 + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV());
|
||||
tessellator.addVertexWithUV(par1 + 0, par2 + par5, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());
|
||||
tessellator.addVertexWithUV(par1 + par4, par2 + par5, this.zLevel, par3Icon.getMaxU(), par3Icon.getMaxV());
|
||||
tessellator.addVertexWithUV(par1 + par4, par2 + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());
|
||||
tessellator.addVertexWithUV(par1 + 0, par2 + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV());
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ public class EnvironmentChecks {
|
||||
* logs if so. Note: This code adds additional data to crashlogs. It does
|
||||
* not trigger any crashes.
|
||||
*/
|
||||
//private static List<String> incompatibilities = new ArrayList<>();
|
||||
//private static EnvironmentChecks instance = new EnvironmentChecks();
|
||||
// private static List<String> incompatibilities = new ArrayList<>();
|
||||
// private static EnvironmentChecks instance = new EnvironmentChecks();
|
||||
public static void verifyEnvironmentSanity() {
|
||||
// Bukkit/Magic Launcher/Optifine are caught by Mantle, so we no longer
|
||||
// check for those.
|
||||
|
||||
@@ -66,7 +66,8 @@ public final class IMCHandler {
|
||||
TConstruct.logger.debug("IMC: Added Projectile stats for material " + mat.materialName);
|
||||
}
|
||||
|
||||
// add additional render mapping so resource packs or the mods themselves can have custom textures
|
||||
// add additional render mapping so resource packs or the mods themselves can have custom
|
||||
// textures
|
||||
// for the tools
|
||||
if (FMLCommonHandler.instance().getSide().isClient())
|
||||
TConstructClientRegistry.addMaterialRenderMapping(
|
||||
@@ -168,12 +169,13 @@ public final class IMCHandler {
|
||||
|
||||
// we add the toolpart to all smeltery recipies that use iron and create a toolpart
|
||||
List<CastingRecipe> newRecipies = new LinkedList<>();
|
||||
for (CastingRecipe recipe : TConstructRegistry.getTableCasting().getCastingRecipes()) {
|
||||
for (CastingRecipe recipe :
|
||||
TConstructRegistry.getTableCasting().getCastingRecipes()) {
|
||||
if (recipe.castingMetal.getFluid() != TinkerSmeltery.moltenIronFluid) continue;
|
||||
if (recipe.cast == null || !(recipe.cast.getItem() instanceof IPattern)) continue;
|
||||
if (!(recipe.getResult().getItem()
|
||||
instanceof DynamicToolPart)) // has to be dynamic toolpart to support automatic addition
|
||||
continue;
|
||||
continue;
|
||||
|
||||
newRecipies.add(recipe);
|
||||
}
|
||||
@@ -198,7 +200,8 @@ public final class IMCHandler {
|
||||
Smeltery.addMelting(ft, output, 0, liquid2.amount);
|
||||
}
|
||||
|
||||
TConstruct.logger.debug("Casting IMC: Added fluid " + tag.getString("FluidName") + " to part casting");
|
||||
TConstruct.logger.debug(
|
||||
"Casting IMC: Added fluid " + tag.getString("FluidName") + " to part casting");
|
||||
break;
|
||||
}
|
||||
case "addMaterialItem": {
|
||||
@@ -275,8 +278,8 @@ public final class IMCHandler {
|
||||
|
||||
Smeltery.addMelting(
|
||||
item, Block.getBlockFromItem(block.getItem()), block.getItemDamage(), temperature, liquid);
|
||||
TConstruct.logger.debug("Smeltery IMC: Added melting: " + item.getDisplayName() + " to " + liquid.amount
|
||||
+ "mb " + liquid.getLocalizedName());
|
||||
TConstruct.logger.debug("Smeltery IMC: Added melting: " + item.getDisplayName() + " to "
|
||||
+ liquid.amount + "mb " + liquid.getLocalizedName());
|
||||
break;
|
||||
}
|
||||
case "addSmelteryFuel": {
|
||||
@@ -299,8 +302,8 @@ public final class IMCHandler {
|
||||
|
||||
Smeltery.addSmelteryFuel(liquid.getFluid(), temperature, duration);
|
||||
|
||||
TConstruct.logger.debug("Smeltery IMC: Added fuel: " + liquid.getLocalizedName() + " (" + temperature
|
||||
+ ", " + duration + ")");
|
||||
TConstruct.logger.debug("Smeltery IMC: Added fuel: " + liquid.getLocalizedName() + " ("
|
||||
+ temperature + ", " + duration + ")");
|
||||
break;
|
||||
}
|
||||
case "addFluxBattery":
|
||||
@@ -311,7 +314,6 @@ public final class IMCHandler {
|
||||
ItemStack battery = message.getItemStackValue();
|
||||
battery.stackSize = 1; // avoid getting a stack size of 0 or larger than 1
|
||||
|
||||
|
||||
if (!(battery.getItem() instanceof IEnergyContainerItem)) {
|
||||
FMLLog.bigWarning("Flux Battery IMC: ItemStack is no instance of IEnergyContainerItem");
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
import tconstruct.client.AmmoItemRenderer;
|
||||
import tconstruct.library.client.TConstructClientRegistry;
|
||||
import tconstruct.library.crafting.ToolBuilder;
|
||||
import tconstruct.library.entity.ProjectileBase;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
import tconstruct.util.Reference;
|
||||
|
||||
@@ -6,7 +6,6 @@ import net.minecraftforge.client.event.FOVUpdateEvent;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import tconstruct.library.weaponry.BowBaseAmmo;
|
||||
import tconstruct.library.weaponry.IWindup;
|
||||
import tconstruct.weaponry.TinkerWeaponry;
|
||||
|
||||
public class RenderEventHandler {
|
||||
@SubscribeEvent
|
||||
@@ -25,8 +24,9 @@ public class RenderEventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRenderPlayer(RenderPlayerEvent.Pre event) {
|
||||
//if (event.entityPlayer.getCurrentEquippedItem() != null && event.entityPlayer.getCurrentEquippedItem().getItem() == TinkerWeaponry.javelin) {
|
||||
//}
|
||||
// if (event.entityPlayer.getCurrentEquippedItem() != null &&
|
||||
// event.entityPlayer.getCurrentEquippedItem().getItem() == TinkerWeaponry.javelin) {
|
||||
// }
|
||||
|
||||
if (event.entityPlayer.getItemInUse() == null) return;
|
||||
|
||||
|
||||
@@ -91,9 +91,7 @@ public class MiningExplosion extends Explosion {
|
||||
int i2 = MathHelper.floor_double(this.explosionZ - (double) this.explosionSize - 1.0D);
|
||||
int j2 = MathHelper.floor_double(this.explosionZ + (double) this.explosionSize + 1.0D);
|
||||
List list = this.world.getEntitiesWithinAABBExcludingEntity(
|
||||
this.exploder,
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
i, k, i2, j, l1, j2));
|
||||
this.exploder, AxisAlignedBB.getBoundingBox(i, k, i2, j, l1, j2));
|
||||
Vec3 vec3 = Vec3.createVectorHelper(this.explosionX, this.explosionY, this.explosionZ);
|
||||
|
||||
for (int k2 = 0; k2 < list.size(); ++k2) {
|
||||
@@ -122,8 +120,7 @@ public class MiningExplosion extends Explosion {
|
||||
entity.motionZ += d2 * d11;
|
||||
|
||||
if (entity instanceof EntityPlayer) {
|
||||
this.field_77288_k.put(
|
||||
entity, Vec3.createVectorHelper(d0 * d10, d1 * d10, d2 * d10));
|
||||
this.field_77288_k.put(entity, Vec3.createVectorHelper(d0 * d10, d1 * d10, d2 * d10));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -196,8 +193,7 @@ public class MiningExplosion extends Explosion {
|
||||
|
||||
if (l != Blocks.air) {
|
||||
if (l.canDropFromExplosion(this)) {
|
||||
l.dropBlockAsItemWithChance(
|
||||
this.world, i, j, k, this.world.getBlockMetadata(i, j, k), 1.0F, 0);
|
||||
l.dropBlockAsItemWithChance(this.world, i, j, k, this.world.getBlockMetadata(i, j, k), 1.0F, 0);
|
||||
}
|
||||
l.onBlockExploded(this.world, i, j, k, this);
|
||||
}
|
||||
|
||||
@@ -182,8 +182,8 @@ public class TinkerWorldProxyClient extends TinkerWorldProxyCommon {
|
||||
entityfx = new EntityPortalFX(mc.theWorld, par2, par4, par6, par8, par10, par12);
|
||||
break;
|
||||
case "enchantmenttable":
|
||||
entityfx =
|
||||
new EntityEnchantmentTableParticleFX(mc.theWorld, par2, par4, par6, par8, par10, par12);
|
||||
entityfx = new EntityEnchantmentTableParticleFX(
|
||||
mc.theWorld, par2, par4, par6, par8, par10, par12);
|
||||
break;
|
||||
case "explode":
|
||||
entityfx = new EntityExplodeFX(mc.theWorld, par2, par4, par6, par8, par10, par12);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package tconstruct.world.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
|
||||
|
||||
@@ -88,11 +88,7 @@ public class SlimeExplosive extends TConstructBlock {
|
||||
if (!par1World.isRemote) {
|
||||
if ((par5 % 2) == 1) {
|
||||
ExplosivePrimed entitytntprimed = new ExplosivePrimed(
|
||||
par1World,
|
||||
(float) par2 + 0.5F,
|
||||
(float) par3 + 0.5F,
|
||||
(float) par4 + 0.5F,
|
||||
par6EntityLivingBase);
|
||||
par1World, (float) par2 + 0.5F, (float) par3 + 0.5F, (float) par4 + 0.5F, par6EntityLivingBase);
|
||||
par1World.spawnEntityInWorld(entitytntprimed);
|
||||
par1World.playSoundAtEntity(entitytntprimed, "random.fuse", 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
|
||||
MinecraftServer var1 = ((WorldServer) this.worldObj).func_73046_m();
|
||||
var2 = this.getMaxInPortalTime();
|
||||
|
||||
//if (this.inPortal) {
|
||||
// if (this.inPortal) {
|
||||
// if (var1.getAllowNether()) {
|
||||
// /*
|
||||
// * if (this.ridingEntity == null && this.timeInPortal++ >=
|
||||
@@ -329,13 +329,13 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
|
||||
// * this.inPortal = false;
|
||||
// */
|
||||
// }
|
||||
//} else {
|
||||
// } else {
|
||||
// /*
|
||||
// * if (this.timeInPortal > 0) { this.timeInPortal -= 4; }
|
||||
// *
|
||||
// * if (this.timeInPortal < 0) { this.timeInPortal = 0; }
|
||||
// */
|
||||
//}
|
||||
// }
|
||||
|
||||
if (this.timeUntilPortal > 0) {
|
||||
--this.timeUntilPortal;
|
||||
|
||||
@@ -120,8 +120,7 @@ public abstract class SlimeBase extends EntityLiving implements IMob {
|
||||
this.motionY = 0.05 * getSlimeSize() + 0.37;
|
||||
|
||||
if (this.isPotionActive(Potion.jump)) {
|
||||
this.motionY +=
|
||||
(float) (this.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F;
|
||||
this.motionY += (float) (this.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F;
|
||||
}
|
||||
|
||||
if (this.isSprinting()) {
|
||||
|
||||
@@ -9,7 +9,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
|
||||
|
||||
Reference in new issue
Block a user