Jump to content

WitherBoss2000

Members
  • Posts

    25
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Everywhere...
  • AIM
    N/A
  • Yahoo IM
    I dont have one!
  • Personal Text
    Sauce Mod was Made Here

WitherBoss2000's Achievements

Tree Puncher

Tree Puncher (2/8)

-2

Reputation

  1. For making a TARDIS
  2. Hi! I am attempting to make a Dr. Who mod, and I want to make it like the TV show itself. I was thinking that I could borrow code from the dimensional doorway mod and hook it up to an entity instead of a door, so it is easier to move. Does anyone know where I can look at some code or if they actually know how to do it? Please help me.
  3. Sorry it took me so long to respond, here is my most recent updated code. Also, I am not asking you to code my entire mod, this is only MY FIRST MOD!!! Please, just tell me how to do it and then I will know. Here it is... package com.camp.entity; import net.minecraft.entity.Entity; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public class EntityTruck extends EntityMob // this to make mob hostile { public boolean stationary; public EntityTruck(World par1World) { super(par1World); isImmuneToFire = false; } protected boolean canDespawn() { return false; } public boolean interact(EntityPlayer entityplayer) { if (riddenByEntity == null || riddenByEntity == entityplayer) { entityplayer.mountEntity(this); return true; } else { return false; } } protected boolean isMovementCeased() { return stationary; } public void moveEntity(double d, double d1, double d2) { if (riddenByEntity != null) { EntityPlayer player = (EntityPlayer) this.riddenByEntity; this.prevRotationYaw = this.rotationYaw = this.riddenByEntity.rotationYaw; this.rotationPitch = this.riddenByEntity.rotationPitch * 0.5F; this.setRotation(this.rotationYaw, this.rotationPitch); this.rotationYawHead = player.rotationYawHead; stationary = false; motionX += riddenByEntity.motionX * 10; // * 0.20000000000000001D; motionZ += riddenByEntity.motionZ * 10; // * 0.20000000000000001D; //this.moveStrafing = player.moveStrafing; //this.moveForward = player.moveForward; if (isCollidedHorizontally) { isJumping = true; } else { isJumping = false; } super.moveEntity(motionX, motionY, motionZ); } else { stationary = false; super.moveEntity(d, d1, d2); } } public void onUpdate() { super.onUpdate(); if (riddenByEntity != null) //check if there is a rider { //currentTarget = this; this.randomYawVelocity = 0; //try not to let the horse control where to look. this.rotationYaw = riddenByEntity.rotationYaw; } } protected boolean isAIEnabled() //Allow your AI task to work? { return true; } }
  4. Sorry, but still it refuses to move.
  5. Wow, I have to say you've got some of the best explanations. Very thorough, tells you where to look, and at the same time isn't spoonfeeding. Not sure you can get any better than that. Dude, this isnt a praise area.
  6. Ok, but there is no moveForward field in the riding entity. Or a moveStrafing.
  7. Did you make the json file have a parent of an oreentable block?
  8. When you calculate your attributes for the entity, do you store them as a variable? If so,you can write after the fact that the stats are calculated: protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(<whatever you used as your variable>); } The code above will make the stats the same as calculated. Repeat the line beginning with this. for each attribute. Also, look at the give command whenever you make a sword that increases your speed. Then, for your morphing, I think that is one of the ways to do it, but maybe instead of doing that, try: public static <name of mob class> mobOne; //Put this after the class declaration line. int mobMaxHealth = mobOne.getEntityAttribute(SharedMonsterAttributes.maxHealth); //put the following in the if statement player.setHealth(mobMaxHealth); Try that, if the second part doesnt work, I have never tried to change the Player health, but I know it is stored as NBT data. Try it, you dont have to use it, but hopefully that works.
  9. I am pretty sure you cant have 2 annotations with the @SideOnly, you dont need the overide. Maybe put the override below the @sideonly for some strange reason. This happens to me too. Trust me, it still works in 1.8
  10. [glow=red,20,200] I tried the keybinding, and it doesnt work. Also, I couldnt find it in the EntityBoat class. I have no idea what I am doing. If anyone knows how to help me, please tell me! [/glow]
  11. [glow=red,20,200]Oh... Well I dont know any other way of making it move, I have never made one before. If I put a solid number there, it will move, but only in one direction and non-controllable. I was thinking that I could use keybindings, but I have no idea how to do that.[/glow]
  12. [glow=red,20,200] Anyone out there that can help me? Please? [/glow]
  13. [shadow=red,left][font=arial][glow=red,4,400]Ok, so I am wondering how I can make a truck. So, I made code for it and it works, but it doesnt move. It rotates and everything, but it stays stationary. Why does it do that? How do I fix it? Please help. [/glow] Here is my code for the Entity: package com.camp.entity; [/font][/shadow] import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public class EntityTruck extends EntityMob // this to make mob hostile { public boolean stationary; public EntityTruck(World par1World) { super(par1World); isImmuneToFire = false; } protected void applEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20000.0d); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.4f); this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(1.0f); this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(100f); this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(10.0f); } protected boolean canDespawn() { return false; } public boolean interact(EntityPlayer entityplayer) { if (riddenByEntity == null || riddenByEntity == entityplayer) { entityplayer.mountEntity(this); return true; } else { return false; } } protected boolean isMovementCeased() { return stationary; } public void moveEntity(double d, double d1, double d2) { if (riddenByEntity != null) { this.prevRotationYaw = this.rotationYaw = this.riddenByEntity.rotationYaw; this.rotationPitch = this.riddenByEntity.rotationPitch * 0.5F; this.setRotation(this.rotationYaw, this.rotationPitch); this.rotationYawHead = this.renderYawOffset = this.rotationYaw; stationary = true; motionX += riddenByEntity.motionX * 2F; // * 0.20000000000000001D; motionZ += riddenByEntity.motionZ * 2F; // * 0.20000000000000001D; if (isCollidedHorizontally) { isJumping = true; } else { isJumping = false; } super.moveEntity(motionX, motionY, motionZ); } else { stationary = false; super.moveEntity(d, d1, d2); } } public void onUpdate() { super.onUpdate(); if (riddenByEntity != null) //check if there is a rider { //currentTarget = this; this.randomYawVelocity = 0; //try not to let the horse control where to look. this.rotationYaw = riddenByEntity.rotationYaw; } } protected boolean isAIEnabled() //Allow your AI task to work? { return true; } } [shadow=red,left][/shadow]
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.