mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 07:56:44 +01:00
Render only the boots
- Do not render the leggings texture when rendering netherite diving boots
This commit is contained in:
parent
d3a33896e2
commit
8d68dff7a5
5 changed files with 2 additions and 31 deletions
|
@ -269,7 +269,7 @@ public class AllItems {
|
|||
COPPER_DIVING_HELMET = REGISTRATE.item("copper_diving_helmet", p -> new DivingHelmetItem(AllArmorMaterials.COPPER, p, Create.asResource("copper_diving")))
|
||||
.register(),
|
||||
|
||||
NETHERITE_DIVING_HELMET = REGISTRATE.item("netherite_diving_helmet", p -> new DivingHelmetItem.Layered(ArmorMaterials.NETHERITE, p, Create.asResource("netherite_diving")))
|
||||
NETHERITE_DIVING_HELMET = REGISTRATE.item("netherite_diving_helmet", p -> new DivingHelmetItem(ArmorMaterials.NETHERITE, p, Create.asResource("netherite_diving")))
|
||||
.register();
|
||||
|
||||
public static final ItemEntry<? extends DivingBootsItem>
|
||||
|
@ -277,7 +277,7 @@ public class AllItems {
|
|||
COPPER_DIVING_BOOTS = REGISTRATE.item("copper_diving_boots", p -> new DivingBootsItem(AllArmorMaterials.COPPER, p, Create.asResource("copper_diving")))
|
||||
.register(),
|
||||
|
||||
NETHERITE_DIVING_BOOTS = REGISTRATE.item("netherite_diving_boots", p -> new DivingBootsItem.Layered(ArmorMaterials.NETHERITE, p, Create.asResource("netherite_diving")))
|
||||
NETHERITE_DIVING_BOOTS = REGISTRATE.item("netherite_diving_boots", p -> new DivingBootsItem(ArmorMaterials.NETHERITE, p, Create.asResource("netherite_diving")))
|
||||
.register();
|
||||
|
||||
public static final ItemEntry<SandPaperItem> SAND_PAPER = REGISTRATE.item("sand_paper", SandPaperItem::new)
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package com.simibubi.create.content.curiosities.armor;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.simibubi.create.foundation.item.LayeredArmorItem;
|
||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -12,7 +9,6 @@ import net.minecraft.world.entity.LivingEntity;
|
|||
import net.minecraft.world.entity.Pose;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ArmorMaterial;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
@ -76,15 +72,4 @@ public class DivingBootsItem extends BaseArmorItem {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static class Layered extends DivingBootsItem implements LayeredArmorItem {
|
||||
public Layered(ArmorMaterial material, Properties properties, ResourceLocation textureLoc) {
|
||||
super(material, properties, textureLoc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTextureLocation(LivingEntity entity, EquipmentSlot slot, ItemStack stack, int layer) {
|
||||
return String.format(Locale.ROOT, "%s:textures/models/armor/%s_layer_%d.png", textureLoc.getNamespace(), textureLoc.getPath(), layer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
package com.simibubi.create.content.curiosities.armor;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.simibubi.create.foundation.advancement.AllAdvancements;
|
||||
import com.simibubi.create.foundation.item.LayeredArmorItem;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
|
@ -96,15 +93,4 @@ public class DivingHelmetItem extends BaseArmorItem {
|
|||
entity.addEffect(new MobEffectInstance(MobEffects.WATER_BREATHING, 30, 0, true, false, true));
|
||||
BacktankUtil.consumeAir(entity, backtank, 1);
|
||||
}
|
||||
|
||||
public static class Layered extends DivingHelmetItem implements LayeredArmorItem {
|
||||
public Layered(ArmorMaterial material, Properties properties, ResourceLocation textureLoc) {
|
||||
super(material, properties, textureLoc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTextureLocation(LivingEntity entity, EquipmentSlot slot, ItemStack stack, int layer) {
|
||||
return String.format(Locale.ROOT, "%s:textures/models/armor/%s_layer_%d.png", textureLoc.getNamespace(), textureLoc.getPath(), layer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 9.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9 KiB After Width: | Height: | Size: 7.8 KiB |
Loading…
Reference in a new issue