fix overlay
This commit is contained in:
parent
b5e5cb0444
commit
330ee75a27
10 changed files with 38 additions and 11 deletions
|
@ -1098,4 +1098,9 @@ public class Block {
|
|||
@Clientside
|
||||
public void getTooltips(ItemStack stack, EntityNPC player, List<String> tooltip) {
|
||||
}
|
||||
|
||||
@Clientside
|
||||
public String getInfo(World world, BlockPos pos, State state, EntityNPC player) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package common.block.tech;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import common.block.Block;
|
||||
|
@ -28,6 +29,7 @@ import common.tileentity.TileEntity;
|
|||
import common.tileentity.TileEntityChest;
|
||||
import common.util.BlockPos;
|
||||
import common.util.BoundingBox;
|
||||
import common.util.Clientside;
|
||||
import common.util.Facing;
|
||||
import common.util.Color;
|
||||
import common.vars.Vars;
|
||||
|
@ -250,6 +252,16 @@ public class BlockChest extends Block implements ITileEntityProvider, Rotatable
|
|||
return true;
|
||||
}
|
||||
|
||||
@Clientside
|
||||
public void getTooltips(ItemStack stack, EntityNPC player, List<String> tooltip) {
|
||||
tooltip.add(Color.DARK_GREEN + "Kapazität" + Color.DARK_GRAY + ": " + Color.GREEN + (this.width * this.height));
|
||||
}
|
||||
|
||||
@Clientside
|
||||
public String getInfo(World world, BlockPos pos, State state, EntityNPC player) {
|
||||
return Color.DARK_GREEN + "Kapazität für " + Color.GREEN + (this.width * this.height) + Color.DARK_GREEN + " Gegenstände";
|
||||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
return !state.getValue(OPEN) ?
|
||||
provider.getModel(name + "_top")
|
||||
|
|
|
@ -2572,4 +2572,8 @@ public abstract class Entity
|
|||
public InventoryBasic getEntityInventory() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getInfo(EntityNPC player) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1167,8 +1167,8 @@ public abstract class EntityNPC extends EntityLiving implements IInventory
|
|||
return super.formatStats() + (this.getManaPoints() == 0 ? "" : Color.GRAY + " [" + Color.MIDNIGHT + this.getManaPoints() + Color.GRAY + "]");
|
||||
}
|
||||
|
||||
public String formatStatsFull() {
|
||||
return super.formatStatsFull() + (this.getManaPoints() == 0 ? "" : Color.DARK_GRAY + " | " + Color.BLUE + this.getManaPoints() + Color.MIDNIGHT + " Mana");
|
||||
public String getInfo(EntityNPC player) {
|
||||
return super.getInfo(player) + (this.getManaPoints() == 0 ? "" : Color.DARK_GRAY + " | " + Color.BLUE + this.getManaPoints() + Color.MIDNIGHT + " Mana");
|
||||
}
|
||||
|
||||
public MerchantRecipeList getTrades(EntityNPC player) {
|
||||
|
|
|
@ -2235,7 +2235,7 @@ public abstract class EntityLiving extends Entity
|
|||
this.getHealth(), this.getMaxHealth());
|
||||
}
|
||||
|
||||
public String formatStatsFull() {
|
||||
public String getInfo(EntityNPC player) {
|
||||
return String.format(this.getAlignment().color + this.getAlignment().display + Color.DARK_GRAY + " | " + getHealthColor(this.getHealth(), this.getMaxHealth()) + "%d" +
|
||||
Color.GRAY + " / " + getMaxHpColor(this.getMaxHealth()) + "%d" + Color.RED + " HP",
|
||||
this.getHealth(), this.getMaxHealth());
|
||||
|
|
|
@ -258,7 +258,14 @@ public abstract class CraftingRegistry
|
|||
addShapeless(new ItemStack(Items.fireball, 3), Items.gunpowder, Items.blazing_powder, Items.coal);
|
||||
addShapeless(new ItemStack(Items.fireball, 3), Items.gunpowder, Items.blazing_powder, Items.charcoal);
|
||||
add(new ItemStack(Items.hopper), "I I", "ICI", " I ", 'I', Items.iron_ingot, 'C', Items.wood_chest);
|
||||
|
||||
|
||||
add(new ItemStack(Items.stone_chest), "III", "ICI", "III", 'I', Items.cobblestone, 'C', Items.wood_chest);
|
||||
add(new ItemStack(Items.iron_chest), "III", "ICI", "III", 'I', Items.iron_ingot, 'C', Items.stone_chest);
|
||||
add(new ItemStack(Items.platinum_chest), "III", "ICI", "III", 'I', Items.platinum_ingot, 'C', Items.iron_chest);
|
||||
add(new ItemStack(Items.silver_chest), "III", "ICI", "III", 'I', Items.silver_ingot, 'C', Items.platinum_chest);
|
||||
add(new ItemStack(Items.thetium_chest), "III", "ICI", "III", 'I', Items.thi_fragment, 'C', Items.silver_chest);
|
||||
add(new ItemStack(Items.black_metal_chest), "III", "ICI", "III", 'I', Items.black_metal_ingot, 'C', Items.thetium_chest);
|
||||
add(new ItemStack(Items.nichun_chest), "III", "ICI", "III", 'I', Items.nieh_fragment, 'C', Items.thetium_chest);
|
||||
|
||||
add(new ItemStack(Items.dynamite, 1), "X#X", "#X#", "X#X", 'X', Items.gunpowder, '#', Items.clay_lump);
|
||||
add(new ItemStack(Items.dynamite_1), "X#X", "#X#", "X#X", 'X', Items.gunpowder, '#', Items.dynamite);
|
||||
|
|
|
@ -86,7 +86,7 @@ public abstract class SpeciesRegistry {
|
|||
}
|
||||
|
||||
static void register() {
|
||||
registerSpecies("Cpu", EntityCpu.class, null, "Test-NSC", 0x202020, 0x8000ff, "Test:char", "Troll:trollface", "Hacker");
|
||||
registerSpecies("Cpu", EntityCpu.class, null, "Test-NSC", 0x202020, 0x8000ff, "Troll:trollface", "Hacker");
|
||||
registerSpecies("Cultivator", EntityCultivator.class, "nienrath", "Kultivator", 0x000000, 0xff0000, "Wei Wuxian", 0x000000, 0xff0000,
|
||||
"Lan Wangji", 0xffffff, 0x80e0ff, "Jiang Cheng", 0x200000, 0xaf00ff, "Shen Qingqiu", 0xffffff, 0x80ff80,
|
||||
"Luo Binghe", 0x600000, 0x000000);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue