mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-24 05:54:34 +00:00
More gluey things.
Glue blocks can be melted in the smeltery, and casted into blocks with the basin. Buckets too.
This commit is contained in:
1 parent
1387bc6f74
commit
decbb7d01f
13 files changed
+118
-15
No files matched your search
@@ -414,6 +414,7 @@ item.tconstruct.bucket.Electrum.name=Molten Electrum Bucket
|
||||
item.tconstruct.bucket.Ender.name=Liquified Ender Bucket
|
||||
item.tconstruct.bucket.Slime.name=Liquid Slime Bucket
|
||||
item.tconstruct.bucket.PigIron.name=Molten Pig Iron Bucket
|
||||
item.tconstruct.bucket.Glue.name=Sticky Glue Bucket
|
||||
|
||||
item.tconstruct.bowstring.string.name=Bowstring
|
||||
item.tconstruct.bowstring.enchantedfabriI donc.name=Enchanted Bowstring
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"animation": {}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"animation": {}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 531 B |
Binary file not shown.
|
After Width: | Height: | Size: 337 B |
@@ -0,0 +1,65 @@
|
||||
package tconstruct.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.BlockFluidFinite;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
public class GlueFluid extends BlockFluidFinite {
|
||||
|
||||
Icon stillIcon;
|
||||
Icon flowIcon;
|
||||
|
||||
public GlueFluid(int id, Fluid fluid, Material material)
|
||||
{
|
||||
super(id, fluid, material);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
{
|
||||
stillIcon = iconRegister.registerIcon("tinker:liquid_glue");
|
||||
flowIcon = iconRegister.registerIcon("tinker:liquid_glue_flow");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon (int side, int meta)
|
||||
{
|
||||
if (side == 0 || side == 1)
|
||||
return stillIcon;
|
||||
return flowIcon;
|
||||
}
|
||||
|
||||
@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 in 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,8 +58,8 @@ public class TClientEvents
|
||||
|
||||
/* Liquids */
|
||||
|
||||
Icon[] stillIcons = new Icon[1];
|
||||
Icon[] flowIcons = new Icon[1];
|
||||
Icon[] stillIcons = new Icon[2];
|
||||
Icon[] flowIcons = new Icon[2];
|
||||
|
||||
@ForgeSubscribe
|
||||
public void preStitch (TextureStitchEvent.Pre event)
|
||||
|
||||
@@ -248,6 +248,10 @@ public class TContent implements IFuelHandler
|
||||
public static Block slimeChannel;
|
||||
public static Block slimePad;
|
||||
|
||||
//Glue
|
||||
public static Fluid glueFluid;
|
||||
public static Block glueFluidBlock;
|
||||
|
||||
//Ores
|
||||
public static Block oreSlag;
|
||||
public static Block oreGravel;
|
||||
@@ -324,8 +328,8 @@ public class TContent implements IFuelHandler
|
||||
//EntityRegistry.registerModEntity(MetalSlime.class, "MetalSlime", 13, TConstruct.instance, 64, 5, true);
|
||||
}
|
||||
|
||||
public static Fluid[] fluids = new Fluid[26];
|
||||
public static Block[] fluidBlocks = new Block[25];
|
||||
public static Fluid[] fluids = new Fluid[27];
|
||||
public static Block[] fluidBlocks = new Block[26];
|
||||
|
||||
void registerBlocks ()
|
||||
{
|
||||
@@ -716,12 +720,23 @@ public class TContent implements IFuelHandler
|
||||
blueSlimeFluid.setBlockID(slimePool);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(blueSlimeFluid, 1000), new ItemStack(buckets, 1, 24), new ItemStack(Item.bucketEmpty)));
|
||||
|
||||
//Glue
|
||||
glueFluid = new Fluid("glue").setDensity(6000).setViscosity(6000).setTemperature(200);
|
||||
if (!FluidRegistry.registerFluid(glueFluid))
|
||||
glueFluid = FluidRegistry.getFluid("glue");
|
||||
glueFluidBlock = new GlueFluid(PHConstruct.glueFluidBlock, glueFluid, Material.water).setCreativeTab(TConstructRegistry.blockTab).setStepSound(slimeStep).setUnlocalizedName("liquid.glue");
|
||||
GameRegistry.registerBlock(glueFluidBlock, "liquid.glue");
|
||||
fluids[25] = glueFluid;
|
||||
fluidBlocks[25] = glueFluidBlock;
|
||||
glueFluid.setBlockID(glueFluidBlock);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(glueFluid, 1000), new ItemStack(buckets, 1, 26), new ItemStack(Item.bucketEmpty)));
|
||||
|
||||
pigIronFluid = new Fluid("pigiron.molten");
|
||||
if (!FluidRegistry.registerFluid(pigIronFluid))
|
||||
pigIronFluid = FluidRegistry.getFluid("pigiron.molten");
|
||||
else
|
||||
pigIronFluid.setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
fluids[25] = pigIronFluid;
|
||||
fluids[26] = pigIronFluid;
|
||||
|
||||
slimeGel = new SlimeGel(PHConstruct.slimeGel).setStepSound(slimeStep).setLightOpacity(0).setUnlocalizedName("slime.gel");
|
||||
GameRegistry.registerBlock(slimeGel, SlimeGelItemBlock.class, "slime.gel");
|
||||
@@ -1593,7 +1608,7 @@ public class TContent implements IFuelHandler
|
||||
{
|
||||
tableCasting.addCastingRecipe(new ItemStack(buckets, 1, sc), new FluidStack(fluids[sc], FluidContainerRegistry.BUCKET_VOLUME), bucket, true, 10);
|
||||
}
|
||||
tableCasting.addCastingRecipe(new ItemStack(buckets, 1, 25), new FluidStack(fluids[25], FluidContainerRegistry.BUCKET_VOLUME), bucket, true, 10);
|
||||
tableCasting.addCastingRecipe(new ItemStack(buckets, 1, 26), new FluidStack(fluids[26], FluidContainerRegistry.BUCKET_VOLUME), bucket, true, 10);
|
||||
|
||||
// Clear glass pane casting
|
||||
tableCasting.addCastingRecipe(new ItemStack(glassPane), new FluidStack(moltenGlassFluid, 250), null, 80);
|
||||
@@ -1677,6 +1692,7 @@ public class TContent implements IFuelHandler
|
||||
basinCasting.addCastingRecipe(new ItemStack(speedBlock, 1, 0), new FluidStack(moltenTinFluid, TConstruct.nuggetLiquidValue), new ItemStack(Block.gravel), true, 100); //brownstone
|
||||
basinCasting.addCastingRecipe(new ItemStack(Block.whiteStone), new FluidStack(moltenEnderFluid, TConstruct.chunkLiquidValue), new ItemStack(Block.obsidian), true, 100); //endstone
|
||||
basinCasting.addCastingRecipe(new ItemStack(metalBlock.blockID, 1, 10), new FluidStack(moltenEnderFluid, 1000), null, true, 100); //ender
|
||||
basinCasting.addCastingRecipe(new ItemStack(glueBlock), new FluidStack(glueFluid, TConstruct.blockLiquidValue), null, true, 100); //glue
|
||||
|
||||
// basinCasting.addCastingRecipe(new ItemStack(slimeGel, 1, 0), new FluidStack(blueSlimeFluid, FluidContainerRegistry.BUCKET_VOLUME), null, true, 100);
|
||||
|
||||
@@ -1767,6 +1783,7 @@ public class TContent implements IFuelHandler
|
||||
Smeltery.addMelting(Block.stone, 0, 800, new FluidStack(moltenStoneFluid, TConstruct.ingotLiquidValue / 18));
|
||||
Smeltery.addMelting(Block.cobblestone, 0, 800, new FluidStack(moltenStoneFluid, TConstruct.ingotLiquidValue / 18));
|
||||
Smeltery.addMelting(Block.blockEmerald, 0, 800, new FluidStack(moltenEmeraldFluid, 640*9));
|
||||
Smeltery.addMelting(glueBlock, 0, 250, new FluidStack(glueFluid, TConstruct.blockLiquidValue));
|
||||
|
||||
Smeltery.addMelting(clearGlass, 0, 500, new FluidStack(moltenGlassFluid, 1000));
|
||||
Smeltery.addMelting(glassPane, 0, 350, new FluidStack(moltenGlassFluid, 250));
|
||||
|
||||
@@ -2,6 +2,8 @@ package tconstruct.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraftforge.fluids.BlockFluidFinite;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.blocks.logic.LiquidTextureLogic;
|
||||
import tconstruct.common.TContent;
|
||||
|
||||
@@ -137,11 +139,16 @@ public class FilledBucket extends ItemBucket
|
||||
}
|
||||
else
|
||||
{
|
||||
int id = 0;
|
||||
int metadata = 0;
|
||||
if (type == 25)
|
||||
metadata = 0;
|
||||
world.setBlock(clickX, clickY, clickZ, TContent.fluidBlocks[type].blockID, metadata, 3); //TODO: Merge liquids
|
||||
try {
|
||||
int metadata = 0;
|
||||
if (TContent.fluidBlocks[type] instanceof BlockFluidFinite)
|
||||
metadata = 7;
|
||||
|
||||
world.setBlock(clickX, clickY, clickZ, TContent.fluidBlocks[type].blockID, metadata, 3); //TODO: Merge liquids
|
||||
} catch (ArrayIndexOutOfBoundsException ex) {
|
||||
TConstruct.logger.warning("AIOBE occured when placing bucket into world; " + ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -180,8 +187,8 @@ public class FilledBucket extends ItemBucket
|
||||
}
|
||||
|
||||
public static final String[] materialNames = new String[] { "Iron", "Gold", "Copper", "Tin", "Aluminum", "Cobalt", "Ardite", "Bronze", "AluBrass", "Manyullyn", "Alumite", "Obsidian", "Steel",
|
||||
"Glass", "Stone", "Villager", "Cow", "Nickel", "Lead", "Silver", "Shiny", "Invar", "Electrum", "Ender", "Slime", "PigIron" };
|
||||
"Glass", "Stone", "Villager", "Cow", "Nickel", "Lead", "Silver", "Shiny", "Invar", "Electrum", "Ender", "Slime", "Glue", "PigIron" };
|
||||
|
||||
public static final String[] textureNames = new String[] { "iron", "gold", "copper", "tin", "aluminum", "cobalt", "ardite", "bronze", "alubrass", "manyullyn", "alumite", "obsidian", "steel",
|
||||
"glass", "stone", "emerald", "blood", "nickel", "lead", "silver", "shiny", "invar", "electrum", "ender", "slime", "pigiron" };
|
||||
"glass", "stone", "emerald", "blood", "nickel", "lead", "silver", "shiny", "invar", "electrum", "ender", "slime", "glue", "pigiron" };
|
||||
}
|
||||
@@ -59,7 +59,9 @@ public enum FluidType
|
||||
/** Slime Smelting **/
|
||||
Slime(TContent.slimeGel.blockID, 0, 250, TContent.blueSlimeFluid, false),
|
||||
/** Pigiron Smelting **/
|
||||
PigIron(TContent.meatBlock.blockID, 0, 610, TContent.pigIronFluid, true);
|
||||
PigIron(TContent.meatBlock.blockID, 0, 610, TContent.pigIronFluid, true),
|
||||
/** Glue Smelting **/
|
||||
Glue(TContent.glueBlock.blockID, 0, 125, TContent.glueFluid, false);
|
||||
|
||||
public final int renderBlockID;
|
||||
public final int renderMeta;
|
||||
|
||||
@@ -163,6 +163,7 @@ public class PHConstruct
|
||||
woolSlab1 = config.getBlock("Wool Slab 1", 3244).getInt(3244);
|
||||
woolSlab2 = config.getBlock("Wool Slab 2", 3245).getInt(3245);
|
||||
glueBlock = config.getBlock("Glue Block", 3256).getInt(3256);
|
||||
glueFluidBlock = config.getBlock("Glue Fluid Block", 3257).getInt(3257);
|
||||
castingChannel = config.getBlock("Casting Channel", 3249).getInt(3249);
|
||||
|
||||
slimePoolBlue = config.getBlock("Liquid Blue Slime", 3235).getInt(3235);
|
||||
@@ -486,6 +487,10 @@ public class PHConstruct
|
||||
public static int slimeChannel;
|
||||
public static int slimePad;
|
||||
|
||||
// Glue
|
||||
public static int glueFluidBlock;
|
||||
public static int glueBlock;
|
||||
|
||||
//Decoration
|
||||
public static int stoneTorch;
|
||||
public static int stoneLadder;
|
||||
@@ -497,7 +502,6 @@ public class PHConstruct
|
||||
public static int meatBlock;
|
||||
public static int woolSlab1;
|
||||
public static int woolSlab2;
|
||||
public static int glueBlock;
|
||||
|
||||
//Patterns and misc
|
||||
public static int blankPattern;
|
||||
@@ -717,6 +721,7 @@ public class PHConstruct
|
||||
//Looks
|
||||
public static int connectedTexturesMode;
|
||||
public static File cfglocation;
|
||||
|
||||
//dimensionblacklist
|
||||
public static boolean slimeIslGenDim0Only;
|
||||
public static int[] cfgDimBlackList;
|
||||
|
||||
Reference in new issue
Block a user