LocalBlockIntercommunication .java

net.minecraft.client.player.inventory.LocalBlockIntercommunication (class): members: guiID, displayName, createContainer, getGuiID, hasCustomName, getName.

net.minecraft.client.player.inventoryclass54 linesclient1.3 KB

Implements

API Surface (5)

Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
String getName()
boolean hasCustomName()
String getGuiID()
IChatComponent getDisplayName()

Fields & Constants (2)

guiID
displayName

Same Package (1)

Code Graph: Dependencies (5)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

LocalBlockIntercommunication.java54 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.player.inventory;
2
3
import net.minecraft.entity.player.EntityPlayer;
4
import net.minecraft.entity.player.InventoryPlayer;
5
import net.minecraft.inventory.Container;
6
import net.minecraft.util.IChatComponent;
7
import net.minecraft.world.IInteractionObject;
8
9
public class LocalBlockIntercommunication implements IInteractionObject
10
{
11
    private String guiID;
12
    private IChatComponent displayName;
13
14
    public LocalBlockIntercommunication(String guiIdIn, IChatComponent displayNameIn)
15
    {
16
        this.guiID = guiIdIn;
17
        this.displayName = displayNameIn;
18
    }
19
20
    public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
21
    {
22
        throw new UnsupportedOperationException();
23
    }
24
25
    /**
26
     * Get the name of this object. For players this returns their username
27
     */
28
    public String getName()
29
    {
30
        return this.displayName.getUnformattedText();
31
    }
32
33
    /**
34
     * Returns true if this thing is named
35
     */
36
    public boolean hasCustomName()
37
    {
38
        return true;
39
    }
40
41
    public String getGuiID()
42
    {
43
        return this.guiID;
44
    }
45
46
    /**
47
     * Get the formatted ChatComponent that will be used for the sender's username in chat
48
     */
49
    public IChatComponent getDisplayName()
50
    {
51
        return this.displayName;
52
    }
53
}
54

Deobfuscated MCP 1.8.9 source of LocalBlockIntercommunication from Marcelektro/MavenMCP-1.8.9 (net/minecraft/client/player/inventory/LocalBlockIntercommunication.java), stored verbatim.