From 4ce8c3764c9fbe685e3918845e1faa5c05d1c52a Mon Sep 17 00:00:00 2001 From: Up Date: Tue, 31 Dec 2024 22:33:55 +0100 Subject: [PATCH] add child classes to ticking lists --- .../cca/internal/block/CardinalBlockInternals.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cardinal-components-block/src/main/java/dev/onyxstudios/cca/internal/block/CardinalBlockInternals.java b/cardinal-components-block/src/main/java/dev/onyxstudios/cca/internal/block/CardinalBlockInternals.java index 7c8ff664..01cd5778 100644 --- a/cardinal-components-block/src/main/java/dev/onyxstudios/cca/internal/block/CardinalBlockInternals.java +++ b/cardinal-components-block/src/main/java/dev/onyxstudios/cca/internal/block/CardinalBlockInternals.java @@ -56,6 +56,10 @@ private static synchronized ComponentContainer.Factory getBeCompone @SuppressWarnings("unchecked") var superclass = (Class) entityClass.getSuperclass(); assert BlockEntity.class.isAssignableFrom(superclass) : "requiresStaticFactory returned false on BlockEntity?"; factory = /* recursive call */ getBeComponentFactory(superclass); + + // if parent class needs to tick, this one does, too! + if(StaticBlockComponentPlugin.INSTANCE.clientTicking.contains(superclass)) StaticBlockComponentPlugin.INSTANCE.clientTicking.add(entityClass); + if(StaticBlockComponentPlugin.INSTANCE.serverTicking.contains(superclass)) StaticBlockComponentPlugin.INSTANCE.serverTicking.add(entityClass); } entityContainerFactories.put(entityClass, factory); return factory;