add item descriptions
This commit is contained in:
parent
1c33159e64
commit
e115ca1707
5 changed files with 15 additions and 11 deletions
|
@ -1,6 +1,7 @@
|
|||
package client.gui.container;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -126,8 +127,11 @@ public abstract class GuiContainer extends Gui
|
|||
s = Color.YELLOW + "" + stack.getSize() + " " + Color.RESET + s;
|
||||
s = s + Color.RESET;
|
||||
list.add(s);
|
||||
if(stack.getItem().getDescription() != null)
|
||||
list.add(stack.getItem().getDescription());
|
||||
if(stack.getItem().getDescription() != null) {
|
||||
for(String line : stack.getItem().getDescription()) {
|
||||
list.add(Color.GRAY + line);
|
||||
}
|
||||
}
|
||||
stack.getItem().addInformation(stack, this.gm.player, list);
|
||||
if(stack.getItem().isAdminItem())
|
||||
list.add(Color.RED + "Admin-Gegenstand");
|
||||
|
|
|
@ -192,7 +192,7 @@ public class Block {
|
|||
protected double maxZ;
|
||||
private State defaultState;
|
||||
private String display;
|
||||
private String description;
|
||||
private String[] description;
|
||||
private CheatTab tab;
|
||||
private SoundType sound;
|
||||
private Equipment miningTool;
|
||||
|
@ -420,7 +420,7 @@ public class Block {
|
|||
return this;
|
||||
}
|
||||
|
||||
public final Block setDisplay(String name, String desc) {
|
||||
public final Block setDisplay(String name, String ... desc) {
|
||||
this.display = name;
|
||||
this.description = desc;
|
||||
return this;
|
||||
|
@ -617,7 +617,7 @@ public class Block {
|
|||
return this.display;
|
||||
}
|
||||
|
||||
public final String getDescription() {
|
||||
public final String[] getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
|
|
|
@ -159,8 +159,8 @@ public abstract class ItemRegistry {
|
|||
"_bucket", new ItemBucket(liquid.second(), true));
|
||||
}
|
||||
|
||||
register("boat", (new ItemBoat()).setDisplay("Boot").setFuelAmount(800));
|
||||
register("minecart", (new ItemMinecart()).setDisplay("Lore"));
|
||||
register("boat", (new ItemBoat()).setDisplay("Boot", "Keine Lust mehr auf Schwimmen oder Tauchen?", "Ist dir Wasser einfach zu Nass und Säure zu scharf?", "Damit ist jetzt Schluss, mit diesem hochwertigen Kahn!").setFuelAmount(800));
|
||||
register("minecart", (new ItemMinecart()).setDisplay("Lore", "Füße zu träge? Keine Kraft mehr in den Beinen?", "Diese Lore wird dich garantiert mühelos an dein Ziel bringen!", "Hinweis: Keine Haftung bei Schäden oder spontanem Tod durch", "ungünstig platzierte Schienen oder darüber laufende Kreaturen"));
|
||||
for(EntityInfo egg : EntityRegistry.DNA.values()) {
|
||||
register("dna_sample_" + egg.id().toLowerCase(), (new ItemMobTemplate(egg.id()))
|
||||
.setMaxAmount(StackSize.L));
|
||||
|
|
|
@ -32,7 +32,7 @@ public class Item {
|
|||
private int maxDamage = 0;
|
||||
private Item containerItem;
|
||||
private String display;
|
||||
private String description;
|
||||
private String[] description;
|
||||
private CheatTab tab;
|
||||
private Color color = null;
|
||||
private int defColor = 0xffffffff;
|
||||
|
@ -85,7 +85,7 @@ public class Item {
|
|||
return this;
|
||||
}
|
||||
|
||||
public final Item setDisplay(String name, String desc) {
|
||||
public final Item setDisplay(String name, String ... desc) {
|
||||
this.display = name;
|
||||
this.description = desc;
|
||||
return this;
|
||||
|
@ -160,7 +160,7 @@ public class Item {
|
|||
return this.display;
|
||||
}
|
||||
|
||||
public final String getDescription() {
|
||||
public final String[] getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ public class ItemBucket extends Item
|
|||
{
|
||||
if(liquid != null) {
|
||||
this.setUnstackable();
|
||||
this.setDisplay((recursive ? "Flutender" : "") + "Eimer mit " + liquid.getDisplay());
|
||||
this.setDisplay((recursive ? "Flutender" : "") + "Eimer mit " + liquid.getDisplay(), liquid.getDescription());
|
||||
}
|
||||
else {
|
||||
this.setDisplay((recursive ? "Unendlicher" : "") + "Eimer");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue