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
|
2015-01-26 22:26:21 -08:00
|
|
|
*
|
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;
|
2015-06-27 21:16:48 -07:00
|
|
|
import forestry.core.gui.ContainerTile;
|
2014-05-02 21:31:20 +02:00
|
|
|
import forestry.mail.gadgets.MachineTrader;
|
|
|
|
|
|
2015-06-27 21:16:48 -07:00
|
|
|
public class ContainerTradeName extends ContainerTile<MachineTrader> {
|
2014-05-02 21:31:20 +02:00
|
|
|
|
2015-06-27 21:16:48 -07: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() {
|
2015-06-27 21:16:48 -07:00
|
|
|
return tile.getAddress();
|
2014-05-02 21:31:20 +02:00
|
|
|
}
|
|
|
|
|
|
2014-12-28 16:59:28 -08:00
|
|
|
@Override
|
2015-06-27 21:16:48 -07:00
|
|
|
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
|
|
|
}
|