Files
ForestryMC/src/main/java/forestry/mail/gui/ContainerTradeName.java
T

42 lines
1.3 KiB
Java
Raw Normal View History

2014-05-02 21:31:20 +02:00
/*******************************************************************************
2014-08-07 08:29:25 +02:00
* Copyright (c) 2011-2014 SirSengir.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v3
* which accompanies this distribution, and is available at
2014-08-07 02:56:58 -07:00
* http://www.gnu.org/licenses/lgpl-3.0.txt
*
2014-08-07 08:29:25 +02:00
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
2014-05-02 21:31:20 +02:00
******************************************************************************/
package forestry.mail.gui;
2014-12-28 16:59:28 -08:00
import net.minecraft.entity.player.EntityPlayer;
2014-12-15 08:15:21 -08:00
import forestry.api.mail.IMailAddress;
import forestry.core.gui.ContainerTile;
2014-05-02 21:31:20 +02:00
import forestry.mail.gadgets.MachineTrader;
public class ContainerTradeName extends ContainerTile<MachineTrader> {
2014-05-02 21:31:20 +02:00
public ContainerTradeName(MachineTrader tile) {
super(tile);
2014-05-02 21:31:20 +02:00
}
2014-09-10 03:43:16 -07:00
public IMailAddress getAddress() {
return tile.getAddress();
2014-05-02 21:31:20 +02:00
}
2014-12-28 16:59:28 -08:00
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
if (tile.isLinked()) {
for (Object crafter : crafters) {
if (crafter instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) crafter;
tile.openGui(player, tile);
}
}
}
2014-12-28 16:59:28 -08:00
}
2014-05-02 21:31:20 +02:00
}