mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-14 01:04:16 +00:00
Added the Mana Distributor block, will get to making it do something tomorrow :s
This commit is contained in:
1 parent
5572487db8
commit
e95266e793
10 files changed
+79
-1
No files matched your search
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Mar 3, 2014, 1:44:29 AM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.block.tile.TileDistributor;
|
||||
import vazkii.botania.common.lib.LibBlockIDs;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
public class BlockDistributor extends BlockModContainer {
|
||||
|
||||
Icon iconSide, iconTop;
|
||||
|
||||
protected BlockDistributor() {
|
||||
super(LibBlockIDs.idDistributor, Material.rock);
|
||||
setHardness(2.0F);
|
||||
setResistance(10.0F);
|
||||
setStepSound(soundStoneFootstep);
|
||||
setUnlocalizedName(LibBlockNames.DISTRIBUTOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
iconTop = IconHelper.forBlock(par1IconRegister, this, 0);
|
||||
iconSide = IconHelper.forBlock(par1IconRegister, this, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
return par1 == 0 ? ModBlocks.livingrock.getIcon(0, 0) : par1 == 1 ? iconTop : iconSide;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world) {
|
||||
return new TileDistributor();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -44,6 +44,7 @@ public final class ModBlocks {
|
||||
public static Block unstableBlock;
|
||||
public static Block pylon;
|
||||
public static Block pistonRelay;
|
||||
public static Block distributor;
|
||||
|
||||
public static void init() {
|
||||
flower = new BlockModFlower();
|
||||
@@ -57,6 +58,7 @@ public final class ModBlocks {
|
||||
unstableBlock = new BlockUnstable();
|
||||
pylon = new BlockPylon();
|
||||
pistonRelay = new BlockPistonRelay();
|
||||
distributor = new BlockDistributor();
|
||||
|
||||
for(int i = 0; i < 16; i++)
|
||||
OreDictionary.registerOre(LibOreDict.FLOWER[i], new ItemStack(flower.blockID, 1, i));
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Mar 3, 2014, 1:51:34 AM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.block.tile;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileDistributor extends TileEntity {
|
||||
|
||||
}
|
||||
@@ -57,9 +57,10 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addBlock(ModBlocks.pylon);
|
||||
addBlock(ModBlocks.unstableBlock);
|
||||
|
||||
addBlock(ModBlocks.pool);
|
||||
addBlock(ModBlocks.distributor);
|
||||
addBlock(ModBlocks.spreader);
|
||||
addItem(ModItems.lens);
|
||||
addBlock(ModBlocks.pool);
|
||||
}
|
||||
|
||||
private void addItem(Item item) {
|
||||
|
||||
@@ -52,6 +52,7 @@ public final class ConfigHandler {
|
||||
LibBlockIDs.idUnstableBlock = loadBlock(LibBlockNames.UNSTABLE_BLOCK, LibBlockIDs.idUnstableBlock);
|
||||
LibBlockIDs.idPylon = loadBlock(LibBlockNames.PYLON, LibBlockIDs.idPylon);
|
||||
LibBlockIDs.idPistonRelay = loadBlock(LibBlockNames.PISTON_RELAY, LibBlockIDs.idPistonRelay);
|
||||
LibBlockIDs.idDistributor = loadBlock(LibBlockNames.DISTRIBUTOR, LibBlockIDs.idDistributor);
|
||||
|
||||
// Item IDs
|
||||
LibItemIDs.idLexicon = loadItem(LibItemNames.LEXICON, LibItemIDs.idLexicon);
|
||||
|
||||
@@ -24,5 +24,6 @@ public final class LibBlockIDs {
|
||||
public static int idUnstableBlock = 1963;
|
||||
public static int idPylon = 1964;
|
||||
public static int idPistonRelay = 1965;
|
||||
public static int idDistributor = 1966;
|
||||
|
||||
}
|
||||
@@ -26,6 +26,7 @@ public final class LibBlockNames {
|
||||
public static final String UNSTABLE_BLOCK = LibResources.PREFIX_MOD + "unstableBlock";
|
||||
public static final String PYLON = LibResources.PREFIX_MOD + "pylon";
|
||||
public static final String PISTON_RELAY = LibResources.PREFIX_MOD + "pistonRelay";
|
||||
public static final String DISTRIBUTOR = LibResources.PREFIX_MOD + "distributor";
|
||||
|
||||
public static final String SPECIAL_FLOWER_PREFIX = FLOWER + ".";
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ tile.botania:unstableBlock13.name=Green Unstable Cube
|
||||
tile.botania:unstableBlock14.name=Red Unstable Cube
|
||||
tile.botania:unstableBlock15.name=Black Unstable Cube
|
||||
tile.botania:pistonRelay.name=Force Relay
|
||||
tile.botania:distributor.name=Mana Distributor
|
||||
|
||||
# FLOWER NAMES
|
||||
tile.botania:flower..name=Botania Flower
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
Reference in new issue
Block a user