Compare commits

..
3 Commits
Author SHA1 Message Date
bdew b34192d8c2 Updated copyright header 2014-01-13 20:40:45 +02:00
bdew 0212f20f69 Bump version for release 2014-01-13 19:56:54 +02:00
bdew 3b31e285d2 Added a slot trait that intercepts clicks 2013-12-31 12:35:34 +02:00
71 changed files with 97 additions and 70 deletions

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ buildscript {
apply plugin: 'forge'
apply plugin: 'scala'
version = "0.9.4"
version = "1.0.0"
if (project.hasProperty('buildnum')) {
project.version = project.version + '.' + project.buildnum
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+10 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -29,6 +29,15 @@ abstract class BaseContainer(te: IInventory) extends Container {
addSlotToContainer(new Slot(inv, i, xOffs + i * 18, yOffsHotbar))
}
override def slotClick(slotnum: Int, button: Int, modifiers: Int, player: EntityPlayer): ItemStack = {
if (inventorySlots.isDefinedAt(slotnum)) {
val slot = getSlot(slotnum)
if (slot != null && slot.isInstanceOf[SlotClickable])
return slot.asInstanceOf[SlotClickable].onClick(button, modifiers, player)
}
return super.slotClick(slotnum, button, modifiers, player)
}
override def transferStackInSlot(player: EntityPlayer, slot: Int): ItemStack = {
var stack = getSlot(slot).getStack
if (getSlot(slot).inventory == player.inventory) {
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+18
View File
@@ -0,0 +1,18 @@
/*
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* https://raw.github.com/bdew/bdlib/master/MMPL-1.0.txt
*/
package net.bdew.lib.gui
import net.minecraft.item.ItemStack
import net.minecraft.inventory.Slot
import net.minecraft.entity.player.EntityPlayer
trait SlotClickable extends Slot {
def onClick(button: Int, mods: Int, player: EntityPlayer): ItemStack
}
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public
@@ -1,5 +1,5 @@
/*
* Copyright (c) bdew, 2013
* Copyright (c) bdew, 2013 - 2014
* https://github.com/bdew/bdlib
*
* This mod is distributed under the terms of the Minecraft Mod Public