mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Goggles.
This commit is contained in:
parent
8dd0e1a951
commit
a03036e9db
3 changed files with 4 additions and 3 deletions
|
@ -16,6 +16,7 @@ import de.ellpeck.actuallyadditions.mod.material.ArmorMaterials;
|
||||||
import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy;
|
import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||||
import io.netty.util.internal.ConcurrentSet;
|
import io.netty.util.internal.ConcurrentSet;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.inventory.EquipmentSlotType;
|
import net.minecraft.inventory.EquipmentSlotType;
|
||||||
|
@ -40,7 +41,7 @@ public class ItemEngineerGoggles extends ItemArmorAA implements IGoggles {
|
||||||
super(ArmorMaterials.GOGGLES, EquipmentSlotType.HEAD, ActuallyItems.defaultProps().setNoRepair().durability(0));
|
super(ArmorMaterials.GOGGLES, EquipmentSlotType.HEAD, ActuallyItems.defaultProps().setNoRepair().durability(0));
|
||||||
this.displayMobs = displayMobs;
|
this.displayMobs = displayMobs;
|
||||||
|
|
||||||
//MinecraftForge.EVENT_BUS.register(this);
|
MinecraftForge.EVENT_BUS.register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isWearing(PlayerEntity player) {
|
public static boolean isWearing(PlayerEntity player) {
|
||||||
|
@ -51,7 +52,7 @@ public class ItemEngineerGoggles extends ItemArmorAA implements IGoggles {
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onClientTick(TickEvent.ClientTickEvent event) {
|
public void onClientTick(TickEvent.ClientTickEvent event) {
|
||||||
/* PlayerEntity player = ClientProxy.getCurrentPlayer();
|
PlayerEntity player = Minecraft.getInstance().player;
|
||||||
if (player != null && isWearing(player)) {
|
if (player != null && isWearing(player)) {
|
||||||
ItemStack face = player.inventory.armor.get(3);
|
ItemStack face = player.inventory.armor.get(3);
|
||||||
if (((IGoggles) face.getItem()).displaySpectralMobs()) {
|
if (((IGoggles) face.getItem()).displaySpectralMobs()) {
|
||||||
|
@ -85,7 +86,7 @@ public class ItemEngineerGoggles extends ItemArmorAA implements IGoggles {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.cachedGlowingEntities.clear();
|
this.cachedGlowingEntities.clear();
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Loading…
Reference in a new issue