mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-20 04:09:49 +00:00
Add networked trim block.
This commit is contained in:
1 parent
5afc377b2b
commit
149f9e36f5
6 files changed
+84
No files matched your search
@@ -55,6 +55,13 @@ tile.halfDrawers4.big_oak.name=Compact Dark Oak Drawers 2x2
|
||||
tile.compDrawers.name=Compacting Drawer
|
||||
tile.drawerController.name=Drawer Controller
|
||||
|
||||
tile.trim.oak.name=Oak Trim
|
||||
tile.trim.spruce.name=Spruce Trim
|
||||
tile.trim.birch.name=Birch Trim
|
||||
tile.trim.jungle.name=Jungle Trim
|
||||
tile.trim.acacia.name=Acacia Trim
|
||||
tile.trim.big_oak.name=Dark Oak Trim
|
||||
|
||||
storageDrawers.drawers.description=Holds %d stacks per drawer
|
||||
storageDrawers.upgrade.description=Increases storage to %d times base value
|
||||
storageDrawers.controller.description=Interact with a bank of connected drawers
|
||||
@@ -82,6 +89,7 @@ storageDrawers.config.blocks.halfDrawers2=Compact Drawers 1x2
|
||||
storageDrawers.config.blocks.halfDrawers4=Compact Drawers 2x2
|
||||
storageDrawers.config.blocks.compDrawers=Compacting Drawer
|
||||
storageDrawers.config.blocks.controller=Drawer Controller
|
||||
storageDrawers.config.blocks.trim=Trim
|
||||
|
||||
storageDrawers.config.upgrades=Upgrade Settings
|
||||
storageDrawers.config.upgrades.tooltip=Configure individual storage upgrades.
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.block;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.storage.INetworked;
|
||||
import com.jaquadro.minecraft.storagedrawers.core.ModBlocks;
|
||||
import com.jaquadro.minecraft.storagedrawers.core.ModCreativeTabs;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockWood;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockTrim extends Block implements INetworked
|
||||
{
|
||||
public BlockTrim (String name) {
|
||||
super(Material.wood);
|
||||
|
||||
setBlockName(name);
|
||||
setCreativeTab(ModCreativeTabs.tabStorageDrawers);
|
||||
setHardness(5f);
|
||||
setStepSound(Block.soundTypeWood);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped (int meta) {
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (Item item, CreativeTabs creativeTabs, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
|
||||
if (StorageDrawers.config.cache.creativeTabVanillaWoods) {
|
||||
for (int i = 1; i < BlockWood.field_150096_a.length; i++)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon (int side, int meta) {
|
||||
return ModBlocks.fullDrawers1.getIcon(0, meta);
|
||||
}
|
||||
}
|
||||
@@ -92,6 +92,7 @@ public class ConfigManager
|
||||
public final ConfigSection sectionBlocksHalfDrawers2x2 = new ConfigSection(blockSections, sectionBlocks, "halfdrawers4", "blocks.halfDrawers4");
|
||||
public final ConfigSection sectionBlocksCompDrawers = new ConfigSection(blockSections, sectionBlocks, "compdrawers", "blocks.compDrawers");
|
||||
public final ConfigSection sectionBlocksController = new ConfigSection(blockSections, sectionBlocks, "controller", "blocks.controller");
|
||||
public final ConfigSection sectionBlocksTrim = new ConfigSection(blockSections, sectionBlocks, "trim", "blocks.trim");
|
||||
|
||||
public Map<String, ConfigSection> blockSectionsMap = new HashMap<String, ConfigSection>();
|
||||
|
||||
@@ -161,6 +162,8 @@ public class ConfigManager
|
||||
|
||||
config.get(sectionBlocksController.getQualifiedName(), "enabled", true).setLanguageKey(LANG_PREFIX + "prop.enabled").setRequiresMcRestart(true);
|
||||
|
||||
config.get(sectionBlocksTrim.getQualifiedName(), "enabled", true).setLanguageKey(LANG_PREFIX + "prop.enabled").setRequiresMcRestart(true);
|
||||
|
||||
cache.level2Mult = config.get(sectionUpgrades.getQualifiedName(), "level2Mult", 2).setLanguageKey(LANG_PREFIX + "upgrades.level2Mult").setRequiresWorldRestart(true).getInt();
|
||||
cache.level3Mult = config.get(sectionUpgrades.getQualifiedName(), "level3Mult", 3).setLanguageKey(LANG_PREFIX + "upgrades.level3Mult").setRequiresWorldRestart(true).getInt();
|
||||
cache.level4Mult = config.get(sectionUpgrades.getQualifiedName(), "level4Mult", 5).setLanguageKey(LANG_PREFIX + "upgrades.level4Mult").setRequiresWorldRestart(true).getInt();
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.BlockCompDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.BlockController;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.BlockDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.BlockTrim;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.tile.TileEntityController;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.tile.TileEntityDrawersComp;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.tile.TileEntityDrawersStandard;
|
||||
@@ -11,6 +12,7 @@ import com.jaquadro.minecraft.storagedrawers.config.ConfigManager;
|
||||
import com.jaquadro.minecraft.storagedrawers.item.ItemCompDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.item.ItemController;
|
||||
import com.jaquadro.minecraft.storagedrawers.item.ItemDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.item.ItemTrim;
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -24,6 +26,7 @@ public class ModBlocks
|
||||
public static BlockDrawers halfDrawers4;
|
||||
public static BlockCompDrawers compDrawers;
|
||||
public static BlockController controller;
|
||||
public static BlockTrim trim;
|
||||
|
||||
public void init () {
|
||||
fullDrawers1 = new BlockDrawers("fullDrawers1", 1, false);
|
||||
@@ -33,6 +36,7 @@ public class ModBlocks
|
||||
halfDrawers4 = new BlockDrawers("halfDrawers4", 4, true);
|
||||
compDrawers = new BlockCompDrawers("compDrawers");
|
||||
controller = new BlockController("drawerController");
|
||||
trim = new BlockTrim("trim");
|
||||
|
||||
ConfigManager config = StorageDrawers.config;
|
||||
|
||||
@@ -64,6 +68,9 @@ public class ModBlocks
|
||||
GameRegistry.registerBlock(controller, ItemController.class, "controller");
|
||||
GameRegistry.registerTileEntity(TileEntityController.class, ModBlocks.getQualifiedName(controller));
|
||||
}
|
||||
if (config.isBlockEnabled("trim")) {
|
||||
GameRegistry.registerBlock(trim, ItemTrim.class, "trim");
|
||||
}
|
||||
}
|
||||
|
||||
public static String getQualifiedName (Block block) {
|
||||
|
||||
@@ -31,6 +31,10 @@ public class ModRecipes
|
||||
if (config.isBlockEnabled("halfdrawers4"))
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.halfDrawers4, config.getBlockRecipeOutput("halfdrawers4"), i), "yxy", "xxx", "yxy",
|
||||
'x', new ItemStack(Blocks.wooden_slab, 1, i), 'y', Blocks.chest);
|
||||
if (config.isBlockEnabled("trim")) {
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.trim, 24, i), "xyx", "yyy", "xyx",
|
||||
'x', Items.stick, 'y', new ItemStack(Blocks.planks, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
if (config.isBlockEnabled("compdrawers"))
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.item;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockWood;
|
||||
import net.minecraft.item.ItemMultiTexture;
|
||||
|
||||
public class ItemTrim extends ItemMultiTexture
|
||||
{
|
||||
public ItemTrim (Block block) {
|
||||
super(block, block, BlockWood.field_150096_a);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user