mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 23:13:15 +00:00
Optimize Entity capabilities a bit by reordering conditions (#9886)
This commit is contained in:
1 parent
7f2b85d2ff
commit
73e02c6add
13 files changed
+33
-36
No files matched your search
@@ -532,7 +532,7 @@ public class ForgeEventFactory {
|
||||
@Nullable
|
||||
private static CapabilityDispatcher gatherCapabilities(AttachCapabilitiesEvent<?> event, @Nullable ICapabilityProvider parent) {
|
||||
post(event);
|
||||
return event.getCapabilities().size() > 0 || parent != null ? new CapabilityDispatcher(event.getCapabilities(), event.getListeners(), parent) : null;
|
||||
return !event.getCapabilities().isEmpty() || parent != null ? new CapabilityDispatcher(event.getCapabilities(), event.getListeners(), parent) : null;
|
||||
}
|
||||
|
||||
public static boolean fireSleepingLocationCheck(LivingEntity player, BlockPos sleepingLocation) {
|
||||
|
||||
Reference in new issue
Block a user