hadron coil number formatting, radio controllable interface, recipe fix

This commit is contained in:
Boblet 2022-12-12 16:05:29 +01:00
parent 6483a58857
commit beee798c70
10 changed files with 19 additions and 7 deletions

View File

@ -0,0 +1,9 @@
package api.hbm.block;
import net.minecraft.world.World;
public interface IRadioControllable {
public String[] getVariables(World world, int x, int y, int z);
public void receiveSignal(World world, int x, int y, int z, String channel, String signal);
}

View File

@ -53,6 +53,6 @@ public class BlockHadronCoil extends Block implements IBlockCT, ITooltipProvider
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add(I18nUtil.resolveKey("info.coil") + ": " + factor);
list.add(I18nUtil.resolveKey("info.coil") + ": " + String.format("%,d", factor));
}
}

View File

@ -7,7 +7,6 @@ import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ILookOverlay;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.TileEntityTowerLarge;
import com.hbm.tileentity.machine.TileEntityTowerSmall;
import com.hbm.util.I18nUtil;
import net.minecraft.block.material.Material;

View File

@ -141,7 +141,7 @@ public class HadronRecipeHandler extends TemplateRecipeHandler {
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
String mom = "" + rec.momentum;
String mom = String.format("%,d", rec.momentum);
fontRenderer.drawString(mom, -fontRenderer.getStringWidth(mom) / 2 + 30, 42, 0x404040);
}

View File

@ -53,7 +53,7 @@ public class GUIHadron extends GuiInfoContainer {
stats.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("hadron.stats"));
stats.add((hadron.stat_success ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) + I18n.format("hadron." + this.hadron.stat_state.name().toLowerCase()));
if(this.hadron.state.showCoord) stats.add(EnumChatFormatting.RED + I18nUtil.resolveKey("hadron.stats_coord", hadron.stat_x, hadron.stat_y, hadron.stat_z));
stats.add(EnumChatFormatting.GRAY + I18nUtil.resolveKey("hadron.stats_momentum", hadron.stat_charge));
stats.add(EnumChatFormatting.GRAY + I18nUtil.resolveKey("hadron.stats_momentum", String.format("%,d", hadron.stat_charge)));
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 41, guiTop + 92, 25, 11, mouseX, mouseY, stats.toArray(new String[0]));
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 4, guiTop + 36, 16, 16, guiLeft + 4, guiTop + 36 + 16, new String[] {"Initial particle momentum: 750"});

View File

@ -42,7 +42,6 @@ public class PressRecipes {
public static void register() {
makeRecipe(StampType.FLAT, new OreDictStack(COAL.dust()), Items.coal);
makeRecipe(StampType.FLAT, new OreDictStack(NETHERQUARTZ.dust()), Items.quartz);
makeRecipe(StampType.FLAT, new OreDictStack(LAPIS.dust()), new ItemStack(Items.dye, 1, 4));
makeRecipe(StampType.FLAT, new OreDictStack(DIAMOND.dust()), Items.diamond);
@ -52,8 +51,8 @@ public class PressRecipes {
makeRecipe(StampType.FLAT, new OreDictStack(ANY_COKE.gem()), ModItems.ingot_graphite);
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.meteorite_sword_reforged), ModItems.meteorite_sword_hardened);
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.powder_coal), DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.COAL));
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.powder_lignite), DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.LIGNITE));
makeRecipe(StampType.FLAT, new OreDictStack(COAL.dust()), DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.COAL));
makeRecipe(StampType.FLAT, new OreDictStack(LIGNITE.dust()), DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.LIGNITE));
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.powder_sawdust), DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.WOOD));
makeRecipe(StampType.PLATE, new OreDictStack(IRON.ingot()), ModItems.plate_iron);

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

View File

@ -0,0 +1,5 @@
{
"animation": {
"frametime": 10
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB