Skip to content

Commit

Permalink
Bloooooooooood
Browse files Browse the repository at this point in the history
  • Loading branch information
mDiyo committed Dec 9, 2013
1 parent 6316a9c commit 5d3d0b8
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 18 deletions.
8 changes: 8 additions & 0 deletions resources/assets/tinker/lang/en_US.lang
Expand Up @@ -28,6 +28,7 @@ CraftedSoil.ConsecratedSoil.name=Consecrated Soil
tile.CastingChannel.name=Casting Channel
tile.slime.channel.name=Slime Channel
tile.slime.pad.name=Bounce Pad
tile.blood.channel.name=Blood Channel

MetalOre.NetherSlag.name=Netherack Slag
MetalOre.Cobalt.name=Cobalt Ore
Expand Down Expand Up @@ -268,6 +269,8 @@ item.tconstruct.jerky.chicken.name=Chicken Jerky
item.tconstruct.jerky.sheep.name=Mutton Jerky
item.tconstruct.jerky.fish.name=Fish Jerky
item.tconstruct.jerky.zombie.name=Monster Jerky
item.tconstruct.jerky.blueslime.name=Gelatinous Slime Drop
item.tconstruct.jerky.blood.name=Coagulated Blood Drop

Smeltery.Controller.name=Smeltery Controller
Smeltery.Drain.name=Smeltery Drain
Expand Down Expand Up @@ -480,6 +483,7 @@ LiquidMetal.Ender.name=Liquified Ender

item.food.apple.diamond.name=Jeweled Apple
item.tconstruct.strangefood.edibleslime.name=Gelatinous Slime
item.tconstruct.strangefood.edibleblood.name=Coagulated Blood
item.tconstruct.canister.empty.name=Empty Canister
item.tconstruct.canister.miniheart.red.name=Miniature Red Heart
item.tconstruct.canister.heart.name=Heart Canister
Expand Down Expand Up @@ -603,6 +607,10 @@ achievement.tconstruct.dualConvenience.desc=Kill a mob with a frying pan, and th
knapsack.tooltip=A Knapsack to hold your things.
strangefood1.tooltip=It smells terrible, but if you
strangefood2.tooltip=have nothing else to eat...
strangefood3.tooltip=It seems edible, but somehow
strangefood4.tooltip=it's just not appealing.
strangefood5.tooltip=Stretchy food!
strangefood6.tooltip=One vampiric appetizer
hambone1.tooltip=Hambone!
hambone2.tooltip=Usable for Beacon bases
metalblock.tooltip=Usable for Beacon bases
Expand Down
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/items/food/edibleslime.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.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/tconstruct/blocks/ConveyorBase.java
Expand Up @@ -19,11 +19,13 @@

public class ConveyorBase extends Block
{
public ConveyorBase(int ID, Material material)
String textureName;
public ConveyorBase(int ID, Material material, String name)
{
super(ID, material);
this.setCreativeTab(TConstructRegistry.blockTab);
setBlockBounds(0f, 0f, 0f, 1f, 0.5f, 1f);
textureName = name;
}

public boolean isBlockReplaceable (World world, int x, int y, int z)
Expand Down Expand Up @@ -134,7 +136,7 @@ public int getRenderType ()
@Override
public void registerIcons (IconRegister iconRegister)
{
String[] textureNames = new String[] { "greencurrent", "greencurrent_flow" };
String[] textureNames = new String[] { textureName, textureName+"_flow" };
this.icons = new Icon[textureNames.length];

for (int i = 0; i < this.icons.length; ++i)
Expand Down
20 changes: 16 additions & 4 deletions src/tconstruct/common/TContent.java
Expand Up @@ -252,6 +252,7 @@ public class TContent implements IFuelHandler

public static Block slimeChannel;
public static Block slimePad;
public static Block bloodChannel;

//Glue
public static Fluid glueFluid;
Expand Down Expand Up @@ -758,11 +759,15 @@ void registerBlocks ()
slimeSapling = (SlimeSapling) new SlimeSapling(PHConstruct.slimeSapling).setStepSound(slimeStep).setUnlocalizedName("slime.sapling");
GameRegistry.registerBlock(slimeSapling, SlimeSaplingItemBlock.class, "slime.sapling");

slimeChannel = new ConveyorBase(PHConstruct.slimeChannel, Material.water).setStepSound(slimeStep).setUnlocalizedName("slime.channel");
slimeChannel = new ConveyorBase(PHConstruct.slimeChannel, Material.water, "greencurrent").setHardness(0.3f).setStepSound(slimeStep).setUnlocalizedName("slime.channel");
GameRegistry.registerBlock(slimeChannel, "slime.channel");
TConstructRegistry.drawbridgeState[slimeChannel.blockID] = 1;

slimePad = new SlimePad(PHConstruct.slimePad, Material.cloth).setStepSound(slimeStep).setUnlocalizedName("slime.pad");
bloodChannel = new ConveyorBase(PHConstruct.bloodChannel, Material.water, "liquid_cow").setHardness(0.3f).setStepSound(slimeStep).setUnlocalizedName("blood.channel");
GameRegistry.registerBlock(bloodChannel, "blood.channel");
TConstructRegistry.drawbridgeState[slimeChannel.blockID] = 1;

slimePad = new SlimePad(PHConstruct.slimePad, Material.cloth).setStepSound(slimeStep).setHardness(0.3f).setUnlocalizedName("slime.pad");
GameRegistry.registerBlock(slimePad, "slime.pad");
TConstructRegistry.drawbridgeState[slimePad.blockID] = 1;

Expand Down Expand Up @@ -1450,7 +1455,10 @@ private void addRecipesForCraftingTable ()
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(slimeExplosive, 1, 0), "slimeball", Block.tnt));

