Some very experimental stuff with "infused" blocks
This commit is contained in:
parent
070528db9b
commit
2ad08cbdc5
|
@ -26,6 +26,7 @@ public class BlockAlchemicalChest extends BlockEE implements ITileEntityProvider
|
|||
super(id, Material.wood);
|
||||
this.setHardness(2.5F);
|
||||
this.setUnlocalizedName(Strings.ALCHEMICAL_CHEST_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -21,6 +22,7 @@ public class BlockAlchemicalFuel extends BlockEE
|
|||
{
|
||||
super(id);
|
||||
this.setUnlocalizedName(Strings.ALCHEMICAL_FUEL_BLOCK_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setHardness(5.0F);
|
||||
this.setResistance(10.0F);
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ public class BlockAludelBase extends BlockEE implements ITileEntityProvider
|
|||
{
|
||||
super(id, Material.anvil);
|
||||
this.setUnlocalizedName(Strings.ALUDEL_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setBlockBounds(0.10F, 0.0F, 0.10F, 0.90F, 1.0F, 0.90F);
|
||||
this.setHardness(5F);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ public class BlockCalcinator extends BlockEE implements ITileEntityProvider
|
|||
{
|
||||
super(id, Material.rock);
|
||||
this.setUnlocalizedName(Strings.CALCINATOR_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setHardness(2.0F);
|
||||
this.setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 1.0F, 0.9F);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.item.ModItems;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -11,9 +12,10 @@ public class BlockChalk extends BlockEE
|
|||
public BlockChalk(int id)
|
||||
{
|
||||
super(id, Material.clay);
|
||||
setHardness(0.6F);
|
||||
setUnlocalizedName(Strings.CHALK_NAME);
|
||||
setStepSound(soundGravelFootstep);
|
||||
this.setHardness(0.6F);
|
||||
this.setUnlocalizedName(Strings.CHALK_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setStepSound(soundGravelFootstep);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import com.pahimar.ee3.tileentity.TileEE;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -30,7 +29,6 @@ public class BlockEE extends Block
|
|||
public BlockEE(int id, Material material)
|
||||
{
|
||||
super(id, material);
|
||||
setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,6 +26,7 @@ public class BlockGlassBell extends BlockEE implements ITileEntityProvider
|
|||
{
|
||||
super(id, Material.glass);
|
||||
this.setUnlocalizedName(Strings.GLASS_BELL_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setHardness(1.0F);
|
||||
}
|
||||
|
||||
|
|
57
src/main/java/com/pahimar/ee3/block/BlockInfusedCloth.java
Normal file
57
src/main/java/com/pahimar/ee3/block/BlockInfusedCloth.java
Normal file
|
@ -0,0 +1,57 @@
|
|||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.ItemIds;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
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.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockInfusedCloth extends BlockEE
|
||||
{
|
||||
public BlockInfusedCloth(int id)
|
||||
{
|
||||
super(id, Material.cloth);
|
||||
this.setUnlocalizedName(Strings.INFUSED_CLOTH_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setStepSound(soundClothFootstep);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister)
|
||||
{
|
||||
blockIcon = iconRegister.registerIcon("wool_colored_white");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int colorMultiplier(IBlockAccess blockAccess, int x, int y, int z)
|
||||
{
|
||||
ItemStack dustStack = new ItemStack(ItemIds.ALCHEMICAL_DUST, 1, MathHelper.clamp_int(blockAccess.getBlockMetadata(x, y, z), 0, Strings.ALCHEMICAL_DUST_SUBTYPE_NAMES.length - 1));
|
||||
return dustStack.getItem().getColorFromItemStack(dustStack, 0);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderColor(int metaData)
|
||||
{
|
||||
ItemStack dustStack = new ItemStack(ItemIds.ALCHEMICAL_DUST, 1, MathHelper.clamp_int(metaData, 0, Strings.ALCHEMICAL_DUST_SUBTYPE_NAMES.length - 1));
|
||||
return dustStack.getItem().getColorFromItemStack(dustStack, metaData);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(int id, CreativeTabs creativeTab, List list)
|
||||
{
|
||||
for (int meta = 0; meta < Strings.ALCHEMICAL_DUST_SUBTYPE_NAMES.length; ++meta)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, meta));
|
||||
}
|
||||
}
|
||||
}
|
57
src/main/java/com/pahimar/ee3/block/BlockInfusedOre.java
Normal file
57
src/main/java/com/pahimar/ee3/block/BlockInfusedOre.java
Normal file
|
@ -0,0 +1,57 @@
|
|||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.ItemIds;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
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.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockInfusedOre extends BlockEE
|
||||
{
|
||||
public BlockInfusedOre(int id)
|
||||
{
|
||||
super(id, Material.iron);
|
||||
this.setUnlocalizedName(Strings.INFUSED_ORE_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setStepSound(soundMetalFootstep);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister)
|
||||
{
|
||||
blockIcon = iconRegister.registerIcon("iron_block");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int colorMultiplier(IBlockAccess blockAccess, int x, int y, int z)
|
||||
{
|
||||
ItemStack dustStack = new ItemStack(ItemIds.ALCHEMICAL_DUST, 1, MathHelper.clamp_int(blockAccess.getBlockMetadata(x, y, z), 0, Strings.ALCHEMICAL_DUST_SUBTYPE_NAMES.length - 1));
|
||||
return dustStack.getItem().getColorFromItemStack(dustStack, 0);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderColor(int metaData)
|
||||
{
|
||||
ItemStack dustStack = new ItemStack(ItemIds.ALCHEMICAL_DUST, 1, MathHelper.clamp_int(metaData, 0, Strings.ALCHEMICAL_DUST_SUBTYPE_NAMES.length - 1));
|
||||
return dustStack.getItem().getColorFromItemStack(dustStack, metaData);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(int id, CreativeTabs creativeTab, List list)
|
||||
{
|
||||
for (int meta = 1; meta < Strings.ALCHEMICAL_DUST_SUBTYPE_NAMES.length; ++meta)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, meta));
|
||||
}
|
||||
}
|
||||
}
|
57
src/main/java/com/pahimar/ee3/block/BlockInfusedStone.java
Normal file
57
src/main/java/com/pahimar/ee3/block/BlockInfusedStone.java
Normal file
|
@ -0,0 +1,57 @@
|
|||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.ItemIds;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
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.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockInfusedStone extends BlockEE
|
||||
{
|
||||
public BlockInfusedStone(int id)
|
||||
{
|
||||
super(id, Material.rock);
|
||||
this.setUnlocalizedName(Strings.INFUSED_STONE_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setStepSound(soundStoneFootstep);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister)
|
||||
{
|
||||
blockIcon = iconRegister.registerIcon("stone");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int colorMultiplier(IBlockAccess blockAccess, int x, int y, int z)
|
||||
{
|
||||
ItemStack dustStack = new ItemStack(ItemIds.ALCHEMICAL_DUST, 1, MathHelper.clamp_int(blockAccess.getBlockMetadata(x, y, z), 0, Strings.ALCHEMICAL_DUST_SUBTYPE_NAMES.length - 1));
|
||||
return dustStack.getItem().getColorFromItemStack(dustStack, 0);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderColor(int metaData)
|
||||
{
|
||||
ItemStack dustStack = new ItemStack(ItemIds.ALCHEMICAL_DUST, 1, MathHelper.clamp_int(metaData, 0, Strings.ALCHEMICAL_DUST_SUBTYPE_NAMES.length - 1));
|
||||
return dustStack.getItem().getColorFromItemStack(dustStack, metaData);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(int id, CreativeTabs creativeTab, List list)
|
||||
{
|
||||
for (int meta = 1; meta < Strings.ALCHEMICAL_DUST_SUBTYPE_NAMES.length; ++meta)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, meta));
|
||||
}
|
||||
}
|
||||
}
|
16
src/main/java/com/pahimar/ee3/block/BlockInfusedWood.java
Normal file
16
src/main/java/com/pahimar/ee3/block/BlockInfusedWood.java
Normal file
|
@ -0,0 +1,16 @@
|
|||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
public class BlockInfusedWood extends BlockEE
|
||||
{
|
||||
public BlockInfusedWood(int id)
|
||||
{
|
||||
super(id, Material.wood);
|
||||
this.setUnlocalizedName(Strings.INFUSED_WOOD_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setStepSound(soundWoodFootstep);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.RenderIds;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import com.pahimar.ee3.tileentity.TileResearchStation;
|
||||
|
@ -13,6 +14,7 @@ public class BlockResearchStation extends BlockEE implements ITileEntityProvider
|
|||
{
|
||||
super(id);
|
||||
this.setUnlocalizedName(Strings.RESEARCH_STATION_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.item.ItemAlchemicalFuelBlock;
|
||||
import com.pahimar.ee3.item.ItemInfusedClothBlock;
|
||||
import com.pahimar.ee3.item.ItemInfusedOreBlock;
|
||||
import com.pahimar.ee3.item.ItemInfusedStoneBlock;
|
||||
import com.pahimar.ee3.lib.BlockIds;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
@ -22,6 +25,10 @@ public class ModBlocks
|
|||
public static BlockEE chalk;
|
||||
public static BlockEE glassBell;
|
||||
public static BlockEE researchStation;
|
||||
public static BlockEE infusedStone;
|
||||
public static BlockEE infusedCloth;
|
||||
public static BlockEE infusedWood;
|
||||
public static BlockEE infusedOre;
|
||||
|
||||
public static void init()
|
||||
{
|
||||
|
@ -33,6 +40,10 @@ public class ModBlocks
|
|||
chalk = new BlockChalk(BlockIds.CHALK);
|
||||
glassBell = new BlockGlassBell(BlockIds.GLASS_BELL);
|
||||
researchStation = new BlockResearchStation((BlockIds.RESEARCH_STATION));
|
||||
infusedStone = new BlockInfusedStone(BlockIds.INFUSED_STONE);
|
||||
infusedWood = new BlockInfusedWood(BlockIds.INFUSED_WOOD);
|
||||
infusedCloth = new BlockInfusedCloth(BlockIds.INFUSED_CLOTH);
|
||||
infusedOre = new BlockInfusedOre(BlockIds.INFUSED_ORE);
|
||||
|
||||
GameRegistry.registerBlock(alchemicalChest, "block." + Strings.ALCHEMICAL_CHEST_NAME);
|
||||
GameRegistry.registerBlock(alchemicalFuel, ItemAlchemicalFuelBlock.class, "block." + Strings.ALCHEMICAL_FUEL_NAME);
|
||||
|
@ -42,5 +53,9 @@ public class ModBlocks
|
|||
GameRegistry.registerBlock(chalk, "block." + Strings.CHALK_NAME);
|
||||
GameRegistry.registerBlock(glassBell, "block." + Strings.GLASS_BELL_NAME);
|
||||
GameRegistry.registerBlock(researchStation, "block." + Strings.RESEARCH_STATION_NAME);
|
||||
GameRegistry.registerBlock(infusedCloth, ItemInfusedClothBlock.class, "block." + Strings.INFUSED_CLOTH_NAME);
|
||||
GameRegistry.registerBlock(infusedOre, ItemInfusedOreBlock.class, "block." + Strings.INFUSED_ORE_NAME);
|
||||
GameRegistry.registerBlock(infusedStone, ItemInfusedStoneBlock.class, "block." + Strings.INFUSED_STONE_NAME);
|
||||
GameRegistry.registerBlock(infusedWood, "block." + Strings.INFUSED_WOOD_NAME);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ public class ItemTooltipEventHandler
|
|||
{
|
||||
WrappedStack stack = new WrappedStack(event.itemStack);
|
||||
|
||||
event.toolTip.add(String.format("id: %s, Meta: %s", event.itemStack.itemID, event.itemStack.getItemDamage()));
|
||||
if (EmcRegistry.getInstance().hasEmcValue(stack))
|
||||
{
|
||||
EmcValue emcValue = EmcRegistry.getInstance().getEmcValue(stack);
|
||||
|
|
|
@ -11,10 +11,8 @@ import java.util.logging.Level;
|
|||
|
||||
public class BlockConfiguration
|
||||
{
|
||||
|
||||
protected static void init(File configFile)
|
||||
{
|
||||
|
||||
Configuration blockConfiguration = new Configuration(configFile);
|
||||
|
||||
try
|
||||
|
@ -29,6 +27,11 @@ public class BlockConfiguration
|
|||
BlockIds.ALCHEMICAL_CHEST = blockConfiguration.getBlock(Strings.ALCHEMICAL_CHEST_NAME, BlockIds.ALCHEMICAL_CHEST_DEFAULT).getInt(BlockIds.ALCHEMICAL_CHEST_DEFAULT);
|
||||
BlockIds.GLASS_BELL = blockConfiguration.getBlock(Strings.GLASS_BELL_NAME, BlockIds.GLASS_BELL_DEFAULT).getInt(BlockIds.GLASS_BELL_DEFAULT);
|
||||
BlockIds.RESEARCH_STATION = blockConfiguration.getBlock(Strings.RESEARCH_STATION_NAME, BlockIds.RESEARCH_STATION_DEFAULT).getInt(BlockIds.RESEARCH_STATION_DEFAULT);
|
||||
|
||||
BlockIds.INFUSED_CLOTH = blockConfiguration.getBlock(Strings.INFUSED_CLOTH_NAME, BlockIds.INFUSED_CLOTH_DEFAULT).getInt(BlockIds.INFUSED_CLOTH_DEFAULT);
|
||||
BlockIds.INFUSED_ORE = blockConfiguration.getBlock(Strings.INFUSED_ORE_NAME, BlockIds.INFUSED_ORE_DEFAULT).getInt(BlockIds.INFUSED_ORE_DEFAULT);
|
||||
BlockIds.INFUSED_STONE = blockConfiguration.getBlock(Strings.INFUSED_STONE_NAME, BlockIds.INFUSED_STONE_DEFAULT).getInt(BlockIds.INFUSED_STONE_DEFAULT);
|
||||
BlockIds.INFUSED_WOOD = blockConfiguration.getBlock(Strings.INFUSED_WOOD_NAME, BlockIds.INFUSED_WOOD_DEFAULT).getInt(BlockIds.INFUSED_WOOD_DEFAULT);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
@ -28,12 +28,12 @@ public class ItemAlchemicalDust extends ItemEE
|
|||
maxStackSize = 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// @Override
|
||||
// @SideOnly(Side.CLIENT)
|
||||
// public boolean requiresMultipleRenderPasses()
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
@ -57,7 +57,7 @@ public class ItemAlchemicalDust extends ItemEE
|
|||
}
|
||||
else if (itemStack.getItemDamage() == 4)
|
||||
{
|
||||
return Integer.parseInt(Colours.DUST_IRIDESCENT, 16);
|
||||
return Integer.parseInt(Colours.DUST_SHIMMERING, 16);
|
||||
}
|
||||
|
||||
return Integer.parseInt(Colours.PURE_WHITE, 16);
|
||||
|
@ -75,13 +75,6 @@ public class ItemAlchemicalDust extends ItemEE
|
|||
return String.format("item.%s%s.%s", Strings.RESOURCE_PREFIX, Strings.ALCHEMICAL_DUST_NAME, Strings.ALCHEMICAL_DUST_SUBTYPE_NAMES[MathHelper.clamp_int(itemStack.getItemDamage(), 0, Strings.ALCHEMICAL_DUST_SUBTYPE_NAMES.length - 1)]);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasEffect(ItemStack stack, int renderPass)
|
||||
{
|
||||
return MathHelper.clamp_int(stack.getItemDamage(), 0, Strings.ALCHEMICAL_DUST_SUBTYPE_NAMES.length - 1) == (Strings.ALCHEMICAL_DUST_SUBTYPE_NAMES.length - 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack itemStack)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package com.pahimar.ee3.item;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
|
||||
public class ItemInfusedClothBlock extends ItemBlock
|
||||
{
|
||||
public ItemInfusedClothBlock(int id)
|
||||
{
|
||||
super(id);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
}
|
18
src/main/java/com/pahimar/ee3/item/ItemInfusedOreBlock.java
Normal file
18
src/main/java/com/pahimar/ee3/item/ItemInfusedOreBlock.java
Normal file
|
@ -0,0 +1,18 @@
|
|||
package com.pahimar.ee3.item;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
|
||||
public class ItemInfusedOreBlock extends ItemBlock
|
||||
{
|
||||
public ItemInfusedOreBlock(int id)
|
||||
{
|
||||
super(id);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.pahimar.ee3.item;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
|
||||
public class ItemInfusedStoneBlock extends ItemBlock
|
||||
{
|
||||
public ItemInfusedStoneBlock(int id)
|
||||
{
|
||||
super(id);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
}
|
|
@ -18,6 +18,10 @@ public class BlockIds
|
|||
public static int CHALK_DEFAULT = 2456;
|
||||
public static int ALCHEMY_SQUARE_DEFAULT = 2457;
|
||||
public static int RESEARCH_STATION_DEFAULT = 2458;
|
||||
public static int INFUSED_STONE_DEFAULT = 2459;
|
||||
public static int INFUSED_CLOTH_DEFAULT = 2460;
|
||||
public static int INFUSED_WOOD_DEFAULT = 2461;
|
||||
public static int INFUSED_ORE_DEFAULT = 2462;
|
||||
|
||||
/* Current block ids */
|
||||
public static int CALCINATOR;
|
||||
|
@ -28,4 +32,8 @@ public class BlockIds
|
|||
public static int CHALK;
|
||||
public static int ALCHEMY_SQUARE;
|
||||
public static int RESEARCH_STATION;
|
||||
public static int INFUSED_STONE;
|
||||
public static int INFUSED_CLOTH;
|
||||
public static int INFUSED_WOOD;
|
||||
public static int INFUSED_ORE;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ public class Colours
|
|||
public static final String DUST_VERDANT = "45CC39";
|
||||
public static final String DUST_AZURE = "35A6DE";
|
||||
public static final String DUST_MINIUM = "FF4545";
|
||||
public static final String DUST_IRIDESCENT = "FFF459";
|
||||
public static final String DUST_SHIMMERING = "FFF459";
|
||||
|
||||
/* Text colour related constants */
|
||||
public static final String TEXT_COLOUR_PREFIX_YELLOW = "\u00a7e";
|
||||
|
|
|
@ -44,6 +44,10 @@ public class Strings
|
|||
public static final String GLASS_BELL_NAME = "glassBell";
|
||||
public static final String ALCHEMY_SQUARE_NAME = "alchemySquare";
|
||||
public static final String RESEARCH_STATION_NAME = "researchStation";
|
||||
public static final String INFUSED_STONE_NAME = "infusedStone";
|
||||
public static final String INFUSED_CLOTH_NAME = "infusedCloth";
|
||||
public static final String INFUSED_WOOD_NAME = "infusedWood";
|
||||
public static final String INFUSED_ORE_NAME = "infusedOre";
|
||||
|
||||
/* Item name constants */
|
||||
public static final String MINIUM_SHARD_NAME = "shardMinium";
|
||||
|
@ -51,7 +55,7 @@ public class Strings
|
|||
public static final String MINIUM_STONE_NAME = "stoneMinium";
|
||||
public static final String PHILOSOPHERS_STONE_NAME = "stonePhilosophers";
|
||||
public static final String ALCHEMICAL_DUST_NAME = "alchemicalDust";
|
||||
public static final String[] ALCHEMICAL_DUST_SUBTYPE_NAMES = {"ash", "verdant", "azure", "minium", "iridescent"};
|
||||
public static final String[] ALCHEMICAL_DUST_SUBTYPE_NAMES = {"ash", "verdant", "azure", "minium", "shimmering"};
|
||||
public static final String ALCHEMICAL_BAG_NAME = "alchemicalBag";
|
||||
public static final String CHALK_NAME = "chalk";
|
||||
public static final String DIVINING_ROD_NAME = "diviningRod";
|
||||
|
|
61
src/main/java/com/pahimar/ee3/recipe/AludelRecipes.java
Normal file
61
src/main/java/com/pahimar/ee3/recipe/AludelRecipes.java
Normal file
|
@ -0,0 +1,61 @@
|
|||
package com.pahimar.ee3.recipe;
|
||||
|
||||
import com.pahimar.ee3.helper.ItemHelper;
|
||||
import com.pahimar.ee3.item.ItemAlchemicalDust;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeMap;
|
||||
|
||||
public class AludelRecipes
|
||||
{
|
||||
private static AludelRecipes aludelRegistry = null;
|
||||
|
||||
private SortedMap<ItemStack, ItemStack[]> aludelRecipes;
|
||||
|
||||
private AludelRecipes()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
public AludelRecipes getInstance()
|
||||
{
|
||||
if (aludelRegistry == null)
|
||||
{
|
||||
aludelRegistry = new AludelRecipes();
|
||||
}
|
||||
|
||||
return aludelRegistry;
|
||||
}
|
||||
|
||||
private void init()
|
||||
{
|
||||
aludelRecipes = new TreeMap<ItemStack, ItemStack[]>(ItemHelper.comparator);
|
||||
}
|
||||
|
||||
public void addRecipe(ItemStack recipeOutput, ItemStack recipeInputStack, ItemStack recipeInputDust)
|
||||
{
|
||||
if (!aludelRecipes.containsKey(recipeOutput) && recipeInputDust.getItem() instanceof ItemAlchemicalDust)
|
||||
{
|
||||
aludelRecipes.put(recipeOutput, new ItemStack[]{recipeInputStack, recipeInputDust});
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack getResult(ItemStack recipeInputStack, ItemStack recipeInputDust)
|
||||
{
|
||||
for (ItemStack recipeOutput : aludelRecipes.keySet())
|
||||
{
|
||||
if (ItemHelper.equals(aludelRecipes.get(recipeOutput)[0], recipeInputStack) && ItemHelper.equals(aludelRecipes.get(recipeOutput)[1], recipeInputDust))
|
||||
{
|
||||
return recipeOutput;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public SortedMap<ItemStack, ItemStack[]> getRecipeMap()
|
||||
{
|
||||
return aludelRecipes;
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@ item.ee3:alchemicalDust.ash.name=Ash [WIP]
|
|||
item.ee3:alchemicalDust.verdant.name=Verdant Dust [WIP]
|
||||
item.ee3:alchemicalDust.azure.name=Azure Dust [WIP]
|
||||
item.ee3:alchemicalDust.minium.name=Minium Dust [WIP]
|
||||
item.ee3:alchemicalDust.iridescent.name=Iridescent Dust [WIP]
|
||||
item.ee3:alchemicalDust.shimmering.name=Shimmering Dust [WIP]
|
||||
item.ee3:alchemicalFuel.alchemicalCoal.name=Alchemical Coal
|
||||
item.ee3:alchemicalFuel.mobiusFuel.name=Mobius Fuel
|
||||
item.ee3:alchemicalFuel.aeternalisFuel.name=Aeternalis Fuel
|
||||
|
@ -31,6 +31,10 @@ tile.ee3:calcinator.name=Calcinator [WIP]
|
|||
tile.ee3:chalk.name=Chalk
|
||||
tile.ee3:glassBell.name=Glass Bell [WIP]
|
||||
tile.ee3:researchStation.name=Research Station [WIP]
|
||||
tile.ee3:infusedCloth.name=Infused Cloth [WIP]
|
||||
tile.ee3:infusedOre.name=Infused Ore [WIP]
|
||||
tile.ee3:infusedStone.name=Infused Stone [WIP]
|
||||
tile.ee3:infusedWood.name=Infused Wood [WIP]
|
||||
|
||||
# GUI localizations
|
||||
container.ee3:alchemicalBag=Alchemical Bag [WIP]
|
||||
|
|
Loading…
Reference in a new issue