mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 12:32:23 +00:00
Carrot is not fruit (#27)
* Carrot is not fruit * updateBuildScript & spotlessApply
This commit is contained in:
1 parent
6973dbc80d
commit
c5c3aee2fb
1345 files changed
+92079
-90006
No files matched your search
@@ -10,9 +10,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.apiculture.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import forestry.apiculture.inventory.ItemInventoryImprinter;
|
||||
import forestry.apiculture.network.packets.PacketImprintSelectionResponse;
|
||||
import forestry.core.gui.ContainerItemInventory;
|
||||
@@ -21,40 +18,43 @@ import forestry.core.gui.slots.SlotFiltered;
|
||||
import forestry.core.gui.slots.SlotOutput;
|
||||
import forestry.core.network.packets.PacketGuiSelectRequest;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
public class ContainerImprinter extends ContainerItemInventory<ItemInventoryImprinter> implements IGuiSelectable {
|
||||
|
||||
public ContainerImprinter(InventoryPlayer inventoryplayer, ItemInventoryImprinter inventory) {
|
||||
super(inventory, inventoryplayer, 8, 103);
|
||||
public ContainerImprinter(InventoryPlayer inventoryplayer, ItemInventoryImprinter inventory) {
|
||||
super(inventory, inventoryplayer, 8, 103);
|
||||
|
||||
// Input
|
||||
this.addSlotToContainer(new SlotFiltered(inventory, 0, 152, 12));
|
||||
// Output
|
||||
this.addSlotToContainer(new SlotOutput(inventory, 1, 152, 72));
|
||||
}
|
||||
// Input
|
||||
this.addSlotToContainer(new SlotFiltered(inventory, 0, 152, 12));
|
||||
// Output
|
||||
this.addSlotToContainer(new SlotOutput(inventory, 1, 152, 72));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSelectionRequest(EntityPlayerMP player, PacketGuiSelectRequest packetRequest) {
|
||||
if (packetRequest.getPrimaryIndex() == 0) {
|
||||
if (packetRequest.getSecondaryIndex() == 0) {
|
||||
inventory.advancePrimary();
|
||||
} else {
|
||||
inventory.regressPrimary();
|
||||
}
|
||||
} else {
|
||||
if (packetRequest.getSecondaryIndex() == 0) {
|
||||
inventory.advanceSecondary();
|
||||
} else {
|
||||
inventory.regressSecondary();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void handleSelectionRequest(EntityPlayerMP player, PacketGuiSelectRequest packetRequest) {
|
||||
if (packetRequest.getPrimaryIndex() == 0) {
|
||||
if (packetRequest.getSecondaryIndex() == 0) {
|
||||
inventory.advancePrimary();
|
||||
} else {
|
||||
inventory.regressPrimary();
|
||||
}
|
||||
} else {
|
||||
if (packetRequest.getSecondaryIndex() == 0) {
|
||||
inventory.advanceSecondary();
|
||||
} else {
|
||||
inventory.regressSecondary();
|
||||
}
|
||||
}
|
||||
|
||||
PacketImprintSelectionResponse packetResponse = new PacketImprintSelectionResponse(inventory.getPrimaryIndex(), inventory.getSecondaryIndex());
|
||||
Proxies.net.sendToPlayer(packetResponse, player);
|
||||
}
|
||||
PacketImprintSelectionResponse packetResponse =
|
||||
new PacketImprintSelectionResponse(inventory.getPrimaryIndex(), inventory.getSecondaryIndex());
|
||||
Proxies.net.sendToPlayer(packetResponse, player);
|
||||
}
|
||||
|
||||
public void setSelection(PacketImprintSelectionResponse packetPayload) {
|
||||
inventory.setPrimaryIndex(packetPayload.getPrimaryIndex());
|
||||
inventory.setSecondaryIndex(packetPayload.getSecondaryIndex());
|
||||
}
|
||||
public void setSelection(PacketImprintSelectionResponse packetPayload) {
|
||||
inventory.setPrimaryIndex(packetPayload.getPrimaryIndex());
|
||||
inventory.setSecondaryIndex(packetPayload.getSecondaryIndex());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user