• 0

    posted a message on Struggling With OBJ files

    *Bump*

    Posted in: Modification Development
  • 0

    posted a message on Struggling With OBJ files

    I want to add a custom sword model using obj as it is much easier to make a smooth model in blender than it is in blockbench. I originally made a basic sword model in blockbench but I was wanting something more detailed than was possible. At the moment I get some error messages while loading Minecraft, but in the game, all I can see is the normal "model is missing" purple and black square.


    Any help would be greatly appreciated!


    Important Files:

    Error Message

    Item File

    ItemInit File

    PreInit File

    Blockstate File

    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace Amount Slots

    Well, after troubleshooting and googling lots about maps and hashmaps, I decided I was confusing myself and decided to mess around with some if statements and figured out away. It's not pretty, and I would definitely like to fix it and make it look a little better, but for now, it works and that's what I need. If you want to check, all the code is in my TileEntity class. Thank you so much for all the help!

    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace Amount Slots

    I've updated the github with my attempts, I don't have any language errors so I'm pretty sure I got it working in ForgeRecipes but I must have messed something up in TileEntityForge because It is checking for 2 items before smelting and removing two every time and not actually taking the count that I added.

    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace Amount Slots

    Are you meaning using a new hashmap? Cause if so I'm 98% sure I can set that up properly, I'm now just confused about how to get it to check in canSmelt(). I'll try messing around and see what I can do though. Thanks!

    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace Amount Slots

    I followed a tutorial off of youtube to build a custom furnace that has 2 inputs. I made 1 of the inputs be for casts and the other be for the metal to cast. I want to be able to set the amount of metal necessary for casting, but everything I have tried on my own has not worked. The furnace works in every other way, it just always takes only one item and won't wait until there is more than one item. Any help would be greatly appreciated.


    All Files Used for Furnace

    Posted in: Modification Development
  • 0

    posted a message on Custom Entity Hold Weapon Help Please!

    At the moment I have just added a model of the sword to him so he looks like he is holding it, but he still isn't actually holding it. Would still love help to be able to fix this issue.

    Posted in: Modification Development
  • 0

    posted a message on Custom Entity Hold Weapon Help Please!

    I'm working on creating a satyr in Minecraft, and I want him to hold a weapon. I have tried searching for tutorials, and none of them have worked for my specific model. They either say to just extend everything to its Biped equivalent (which I have done) and then to just look through the code and see what adds items (which I've also done and hasn't worked so I deleted most of the mess of code).


    Any help that can be given would be greatly appreciated.


    EntitySaytr


    public class EntitySaytr extends EntityIronGolem {

    @Nullable
    Village village;
    private int attackTimer;

    public EntitySaytr(World worldIn) {
    super(worldIn);
    this.setSize(0.6F, 2.05F);
    }

    @Override
    protected void initEntityAI() {
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(5, new EntityAIWanderAvoidWater(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(7, new EntityAILookIdle(this));

    this.tasks.addTask(1, new EntityAIAttackMelee(this, 1.0D, true));
    this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F));
    this.tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true));
    this.tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D));
    this.tasks.addTask(5, new EntityAILookAtVillager(this));
    this.tasks.addTask(6, new EntityAIWanderAvoidWater(this, 0.6D));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    this.tasks.addTask(8, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIDefendVillage(this));
    this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false, new Class[0]));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 10, false, true, new Predicate<EntityLiving>() {
    public boolean apply(@Nullable EntityLiving p_apply_1_) {
    return p_apply_1_ != null && IMob.VISIBLE_MOB_SELECTOR.apply(p_apply_1_) && !(p_apply_1_ instanceof EntityCreeper);
    }
    }));
    }

    @Override
    protected void applyEntityAttributes() {
    super.applyEntityAttributes();
    this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(30);
    this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.5);
    }

    protected void collideWithEntity(Entity entityIn) {
    if (entityIn instanceof IMob && !(entityIn instanceof EntityCreeper) && this.getRNG().nextInt(20) == 0) {
    this.setAttackTarget((EntityLivingBase) entityIn);
    }

    super.collideWithEntity(entityIn);
    }

    public void onLivingUpdate() {
    super.onLivingUpdate();

    if (this.attackTimer > 0) {
    --this.attackTimer;
    }
    }

    public boolean canAttackClass(Class<? extends EntityLivingBase> cls) {
    if (this.isPlayerCreated() && EntityPlayer.class.isAssignableFrom(cls)) {
    return false;
    } else {
    return cls != EntityCreeper.class && super.canAttackClass(cls);
    }
    }

    public boolean attackEntityAsMob(Entity entityIn)
    {
    this.attackTimer = 10;
    this.world.setEntityState(this, (byte)4);
    boolean flag = entityIn.attackEntityFrom(DamageSource.causeMobDamage(this), (float)(7 + this.rand.nextInt(15)));

    if (flag)
    {
    entityIn.motionX += 0.3D;
    this.applyEnchantments(this, entityIn);
    }

    this.playSound(SoundEvents.ENTITY_PLAYER_ATTACK_SWEEP, 0.5F, 1.0F);
    return flag;
    }

    protected void setEquipmentBasedOnDifficulty(DifficultyInstance difficulty)
    {
    super.setEquipmentBasedOnDifficulty(difficulty);
    this.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(ItemInit.SWORD_CB));
    }

    @Override
    public float getEyeHeight() {
    return 1.725F;
    }

    @Override
    protected SoundEvent getAmbientSound() {
    return super.getAmbientSound();
    }

    @Override
    protected SoundEvent getHurtSound(DamageSource source) {
    return super.getHurtSound(source);
    }

    @Override
    protected SoundEvent getDeathSound() {
    return super.getDeathSound();
    }
    }


    RenderSaytr


    public class RenderSaytr extends RenderBiped<EntitySaytr> {

    public static final ResourceLocation TEXTURES = new ResourceLocation(Reference.MODID + ":textures/entity/saytr.png");

    public RenderSaytr(RenderManager manager) {

    super(manager, new ModelSaytr(), 0.5F);
    LayerBipedArmor layerbipedarmor = new LayerBipedArmor(this) {
    protected void initArmor() {
    this.modelLeggings = new ModelSaytr(0.5F, true);
    this.modelArmor = new ModelSaytr(1.0F, true);
    }
    };
    this.addLayer(layerbipedarmor);
    this.addLayer(new LayerHeldItem(this));

    }

    @Override
    protected ResourceLocation getEntityTexture(EntitySaytr entity) {
    return TEXTURES;
    }

    @Override
    protected void applyRotations(EntitySaytr entityLiving, float p_77043_2_, float rotationYaw, float partialTicks) {
    super.applyRotations(entityLiving, p_77043_2_, rotationYaw, partialTicks);
    }

    public void transformHeldFull3DItemLayer()
    {
    GlStateManager.translate(0.0F, 0.1875F, 0.0F);
    }
    }


    ModelSaytr


    public class ModelSaytr extends ModelBiped {
    public ModelRenderer SaytrHead;
    public ModelRenderer SaytrHeadwear;
    public ModelRenderer SaytrBody;
    public ModelRenderer SaytrRightArm;
    public ModelRenderer SaytrLeftArm;
    public ModelRenderer LegJoined;
    public ModelRenderer SaytrRightLeg;
    public ModelRenderer SaytrLeftLeg;
    public ModelRenderer LeftHorn;
    public ModelRenderer RightHorn;
    public ModelRenderer Goatee;
    public ModelRenderer SaytrRightLeg2;
    public ModelRenderer SaytrRightLeg3;
    public ModelRenderer SaytrRightLeg4;
    public ModelRenderer SaytrLeftLeg2;
    public ModelRenderer SaytrLeftLeg3;
    public ModelRenderer SaytrLeftLeg4;

    public ModelSaytr() {
    this.textureWidth = 64;
    this.textureHeight = 32;
    this.SaytrLeftArm = new ModelRenderer(this, 40, 16);
    this.SaytrLeftArm.setRotationPoint(5.0F, 2.0F, 0.0F);
    this.SaytrLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, 0.0F);
    this.SaytrLeftArm.mirror = true;
    this.SaytrRightLeg2 = new ModelRenderer(this, 2, 20);
    this.SaytrRightLeg2.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrRightLeg2.addBox(-1.85F, 2.0F, -2.9F, 3, 4, 3, 0.0F);
    this.setRotateAngle(SaytrRightLeg2, 0.5101597403579425F, 0.0F, 0.0F);
    this.LegJoined = new ModelRenderer(this, 1, 17);
    this.LegJoined.setRotationPoint(0.0F, 12.0F, 0.0F);
    this.LegJoined.addBox(-2.0F, 0.0F, -1.5F, 4, 2, 3, 0.0F);
    this.SaytrRightLeg4 = new ModelRenderer(this, 0, 26);
    this.SaytrRightLeg4.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrRightLeg4.addBox(-2.35F, 10.0F, -2.0F, 4, 2, 4, 0.0F);
    this.SaytrLeftLeg2 = new ModelRenderer(this, 2, 20);
    this.SaytrLeftLeg2.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrLeftLeg2.addBox(-1.85F, 2.0F, -2.9F, 3, 4, 3, 0.0F);
    this.setRotateAngle(SaytrLeftLeg2, 0.5101597403579425F, 0.0F, 0.0F);
    this.SaytrLeftLeg2.mirror = true;
    this.SaytrBody = new ModelRenderer(this, 16, 16);
    this.SaytrBody.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, 0.0F);
    this.SaytrLeftLeg = new ModelRenderer(this, 0, 16);
    this.SaytrLeftLeg.setRotationPoint(1.9F, 12.0F, 0.0F);
    this.SaytrLeftLeg.addBox(-2.25F, 0.0F, -2.0F, 4, 4, 4, 0.0F);
    this.SaytrLeftLeg.mirror = true;
    this.Goatee = new ModelRenderer(this, 57, 24);
    this.Goatee.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.Goatee.addBox(-1.0F, -0.5F, -4.25F, 2, 1, 1, 0.0F);
    this.SaytrLeftLeg3 = new ModelRenderer(this, 2, 20);
    this.SaytrLeftLeg3.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrLeftLeg3.addBox(-1.85F, 4.2F, 1.4F, 3, 6, 3, 0.0F);
    this.setRotateAngle(SaytrLeftLeg3, -0.28431413514987625F, 0.0F, 0.0F);
    this.SaytrLeftLeg3.mirror = true;
    this.SaytrHead = new ModelRenderer(this, 0, 0);
    this.SaytrHead.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.0F);
    this.SaytrRightLeg = new ModelRenderer(this, 0, 16);
    this.SaytrRightLeg.setRotationPoint(-1.9F, 12.0F, 0.0F);
    this.SaytrRightLeg.addBox(-2.25F, 0.0F, -2.0F, 4, 4, 4, 0.0F);
    this.SaytrRightLeg3 = new ModelRenderer(this, 2, 20);
    this.SaytrRightLeg3.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrRightLeg3.addBox(-1.85F, 4.2F, 1.4F, 3, 6, 3, 0.0F);
    this.setRotateAngle(SaytrRightLeg3, -0.28431413514987625F, 0.0F, 0.0F);
    this.LeftHorn = new ModelRenderer(this, 58, 20);
    this.LeftHorn.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.LeftHorn.addBox(3.25F, -8.75F, 0.0F, 1, 2, 1, 0.0F);
    this.LeftHorn.mirror = true;
    this.RightHorn = new ModelRenderer(this, 58, 20);
    this.RightHorn.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.RightHorn.addBox(-4.3F, -8.8F, 0.0F, 1, 2, 1, 0.0F);
    this.SaytrLeftLeg4 = new ModelRenderer(this, 0, 26);
    this.SaytrLeftLeg4.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrLeftLeg4.addBox(-2.35F, 10.0F, -2.0F, 4, 2, 4, 0.0F);
    this.SaytrLeftLeg4.mirror = true;
    this.SaytrHeadwear = new ModelRenderer(this, 32, 0);
    this.SaytrHeadwear.setRotationPoint(0.0F, 0.0F, 0.0F);
    this.SaytrHeadwear.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.5F);
    this.SaytrRightArm = new ModelRenderer(this, 40, 16);
    this.SaytrRightArm.setRotationPoint(-5.0F, 2.0F, 0.0F);
    this.SaytrRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.0F);
    this.SaytrRightLeg.addChild(this.SaytrRightLeg2);
    this.SaytrRightLeg.addChild(this.SaytrRightLeg4);
    this.SaytrLeftLeg.addChild(this.SaytrLeftLeg2);
    this.SaytrHead.addChild(this.Goatee);
    this.SaytrLeftLeg.addChild(this.SaytrLeftLeg3);
    this.SaytrRightLeg.addChild(this.SaytrRightLeg3);
    this.SaytrHead.addChild(this.LeftHorn);
    this.SaytrHead.addChild(this.RightHorn);
    this.SaytrLeftLeg.addChild(this.SaytrLeftLeg4);
    }

    public ModelSaytr(float modelSize, boolean p_i1168_2_)
    {
    super(modelSize, 0.0F, 64, p_i1168_2_ ? 32 : 64);
    }

    @Override
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
    this.SaytrLeftArm.render(f5);
    this.LegJoined.render(f5);
    this.SaytrBody.render(f5);
    this.SaytrLeftLeg.render(f5);
    this.SaytrHead.render(f5);
    this.SaytrRightLeg.render(f5);
    this.SaytrHeadwear.render(f5);
    this.SaytrRightArm.render(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;
    }

    @Override
    public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn) {
    this.SaytrLeftLeg.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount;
    this.SaytrRightLeg.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.4F * limbSwingAmount;

    this.SaytrRightArm.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount / 2;
    this.SaytrLeftArm.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.4F * limbSwingAmount / 2;

    this.SaytrHead.rotateAngleY = netHeadYaw * 0.017453292F;
    this.SaytrHead.rotateAngleX = headPitch * 0.017453292F;
    this.SaytrHeadwear.rotateAngleY = netHeadYaw * 0.017453292F;
    this.SaytrHead.rotateAngleX = headPitch * 0.017453292F;
    }
    }

    Posted in: Modification Development
  • 0

    posted a message on CUSTOM 3D MODEL HELP PLZ

    Bump

    Posted in: Modification Development
  • 0

    posted a message on CUSTOM 3D MODEL HELP PLZ

    Hey Guys,


    So basically, I'm working on making a Greek Armor Set. I want the basic Minecraft Armor Model, with an added "Mohawk" to the helmet, and Shoulder Guards to the arms. When I add the models though, it just turns out really wrong. The First picture is what I have normally. Then, I thought maybe it had something to do with the ModelBiped Headwear, and so I turned that off and that's how I got the second picture.


    Also, here is the code:


    Any help you could bring would be great. Thanks!

    Posted in: Modification Development
  • 0

    posted a message on How to create a custom armor keybind
    Quote from Bright_Spark»

    For what exactly? This is a combination of a few things: GUIs, key bindings and sending packets

    That's the problem, I don't know which one I need. I shouldn't need a GUI tutorial as I have already made one before. I have watched tons of keybinds tutorials, but none of them seem to work, and then I don't know what sending packets are.
    Posted in: Modification Development
  • 0

    posted a message on How to create a custom armor keybind

    Do you have any links to certain tutorials? I can't seem to find any.

    Posted in: Modification Development
  • 0

    posted a message on Fairy Tail Mod (WIP)

    Is there an estimated time that the first version will be out?

    Posted in: WIP Mods
  • 0

    posted a message on [1.7.10] SUPERHEROES UNLIMITED MOD - NOW APART OF THE LEGENDS MOD
    Quote from AkumaSatsu»

    Superhero Minecraft Universe, Tihyo is doing a minecraft superhero series and thats most likely the nightwing suit to be used in it

    Ah, that makes sense. Thanks
    Posted in: Minecraft Mods
  • 0

    posted a message on How to create a custom armor keybind

    Hey guys, I'm developing a mod in 1.7.10 and I'm trying to make a keybind where when you press it it opens an inventory gui, but only if you're wearing my custom leggings. Does anyone know how to do that?


    Thanks,

    BloxBoss6

    Posted in: Modification Development
  • To post a comment, please or register a new account.