mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-25 06:17:59 +01:00
25 lines
614 B
Java
25 lines
614 B
Java
package com.minelittlepony.unicopia.entity;
|
|
|
|
import net.minecraft.entity.Entity;
|
|
import net.minecraft.entity.EntityType;
|
|
import net.minecraft.world.World;
|
|
|
|
public abstract class LightEmittingEntity extends Entity implements DynamicLightSource {
|
|
private final LightEmitter<?> emitter = new LightEmitter<>(this);
|
|
|
|
public LightEmittingEntity(EntityType<?> type, World world) {
|
|
super(type, world);
|
|
}
|
|
|
|
@Override
|
|
public void tick() {
|
|
super.tick();
|
|
emitter.tick();
|
|
}
|
|
|
|
@Override
|
|
public void onRemoved() {
|
|
super.onRemoved();
|
|
emitter.remove();
|
|
}
|
|
}
|