start 1.10.2

This commit is contained in:
marcin212 committed 2016-10-20 04:32:47 +02:00
1 parent f969f63b66
commit 6a7c4bf67d
826 files changed
+60550 -63758

No files matched your search

@@ -1,50 +1,46 @@
//
// Decompiled by Procyon v0.5.30
//
package binnie.craftgui.minecraft;
import net.minecraft.entity.player.EntityPlayer;
import binnie.core.machines.Machine;
import binnie.core.machines.inventory.IInventorySlots;
import binnie.core.machines.inventory.InventorySlot;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ClickType;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class CustomSlot extends Slot
{
@Override
public boolean isItemValid(final ItemStack par1ItemStack) {
return this.inventory.isItemValidForSlot(this.getSlotIndex(), par1ItemStack);
}
public class CustomSlot extends Slot {
@Override
public boolean isItemValid(final ItemStack par1ItemStack) {
return this.inventory.isItemValidForSlot(this.getSlotIndex(), par1ItemStack);
}
public CustomSlot(final IInventory inventory, final int index) {
super(inventory, index, 0, 0);
}
public CustomSlot(final IInventory inventory, final int index) {
super(inventory, index, 0, 0);
}
public InventorySlot getInventorySlot() {
final IInventorySlots slots = Machine.getInterface(IInventorySlots.class, this.inventory);
if (slots != null) {
return slots.getSlot(this.getSlotIndex());
}
return null;
}
public InventorySlot getInventorySlot() {
final IInventorySlots slots = Machine.getInterface(IInventorySlots.class, this.inventory);
if (slots != null) {
return slots.getSlot(this.getSlotIndex());
}
return null;
}
public boolean handleClick() {
final InventorySlot slot = this.getInventorySlot();
return slot != null && slot.isRecipe();
}
public boolean handleClick() {
final InventorySlot slot = this.getInventorySlot();
return slot != null && slot.isRecipe();
}
public void onSlotClick(final ContainerCraftGUI container, final int mouseButton, final int modifier, final EntityPlayer player) {
ItemStack stack = player.inventory.getItemStack();
if (stack == null || mouseButton == 2) {
this.putStack((ItemStack) null);
}
else {
stack = stack.copy();
stack.stackSize = 1;
this.putStack(stack);
}
}
public void onSlotClick(final ContainerCraftGUI container, final int dragType, final ClickType modifier, final EntityPlayer player) {
ItemStack stack = player.inventory.getItemStack();
//TODO modifier==mouseButton2?
if (stack == null || modifier == ClickType.PICKUP_ALL) {
this.putStack((ItemStack) null);
} else {
stack = stack.copy();
stack.stackSize = 1;
this.putStack(stack);
}
}
}