Skip to content

Commit

Permalink
manual merge of master branch changes up to commit 1387bc6
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Nov 23, 2013
1 parent 2d99d5d commit 14d357c
Show file tree
Hide file tree
Showing 23 changed files with 309 additions and 164 deletions.
3 changes: 3 additions & 0 deletions resources/assets/tinker/lang/en_US.lang
Expand Up @@ -118,6 +118,8 @@ tile.cloth.green.slab.name=Green Wool Slab
tile.cloth.red.slab.name=Red Wool Slab
tile.cloth.black.slab.name=Black Wool Slab

tile.GlueBlock.name=Glue Block

item.oreberry.iron.name=Iron Oreberry
item.oreberry.gold.name=Gold Oreberry
item.oreberry.copper.name=Copper Oreberry
Expand Down Expand Up @@ -204,6 +206,7 @@ item.tconstruct.MetalPattern.bowstring.name=Bowstring Cast
item.tconstruct.MetalPattern.fletching.name=Fletching Cast
item.tconstruct.MetalPattern.arrowhead.name=Arrowhead Cast
item.tconstruct.MetalPattern.ingot.name=Ingot Cast
item.tconstruct.MetalPattern.gem.name=Gem Cast

item.tconstruct.Materials.PaperStack.name=Paper Stack
item.tconstruct.Materials.SlimeCrystal.name=Slime Crystal
Expand Down
Binary file modified resources/assets/tinker/textures/blocks/compressed_alubrass.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/tinker/textures/blocks/compressed_alumite.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/tinker/textures/blocks/compressed_ardite.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/tinker/textures/blocks/compressed_cobalt.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/tinker/textures/blocks/compressed_ender.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/tinker/textures/blocks/compressed_manyullyn.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/assets/tinker/textures/blocks/glue.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions src/main/java/tconstruct/blocks/BloodBlock.java
@@ -0,0 +1,27 @@
package tconstruct.blocks;

import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import net.minecraftforge.fluids.Fluid;

public class BloodBlock extends TConstructFluid
{

public BloodBlock(int id, Fluid fluid, Material material, String texture)
{
super(id, fluid, material, texture);
}

public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity)
{
if (entity instanceof EntityLivingBase)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 200, 0));
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 20*10, 4));
}
}
}
48 changes: 48 additions & 0 deletions src/main/java/tconstruct/blocks/GlueBlock.java
@@ -0,0 +1,48 @@
package tconstruct.blocks;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;

public class GlueBlock extends TConstructBlock {

public GlueBlock(int id)
{
super(id, Material.ground, 4.0f, new String[]{"glue"});
}

@Override
public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity)
{
entity.motionX *= 0.1;
entity.motionZ *= 0.1;

if (entity instanceof EntityLivingBase) {
EntityLivingBase lvb = (EntityLivingBase)entity;
// Well you'd feel ill too standing on glue...
if (lvb.isPotionActive(Potion.hunger)) {
lvb.getActivePotionEffect(Potion.hunger).duration = 20;
} else {
lvb.addPotionEffect(new PotionEffect(Potion.hunger.getId(), 20, 4));
}

// Glue is sticky stuff
if (lvb.isPotionActive(Potion.moveSlowdown)) {
lvb.getActivePotionEffect(Potion.moveSlowdown).duration = 30;
} else {
lvb.addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 30, 4));
}
}
}

public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
{
return Block.slowSand.getCollisionBoundingBoxFromPool(world, x, y, z);
}

}
34 changes: 23 additions & 11 deletions src/main/java/tconstruct/blocks/logic/SmelteryLogic.java
Expand Up @@ -9,6 +9,7 @@
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.monster.EntityIronGolem;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
Expand Down Expand Up @@ -313,34 +314,45 @@ void detectEntities ()
if (o instanceof EntityVillager)
{
EntityVillager villager = (EntityVillager) o;
if (villager.attackEntityFrom(new SmelteryDamageSource(), 1))
if (villager.attackEntityFrom(new SmelteryDamageSource(), 5))
{
if (currentLiquid + 8 < maxLiquid)
if (currentLiquid + 40 < maxLiquid)
{
int amount = villager.isChild() ? 1 : 8;
int amount = villager.isChild() ? 5 : 40;
this.fill(new FluidStack(TContent.moltenEmeraldFluid, amount), true);
}
}
}
else if (o instanceof EntityEnderman)
{
EntityEnderman villager = (EntityEnderman) o;
if (villager.attackEntityFrom(new SmelteryDamageSource(), 1))
if (villager.attackEntityFrom(new SmelteryDamageSource(), 5))
{
if (currentLiquid + 25 < maxLiquid)
if (currentLiquid + 125 < maxLiquid)
{
this.fill(new FluidStack(TContent.moltenEnderFluid, 25), true);
this.fill(new FluidStack(TContent.moltenEnderFluid, 125), true);
}
}
}
else if (o instanceof EntityIronGolem)
{
EntityIronGolem golem = (EntityIronGolem) o;
if (golem.attackEntityFrom(new SmelteryDamageSource(), 5))
{
if (currentLiquid + 40 < maxLiquid)
{
this.fill(new FluidStack(TContent.moltenIronFluid, 40), true);
}
}
}
else if (o instanceof EntityLivingBase)
{
EntityLivingBase living = (EntityLivingBase) o;
if (living.attackEntityFrom(new SmelteryDamageSource(), 1))
if (living.attackEntityFrom(new SmelteryDamageSource(), 5))
{
if (currentLiquid + 8 < maxLiquid)
if (currentLiquid + 40 < maxLiquid)
{
int amount = (living.isChild() || living instanceof EntityPlayer) ? 1 : 8;
int amount = (living.isChild() || living instanceof EntityPlayer) ? 5 : 40;
this.fill(new FluidStack(TContent.bloodFluid, amount), true);
}
}
Expand Down Expand Up @@ -952,7 +964,7 @@ public FluidStack drain (int maxDrain, boolean doDrain)
}
else
{
if (doDrain)
if (doDrain && maxDrain > 0)
{
liquid.amount -= maxDrain;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
Expand All @@ -977,7 +989,7 @@ public int fill (FluidStack resource, boolean doFill)
resource.amount = maxLiquid - currentLiquid;
int amount = resource.amount;

if (doFill)
if (amount > 0 && doFill)
{
if (addMoltenMetal(resource, false))
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/slime/SlimeGel.java
Expand Up @@ -53,7 +53,7 @@ public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity
entity.motionY *= -1.2F;
if (entity instanceof EntityLivingBase)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.jump.id, 1, 4));
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.jump.id, 1, 2));
}
}
entity.fallDistance = 0;
Expand Down

0 comments on commit 14d357c

Please sign in to comment.