mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 05:52:41 +01:00
Merge pull request #5606 from Robocraft999/patch-1
generalized getFogDensity and checking for armor in NetheriteDivingHandler
This commit is contained in:
commit
0d6d4b7ee5
2 changed files with 4 additions and 5 deletions
|
@ -1,7 +1,5 @@
|
|||
package com.simibubi.create.content.equipment.armor;
|
||||
|
||||
import com.simibubi.create.AllItems;
|
||||
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
|
@ -28,13 +26,13 @@ public final class NetheriteDivingHandler {
|
|||
ItemStack to = event.getTo();
|
||||
|
||||
if (slot == EquipmentSlot.HEAD) {
|
||||
if (AllItems.NETHERITE_DIVING_HELMET.isIn(to)) {
|
||||
if (to.getItem() instanceof DivingHelmetItem && isNetheriteArmor(to)) {
|
||||
setBit(entity, slot);
|
||||
} else {
|
||||
clearBit(entity, slot);
|
||||
}
|
||||
} else if (slot == EquipmentSlot.CHEST) {
|
||||
if (AllItems.NETHERITE_BACKTANK.isIn(to) && BacktankUtil.hasAirRemaining(to)) {
|
||||
if (to.getItem() instanceof BacktankItem && isNetheriteArmor(to) && BacktankUtil.hasAirRemaining(to)) {
|
||||
setBit(entity, slot);
|
||||
} else {
|
||||
clearBit(entity, slot);
|
||||
|
|
|
@ -19,6 +19,7 @@ import com.simibubi.create.content.decoration.girder.GirderWrenchBehavior;
|
|||
import com.simibubi.create.content.equipment.armor.BacktankArmorLayer;
|
||||
import com.simibubi.create.content.equipment.armor.DivingHelmetItem;
|
||||
import com.simibubi.create.content.equipment.armor.NetheriteBacktankFirstPersonRenderer;
|
||||
import com.simibubi.create.content.equipment.armor.NetheriteDivingHandler;
|
||||
import com.simibubi.create.content.equipment.blueprint.BlueprintOverlayRenderer;
|
||||
import com.simibubi.create.content.equipment.clipboard.ClipboardValueSettingsHandler;
|
||||
import com.simibubi.create.content.equipment.extendoGrip.ExtendoGripRenderHandler;
|
||||
|
@ -316,7 +317,7 @@ public class ClientEvents {
|
|||
event.scaleFarPlaneDistance(6.25f);
|
||||
event.setCanceled(true);
|
||||
return;
|
||||
} else if (FluidHelper.isLava(fluid) && AllItems.NETHERITE_DIVING_HELMET.isIn(divingHelmet)) {
|
||||
} else if (FluidHelper.isLava(fluid) && NetheriteDivingHandler.isNetheriteArmor(divingHelmet)) {
|
||||
event.setNearPlaneDistance(-4.0f);
|
||||
event.setFarPlaneDistance(20.0f);
|
||||
event.setCanceled(true);
|
||||
|
|
Loading…
Reference in a new issue