mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 05:02:39 +00:00
Pull in wooden rails from Chaotic Bastion.
This commit is contained in:
1 parent
d80b0c7c31
commit
daec0eacfa
6 files changed
+71
No files matched your search
@@ -96,6 +96,8 @@ block.fancybrick.obsidian.ingot.name=Fancy Obsidian Brick
|
||||
block.fancybrick.stone.road.name=Stone Road
|
||||
block.fancybrick.stone.name=Fancy Stone Brick
|
||||
|
||||
block.rail.wood=Wooden Rail
|
||||
|
||||
tile.cloth.white.slab.name=Wool Slab
|
||||
tile.cloth.orange.slab.name=Orange Wool Slab
|
||||
tile.cloth.magenta.slab.name=Magenta Wool Slab
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 431 B |
Binary file not shown.
|
After Width: | Height: | Size: 476 B |
@@ -0,0 +1,59 @@
|
||||
package tconstruct.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBaseRailLogic;
|
||||
import net.minecraft.block.BlockRailBase;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class WoodRail extends BlockRailBase
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon theIcon;
|
||||
|
||||
public WoodRail(int par1)
|
||||
{
|
||||
super(par1, false);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
/**
|
||||
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
|
||||
*/
|
||||
public Icon getIcon(int par1, int par2)
|
||||
{
|
||||
return par2 >= 6 ? this.theIcon : this.blockIcon;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
/**
|
||||
* When this method is called, your block should register all the icons it needs with the given IconRegister. This
|
||||
* is the only chance you get to register icons.
|
||||
*/
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.blockIcon = par1IconRegister.registerIcon("tinker:woodrail");
|
||||
this.theIcon = par1IconRegister.registerIcon("tinker:woodrail_turn");
|
||||
}
|
||||
|
||||
protected void func_94358_a(World par1World, int par2, int par3, int par4, int par5, int par6, int par7)
|
||||
{
|
||||
if (par7 > 0 && Block.blocksList[par7].canProvidePower() && (new BlockBaseRailLogic(this, par1World, par2, par3, par4)).getNumberOfAdjacentTracks() == 3)
|
||||
{
|
||||
this.refreshTrackShape(par1World, par2, par3, par4, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getRailMaxSpeed(World world, EntityMinecart cart, int y, int x, int z)
|
||||
{
|
||||
return 0.3f;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -269,6 +269,9 @@ public class TContent implements IFuelHandler
|
||||
public static Item heartCanister;
|
||||
public static Item goldHead;
|
||||
|
||||
//Rail-related
|
||||
public static Block woodenRail;
|
||||
|
||||
//Chest hooks
|
||||
public static ChestGenHooks tinkerHouseChest;
|
||||
public static ChestGenHooks tinkerHousePatterns;
|
||||
@@ -797,6 +800,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");
|
||||
|
||||
//Rail
|
||||
woodenRail = new WoodRail(PHConstruct.woodenRail).setStepSound(Block.soundWoodFootstep).setCreativeTab(TConstructRegistry.blockTab).setUnlocalizedName("rail.wood");
|
||||
GameRegistry.registerBlock(woodenRail, "rail.wood");
|
||||
}
|
||||
|
||||
void registerItems ()
|
||||
|
||||
@@ -179,6 +179,7 @@ public class PHConstruct
|
||||
woolSlab2 = config.getBlock("Wool Slab 2", 3245).getInt(3245);
|
||||
airTank = config.getBlock("Air Tank", 3246).getInt(3246);
|
||||
castingChannel = config.getBlock("Casting Channel", 3249).getInt(3249);
|
||||
woodenRail = config.getBlock("Wooden Rail", 3250).getInt(3250);
|
||||
|
||||
manual = config.getItem("Patterns and Misc", "Tinker's Manual", 14018).getInt(14018);
|
||||
blankPattern = config.getItem("Patterns and Misc", "Blank Patterns", 14019).getInt(14019);
|
||||
@@ -409,6 +410,8 @@ public class PHConstruct
|
||||
public static int redstoneMachine;
|
||||
public static int dryingRack;
|
||||
|
||||
public static int woodenRail;
|
||||
|
||||
//Crops
|
||||
public static int oreBerry;
|
||||
public static int oreBerrySecond;
|
||||
|
||||
Reference in new issue
Block a user