Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

JohnGleb

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

JohnGleb's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. You need to use attribute modifiers
  2. Are there any render\nbt warnings\errors in the log?
  3. You can try to use forges Multi-layer models. If you are trying to change vanilla tree behaviour - you'll have to use mixins, but it's not recomended if you do not understand what are you doing
  4. Hello! May be someone knows how to solve my problem. When exporting from blockbench to 1.17+, blockbench generates ModelPart objects only for parent bones, but not for the children. I'm tired of writing them manualy. And i have not found any solutions to make blockbench to generate them like for 1.16 version.
  5. that's because each item has it's own brhaviour, but it does nothing with rendering. public abstract class ChitinArmorItem extends ArmorItem { public ChitinArmorItem(EquipmentSlot slot, Properties properties) { super(new ArmorMaterial() { @Override public int getDurabilityForSlot(EquipmentSlot slot) { return new int[]{13, 15, 16, 11}[slot.getIndex()] * 25; } @Override public int getDefenseForSlot(EquipmentSlot slot) { return new int[]{2, 5, 6, 2}[slot.getIndex()]; } @Override public int getEnchantmentValue() { return 9; } @Override public SoundEvent getEquipSound() { return null; } @Override public Ingredient getRepairIngredient() { return Ingredient.of(new ItemStack(EItems.SCORPION_HUSK.get())); } @Override public String getName() { return "chitin_armor"; } @Override public float getToughness() { return 0; } @Override public float getKnockbackResistance() { return 0; } }, slot, properties); } @Override public void appendHoverText(ItemStack p_41421_, @Nullable Level p_41422_, List<Component> p_41423_, TooltipFlag p_41424_) { super.appendHoverText(p_41421_,p_41422_,p_41423_,p_41424_); p_41423_.add(new TextComponent("Decreases poison duration")); p_41423_.add(new TextComponent(" ")); p_41423_.add(new TextComponent("Wearing full set grants immunity to tier I poison effect")); } public static class Helmet extends ChitinArmorItem{ public Helmet() { super(EquipmentSlot.HEAD, new Item.Properties().tab(CreativeModeTab.TAB_COMBAT)); } @Override public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, String type) { return "evolved_rpg:textures/models/armor/chitin__layer_1.png"; } @Override public void onArmorTick(ItemStack itemstack, Level world, Player entity) { if(entity.getEffect(MobEffects.POISON) != null){ MobEffectInstance poison = entity.getEffect(MobEffects.POISON); entity.removeEffect(MobEffects.POISON); entity.addEffect(new MobEffectInstance(MobEffects.POISON, poison.getDuration()-1)); } } } public static class Chest extends ChitinArmorItem{ public Chest() { super(EquipmentSlot.CHEST, new Item.Properties().tab(CreativeModeTab.TAB_COMBAT)); } @Override public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, String type) { return "evolved_rpg:textures/models/armor/chitin__layer_1.png"; } @Override public void onArmorTick(ItemStack itemstack, Level world, Player entity) { if(entity.getEffect(MobEffects.POISON) != null){ MobEffectInstance poison = entity.getEffect(MobEffects.POISON); entity.removeEffect(MobEffects.POISON); entity.addEffect(new MobEffectInstance(MobEffects.POISON, poison.getDuration()-1)); if(entity.getItemBySlot(EquipmentSlot.HEAD).getItem() == EItems.CHITIN_HOOD.get() && entity.getItemBySlot(EquipmentSlot.LEGS).getItem() == EItems.CHITIN_PANTS.get() && entity.getItemBySlot(EquipmentSlot.FEET).getItem() == EItems.CHITIN_BOOTS.get()){ if (poison.getAmplifier() == 1){ entity.removeEffect(MobEffects.POISON); } } } } } public static class Pants extends ChitinArmorItem{ public Pants() { super(EquipmentSlot.LEGS, new Item.Properties().tab(CreativeModeTab.TAB_COMBAT)); } @Override public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, String type) { return "evolved_rpg:textures/models/armor/chitin__layer_2.png"; } @Override public void onArmorTick(ItemStack itemstack, Level world, Player entity) { if(entity.getEffect(MobEffects.POISON) != null){ MobEffectInstance poison = entity.getEffect(MobEffects.POISON); entity.removeEffect(MobEffects.POISON); entity.addEffect(new MobEffectInstance(MobEffects.POISON, poison.getDuration()-1)); } } } public static class Boots extends ChitinArmorItem{ public Boots() { super(EquipmentSlot.FEET, new Item.Properties().tab(CreativeModeTab.TAB_COMBAT)); } @Override public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, String type) { return "evolved_rpg:textures/models/armor/chitin__layer_1.png"; } @Override public void onArmorTick(ItemStack itemstack, Level world, Player entity) { if(entity.getEffect(MobEffects.POISON) != null){ MobEffectInstance poison = entity.getEffect(MobEffects.POISON); entity.removeEffect(MobEffects.POISON); entity.addEffect(new MobEffectInstance(MobEffects.POISON, poison.getDuration()-1)); } } } }
  6. I am trying to create custom armor. I've extended ArmorItem and head, body and legs work just fine. But Feet item renders as pants but with boots scale. I'm a bit confused... My item classes public static class Helmet extends BlackChitinArmorItem{ public Helmet() { super(EquipmentSlot.HEAD, new Item.Properties().tab(CreativeModeTab.TAB_COMBAT)); } } public static class Chest extends BlackChitinArmorItem{ public Chest() { super(EquipmentSlot.CHEST, new Item.Properties().tab(CreativeModeTab.TAB_COMBAT)); } } public static class Pants extends BlackChitinArmorItem{ public Pants() { super(EquipmentSlot.LEGS, new Item.Properties().tab(CreativeModeTab.TAB_COMBAT)); } } public static class Boots extends BlackChitinArmorItem{ public Boots() { super(EquipmentSlot.FEET, new Item.Properties().tab(CreativeModeTab.TAB_COMBAT)); } } My registry public static final RegistryObject<ArmorItem> CHITIN_HOOD = ITEMS.register("chitin_hood", () -> new ChitinArmorItem.Helmet()); public static final RegistryObject<ArmorItem> CHITIN_JACKET = ITEMS.register("chitin_jacket", () -> new ChitinArmorItem.Chest()); public static final RegistryObject<ArmorItem> CHITIN_PANTS = ITEMS.register("chitin_pants", () -> new ChitinArmorItem.Pants()); public static final RegistryObject<ArmorItem> CHITIN_BOOTS = ITEMS.register("chitin_boots", () -> new ChitinArmorItem.Boots());
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.