removed useless override to slotClick

This commit is contained in:
SpaceToad 2014-05-07 19:58:21 +02:00
parent 5781a9c01f
commit f63a16bd95
2 changed files with 7 additions and 18 deletions

View file

@ -12,7 +12,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import buildcraft.builders.TileBlueprintLibrary;
import buildcraft.core.gui.BuildCraftContainer;
@ -49,23 +48,6 @@ public class ContainerBlueprintLibrary extends BuildCraftContainer {
}
}
@Override
public ItemStack slotClick(int slotNum, int mouseButton, int modifier, EntityPlayer player) {
// When downloading or uploading a blueprint, the server needs to know
// who requested it. The way to do it so far is by recording the last
// player that clicks on the slots. To be improved if the method is
// not robust enough (e.g. what if the player is not logged anymore?
// is that robust against race conditions? etc.)
if (slotNum == 0) {
library.uploadingPlayer = player;
} else if (slotNum == 2) {
library.downloadingPlayer = player;
}
return super.slotClick(slotNum, mouseButton, modifier, player);
}
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();

View file

@ -25,7 +25,14 @@ public class SlotBlueprintLibrary extends SlotBase {
this.player = player;
}
@Override
public void onSlotChanged() {
// When downloading or uploading a blueprint, the server needs to know
// who requested it. The way to do it so far is by recording the last
// player that clicks on the slots. To be improved if the method is
// not robust enough (e.g. what if the player is not logged anymore?
// is that robust against race conditions? etc.)
if (slot == 0) {
library.uploadingPlayer = player;
} else if (slot == 2) {