J0WAY
Members-
Posts
63 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
J0WAY's Achievements
Stone Miner (3/8)
1
Reputation
-
Just typing so someone can see thisJust typing so someone can see this
-
I keep getting an error when starting that says the mod file bin/main has mods that were not found and in warning I have errors like failed to load a valid resourcepackinfo
-
fixed
-
So i logged into eclipse and every single one of my classes have errors and in referenced lib the mc classes don't exist anymore or nothing which i don't know what to do
-
So i made my biome classes and i know there is topBlock, fillerBlock but there only for the top layers so they wouldn't work, Is there anyway i can make it so in my biome my stone generates like the normal stone, And if there is a youtube tutorial on this or forums post related to my problem for 1.12.2 you can link me that and ill look into it!.
-
[1.12.2] How do i make it so my sword renders in my mobs hand?.
J0WAY replied to J0WAY's topic in Modder Support
Also i fixed the problem, It was nothing to do with setItemStackToSlot it was because i needed to add in renderbarbarian { this.addLayer(new LayerBipedArmor(this)); this.addLayer(new LayerHeldItem(this)); } so turns out it wasn't anything to do with itemstack just like when i made the most and said if there's any render method but yeah, thanks for the help anyways. Also your ModelClass for your mob needs to extend ModelBiped if you want it to work!. -
[1.12.2] How do i make it so my sword renders in my mobs hand?.
J0WAY replied to J0WAY's topic in Modder Support
Yeah i do get it now and i really should of learned basic java before coding my mob which ill do and ill come back to this once i learn some more about basic java. -
[1.12.2] How do i make it so my sword renders in my mobs hand?.
J0WAY replied to J0WAY's topic in Modder Support
public class EntityBarbarian extends EntityMob { public EntityBarbarian(World worldIn) { super(worldIn); this.setSize(0.6F, 1.95F); this.setHealth(50); } @Override protected void initEntityAI() { super.initEntityAI(); this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(4, new EntityAIAttackMelee(this, 1.0D, false)); this.tasks.addTask(8, new EntityAIWander(this, 0.6D)); this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 3.0F, 1.0F)); this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[] {EntityVindicator.class})); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityVillager.class, true)); this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityIronGolem.class, true)); } @Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(6.0D); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.23000000417232513D); this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(48.0D); } @Override public float getEyeHeight() { return 1.6F; } @Override public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, IEntityLivingData livingdata) { return super.onInitialSpawn(difficulty, livingdata); } @Override public void setItemStackToSlot(EntityEquipmentSlot slotIn, ItemStack stack) { super.setItemStackToSlot(slotIn.MAINHAND, new ItemStack (ModItems.BARBARIAN_SWORD)); } } -
[1.12.2] How do i make it so my sword renders in my mobs hand?.
J0WAY replied to J0WAY's topic in Modder Support
Well to be honest at this point i really don't know what i'm doing and it's not working still when i call those methods so if you could show me an example of what to do that would be amazing, Also are mobs suppose to have inventories because if they are then my doesn't have one and i think the main problem in this is it can't find which hand to set the sword to so that's why it isn't spawning with the mob and it just keeps denying it, Again i don't know how to fix because like i said before i'm only good at blocks and items and i just got into making mobs like 3 days ago. -
[1.12.2] How do i make it so my sword renders in my mobs hand?.
J0WAY replied to J0WAY's topic in Modder Support
Which if you mean call @Override public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, IEntityLivingData livingdata) { // TODO Auto-generated method stub return super.onInitialSpawn(difficulty, livingdata); } What would i replace difficulty and livingdata with?. -
[1.12.2] How do i make it so my sword renders in my mobs hand?.
J0WAY replied to J0WAY's topic in Modder Support
This will probably sound really stupid but i get the first part called setItemStackToSlot in my EntityBarbarian but what do you mean by in EntityLiving#onInitialSpawn. It's probably really simple and i'm just confused or somethin. -
[1.12.2] How do i make it so my sword renders in my mobs hand?.
J0WAY replied to J0WAY's topic in Modder Support
I was just saying that because you said still not using override, And my whole point of making this post is i need help with the mob and i'm asking why won't it spawn with a sword, To be honest i don't know any of the code to make the mob spawn with the sword so if you could tell me what to do so my mob can spawn with a sword that would be amazing!, Also yeah i do agree i should of learned more basic java before i jumped into this. -
[1.12.2] How do i make it so my sword renders in my mobs hand?.
J0WAY replied to J0WAY's topic in Modder Support
It's because i was showing you where i only setup the sword for the mob and that method doesn't want override. Entity barbarian public class EntityBarbarian extends EntityMob { public EntityBarbarian(World worldIn) { super(worldIn); this.setSize(0.6F, 1.95F); this.setHealth(50); } @Override protected void initEntityAI() { super.initEntityAI(); this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(4, new EntityAIAttackMelee(this, 1.0D, false)); this.tasks.addTask(8, new EntityAIWander(this, 0.6D)); this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 3.0F, 1.0F)); this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[] {EntityVindicator.class})); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityVillager.class, true)); this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityIronGolem.class, true)); } @Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(6.0D); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.23000000417232513D); this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(48.0D); } @Override public float getEyeHeight() { return 1.6F; } protected void setEquipmentBasedOnDifficult(DifficultyInstance difficulty) { this.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(ModItems.BARBARIAN_SWORD)); } } -
[1.12.2] How do i make it so my sword renders in my mobs hand?.
J0WAY replied to J0WAY's topic in Modder Support
I'm still kinda new to coding mobs so if you could show me an example on how to do it that would be amazing!. -
[1.12.2] How do i make it so my sword renders in my mobs hand?.
J0WAY replied to J0WAY's topic in Modder Support
protected void setEquipmentBasedOnDifficult(DifficultyInstance difficulty) { this.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(ModItems.BARBARIAN_SWORD)); }