I am making a custom helmet for a mod, and it has a custom model that I created. However, there is some sort of texture issue that makes floating textures appear. I'm fairly certain it's not an issue with the texturing job, because I tagged each piece of the png with a color to identify where it was pulling the floating texture from, and it seems to be taking textures from the entire image and rearranging them into the troublesome formations. It's difficult to explain, so there are some images attached of the problem, along with the texture file. Here's my code:
/**
* ModelPlayer - Either Mojang or a mod author
* Created using Tabula 7.0.0
*/
public class ModelLutinHat extends ModelBiped {
public ModelRenderer Hat1;
public ModelRenderer Hat2;
public ModelRenderer Hat3;
public ModelRenderer Hat4;
public ModelRenderer Hat5;
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
I am making a custom helmet for a mod, and it has a custom model that I created. However, there is some sort of texture issue that makes floating textures appear. I'm fairly certain it's not an issue with the texturing job, because I tagged each piece of the png with a color to identify where it was pulling the floating texture from, and it seems to be taking textures from the entire image and rearranging them into the troublesome formations. It's difficult to explain, so there are some images attached of the problem, along with the texture file. Here's my code:
ArmorModel.java:
package com.volbot.kone.armor;
import com.volbot.kone.Main;
import com.volbot.kone.ref.IHasModel;
import com.volbot.kone.ref.ItemInit;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
public class ArmorModel extends ItemArmor implements IHasModel{
public ArmorModel(String name, CreativeTabs tab, ArmorMaterial materialIn, EntityEquipmentSlot equipmentSlotIn) {
super(materialIn, 1, equipmentSlotIn);
setUnlocalizedName(name);
setRegistryName(name);
setCreativeTab(tab);
setMaxStackSize(1);
ItemInit.ITEMS.add(this);
}
@Override
public void registerModels() {
Main.proxy.registerItemRenderer(this, 0, "inventory");
}
@Override
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, ModelBiped _default) {
if(itemStack != ItemStack.EMPTY) {
if (itemStack.getItem() instanceof ItemArmor) {
ModelLutinHat model = new ModelLutinHat();
model.bipedHead.showModel = armorSlot == EntityEquipmentSlot.HEAD;
model.isChild = _default.isChild;
model.isRiding = _default.isRiding;
model.isSneak = _default.isSneak;
model.rightArmPose = _default.rightArmPose;
model.leftArmPose = _default.leftArmPose;
return model;
}
}
return null;
}
}
ItemInit.java:
package com.volbot.kone.ref;
import java.util.ArrayList;
import java.util.List;
import com.volbot.kone.armor.ArmorBase;
import com.volbot.kone.armor.ArmorModel;
import com.volbot.kone.items.ItemBase;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.SoundEvents;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraftforge.common.util.EnumHelper;
public class ItemInit {
public static final List<Item> ITEMS = new ArrayList<Item>();
public static final ArmorMaterial LUTIN_HAT_ARMOR = EnumHelper.addArmorMaterial("lutin_hat", Ref.modId + ":lutin_hat", 5, new int[] {ArmorMaterial.LEATHER.getDamageReductionAmount(EntityEquipmentSlot.HEAD), ArmorMaterial.LEATHER.getDamageReductionAmount(EntityEquipmentSlot.CHEST), ArmorMaterial.LEATHER.getDamageReductionAmount(EntityEquipmentSlot.LEGS), ArmorMaterial.LEATHER.getDamageReductionAmount(EntityEquipmentSlot.FEET)}, ArmorMaterial.LEATHER.getEnchantability(), SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, ArmorMaterial.LEATHER.getToughness());
public static final ArmorMaterial LUTIN_HAT_ARMOR_REINFORCED = EnumHelper.addArmorMaterial("lutin_hat", Ref.modId + ":lutin_hat", 33, new int[] {ArmorMaterial.DIAMOND.getDamageReductionAmount(EntityEquipmentSlot.HEAD), ArmorMaterial.DIAMOND.getDamageReductionAmount(EntityEquipmentSlot.CHEST), ArmorMaterial.DIAMOND.getDamageReductionAmount(EntityEquipmentSlot.LEGS), ArmorMaterial.DIAMOND.getDamageReductionAmount(EntityEquipmentSlot.FEET)}, ArmorMaterial.DIAMOND.getEnchantability(), SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, ArmorMaterial.DIAMOND.getToughness());
public static final Item LUTIN_HAT = new ArmorModel("lutin_hat", CreativeTabs.COMBAT, LUTIN_HAT_ARMOR, EntityEquipmentSlot.HEAD);
}
ModelLutinHat.java (the model file exported from Tabula):
package com.volbot.kone.armor;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* ModelPlayer - Either Mojang or a mod author
* Created using Tabula 7.0.0
*/
public class ModelLutinHat extends ModelBiped {
public ModelRenderer Hat1;
public ModelRenderer Hat2;
public ModelRenderer Hat3;
public ModelRenderer Hat4;
public ModelRenderer Hat5;
public ModelLutinHat() {
this.textureWidth = 64;
this.textureHeight = 64;
this.Hat1 = new ModelRenderer(this, 0, 0);
this.Hat1.setRotationPoint(0.0F, -15.0F, 0.0F);
this.Hat1.addBox(-1.0F, 0.0F, -1.0F, 2, 2, 2, 0.0F);
this.Hat2 = new ModelRenderer(this, 0, 0);
this.Hat2.setRotationPoint(0.0F, -7.0F, 0.0F);
this.Hat2.addBox(-4.5F, 0.0F, -4.5F, 9, 2, 9, 0.0F);
this.Hat3 = new ModelRenderer(this, 28, 3);
this.Hat3.setRotationPoint(0.0F, -9.0F, 0.0F);
this.Hat3.addBox(-4.0F, 0.0F, -4.0F, 8, 2, 8, 0.0F);
this.Hat4 = new ModelRenderer(this, 0, 11);
this.Hat4.setRotationPoint(0.0F, -11.0F, 0.0F);
this.Hat4.addBox(-3.0F, 0.0F, -3.0F, 6, 2, 6, 0.0F);
this.Hat5 = new ModelRenderer(this, 24, 13);
this.Hat5.setRotationPoint(0.0F, -13.0F, 0.0F);
this.Hat5.addBox(-2.0F, 0.0F, -2.0F, 4, 2, 4, 0.0F);
this.bipedHead.addChild(Hat1);
this.bipedHead.addChild(Hat2);
this.bipedHead.addChild(Hat3);
this.bipedHead.addChild(Hat4);
this.bipedHead.addChild(Hat5);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
super.render(entity, f, f1, f2, f3, f4, f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
how do i make this text bold
Bump?
how do i make this text bold