Updated the way ESD is named in en_US

This commit is contained in:
Ellpeck 2015-03-22 20:07:06 +01:00
parent e274eb811f
commit d2724f3af6
7 changed files with 35 additions and 40 deletions

View file

@ -17,7 +17,7 @@ buildscript {
apply plugin: 'forge' apply plugin: 'forge'
version = "1.7.10-0.0.2.0" version = "1.7.10-0.0.2.1"
group = "ellpeck.actuallyadditions" group = "ellpeck.actuallyadditions"
archivesBaseName = "ActuallyAdditions" archivesBaseName = "ActuallyAdditions"

View file

@ -3,7 +3,6 @@ package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.ActuallyAdditions; import ellpeck.actuallyadditions.ActuallyAdditions;
import ellpeck.actuallyadditions.creative.CreativeTab;
import ellpeck.actuallyadditions.inventory.GuiHandler; import ellpeck.actuallyadditions.inventory.GuiHandler;
import ellpeck.actuallyadditions.tile.TileEntityInputter; import ellpeck.actuallyadditions.tile.TileEntityInputter;
import ellpeck.actuallyadditions.util.IName; import ellpeck.actuallyadditions.util.IName;
@ -30,16 +29,12 @@ public class BlockInputter extends BlockContainerBase implements IName{
public static final int NAME_FLAVOUR_AMOUNTS = 12; public static final int NAME_FLAVOUR_AMOUNTS = 12;
private long lastSysTime;
private int toPick;
public BlockInputter(){ public BlockInputter(){
super(Material.rock); super(Material.rock);
this.setHarvestLevel("pickaxe", 0); this.setHarvestLevel("pickaxe", 0);
this.setHardness(1.0F); this.setHardness(1.0F);
this.setStepSound(soundTypeStone); this.setStepSound(soundTypeStone);
this.setTickRandomly(true); this.setTickRandomly(true);
this.setCreativeTab(CreativeTab.instance);
} }
@Override @Override
@ -72,21 +67,6 @@ public class BlockInputter extends BlockContainerBase implements IName{
if (rotation == 3) world.setBlockMetadataWithNotify(x, y, z, 2, 2); if (rotation == 3) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
} }
@Override
public String getUnlocalizedName(){
String norm = "tile." + Util.MOD_ID_LOWER + "." + this.getName();
Random rand = new Random();
long sysTime = System.currentTimeMillis();
if(this.lastSysTime+5000 < sysTime){
this.lastSysTime = sysTime;
this.toPick = rand.nextInt(NAME_FLAVOUR_AMOUNTS+1);
}
return norm + "." + this.toPick;
}
@Override @Override
public TileEntity createNewTileEntity(World world, int par2){ public TileEntity createNewTileEntity(World world, int par2){
return new TileEntityInputter(); return new TileEntityInputter();
@ -133,6 +113,9 @@ public class BlockInputter extends BlockContainerBase implements IName{
private Block theBlock; private Block theBlock;
private long lastSysTime;
private int toPick;
public TheItemBlock(Block block){ public TheItemBlock(Block block){
super(block); super(block);
this.theBlock = block; this.theBlock = block;
@ -145,6 +128,19 @@ public class BlockInputter extends BlockContainerBase implements IName{
return EnumRarity.rare; return EnumRarity.rare;
} }
@Override
public String getItemStackDisplayName(ItemStack stack){
Random rand = new Random();
long sysTime = System.currentTimeMillis();
if(this.lastSysTime+5000 < sysTime){
this.lastSysTime = sysTime;
this.toPick = rand.nextInt(NAME_FLAVOUR_AMOUNTS+1);
}
return StatCollector.translateToLocal(this.getUnlocalizedName() + ".name") + " (" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".add." + this.toPick + ".name") + ")";
}
@Override @Override
public String getUnlocalizedName(ItemStack stack){ public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName(); return this.getUnlocalizedName();

View file

@ -1,7 +1,5 @@
package ellpeck.actuallyadditions.blocks; package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.common.registry.GameRegistry;
import ellpeck.actuallyadditions.util.IName;
import ellpeck.actuallyadditions.util.Util; import ellpeck.actuallyadditions.util.Util;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -42,6 +40,6 @@ public class InitBlocks{
Util.register(blockFurnaceDouble, BlockFurnaceDouble.TheItemBlock.class); Util.register(blockFurnaceDouble, BlockFurnaceDouble.TheItemBlock.class);
blockInputter = new BlockInputter(); blockInputter = new BlockInputter();
GameRegistry.registerBlock(blockInputter, BlockInputter.TheItemBlock.class, ((IName)blockInputter).getName()); Util.register(blockInputter, BlockInputter.TheItemBlock.class);
} }
} }

View file

@ -10,7 +10,7 @@ public class PacketHandler{
public static SimpleNetworkWrapper theNetwork; public static SimpleNetworkWrapper theNetwork;
public static void init(){ public static void init(){
theNetwork = NetworkRegistry.INSTANCE.newSimpleChannel(Util.MOD_ID + "Channel"); theNetwork = NetworkRegistry.INSTANCE.newSimpleChannel(Util.MOD_ID_LOWER);
theNetwork.registerMessage(PacketTileEntityFeeder.Handler.class, PacketTileEntityFeeder.class, 0, Side.CLIENT); theNetwork.registerMessage(PacketTileEntityFeeder.Handler.class, PacketTileEntityFeeder.class, 0, Side.CLIENT);
theNetwork.registerMessage(PacketInputterButton.Handler.class, PacketInputterButton.class, 1, Side.SERVER); theNetwork.registerMessage(PacketInputterButton.Handler.class, PacketInputterButton.class, 1, Side.SERVER);

View file

@ -18,7 +18,7 @@ import org.lwjgl.input.Keyboard;
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class Util{ public class Util{
public static final String VERSION = "1.7.10-0.0.2.0"; public static final String VERSION = "1.7.10-0.0.2.1";
public static final String MOD_ID = "ActuallyAdditions"; public static final String MOD_ID = "ActuallyAdditions";
public static final String NAME = "Actually Additions"; public static final String NAME = "Actually Additions";

View file

@ -12,19 +12,20 @@ tile.actuallyadditions.blockGrinder.name=Crusher
tile.actuallyadditions.blockGrinderDouble.name=Double Crusher tile.actuallyadditions.blockGrinderDouble.name=Double Crusher
tile.actuallyadditions.blockFurnaceDouble.name=Double Furnace tile.actuallyadditions.blockFurnaceDouble.name=Double Furnace
tile.actuallyadditions.blockInputter.0.name=ESD (Ellpeck's Slot Device) tile.actuallyadditions.blockInputter.name=ESD
tile.actuallyadditions.blockInputter.1.name=ESD (Energetic Solo Dancer) tile.actuallyadditions.blockInputter.add.0.name=Ellpeck's Slot Device
tile.actuallyadditions.blockInputter.2.name=ESD (Ethereal System Dude) tile.actuallyadditions.blockInputter.add.1.name=Energetic Solo Dancer
tile.actuallyadditions.blockInputter.3.name=ESD (Energy Stuff Distributor) tile.actuallyadditions.blockInputter.add.2.name=Ethereal System Dude
tile.actuallyadditions.blockInputter.4.name=ESD (Existing Stuff Donator) tile.actuallyadditions.blockInputter.add.3.name=Energy Stuff Distributor
tile.actuallyadditions.blockInputter.5.name=ESD (ExtraUtils Stealing Device) tile.actuallyadditions.blockInputter.add.4.name=Existing Stuff Donator
tile.actuallyadditions.blockInputter.6.name=ESD (Experienced Sauce Deriver) tile.actuallyadditions.blockInputter.add.5.name=ExtraUtils Stealing Device
tile.actuallyadditions.blockInputter.7.name=ESD (Excellent Spaghetti Dessert) tile.actuallyadditions.blockInputter.add.6.name=Experienced Sauce Deriver
tile.actuallyadditions.blockInputter.8.name=ESD (Extraordinary Sample Deliverer) tile.actuallyadditions.blockInputter.add.7.name=Excellent Spaghetti Dessert
tile.actuallyadditions.blockInputter.9.name=ESD (Express Sending Doughnut) tile.actuallyadditions.blockInputter.add.8.name=Extraordinary Sample Deliverer
tile.actuallyadditions.blockInputter.10.name=ESD (Expelling Sugar Dagger) tile.actuallyadditions.blockInputter.add.9.name=Express Sending Doughnut
tile.actuallyadditions.blockInputter.11.name=ESD (Extra-Long Solidifying Dissociation) tile.actuallyadditions.blockInputter.add.10.name=Expelling Sugar Dagger
tile.actuallyadditions.blockInputter.12.name=ESD (Extravagant Supreme Dirt) tile.actuallyadditions.blockInputter.add.11.name=Extra-Long Solidifying Dissociation
tile.actuallyadditions.blockInputter.add.12.name=Extravagant Supreme Dirt
item.actuallyadditions.itemMiscMashedFood.name=Mashed Food item.actuallyadditions.itemMiscMashedFood.name=Mashed Food
item.actuallyadditions.itemFertilizer.name=Fertilizer item.actuallyadditions.itemFertilizer.name=Fertilizer

View file

@ -3,7 +3,7 @@
"modid": "ActuallyAdditions", "modid": "ActuallyAdditions",
"name": "Actually Additions", "name": "Actually Additions",
"description": "A bunch of random stuff added to your Game to make it even more fun, exciting and add some more variety!", "description": "A bunch of random stuff added to your Game to make it even more fun, exciting and add some more variety!",
"version": "0.0.2.0", "version": "0.0.2.1",
"mcversion": "1.7.10", "mcversion": "1.7.10",
"url": "https://github.com/Ellpeck/ActuallyAdditions", "url": "https://github.com/Ellpeck/ActuallyAdditions",
"updateUrl": "", "updateUrl": "",