mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-08 06:26:43 +01:00
Mobs will not see you whilst you're disguised (unless you attack them)
This commit is contained in:
parent
7ee090bbff
commit
ea2febfe4f
1 changed files with 8 additions and 0 deletions
|
@ -10,6 +10,7 @@ import net.minecraftforge.event.entity.ProjectileImpactEvent;
|
|||
import net.minecraftforge.event.entity.item.ItemTossEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingEntityUseItemEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerDropsEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerFlyableFallEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerSleepInBedEvent;
|
||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||
|
@ -28,6 +29,13 @@ class Hooks {
|
|||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onPlayerVisibilityCheck(PlayerEvent.Visibility event) {
|
||||
if (PlayerSpeciesList.instance().getPlayer(event.getEntityPlayer()).isInvisible()) {
|
||||
event.modifyVisibility(0);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onPlayerTossItem(ItemTossEvent event) {
|
||||
Race race = PlayerSpeciesList.instance().getPlayer(event.getPlayer()).getPlayerSpecies();
|
||||
|
|
Loading…
Reference in a new issue