diff --git a/src/main/java/com/enderio/core/common/util/ItemUtil.java b/src/main/java/com/enderio/core/common/util/ItemUtil.java index e1a3405..2babd01 100644 --- a/src/main/java/com/enderio/core/common/util/ItemUtil.java +++ b/src/main/java/com/enderio/core/common/util/ItemUtil.java @@ -304,9 +304,9 @@ public class ItemUtil { return 0; } if (into instanceof ISidedInventory) { - return ItemUtil.doInsertItemInv((ISidedInventory) into, item, side); + return ItemUtil.doInsertItemInv((ISidedInventory) into, item, side, true); } else if (into instanceof IInventory) { - return ItemUtil.doInsertItemInv(getInventory((IInventory) into), item, side); + return ItemUtil.doInsertItemInv(getInventory((IInventory) into), item, side, true); } else if (into instanceof IItemDuct) { return ItemUtil.doInsertItem((IItemDuct) into, item, side); } @@ -330,13 +330,17 @@ public class ItemUtil { } public static int doInsertItem(IInventory inv, int startSlot, int endSlot, ItemStack item) { - return doInsertItemInv(inv, null, invSlotter.getInstance(startSlot, endSlot), item, ForgeDirection.UNKNOWN); + return doInsertItemInv(inv, null, invSlotter.getInstance(startSlot, endSlot), item, ForgeDirection.UNKNOWN, true); + } + + public static int doInsertItem(IInventory inv, int startSlot, int endSlot, ItemStack item, boolean doInsert) { + return doInsertItemInv(inv, null, invSlotter.getInstance(startSlot, endSlot), item, ForgeDirection.UNKNOWN, doInsert); } /* * Insert items into an IInventory or an ISidedInventory. */ - private static int doInsertItemInv(IInventory inv, ItemStack item, ForgeDirection inventorySide) { + private static int doInsertItemInv(IInventory inv, ItemStack item, ForgeDirection inventorySide, boolean doInsert) { final ISidedInventory sidedInv = inv instanceof ISidedInventory ? (ISidedInventory) inv : null; ISlotIterator slots; @@ -350,10 +354,10 @@ public class ItemUtil { slots = invSlotter.getInstance(0, inv.getSizeInventory()); } - return doInsertItemInv(inv, sidedInv, slots, item, inventorySide); + return doInsertItemInv(inv, sidedInv, slots, item, inventorySide, doInsert); } - private static int doInsertItemInv(IInventory inv, ISidedInventory sidedInv, ISlotIterator slots, ItemStack item, ForgeDirection inventorySide) { + private static int doInsertItemInv(IInventory inv, ISidedInventory sidedInv, ISlotIterator slots, ItemStack item, ForgeDirection inventorySide, boolean doInsert) { int numInserted = 0; int numToInsert = item.stackSize; int firstFreeSlot = -1; @@ -375,7 +379,9 @@ public class ItemUtil { if (sidedInv != null || inv.isItemValidForSlot(slot, toInsert)) { numInserted += noToInsert; numToInsert -= noToInsert; - inv.setInventorySlotContents(slot, toInsert); + if (doInsert) { + inv.setInventorySlotContents(slot, toInsert); + } } } } @@ -392,11 +398,13 @@ public class ItemUtil { if (sidedInv != null || inv.isItemValidForSlot(firstFreeSlot, toInsert)) { numInserted += toInsert.stackSize; numToInsert -= toInsert.stackSize; - inv.setInventorySlotContents(firstFreeSlot, toInsert); + if (doInsert) { + inv.setInventorySlotContents(firstFreeSlot, toInsert); + } } } - if (numInserted > 0) { + if (numInserted > 0 && doInsert) { inv.markDirty(); } return numInserted; diff --git a/src/main/resources/assets/endercore/lang/cs_CZ.lang b/src/main/resources/assets/endercore/lang/cs_CZ.lang index 783cdde..62263b7 100644 --- a/src/main/resources/assets/endercore/lang/cs_CZ.lang +++ b/src/main/resources/assets/endercore/lang/cs_CZ.lang @@ -1,2 +1,2 @@ -enderio.item.tooltip.showDetails= -enderio.item.darkSteel.tooltip.durability=Výdrž: +endercore.tooltip.showDetails= +endercore.tooltip.durability=Výdrž: diff --git a/src/main/resources/assets/endercore/lang/en_US.lang b/src/main/resources/assets/endercore/lang/en_US.lang index c83fcfc..3bf76f3 100644 --- a/src/main/resources/assets/endercore/lang/en_US.lang +++ b/src/main/resources/assets/endercore/lang/en_US.lang @@ -7,10 +7,10 @@ endercore.command.config.result.fail=Reloading configs for %s failed endercore.command.config.result.invalid=Modid %s is not valid enchantment.xpboost=XP Boost -enchantment.xpboost.tooltip=Extra XP from mob kills +endercore.enchantment.xpboost.tooltip=Extra XP from mob kills enchantment.autosmelt=Auto-Smelt -enchantment.autosmelt.tooltip=Automatically smelts whatever is mined +endercore.enchantment.autosmelt.tooltip=Automatically smelts whatever is mined endercore.celebrate=Happy New Year! diff --git a/src/main/resources/assets/endercore/lang/fr_FR.lang b/src/main/resources/assets/endercore/lang/fr_FR.lang index c8dd999..bd8dddb 100644 --- a/src/main/resources/assets/endercore/lang/fr_FR.lang +++ b/src/main/resources/assets/endercore/lang/fr_FR.lang @@ -1,2 +1,2 @@ -enderio.item.tooltip.showDetails= -enderio.item.darkSteel.tooltip.durability=Durabilité : +endercore.tooltip.showDetails= +endercore.tooltip.durability=Durabilité : \ No newline at end of file diff --git a/src/main/resources/assets/endercore/lang/pt_BR.lang b/src/main/resources/assets/endercore/lang/pt_BR.lang index c4dbb73..2b96e23 100644 --- a/src/main/resources/assets/endercore/lang/pt_BR.lang +++ b/src/main/resources/assets/endercore/lang/pt_BR.lang @@ -1,2 +1,2 @@ -enderio.item.tooltip.showDetails= -enderio.item.darkSteel.tooltip.durability=Durabilidade: +endercore.tooltip.showDetails= +endercore.tooltip.durability=Durabilidade: \ No newline at end of file diff --git a/src/main/resources/assets/endercore/lang/pt_PT.lang b/src/main/resources/assets/endercore/lang/pt_PT.lang index c4dbb73..2b96e23 100644 --- a/src/main/resources/assets/endercore/lang/pt_PT.lang +++ b/src/main/resources/assets/endercore/lang/pt_PT.lang @@ -1,2 +1,2 @@ -enderio.item.tooltip.showDetails= -enderio.item.darkSteel.tooltip.durability=Durabilidade: +endercore.tooltip.showDetails= +endercore.tooltip.durability=Durabilidade: \ No newline at end of file diff --git a/src/main/resources/assets/endercore/lang/ru_RU.lang b/src/main/resources/assets/endercore/lang/ru_RU.lang index 0c2fa14..19c5312 100644 --- a/src/main/resources/assets/endercore/lang/ru_RU.lang +++ b/src/main/resources/assets/endercore/lang/ru_RU.lang @@ -7,10 +7,10 @@ endercore.command.config.result.fail=Перезапуск конфигураци endercore.command.config.result.invalid=Modid %s недействителен enchantment.xpboost=Увеличение опыта -enchantment.xpboost.tooltip=Дополнительный опыт за убитых мобов +endercore.enchantment.xpboost.tooltip=Дополнительный опыт за убитых мобов enchantment.autosmelt=Авто-плавка -enchantment.autosmelt.tooltip=Автоматическая плавка всего, что добывается +endercore.enchantment.autosmelt.tooltip=Автоматическая плавка всего, что добывается endercore.celebrate=С Новым Годом! @@ -19,5 +19,9 @@ endercore.resourcepack.readme2=Не редактируйте его, он буд endercore.gui.normal=Обычный endercore.gui.search=Поиск: -endercore.gui.modlistinfo1=О Боже всё иное! +endercore.gui.modlistinfo1=О Боже что случилось! endercore.gui.modlistinfo2=Новый дизайн добавлен: + +endercore.error.ttcore.1=EnderCore не может работать вместе с ttCore. +endercore.error.ttcore.2=Все функции ttCore имеются в EnderCore. +endercore.error.ttcore.3=Пожалуйста удалите ttCore и попробуйте запустить игру снова. \ No newline at end of file diff --git a/src/main/resources/assets/endercore/lang/zh_CN.lang b/src/main/resources/assets/endercore/lang/zh_CN.lang index 01b5d1d..bf1ae9e 100644 --- a/src/main/resources/assets/endercore/lang/zh_CN.lang +++ b/src/main/resources/assets/endercore/lang/zh_CN.lang @@ -1,2 +1,2 @@ -enderio.item.tooltip.showDetails=<按住Shift> -enderio.item.darkSteel.tooltip.durability=耐久: +endercore.tooltip.showDetails=<按住Shift> +endercore.tooltip.durability=耐久: \ No newline at end of file diff --git a/src/main/resources/assets/endercore/lang/zh_TW.lang b/src/main/resources/assets/endercore/lang/zh_TW.lang index c5e74f6..dc44627 100644 --- a/src/main/resources/assets/endercore/lang/zh_TW.lang +++ b/src/main/resources/assets/endercore/lang/zh_TW.lang @@ -1,2 +1,2 @@ -enderio.item.tooltip.showDetails=<按住Shift> -enderio.item.darkSteel.tooltip.durability=耐久度: +endercore.tooltip.showDetails=<按住Shift> +endercore.tooltip.durability=耐久度: \ No newline at end of file diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta new file mode 100644 index 0000000..df5dc1c --- /dev/null +++ b/src/main/resources/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 1, + "description": "Resources used for Ender Core" + } +} \ No newline at end of file