Remove a few no longer needed mixins (#1243)
This commit is contained in:
1 parent
763abe68c9
commit
212b6a792e
12 files changed
+10
-152
No files matched your search
@@ -1,10 +1,8 @@
|
||||
package carpet.script.value;
|
||||
|
||||
import carpet.fakes.BrainInterface;
|
||||
import carpet.fakes.EntityInterface;
|
||||
import carpet.fakes.ItemEntityInterface;
|
||||
import carpet.fakes.LivingEntityInterface;
|
||||
import carpet.fakes.MemoryInterface;
|
||||
import carpet.fakes.MobEntityInterface;
|
||||
import carpet.fakes.ServerPlayerEntityInterface;
|
||||
import carpet.fakes.ServerPlayerInteractionManagerInterface;
|
||||
@@ -633,11 +631,11 @@ public class EntityValue extends Value
|
||||
if (e instanceof LivingEntity livingEntity)
|
||||
{
|
||||
Brain<?> brain = livingEntity.getBrain();
|
||||
Map<MemoryModuleType<?>, Optional<? extends Memory<?>>> memories = ((BrainInterface)brain).getMobMemories();
|
||||
Map<MemoryModuleType<?>, Optional<? extends Memory<?>>> memories = brain.getMemories();
|
||||
Optional<? extends Memory<?>> optmemory = memories.get(moduleType);
|
||||
if (optmemory==null || !optmemory.isPresent()) return Value.NULL;
|
||||
Memory<?> memory = optmemory.get();
|
||||
return ValueConversions.fromTimedMemory(e, ((MemoryInterface)memory).getScarpetExpiry(), memory.getValue());
|
||||
return ValueConversions.fromTimedMemory(e, memory.getExpiry(), memory.getValue());
|
||||
}
|
||||
return Value.NULL;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user