GameRegistry.addShapelessRecipe(new ItemStack(slimeChannel, 1, 0), new ItemStack(slimeGel, 1, Short.MAX_VALUE), new ItemStack(Item.redstone));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(slimePad, 1, 0), slimeChannel, "slimeBall"));
GameRegistry.addShapelessRecipe(new ItemStack(bloodChannel, 1, 0), new ItemStack(strangeFood, 1, 1), new ItemStack(strangeFood, 1, 1), new ItemStack(strangeFood, 1, 1), new ItemStack(
strangeFood, 1, 1), new ItemStack(Item.redstone));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(slimeChannel, 1, 0), "slimeball", "slimeball", "slimeball", "slimeball", new ItemStack(Item.redstone)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(slimePad, 1, 0), slimeChannel, "slimeball"));
}

private void addRecipesForFurnace ()
Expand Down Expand Up @@ -1629,6 +1637,7 @@ private void addRecipesForTableCasting ()
//Misc
tableCasting.addCastingRecipe(new ItemStack(Item.emerald), new FluidStack(moltenEmeraldFluid, 640), gemcast, 80);
tableCasting.addCastingRecipe(new ItemStack(materials, 1, 36), new FluidStack(glueFluid, TConstruct.ingotLiquidValue), null, 50);
tableCasting.addCastingRecipe(new ItemStack(strangeFood, 1, 1), new FluidStack(bloodFluid, 160), null, 50);

//Buckets
ItemStack bucket = new ItemStack(Item.bucketEmpty);
Expand Down Expand Up @@ -1890,6 +1899,8 @@ private void addRecipesForDryingRack ()
//DryingRackRecipes.addDryingRecipe(Item.muttonRaw, 20 * 60 * 5, new ItemStack(jerky, 1, 3));
DryingRackRecipes.addDryingRecipe(Item.fishRaw, 20 * 60 * 5, new ItemStack(jerky, 1, 4));
DryingRackRecipes.addDryingRecipe(Item.rottenFlesh, 20 * 60 * 5, new ItemStack(jerky, 1, 5));
DryingRackRecipes.addDryingRecipe(new ItemStack(strangeFood, 1, 0), 20 * 60 * 5, new ItemStack(jerky, 1, 6));
DryingRackRecipes.addDryingRecipe(new ItemStack(strangeFood, 1, 1), 20 * 60 * 5, new ItemStack(jerky, 1, 7));

//DryingRackRecipes.addDryingRecipe(new ItemStack(jerky, 1, 5), 20 * 60 * 10, Item.leather);
}
Expand Down Expand Up @@ -2093,6 +2104,7 @@ public void oreRegistry ()
//Vanilla stuff
OreDictionary.registerOre("slimeball", new ItemStack(Item.slimeBall));
OreDictionary.registerOre("slimeball", new ItemStack(strangeFood, 1, 0));
OreDictionary.registerOre("slimeball", new ItemStack(strangeFood, 1, 1));
OreDictionary.registerOre("slimeball", new ItemStack(materials, 1, 36));
OreDictionary.registerOre("glass", new ItemStack(clearGlass));
OreDictionary.registerOre("glass", new ItemStack(Block.glass));
Expand Down Expand Up @@ -2274,7 +2286,7 @@ public void modIntegration ()
Block heatSand = GameRegistry.findBlock("Natura", "heatsand");
if (taintedSoil != null && heatSand != null)
GameRegistry.addShapelessRecipe(new ItemStack(craftedSoil, 2, 6), Item.netherStalkSeeds, taintedSoil, heatSand);

/*TE3 Flux*/
ItemStack batHardened = GameRegistry.findItemStack("ThermalExpansion", "capacitorHardened", 1);
if (batHardened != null)
Expand Down
46 changes: 41 additions & 5 deletions src/tconstruct/items/Jerky.java
@@ -1,19 +1,26 @@
package tconstruct.items;

import java.util.List;

