Compare commits

..
19 Commits
Author SHA1 Message Date
Martin Robertz 114ccf1ffb Merge remote-tracking branch 'RediskusGaming/feature/actionableBackpack' into dev 2026-05-24 12:24:25 +02:00
Eduard Rakhmankulov 0e5c9f320e review fixes 2026-05-24 08:06:26 +03:00
Martin Robertz 43f10b5e84 Merge remote-tracking branch 'RediskusGaming/feature/actionableBackpack' into dev 2026-05-09 14:46:47 +02:00
Martin Robertz 673cf548cc Merge branch 'master' into feature/actionableBackpack 2026-05-09 14:26:38 +02:00
Dream Master acd079b9ac Merge remote-tracking branch 'RediskusGaming/feature/actionableBackpack' into dev 2026-05-07 15:41:51 +02:00
Eduard Rakhmankulov 3a8c2bd8cf spotless rules applied 2026-05-06 01:22:54 +03:00
Martin Robertz 00a55f6888 Update dependencies.gradle 2026-05-05 19:53:20 +02:00
Martin Robertz f2895a469d Merge remote-tracking branch 'origin/feat/oredict-pollen-fertile' into dev 2026-05-05 19:09:51 +02:00
Eldrinn-Elantey 181c71d245 Add OreDict entry "itemPollenFertile" for tree pollen 2026-05-05 21:03:26 +04:00
Ed Rakhmankulov 58c6b7bdf3 Merge branch 'master' into feature/actionableBackpack 2026-05-05 17:43:22 +03:00
Ed Rakhmankulov 7bba5bea50 Update NoHotbarNeeded version to 0.0.3 2026-05-05 00:25:00 +03:00
Martin Robertz c8bfb67045 fix 2026-05-02 12:27:29 +02:00
Martin Robertz 798cdef6af fix 2026-05-02 12:19:28 +02:00
Martin Robertz f5ed7a61b2 sa+deps 2026-05-02 12:16:30 +02:00
Martin Robertz f0aece4dc8 change dep 2026-05-02 12:15:24 +02:00
Martin Robertz c6f4044193 fix dep 2026-05-02 12:02:30 +02:00
Martin Robertz d8f43c0544 Merge remote-tracking branch 'RediskusGaming/feature/actionableBackpack' into dev 2026-05-02 12:01:37 +02:00
Eduard Rakhmankulov eb0cda2d71 added dependency to NoHotbarNeeded 2025-12-25 05:34:45 +03:00
Eduard Rakhmankulov 604209fd91 added ability to open backpacks enabled by NoHotbarNeeded 2025-12-25 01:37:13 +03:00
4 changed files with 18 additions and 23 deletions

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ dependencies {
compileOnlyApi('com.github.GTNewHorizons:Angelica:2.1.19:api')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.93-GTNH:dev')
compileOnly('com.github.GTNewHorizons:inventory-tweaks:1.7.1:api')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.57:api')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.59:api')
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
compileOnly('curse.maven:craftguide-75557:2459320')
devOnlyNonPublishable('net.xonich.mc:NoHotbarNeeded:0.0.3:dev')
+4 -4
View File
@@ -1,12 +1,12 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c2dd35c9d0aaf0ba6ad0791320f99dfc/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/e5810bd7fd1f8a586644409d395a7e55/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/7b3c4877c0749019e6805bb61e421497/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/8e1d9ee5d0f13e442218f6884a306da1/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d76df094a9cbbabd3b08251f9e61444a/redirect
toolchainVersion=25
@@ -25,19 +25,6 @@ public interface IArmorApiarist {
*/
boolean protectEntity(EntityLivingBase entity, ItemStack armor, String cause, boolean doProtect);
/**
* Called to determine how many pieces an armor "counts for". For instance, if this returns 4, the single piece will
* act as full protection.
*
* @param entity Entity being attacked
* @param armor Armor item
* @param cause Optional cause of attack, such as a bee effect identifier
* @return Amount of effective protected slots
*/
default int getProtectionCount(EntityLivingBase entity, ItemStack armor, String cause) {
return 1;
}
/**
* Called when the apiarist's armor acts as protection against an attack.
*
@@ -10,6 +10,7 @@ package forestry.apiculture;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import forestry.api.apiculture.IArmorApiarist;
@@ -19,14 +20,21 @@ public class ArmorApiaristHelper implements IArmorApiaristHelper {
@Override
public boolean isArmorApiarist(ItemStack stack, EntityLivingBase entity, String cause, boolean doProtect) {
if (stack == null) {
return false;
}
if (stack == null || !(stack.getItem() instanceof IArmorApiarist armor)) return false;
Item item = stack.getItem();
if (!(item instanceof IArmorApiarist)) {
return false;
}
IArmorApiarist armorApiarist = (IArmorApiarist) item;
try {
return armor.protectEntity(entity, stack, cause, doProtect);
return armorApiarist.protectEntity(entity, stack, cause, doProtect);
} catch (Throwable ignored) { // protectEntity is new to the API and may not be implemented by the armor
if (entity instanceof EntityPlayer) {
return armor.protectPlayer((EntityPlayer) entity, stack, cause, doProtect);
return armorApiarist.protectPlayer((EntityPlayer) entity, stack, cause, doProtect);
} else {
return true; // fallback on assuming IArmorApiarist will protect the entity
}
@@ -40,11 +48,11 @@ public class ArmorApiaristHelper implements IArmorApiaristHelper {
for (int i = 1; i <= 4; i++) {
ItemStack armorItem = entity.getEquipmentInSlot(i);
if (isArmorApiarist(armorItem, entity, cause, doProtect)) {
count += ((IArmorApiarist) armorItem.getItem()).getProtectionCount(entity, armorItem, cause);
count++;
}
}
return Math.min(count, 4);
return count;
}
@Override