Add an entity blacklist for the Teleposer (#701)
Added event for when an entity is teleposed. Includes a Post version as well to allow modification of the entity after the fact.
This commit is contained in:
parent
cfce1a4a6c
commit
9253d6a410
4 changed files with 76 additions and 9 deletions
|
@ -482,6 +482,17 @@ public class EventHandler
|
|||
event.setCanceled(true);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onTeleposeEntity(TeleposeEvent.Ent event) {
|
||||
if (ConfigHandler.teleposerBlacklistEntity.contains(event.entity.getClass().getSimpleName()))
|
||||
event.setCanceled(true);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onTeleposeEntityPost(TeleposeEvent.Ent.Post event) {
|
||||
event.entity.timeUntilPortal = 5;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onConfigChanged(ConfigChangedEvent event)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue