Terraformer start
No files matched your search
@@ -293,6 +293,14 @@ tile.trap.barricade.spruce.name=Spruce Barricade
|
||||
tile.trap.barricade.birch.name=Birch Barricade
|
||||
tile.trap.barricade.jungle.name=Jungle Barricade
|
||||
tile.extractor.essence.name=Essence Extractor
|
||||
tile.terraformer.freezer.name=Terrafreezer
|
||||
tile.terraformer.fumer.name=Terrafumer
|
||||
tile.terraformer.waver.name=Terrawaver
|
||||
tile.terraformer.leecher.name=Terraleecher
|
||||
tile.terraformer.grower.name=Terragrower
|
||||
tile.terraformer.nether.name=Terranether
|
||||
tile.terraformer.lighter.name=Terralighter
|
||||
tile.terraformer.crystal.name=Terracrystal
|
||||
tile.explosive.slime.name=SDX
|
||||
|
||||
StorageMetals.Cobalt.name=Block of Cobalt
|
||||
|
||||
|
Before Width: | Height: | Size: 540 B After Width: | Height: | Size: 540 B |
|
After Width: | Height: | Size: 699 B |
|
After Width: | Height: | Size: 819 B |
|
After Width: | Height: | Size: 680 B |
|
After Width: | Height: | Size: 690 B |
|
After Width: | Height: | Size: 682 B |
|
Before Width: | Height: | Size: 682 B After Width: | Height: | Size: 682 B |
|
Before Width: | Height: | Size: 735 B After Width: | Height: | Size: 735 B |
|
Before Width: | Height: | Size: 735 B After Width: | Height: | Size: 735 B |
|
After Width: | Height: | Size: 737 B |
|
After Width: | Height: | Size: 717 B |
@@ -0,0 +1,77 @@
|
||||
package tconstruct.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import tconstruct.blocks.logic.TerraformerLogic;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class Terraformer extends BlockContainer
|
||||
{
|
||||
public Terraformer(int id)
|
||||
{
|
||||
super(id, Material.iron);
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
setStepSound(soundMetalFootstep);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity (World world)
|
||||
{
|
||||
return new TerraformerLogic();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped (int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks (int id, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 0; iter < textureNames.length - 1; iter++)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, iter));
|
||||
}
|
||||
}
|
||||
|
||||
/* Rendering */
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon[] icons;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
static String[] textureNames = { "crystal_machine_top", "terrafreezer", "terrafumer", "terrawaver", "terraleecher", "terragrower", "terranether", "terralighter", "terracrystal" };
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
{
|
||||
this.icons = new Icon[textureNames.length];
|
||||
|
||||
for (int i = 0; i < this.icons.length; ++i)
|
||||
{
|
||||
this.icons[i] = iconRegister.registerIcon("tinker:machines/" + textureNames[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon (int side, int meta)
|
||||
{
|
||||
if (side == 0 || side == 1)
|
||||
return icons[0];
|
||||
return icons[meta + 1];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
package tconstruct.blocks.logic;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TerraformerLogic extends TileEntity
|
||||
{
|
||||
Random random = new Random();
|
||||
boolean init;
|
||||
int type;
|
||||
|
||||
@Override
|
||||
public void updateEntity ()
|
||||
{
|
||||
if (!init)
|
||||
{
|
||||
init = true;
|
||||
type = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
|
||||
}
|
||||
if (worldObj.isRemote)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case 0: //Freezer
|
||||
for (int i = 0; i < 32; i++)
|
||||
worldObj.spawnParticle("snowshovel", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0);
|
||||
break;
|
||||
case 1: //Fumer
|
||||
for (int i = 0; i < 5; i++)
|
||||
worldObj.spawnParticle("lava", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0);
|
||||
for (int i = 0; i < 3; i++)
|
||||
worldObj.spawnParticle("explode", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0);
|
||||
for (int i = 0; i < 5; i++)
|
||||
worldObj.spawnParticle("smoke", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0);
|
||||
break;
|
||||
case 2: //Waver
|
||||
for (int i = 0; i < 50; i++)
|
||||
worldObj.spawnParticle("splash", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0);
|
||||
break;
|
||||
case 3: //Leecher
|
||||
for (int i = 0; i < 16; i++)
|
||||
worldObj.spawnParticle("enchantmenttable", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, -1, 0);
|
||||
break;
|
||||
case 4: //Grower
|
||||
break;
|
||||
case 5: //Nether
|
||||
for (int i = 0; i < 40; i++)
|
||||
worldObj.spawnParticle("depthsuspend", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0);
|
||||
for (int i = 0; i < 3; i++)
|
||||
worldObj.spawnParticle("largesmoke", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0);
|
||||
break;
|
||||
case 6: //Lighter
|
||||
break;
|
||||
case 7: //Crystal
|
||||
for (int i = 0; i < 8; i++)
|
||||
worldObj.spawnParticle("fireworksSpark", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0);
|
||||
break;
|
||||
case 8: //Ender
|
||||
for (int i = 0; i < 16; i++)
|
||||
worldObj.spawnParticle("portal", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0);
|
||||
for (int i = 0; i < 6; i++)
|
||||
worldObj.spawnParticle("witchMagic", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0);
|
||||
break;
|
||||
case 9: //Void
|
||||
for (int i = 0; i < 16; i++)
|
||||
worldObj.spawnParticle("portal", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0);
|
||||
for (int i = 0; i < 8; i++)
|
||||
worldObj.spawnParticle("dripWater", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0);
|
||||
for (int i = 0; i < 8; i++)
|
||||
worldObj.spawnParticle("dripLava", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0);
|
||||
break;
|
||||
case 10: //Desert
|
||||
break;
|
||||
}
|
||||
|
||||
/* Good combos:
|
||||
* smoke + flame, 20+5
|
||||
* portal + witchMagic, 16+6
|
||||
* mobSpellAmbient + spell + mobSpell, 20+3+3
|
||||
* lava + explode + smoke, 10+6+10
|
||||
* happyVillager + deathsuspend + enchantmenttable, 16+64+20
|
||||
*
|
||||
* Good values:
|
||||
* fireworksSpark, 16
|
||||
* depthsuspend, 40
|
||||
* enchantmenttable, 16, x5
|
||||
* explode, 110
|
||||
* splash, 50
|
||||
* snowshovel, 32
|
||||
* heart, 16
|
||||
*/
|
||||
}
|
||||
else
|
||||
{
|
||||
if (worldObj.getTotalWorldTime() % 5 == 0)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case 0:
|
||||
snow();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void snow ()
|
||||
{
|
||||
int x = xCoord + random.nextInt(25) - 12, y = yCoord + random.nextInt(6) - 1, z = zCoord + random.nextInt(25) - 12;
|
||||
Block block = Block.blocksList[worldObj.getBlockId(x, y, z)];
|
||||
if (block == Block.waterStill || block == Block.waterMoving)
|
||||
{
|
||||
worldObj.setBlock(x, y, z, Block.ice.blockID);
|
||||
}
|
||||
else if (block == Block.snow)
|
||||
{
|
||||
int meta = worldObj.getBlockMetadata(x, y, z);
|
||||
if (meta < 7)
|
||||
worldObj.setBlockMetadataWithNotify(x, y, z, meta + 1, 3);
|
||||
}
|
||||
else if (block == null || block.isBlockReplaceable(worldObj, x, y, z))
|
||||
{
|
||||
if (worldObj.doesBlockHaveSolidTopSurface(x, y - 1, z))
|
||||
{
|
||||
worldObj.setBlock(x, y, z, Block.snow.blockID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -179,6 +179,7 @@ public class TContent implements IFuelHandler
|
||||
//Crystalline
|
||||
public static Block essenceExtractor;
|
||||
public static Item essenceCrystal;
|
||||
public static Block terraformer;
|
||||
|
||||
//Liquids
|
||||
public static Material liquidMetal;
|
||||
@@ -797,6 +798,10 @@ public class TContent implements IFuelHandler
|
||||
essenceExtractor = new EssenceExtractor(PHConstruct.essenceExtractor).setHardness(12f).setUnlocalizedName("extractor.essence");
|
||||
GameRegistry.registerBlock(essenceExtractor, "extractor.essence");
|
||||
GameRegistry.registerTileEntity(EssenceExtractorLogic.class, "extractor.essence");
|
||||
|
||||
terraformer = new Terraformer(PHConstruct.terraformer).setHardness(50f).setUnlocalizedName("terraformer");
|
||||
GameRegistry.registerBlock(terraformer, TerraformerItem.class, "terraformer");
|
||||
GameRegistry.registerTileEntity(TerraformerLogic.class, "TerraFreezer");
|
||||
|
||||
//Rail
|
||||
woodenRail = new WoodRail(PHConstruct.woodenRail).setStepSound(Block.soundWoodFootstep).setCreativeTab(TConstructRegistry.blockTab).setUnlocalizedName("rail.wood");
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class TerraformerItem extends ItemBlock
|
||||
{
|
||||
static String blockType[] = { "freezer", "fumer", "waver", "leecher", "grower", "nether", "lighter", "crystal" };
|
||||
//static String[] textureNames = { "crystal_machine_top", "terrafreezer", "terrafumer", "terrawaver", "terraleecher", "terragrower", "terranether", "terralighter", "terracrystal" };
|
||||
|
||||
public TerraformerItem(int id)
|
||||
{
|
||||
super(id);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
public int getMetadata (int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
public String getUnlocalizedName (ItemStack itemstack)
|
||||
{
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1);
|
||||
return (new StringBuilder()).append("tile.terraformer.").append(blockType[pos]).toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
switch (stack.getItemDamage())
|
||||
{
|
||||
case 0:
|
||||
list.add("\u00a7b\u00a7oCold to the touch");
|
||||
break;
|
||||
case 1:
|
||||
list.add("\u00a74\u00a7oHot to the touch");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public class PHConstruct
|
||||
barricadeSpruce = config.getBlock("Spruce Barricade", 1482).getInt(1482);
|
||||
barricadeBirch = config.getBlock("Birch Barricade", 1483).getInt(1483);
|
||||
barricadeJungle = config.getBlock("Jungle Barricade", 1487).getInt(1487);
|
||||
|
||||
|
||||
slimeChannel = config.getBlock("Slime Channel", 3190).getInt(3190);
|
||||
slimePad = config.getBlock("Slime Pad", 3191).getInt(3191);
|
||||
|
||||
@@ -133,7 +133,7 @@ public class PHConstruct
|
||||
blood = config.getBlock("Liquid Cow", 3217).getInt(3217);
|
||||
moltenEnder = config.getBlock("Molten Ender", 3218).getInt(3218);
|
||||
|
||||
|
||||
terraformer = config.getBlock("Terraformer", 3219).getInt(3219);
|
||||
|
||||
signalBus = config.getBlock("Signal Bus", 3221).getInt(3221);
|
||||
signalTerminal = config.getBlock("Signal Terminal", 3222).getInt(3222);
|
||||
@@ -446,6 +446,7 @@ public class PHConstruct
|
||||
//Crystalline
|
||||
public static int essenceExtractor;
|
||||
public static int essenceCrystal;
|
||||
public static int terraformer;
|
||||
|
||||
//Liquids
|
||||
public static int metalFlowing;
|
||||
|
||||