import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class Jerky extends SpecialFood
{
public static String[] textureNames = new String[] { "beef", "chicken", "pork", "mutton", "fish", "monster" };
public static String[] itemNames = new String[] { "jerky.beef", "jerky.chicken", "jerky.pig", "jerky.sheep", "jerky.fish", "jerky.zombie" };
public static int[] hunger = new int[] { 8, 6, 8, 6, 5, 4 };
public static float[] saturation = new float[] { 1.0f, 0.8f, 1.0f, 0.8f, 0.8f, 0.4f };
public static int[] overhaulHunger = new int[] { 1, 1, 1, 1, 1, 1 };
public static String[] textureNames = new String[] { "beef", "chicken", "pork", "mutton", "fish", "monster", "blueslime", "blood" };
public static String[] itemNames = new String[] { "jerky.beef", "jerky.chicken", "jerky.pig", "jerky.sheep", "jerky.fish", "jerky.zombie", "jerky.blueslime", "jerky.blood" };
public static int[] hunger = new int[] { 8, 6, 8, 6, 5, 4, 6, 4 };
public static float[] saturation = new float[] { 1.0f, 0.8f, 1.0f, 0.8f, 0.8f, 0.4f, 1.0f, 0.25f };
public static int[] overhaulHunger = new int[] { 1, 1, 1, 1, 1, 1, 1, 1 };

public Jerky(int id, boolean hungerOverhaul)
{
Expand All @@ -38,4 +45,33 @@ public String getUnlocalizedName (ItemStack stack)
int arr = MathHelper.clamp_int(stack.getItemDamage(), 0, unlocalizedNames.length);
return "item.tconstruct." + unlocalizedNames[arr];
}

@Override
protected void onFoodEaten (ItemStack stack, World world, EntityPlayer player)
{
if (stack.getItemDamage() == 7)
{
int duration = 20 * 30;
PotionEffect potion = player.getActivePotionEffect(Potion.regeneration);
if (potion != null)
duration = potion.duration;
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, duration + 20 * 30, 0));
}
}

@Override
@SideOnly(Side.CLIENT)
public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
{
int type = stack.getItemDamage();
switch (type)
{
case 6:
list.add("\u00a7b" + StatCollector.translateToLocal("strangefood5.tooltip"));
break;
case 7:
list.add("\u00a74" + StatCollector.translateToLocal("strangefood6.tooltip"));
break;
}
}
}
26 changes: 23 additions & 3 deletions src/tconstruct/items/StrangeFood.java
Expand Up @@ -2,7 +2,10 @@

import java.util.List;

import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.relauncher.Side;
Expand All @@ -12,14 +15,31 @@ public class StrangeFood extends SpecialFood
{
public StrangeFood(int id)
{
super(id, new int[] { 2 }, new float[] { 1f }, new String[] { "edibleslime" }, new String[] { "food/edibleslime" });
super(id, new int[] { 2, 2 }, new float[] { 1f, 1f }, new String[] { "edibleslime", "edibleblood" }, new String[] { "food/edibleslime", "food/edibleblood" });
}

@Override
protected void onFoodEaten (ItemStack stack, World world, EntityPlayer player)
{
if (stack.getItemDamage() == 1)
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 20*15, 0));
}

@Override
@SideOnly(Side.CLIENT)
public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
{
list.add("\u00a7b\u00a7o"+StatCollector.translateToLocal("strangefood1.tooltip"));
list.add("\u00a7b\u00a7o"+StatCollector.translateToLocal("strangefood2.tooltip"));
int type = stack.getItemDamage();
switch (type)
{
case 0:
list.add("\u00a7b\u00a7o" + StatCollector.translateToLocal("strangefood1.tooltip"));
list.add("\u00a7b\u00a7o" + StatCollector.translateToLocal("strangefood2.tooltip"));
break;
case 1:
list.add("\u00a74\u00a7o" + StatCollector.translateToLocal("strangefood3.tooltip"));
list.add("\u00a74\u00a7o" + StatCollector.translateToLocal("strangefood4.tooltip"));
break;
}
}
}
10 changes: 6 additions & 4 deletions src/tconstruct/util/config/PHConstruct.java
Expand Up @@ -103,10 +103,11 @@ public static void initProps (File location)
barricadeBirch = config.getBlock("Birch Barricade", 1483).getInt(1483);
barricadeJungle = config.getBlock("Jungle Barricade", 1487).getInt(1487);

lavaTankNether = config.getBlock("Nether Lava Tank", 3187).getInt(3187);
smelteryNether = config.getBlock("Nether Smeltery", 3188).getInt(3188);
searedTableNether = config.getBlock("Nether Seared Block", 3189).getInt(3189);

lavaTankNether = config.getBlock("Nether Lava Tank", 3186).getInt(3186);
smelteryNether = config.getBlock("Nether Smeltery", 3187).getInt(3187);
searedTableNether = config.getBlock("Nether Seared Block", 3188).getInt(3188);

bloodChannel = config.getBlock("Blood Channel", 3189).getInt(3189);
slimeChannel = config.getBlock("Slime Channel", 3190).getInt(3190);
slimePad = config.getBlock("Slime Pad", 3191).getInt(3191);

Expand Down Expand Up @@ -492,6 +493,7 @@ public static void initProps (File location)

public static int slimeChannel;
public static int slimePad;
public static int bloodChannel;

// Glue
public static int glueFluidBlock;
Expand Down

0 comments on commit 5d3d0b8

Please sign in to comment.