more garbage nobody asked for
@ -1129,6 +1129,8 @@ public class ModBlocks {
|
||||
|
||||
public static Block book_guide;
|
||||
|
||||
public static Block rail_wood;
|
||||
public static Block rail_narrow;
|
||||
public static Block rail_highspeed;
|
||||
public static Block rail_booster;
|
||||
|
||||
@ -2094,7 +2096,9 @@ public class ModBlocks {
|
||||
|
||||
book_guide = new Guide(Material.iron).setBlockName("book_guide").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.nukeTab);
|
||||
|
||||
rail_highspeed = new RailHighspeed().setBlockName("rail_highspeed").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_highspeed");
|
||||
rail_wood = new RailGeneric().setMaxSpeed(0.2F).setBlockName("rail_wood").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_wood");
|
||||
rail_narrow = new RailGeneric().setBlockName("rail_narrow").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_narrow");
|
||||
rail_highspeed = new RailGeneric().setMaxSpeed(1F).setFlexible(false).setBlockName("rail_highspeed").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_highspeed");
|
||||
rail_booster = new RailBooster().setBlockName("rail_booster").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_booster");
|
||||
|
||||
crate = new BlockCrate(Material.wood).setBlockName("crate").setStepSound(Block.soundTypeWood).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":crate");
|
||||
@ -3244,8 +3248,10 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(sat_resonator, sat_resonator.getUnlocalizedName());
|
||||
|
||||
//Rails
|
||||
GameRegistry.registerBlock(rail_highspeed, rail_highspeed.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rail_booster, rail_booster.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rail_wood, ItemBlockBase.class, rail_wood.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rail_narrow, ItemBlockBase.class, rail_narrow.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rail_highspeed, ItemBlockBase.class, rail_highspeed.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rail_booster, ItemBlockBase.class, rail_booster.getUnlocalizedName());
|
||||
|
||||
//Crate
|
||||
GameRegistry.registerBlock(crate, crate.getUnlocalizedName());
|
||||
|
||||
@ -3,7 +3,13 @@ package com.hbm.blocks.machine;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class RailBooster extends RailHighspeed {
|
||||
public class RailBooster extends RailGeneric {
|
||||
|
||||
public RailBooster() {
|
||||
super();
|
||||
this.setMaxSpeed(1.0F);
|
||||
this.setFlexible(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMinecartPass(World world, EntityMinecart cart, int y, int x, int z) {
|
||||
|
||||
94
src/main/java/com/hbm/blocks/machine/RailGeneric.java
Normal file
@ -0,0 +1,94 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockRailBase;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class RailGeneric extends BlockRailBase implements ITooltipProvider {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected IIcon turnedIcon;
|
||||
|
||||
protected static final float baseSpeed = 0.4F;
|
||||
protected float maxSpeed = 0.4F;
|
||||
protected boolean slopable = true;
|
||||
protected boolean flexible = true;
|
||||
|
||||
public RailGeneric() {
|
||||
super(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return (flexible && meta >= 6) ? this.turnedIcon : this.blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
super.registerBlockIcons(reg);
|
||||
|
||||
if(flexible)
|
||||
this.turnedIcon = reg.registerIcon(this.getTextureName() + "_turned");
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getRailMaxSpeed(World world, EntityMinecart cart, int y, int x, int z) {
|
||||
return maxSpeed;
|
||||
}
|
||||
|
||||
public RailGeneric setMaxSpeed(float speed) {
|
||||
this.maxSpeed = speed;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlexibleRail(IBlockAccess world, int y, int x, int z) {
|
||||
return !isPowered();
|
||||
}
|
||||
|
||||
public RailGeneric setFlexible(boolean flexible) {
|
||||
this.flexible = flexible;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canMakeSlopes(IBlockAccess world, int x, int y, int z) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public RailGeneric setSlopable(boolean slopable) {
|
||||
this.slopable = slopable;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
float speed = this.maxSpeed / this.baseSpeed;
|
||||
|
||||
if(speed != 1F) {
|
||||
list.add((speed > 1 ? EnumChatFormatting.BLUE : EnumChatFormatting.RED) + "Speed: " + ((int) (speed * 100)) + "%");
|
||||
}
|
||||
|
||||
if(!flexible) {
|
||||
list.add(EnumChatFormatting.RED + "Cannot be used for turns!");
|
||||
}
|
||||
|
||||
if(!slopable) {
|
||||
list.add(EnumChatFormatting.RED + "Cannot be used for slopes!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,44 +1,33 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockRailBase;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class RailHighspeed extends BlockRailBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon icon;
|
||||
/*@SideOnly(Side.CLIENT)
|
||||
private IIcon icon;*/
|
||||
|
||||
public RailHighspeed()
|
||||
{
|
||||
super(true);
|
||||
}
|
||||
public RailHighspeed() {
|
||||
super(true);
|
||||
}
|
||||
|
||||
/*@Override
|
||||
@SideOnly(Side.CLIENT) public IIcon getIcon(int p_149691_1_, int p_149691_2_) {
|
||||
return p_149691_2_ >= 6 ? this.icon : this.blockIcon;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the block's texture. Args: side, meta
|
||||
*/
|
||||
@Override
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int p_149691_1_, int p_149691_2_)
|
||||
{
|
||||
return p_149691_2_ >= 6 ? this.icon : this.blockIcon;
|
||||
}
|
||||
public void registerBlockIcons(IIconRegister p_149651_1_) {
|
||||
super.registerBlockIcons(p_149651_1_);
|
||||
this.icon = p_149651_1_.registerIcon(this.getTextureName());
|
||||
}*/
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister p_149651_1_)
|
||||
{
|
||||
super.registerBlockIcons(p_149651_1_);
|
||||
this.icon = p_149651_1_.registerIcon(this.getTextureName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getRailMaxSpeed(World world, EntityMinecart cart, int y, int x, int z)
|
||||
{
|
||||
return 1.0f;
|
||||
}
|
||||
@Override
|
||||
public float getRailMaxSpeed(World world, EntityMinecart cart, int y, int x, int z) {
|
||||
return 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ public class OreDictManager {
|
||||
public static final String KEY_COAL_TAR = "coaltar";
|
||||
|
||||
public static final String KEY_UNIVERSAL_TANK = "ntmuniversaltank";
|
||||
public static final String KEY_HAZARD_TANK = "ntmuhazardtank";
|
||||
public static final String KEY_HAZARD_TANK = "ntmhazardtank";
|
||||
public static final String KEY_UNIVERSAL_BARREL = "ntmuniversalbarrel";
|
||||
|
||||
public static final String KEY_TOOL_SCREWDRIVER = "ntmscrewdriver";
|
||||
|
||||
@ -214,6 +214,8 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.turbine_tungsten, 1), new Object[] { "BBB", "BSB", "BBB", 'B', ModItems.blade_tungsten, 'S', DURA.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.ring_starmetal, 1), new Object[] { " S ", "S S", " S ", 'S', STAR.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.flywheel_beryllium, 1), new Object[] { "BBB", "BTB", "BBB", 'B', BE.block(), 'T', ModItems.bolt_compound });
|
||||
|
||||
addShapelessAuto(DictFrame.fromOne(ModItems.plant_item, EnumPlantType.ROPE, 1), new Object[] { Items.string, Items.string, Items.string });
|
||||
addRecipeAuto(DictFrame.fromOne(ModItems.plant_item, EnumPlantType.ROPE, 4), new Object[] { "W", "W", "W", 'W', DictFrame.fromOne(ModBlocks.plant_flower, EnumFlowerType.WEED) });
|
||||
addRecipeAuto(new ItemStack(ModItems.rag, 16), new Object[] { "WW", "WW", 'W', DictFrame.fromOne(ModBlocks.plant_flower, EnumFlowerType.WEED) });
|
||||
|
||||
@ -451,8 +453,10 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.sat_dock, 1), new Object[] { "SSS", "PCP", 'S', STEEL.ingot(), 'P', ANY_PLASTIC.ingot(), 'C', ModBlocks.crate_iron });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.book_guide, 1), new Object[] { "IBI", "LBL", "IBI", 'B', Items.book, 'I', KEY_BLACK, 'L', KEY_BLUE });
|
||||
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.rail_highspeed), 16), new Object[] { "S S", "SIS", "S S", 'S', STEEL.ingot(), 'I', IRON.plate() });
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.rail_booster), 6), new Object[] { "S S", "CIC", "SRS", 'S', STEEL.ingot(), 'I', IRON.plate(), 'R', MINGRADE.ingot(), 'C', ModItems.coil_copper });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_wood, 16), new Object[] { "S S", "SRS", "S S", 'S', ModBlocks.steel_beam, 'R', DictFrame.fromOne(ModItems.plant_item, EnumPlantType.ROPE) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_narrow, 64), new Object[] { "S S", "S S", "S S", 'S', ModBlocks.steel_beam });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_highspeed, 16), new Object[] { "S S", "SIS", "S S", 'S', STEEL.ingot(), 'I', IRON.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_booster, 6), new Object[] { "S S", "CIC", "SRS", 'S', STEEL.ingot(), 'I', IRON.plate(), 'R', MINGRADE.ingot(), 'C', ModItems.coil_copper });
|
||||
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.bomb_multi), 1), new Object[] { "AAD", "CHF", "AAD", 'A', ModItems.wire_aluminium, 'C', ModItems.circuit_aluminium, 'H', ModItems.hull_small_aluminium, 'F', ModItems.fins_quad_titanium, 'D', KEY_WHITE });
|
||||
addShapelessAuto(new ItemStack(ModItems.powder_ice, 4), new Object[] { Items.snowball, KNO.dust(), REDSTONE.dust() });
|
||||
|
||||
@ -3517,6 +3517,8 @@ tile.radiobox.name=Rosenberg Ungeziefervernichter
|
||||
tile.radiorec.name=Kaputtes UKW Radio
|
||||
tile.rail_booster.name=Hochgeschwindigkeits-Boosterschienen
|
||||
tile.rail_highspeed.name=Hochgeschwindigkeitsschienen
|
||||
tile.rail_narrow.name=Schmalspurschienen
|
||||
tile.rail_wood.name=Holzschienen
|
||||
tile.rbmk_absorber.name=RBMK Bor-Neutronenabsorber
|
||||
tile.rbmk_blank.name=RBMK Strukturteil
|
||||
tile.rbmk_boiler.name=RBMK Dampfkanal
|
||||
|
||||
@ -3910,6 +3910,8 @@ tile.radiobox.name=Rosenberg Pest Control Box
|
||||
tile.radiorec.name=Broken FM Radio
|
||||
tile.rail_booster.name=High Speed Booster Rail
|
||||
tile.rail_highspeed.name=High Speed Rail
|
||||
tile.rail_narrow.name=Narrow Gauge Cart Rail
|
||||
tile.rail_wood.name=Wooden Tracks
|
||||
tile.rbmk_absorber.name=RBMK Boron Neutron Absorber
|
||||
tile.rbmk_blank.name=RBMK Structural Column
|
||||
tile.rbmk_boiler.name=RBMK Steam Channel
|
||||
|
||||
BIN
src/main/resources/assets/hbm/textures/blocks/rail_narrow.png
Normal file
|
After Width: | Height: | Size: 190 B |
|
After Width: | Height: | Size: 245 B |
BIN
src/main/resources/assets/hbm/textures/blocks/rail_normal.png
Normal file
|
After Width: | Height: | Size: 232 B |
|
After Width: | Height: | Size: 247 B |
BIN
src/main/resources/assets/hbm/textures/blocks/rail_wood.png
Normal file
|
After Width: | Height: | Size: 499 B |
|
After Width: | Height: | Size: 527 B |
|
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 484 B |
BIN
src/main/resources/assets/hbm/textures/particle/debug_fluid.png
Normal file
|
After Width: | Height: | Size: 148 B |
BIN
src/main/resources/assets/hbm/textures/particle/debug_power.png
Normal file
|
After Width: | Height: | Size: 141 B |