mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Did some more stuff with the OreDictionary, added Config Stuff, Localizing, Createive Tab adding
This commit is contained in:
parent
c06522fd6f
commit
0c39a29bc0
11 changed files with 40 additions and 16 deletions
|
@ -18,7 +18,7 @@ buildscript {
|
|||
apply plugin: 'forge'
|
||||
apply plugin: 'maven'
|
||||
|
||||
version = "1.7.10-0.0.7.6"
|
||||
version = "1.7.10-0.0.8.0"
|
||||
group = "ellpeck.actuallyadditions"
|
||||
archivesBaseName = "ActuallyAdditions"
|
||||
|
||||
|
|
|
@ -92,10 +92,10 @@ public class BlockOreMagnet extends BlockContainerBase implements INameableItem{
|
|||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
||||
BlockUtil.addInformation(theBlock, list, 1, "");
|
||||
BlockUtil.addInformation(theBlock, list, 3, "");
|
||||
BlockUtil.addPowerUsageInfo(list, TileEntityOreMagnet.energyUsePerTick);
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".uses.desc")+" "+TileEntityOreMagnet.oilUsePerTick+" mB/t");
|
||||
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".uses.desc")+" "+TileEntityOreMagnet.oilUsePerTick+" mB "+StringUtil.localize(InitBlocks.fluidOil.getUnlocalizedName())+"/"+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".block.desc"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,12 @@ public enum ConfigIntValues{
|
|||
MAGNET_RING_ENERGY_USE("Magnet Ring: Energy Used", ConfigCategories.MACHINE_VALUES, 30, 0, 500, "The Amount of Energy the Magnet Ring uses per tick"),
|
||||
|
||||
WATER_RING_RANGE("Water Ring: Range", ConfigCategories.MACHINE_VALUES, 3, 1, 10, "The Range of the Water Ring"),
|
||||
WATER_RING_ENERGY_USE("Magnet Ring: Energy Used", ConfigCategories.MACHINE_VALUES, 30, 0, 500, "The Amount of Energy the Water Ring uses per Block");
|
||||
WATER_RING_ENERGY_USE("Magnet Ring: Energy Used", ConfigCategories.MACHINE_VALUES, 30, 0, 500, "The Amount of Energy the Water Ring uses per Block"),
|
||||
|
||||
ORE_MAGNET_MAX_TIMER("Ore Magnet: Max Timer", ConfigCategories.MACHINE_VALUES, 15, 1, 2000, "The approximate Time it takes for the Ore Magnet to search for a new block to mine"),
|
||||
ORE_MAGNET_RANGE("Ore Magnet: Range", ConfigCategories.MACHINE_VALUES, 10, 1, 60, "The range of the Ore Magnet"),
|
||||
ORE_MAGNET_OIL_USE("Ore Magnet: Oil Use", ConfigCategories.MACHINE_VALUES, 50, 0, 5000, "The amount of oil the Ore Magnet uses every Block"),
|
||||
ORE_MAGNET_ENERGY_USE("Ore Magnet: Energy USe", ConfigCategories.MACHINE_VALUES, 500, 10, 10000, "The amount of Energy the Ore Magnet uses every tick");
|
||||
|
||||
public final String name;
|
||||
public final String category;
|
||||
|
|
|
@ -38,6 +38,8 @@ public class CreativeTab extends CreativeTabs{
|
|||
add(InitBlocks.blockCoffeeMachine);
|
||||
add(InitBlocks.blockXPSolidifier);
|
||||
|
||||
add(InitBlocks.blockOreMagnet);
|
||||
|
||||
add(InitBlocks.blockGreenhouseGlass);
|
||||
add(InitBlocks.blockGrinder);
|
||||
add(InitBlocks.blockGrinderDouble);
|
||||
|
|
|
@ -39,12 +39,14 @@ public class TooltipEvent{
|
|||
|
||||
//Base Item's Unlocalized Name
|
||||
String baseName = event.itemStack.getItem().getUnlocalizedName();
|
||||
event.toolTip.add(HEADER_PRE+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".baseUnlocName.desc")+":");
|
||||
event.toolTip.add(TEXT_PRE+baseName);
|
||||
if(baseName != null){
|
||||
event.toolTip.add(HEADER_PRE+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".baseUnlocName.desc")+":");
|
||||
event.toolTip.add(TEXT_PRE+baseName);
|
||||
}
|
||||
|
||||
//Unlocalized Name
|
||||
String metaName = event.itemStack.getItem().getUnlocalizedName(event.itemStack);
|
||||
if(!metaName.equals(baseName)){
|
||||
if(metaName != null && baseName != null && !metaName.equals(baseName)){
|
||||
event.toolTip.add(HEADER_PRE+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".unlocName.desc")+":");
|
||||
event.toolTip.add(TEXT_PRE+metaName);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public class ItemGrowthRing extends ItemEnergy implements INameableItem{
|
|||
private static final int GROWTH_TICKS_PER_CYCLE = ConfigIntValues.GROWTH_RING_GROWTH_PER_CYCLE.getValue();
|
||||
|
||||
public ItemGrowthRing(){
|
||||
super(1000000, 5000, 2);
|
||||
super(1000000, 5000, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,7 +21,7 @@ public class ItemWaterRemovalRing extends ItemEnergy implements INameableItem{
|
|||
private static final int ENERGY_USED_PER_BLOCK = ConfigIntValues.WATER_RING_ENERGY_USE.getValue();
|
||||
|
||||
public ItemWaterRemovalRing(){
|
||||
super(1000000, 5000, 2);
|
||||
super(1000000, 5000, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,6 +6,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.InitBlocks;
|
||||
import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
|
||||
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
|
||||
import ellpeck.actuallyadditions.network.sync.IPacketSyncerToClient;
|
||||
import ellpeck.actuallyadditions.network.sync.PacketSyncerToClient;
|
||||
import ellpeck.actuallyadditions.util.WorldPos;
|
||||
|
@ -35,10 +36,10 @@ public class TileEntityOreMagnet extends TileEntityInventoryBase implements IEne
|
|||
|
||||
private int currentWorkTimer;
|
||||
|
||||
private int maxWorkTimer = 10;
|
||||
private int range = 10;
|
||||
public static int oilUsePerTick = 50;
|
||||
public static int energyUsePerTick = 400;
|
||||
private int maxWorkTimer = ConfigIntValues.ORE_MAGNET_MAX_TIMER.getValue();
|
||||
private int range = ConfigIntValues.ORE_MAGNET_RANGE.getValue();
|
||||
public static int oilUsePerTick = ConfigIntValues.ORE_MAGNET_OIL_USE.getValue();
|
||||
public static int energyUsePerTick = ConfigIntValues.ORE_MAGNET_ENERGY_USE.getValue();
|
||||
|
||||
public TileEntityOreMagnet(){
|
||||
super(3, "oreMagnet");
|
||||
|
@ -83,10 +84,10 @@ public class TileEntityOreMagnet extends TileEntityInventoryBase implements IEne
|
|||
int z = randomPlacingPos.getZ();
|
||||
int toPlaceY = randomPlacingPos.getY();
|
||||
//Find the first available block
|
||||
for(int y = this.yCoord-1; y > 0; y--){
|
||||
for(int y = this.yCoord-2; y > 0; y--){
|
||||
Block block = worldObj.getBlock(xCoord+x, y, zCoord+z);
|
||||
int meta = worldObj.getBlockMetadata(xCoord+x, y, zCoord+z);
|
||||
if(!block.hasTileEntity(meta) && block.getBlockHardness(worldObj, xCoord+x, y, zCoord+z) >= 0.0F && (block.getMaterial().isToolNotRequired() || (block.getHarvestTool(meta).equals("pickaxe") && block.getHarvestLevel(meta) <= 3))){
|
||||
if(block != null && !block.isAir(worldObj, xCoord+x, y, zCoord+z) && !block.hasTileEntity(meta) && block.getBlockHardness(worldObj, xCoord+x, y, zCoord+z) >= 0.0F && ((block.getMaterial() != null && block.getMaterial().isToolNotRequired()) || (block.getHarvestTool(meta) == null || (block.getHarvestTool(meta).equals("pickaxe") && block.getHarvestLevel(meta) <= 3)))){
|
||||
int[] oreIDs = OreDictionary.getOreIDs(new ItemStack(block, 1, meta));
|
||||
for(int ID : oreIDs){
|
||||
String oreName = OreDictionary.getOreName(ID);
|
||||
|
|
|
@ -5,7 +5,7 @@ import org.apache.logging.log4j.Logger;
|
|||
|
||||
public class ModUtil{
|
||||
|
||||
public static final String VERSION = "1.7.10-0.0.7.6";
|
||||
public static final String VERSION = "1.7.10-0.0.8.0";
|
||||
|
||||
public static final String MOD_ID = "ActuallyAdditions";
|
||||
public static final String NAME = "Actually Additions";
|
||||
|
|
|
@ -4,6 +4,8 @@ achievement.page.actuallyadditions=Actually Additions
|
|||
fluid.oil=Oil
|
||||
fluid.canolaoil=Canola Oil
|
||||
|
||||
tooltip.actuallyadditions.block.desc=Block
|
||||
|
||||
tile.actuallyadditions.blockCompost.name=Compost
|
||||
tile.actuallyadditions.blockMiscOreBlackQuartz.name=Black Quartz Ore
|
||||
tile.actuallyadditions.blockMiscBlackQuartz.name=Block of Black Quartz
|
||||
|
@ -90,6 +92,18 @@ tile.actuallyadditions.blockColoredLampPink.name=Pink Lamp
|
|||
tile.actuallyadditions.blockColoredLampCyan.name=Cyan Lamp
|
||||
tile.actuallyadditions.blockColoredLampPurple.name=Purple Lamp
|
||||
|
||||
item.actuallyadditions.itemGrowthRing.name=Ring of Growth
|
||||
tooltip.actuallyadditions.itemGrowthRing.desc=Lets Plants around you grow when held in hand
|
||||
item.actuallyadditions.itemWaterRemovalRing.name=Ring of Liquid Banning
|
||||
tooltip.actuallyadditions.itemWaterRemovalRing.desc=Removes Water & Lava Blocks around you when held in hand
|
||||
item.actuallyadditions.itemSuctionRing.name=Ring of Magnetism
|
||||
tooltip.actuallyadditions.itemSuctionRing.desc=Sucks in Items in the area when in Inventory
|
||||
|
||||
tile.actuallyadditions.blockOreMagnet.name=Magnetic Miner
|
||||
tooltip.actuallyadditions.blockOreMagnet.desc.1=Pulls underground Ore Blocks to the Surface
|
||||
tooltip.actuallyadditions.blockOreMagnet.desc.2=Places where Ores should be mined have to have a
|
||||
tooltip.actuallyadditions.blockOreMagnet.desc.3=Casing Block one block lower than the Miner.
|
||||
|
||||
item.actuallyadditions.itemBucketCanolaOil.name=Canola Oil Bucket
|
||||
tooltip.actuallyadditions.itemBucketCanolaOil.desc=A Bucket filled with Canola Oil
|
||||
item.actuallyadditions.itemBucketOil.name=Oil Bucket
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Loading…
Reference in a new issue