• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Installing Optifine through their installer doesn't touch the mods folder, it also doesn't install Optifine in a way that Forge would recognize. The presence of Optifine in your mods folder has nothing to do with the Optifine installer and everything to do with you putting it there.
    • Is there a way to make a mod click or shit click a slot? if yes anyone can give me the code please 
    • well, this could be a silly question, but I want to know how efficient forge is, as many people know, installing forge makes Minecraft loading(Mojang logo on white screen) longer, even if no mods are installed. I also want to know how efficient mods are.
    • This doesn't make sense. Why do you have an EntityType parameter but don't use it?   returning null is not allowed here. Why not an empty list?   Also: Don't use @OnlyIn.
    • The Entity-class: package drachenbauer32.angrybirdsmod.entities; import drachenbauer32.angrybirdsmod.init.AngryBirdsEntities; import net.minecraft.entity.AgeableEntity; import net.minecraft.entity.EntityType; import net.minecraft.entity.Pose; import net.minecraft.entity.ai.goal.LookAtGoal; import net.minecraft.entity.ai.goal.LookRandomlyGoal; import net.minecraft.entity.ai.goal.RandomSwimmingGoal; import net.minecraft.entity.ai.goal.RandomWalkingGoal; import net.minecraft.entity.ai.goal.SwimGoal; import net.minecraft.entity.passive.AnimalEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.world.World; public class StellaEntity extends AnimalEntity { public StellaEntity(EntityType<? extends AnimalEntity> type, World worldIn) { super((EntityType<? extends AnimalEntity>) AngryBirdsEntities.STELLA, worldIn); } @Override public AgeableEntity createChild(AgeableEntity arg0) { return null; } @Override public float getEyeHeight(Pose pose) { return this.getSize(pose).height / 2; } @Override protected void registerGoals() { this.goalSelector.addGoal(0, new SwimGoal(this)); this.goalSelector.addGoal(1, new RandomSwimmingGoal(this, 0.2d, 10)); this.goalSelector.addGoal(2, new RandomWalkingGoal(this, 0.2d)); this.goalSelector.addGoal(3, new LookAtGoal(this, PlayerEntity.class, 6.0F)); this.goalSelector.addGoal(4, new LookRandomlyGoal(this)); } @Override public boolean canBreatheUnderwater() { return true; } @Override protected void registerAttributes() { super.registerAttributes(); } }   The Renderer-class: package drachenbauer32.angrybirdsmod.entities.renderers; import drachenbauer32.angrybirdsmod.entities.StellaEntity; import drachenbauer32.angrybirdsmod.entities.models.StellaModel; import drachenbauer32.angrybirdsmod.util.Reference; import net.minecraft.client.renderer.entity.EntityRendererManager; import net.minecraft.client.renderer.entity.MobRenderer; import net.minecraft.client.renderer.entity.model.EntityModel; import net.minecraft.util.ResourceLocation; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @OnlyIn(Dist.CLIENT) public class StellaRenderer extends MobRenderer<StellaEntity, EntityModel<StellaEntity>> { private static final ResourceLocation STELLA_TEXTURE = new ResourceLocation(Reference.MOD_ID + ":textures/entity/stella.png"); public StellaRenderer(EntityRendererManager manager) { super(manager, new StellaModel<>(), 0.5f); } @Override public ResourceLocation getEntityTexture(StellaEntity stella) { return STELLA_TEXTURE; } /*public static class RenderFactory implements IRenderFactory<StellaEntity> { @Override public EntityRenderer<? super StellaEntity> createRenderFor(EntityRendererManager manager) { return new StellaRenderer(manager); } }*/ } i commented out the RenderFactory, because i didn´t see it in the vanilla-renderers any more.   The Model-class: package drachenbauer32.angrybirdsmod.entities.models; import com.google.common.collect.ImmutableList; import drachenbauer32.angrybirdsmod.entities.StellaEntity; import net.minecraft.client.renderer.entity.model.AgeableModel; import net.minecraft.client.renderer.model.ModelRenderer; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @OnlyIn(Dist.CLIENT) public class StellaModel<T extends StellaEntity> extends AgeableModel<T> { private final ModelRenderer bone; private final ModelRenderer bone2; private final ModelRenderer bone3; private final ModelRenderer bone4; private final ModelRenderer bone5; public StellaModel() { textureWidth = 32; textureHeight = 16; bone = new ModelRenderer(this); bone.setRotationPoint(0.0F, 20.0F, 0.0F); bone.addBox("body", -4.0F, -4.0F, -4.0F, 8, 8, 8, 0.0F, 0, 0); bone.addBox("beak", -1.0F, 2.0F, -5.0F, 2, 1, 1, 0.0F, 25, 0); bone.addBox("head_feather_1", 0.0F, -6.0F, -8.0F, 0, 2, 6, 0.0F, 10, 10); bone.addBox("tail_feather_1", 0.0F, 1.0F, 4.0F, 0, 1, 4, 0.0F, 24, 3); bone2 = new ModelRenderer(this); bone2.setRotationPoint(0.0F, -4.0F, -2.0F); setRotationAngle(bone2, -0.5236F, 0.0F, 0.0F); bone.addChild(bone2); bone2.addBox("head_feather_2", 0.0F, -2.0F, -6.0F, 0, 2, 6, 0.0F, 10, 10); bone3 = new ModelRenderer(this); bone3.setRotationPoint(0.0F, -4.0F, -2.0F); setRotationAngle(bone3, -1.0472F, 0.0F, 0.0F); bone.addChild(bone3); bone3.addBox("head_feather_3", 0.0F, -2.0F, -6.0F, 0, 2, 8, 0.0F, 8, 8); bone4 = new ModelRenderer(this); bone4.setRotationPoint(0.0F, 1.0F, 4.0F); setRotationAngle(bone4, 0.5236F, 0.0F, 0.0F); bone.addChild(bone4); bone4.addBox("tail_feather_2", 0.0F, 0.0F, 0.0F, 0, 1, 4, 0.0F, 24, 3); bone5 = new ModelRenderer(this); bone5.setRotationPoint(0.0F, 1.0F, 4.0F); setRotationAngle(bone5, -0.5236F, 0.0F, 0.0F); bone.addChild(bone5); bone5.addBox("tail_feather_3", 0.0F, 0.0F, 0.0F, 0, 1, 4, 0.0F, 24, 3); } @Override protected Iterable<ModelRenderer> getHeadParts() { return ImmutableList.of(bone); } @Override protected Iterable<ModelRenderer> getBodyParts() { return null; } @Override public void setRotationAngles(StellaEntity stella, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { bone.rotateAngleX = headPitch * 0.017453292f; bone.rotateAngleY = netHeadYaw * 0.017453292f; } private void setRotationAngle(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } } in the method getBodyParts i return null, because it´s a classic Angry Birds-character. they are not much more than bird-heads with some feathers stick out. So i only needed stuff as head-part
  • Topics

  • Who's Online (See full list)