This commit is contained in:
Bob 2023-03-27 21:47:01 +02:00
parent f0fe4119f5
commit 1cf051a8b1
5 changed files with 32 additions and 52 deletions

View File

@ -1,6 +1,6 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=4550
mod_build_number=4551
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models, porting),\

View File

@ -14,7 +14,6 @@ import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
import com.hbm.render.block.RenderBlockMultipass;
import com.hbm.util.ColorUtil;
import com.hbm.util.I18nUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -35,6 +34,7 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;
@ -281,7 +281,7 @@ public class BlockMotherOfAllOres extends BlockContainer implements IBlockMultiP
if(name.getItemDamage() == OreDictionary.WILDCARD_VALUE) {
name.setItemDamage(0);
}
return I18nUtil.resolveKey(this.getUnlocalizedName() + ".name", name.getItem().getItemStackDisplayName(name));
return StatCollector.translateToLocalFormatted(this.getUnlocalizedName() + ".name", name.getItem().getItemStackDisplayName(name));
}
}

View File

@ -25,7 +25,8 @@ public class Watz extends BlockDummyable {
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
return super.standardOpenBehavior(world, x, y, z, player, 0);
//return super.standardOpenBehavior(world, x, y, z, player, 0);
return false;
}
@Override

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (4550)";
public static final String VERSION = "1.0.27 BETA (4551)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -45,10 +45,12 @@ public class StatHelper {
StatList.objectMineStats.clear();
StatList.itemStats.clear();
initCraftItemStats();
initBlockMineStats();
initItemUseStats();
initItemBreakStats();
try {
initCraftItemStats();
initBlockMineStats();
initItemUseStats();
initItemBreakStats();
} catch(Exception ex) { } // just to be sure
}
/**
@ -59,42 +61,15 @@ public class StatHelper {
* 2) The system just will never work with items that don't have crafting table recipes
*/
private static void initCraftItemStats() {
/*HashSet hashset = new HashSet();
Iterator iterator = CraftingManager.getInstance().getRecipeList().iterator();
while(iterator.hasNext()) {
IRecipe irecipe = (IRecipe) iterator.next();
if(irecipe.getRecipeOutput() != null) {
hashset.add(irecipe.getRecipeOutput().getItem());
}
}
iterator = FurnaceRecipes.smelting().getSmeltingList().values().iterator();
while(iterator.hasNext()) {
ItemStack itemstack = (ItemStack) iterator.next();
hashset.add(itemstack.getItem());
}
iterator = hashset.iterator();
while(iterator.hasNext()) {
Item item = (Item) iterator.next();
if(item != null) {
int i = Item.getIdFromItem(item);
StatList.objectCraftStats[i] = registerStat(new StatCrafting("stat.craftItem." + i, new ChatComponentTranslation("stat.craftItem", new Object[] { (new ItemStack(item)).func_151000_E() }), item));
}
}*/
Iterator iterator = Item.itemRegistry.iterator();
while(iterator.hasNext()) {
Item item = (Item) iterator.next();
if(item != null) {
int i = Item.getIdFromItem(item);
StatList.objectCraftStats[i] = registerStat(new StatCrafting("stat.craftItem." + i, new ChatComponentTranslation("stat.craftItem", new Object[] { (new ItemStack(item)).func_151000_E() }), item));
try {
StatList.objectCraftStats[i] = registerStat(new StatCrafting("stat.craftItem." + i, new ChatComponentTranslation("stat.craftItem", new Object[] { (new ItemStack(item)).func_151000_E() }), item));
} catch(Exception ex) { }
}
}
@ -109,11 +84,12 @@ public class StatHelper {
if(Item.getItemFromBlock(block) != null) {
int i = Block.getIdFromBlock(block);
if(block.getEnableStats()) {
StatList.mineBlockStatArray[i] = registerStat(new StatCrafting("stat.mineBlock." + i, new ChatComponentTranslation("stat.mineBlock", new Object[] { (new ItemStack(block)).func_151000_E() }), Item.getItemFromBlock(block)));
StatList.objectMineStats.add((StatCrafting) StatList.mineBlockStatArray[i]);
}
try {
if(block.getEnableStats()) {
StatList.mineBlockStatArray[i] = registerStat(new StatCrafting("stat.mineBlock." + i, new ChatComponentTranslation("stat.mineBlock", new Object[] { (new ItemStack(block)).func_151000_E() }), Item.getItemFromBlock(block)));
StatList.objectMineStats.add((StatCrafting) StatList.mineBlockStatArray[i]);
}
} catch(Exception ex) { }
}
}
@ -128,11 +104,12 @@ public class StatHelper {
if(item != null) {
int i = Item.getIdFromItem(item);
StatList.objectUseStats[i] = registerStat(new StatCrafting("stat.useItem." + i, new ChatComponentTranslation("stat.useItem", new Object[] { (new ItemStack(item)).func_151000_E() }), item));
if(!(item instanceof ItemBlock)) {
StatList.itemStats.add((StatCrafting) StatList.objectUseStats[i]);
}
try {
StatList.objectUseStats[i] = registerStat(new StatCrafting("stat.useItem." + i, new ChatComponentTranslation("stat.useItem", new Object[] { (new ItemStack(item)).func_151000_E() }), item));
if(!(item instanceof ItemBlock)) {
StatList.itemStats.add((StatCrafting) StatList.objectUseStats[i]);
}
} catch(Exception ex) { }
}
}
@ -147,9 +124,11 @@ public class StatHelper {
if(item != null) {
int i = Item.getIdFromItem(item);
if(item.isDamageable()) {
StatList.objectBreakStats[i] = registerStat(new StatCrafting("stat.breakItem." + i, new ChatComponentTranslation("stat.breakItem", new Object[] { (new ItemStack(item)).func_151000_E() }), item));
}
try {
if(item.isDamageable()) {
StatList.objectBreakStats[i] = registerStat(new StatCrafting("stat.breakItem." + i, new ChatComponentTranslation("stat.breakItem", new Object[] { (new ItemStack(item)).func_151000_E() }), item));
}
} catch(Exception ex) { }
}
}