mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-25 14:05:39 -04:00
Merge branch 'master' of github.com:MightyPirates/OpenComputers into MC1.7
This commit is contained in:
commit
5a36e1eea9
@ -228,7 +228,7 @@ end
|
||||
function filesystem.path(path)
|
||||
local parts = segments(path)
|
||||
local result = table.concat(parts, "/", 1, #parts - 1) .. "/"
|
||||
if unicode.sub(path, 1, 1) == "/" then
|
||||
if unicode.sub(path, 1, 1) == "/" and unicode.sub(result, 1, 1) ~= "/" then
|
||||
return "/" .. result
|
||||
else
|
||||
return result
|
||||
|
@ -52,7 +52,7 @@ abstract class Player(val playerInventory: InventoryPlayer, val otherInventory:
|
||||
if (intoPlayerInventory) (inventorySlots.size - 1, 0)
|
||||
else (0, inventorySlots.size - 1)
|
||||
|
||||
if (fromStack.isStackable) for (i <- begin to end by step if i >= 0 && i < inventorySlots.size && from.getHasStack && from.getStack.stackSize > 0) {
|
||||
if (fromStack.getMaxStackSize > 1) for (i <- begin to end by step if i >= 0 && i < inventorySlots.size && from.getHasStack && from.getStack.stackSize > 0) {
|
||||
val intoSlot = inventorySlots.get(i).asInstanceOf[Slot]
|
||||
if (intoSlot.inventory != from.inventory && intoSlot.getHasStack) {
|
||||
val intoStack = intoSlot.getStack
|
||||
|
@ -146,6 +146,11 @@ class Delegator extends Item {
|
||||
case _ => super.getMaxDamage(stack)
|
||||
}
|
||||
|
||||
override def isDamaged(stack: ItemStack) =
|
||||
subItem(stack) match {
|
||||
case Some(subItem) if subItem.isDamageable => subItem.damage(stack) > 0
|
||||
case _ => false
|
||||
}
|
||||
|
||||
override def onUpdate(stack: ItemStack, world: World, player: Entity, slot: Int, selected: Boolean) =
|
||||
subItem(stack) match {
|
||||
|
Loading…
x
Reference in New Issue
Block a user