wretched abominations

This commit is contained in:
Bob 2023-10-23 21:23:23 +02:00
parent 1ba07217ec
commit eb602d2707
6 changed files with 75 additions and 38 deletions

View File

@ -1,27 +0,0 @@
## Added
* Plastic bag
* Rarely spawns in water with similar spawn conditions as squids
* Will slowly drift into random directions
* Can be picked up, the resulting item can be used like a backpack that stores one item
## Changed
* Updated chinese localization
* Tweaked certain assembler recipes
* Some welded plate requirements have been lowered
* The plasma heater now requires slightly more resources, but yields 4 blocks per operation instead of 1
* The fractioning tower now requires welded plates, but the total steel cost has been reduced by roughly a third
* The cyclotron now has three automation ports on each side, corresponding with the colors of the three input pairs
* Updated the PWR sound
## Fixed
* Fixed multi fluid ID's search not behaving correctly
* Fixed jetpack's description using unlocalized fluid names
* Fixed the CM structure wand being broken when used in most directions
* Fixed the custom machine recipe handler using the original references to the output stacks, causing the chance percentage indicator getting stuck on the actual outputs
* Fixed the desh suit's boot models not being separated from the legs
* Fixed dupe caused by defusing TNT-like blocks
* Fixed containment box being able to contain itself when using the number keys, crashing the game
* Fixed a critical game-breaking error where the custom tool's ability toggle is misspelled
* (Hopefully) fixed the vampire ability not firing the onDeath event, causing the target to not drop any items and any death releated events to not happen
* Fixed water creatures vomitting when irradiated, when they logically shouldn't
* Fixed arc welder recipe template file not being generated properly

View File

@ -16,6 +16,12 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
public class EntityPigeon extends EntityCreature implements IFlyingCreature, IAnimals {
public float fallTime;
public float dest;
public float prevDest;
public float prevFallTime;
public float offGroundTimer = 1.0F;
public EntityPigeon(World world) {
super(world);
@ -25,9 +31,10 @@ public class EntityPigeon extends EntityCreature implements IFlyingCreature, IAn
this.tasks.addTask(1, new EntityAISwimmingConditional(this, noFlyCondition));
this.tasks.addTask(2, new EntityAIFlutterAroundAimlessly(this, this));
//this.tasks.addTask(2, new EntityAIPanicConditional(this, 1.4D, noFlyCondition));
this.tasks.addTask(5, new EntityAIWanderConditional(this, 1.0D, noFlyCondition));
this.tasks.addTask(5, new EntityAIWanderConditional(this, 0.2D, noFlyCondition));
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.tasks.addTask(7, new EntityAILookIdle(this));
this.setSize(0.5F, 1.0F);
}
@Override
@ -62,4 +69,58 @@ public class EntityPigeon extends EntityCreature implements IFlyingCreature, IAn
protected String getDeathSound() {
return null;
}
@Override
protected void updateAITasks() {
super.updateAITasks();
if(this.getFlyingState() == this.STATE_FLYING) {
int height = worldObj.getHeightValue((int) Math.floor(posX), (int) Math.floor(posZ));
boolean ceil = posY - height > 10;
this.motionY = this.getRNG().nextGaussian() * 0.05 + (ceil ? 0 : 0.04) + (this.isInWater() ? 0.2 : 0);
if(onGround) this.motionY = Math.abs(this.motionY) + 0.1D;
this.moveForward = 1.5F;
if(this.getRNG().nextInt(20) == 0) this.rotationYaw += this.getRNG().nextGaussian() * 30;
} else if(!this.onGround && this.motionY < 0.0D) {
this.motionY *= 0.8D;
}
}
@Override
public void onLivingUpdate() {
super.onLivingUpdate();
this.prevFallTime = this.fallTime;
this.prevDest = this.dest;
this.dest = (float) ((double) this.dest + (double) (this.onGround ? -1 : 4) * 0.3D);
if(this.dest < 0.0F) {
this.dest = 0.0F;
}
if(this.dest > 1.0F) {
this.dest = 1.0F;
}
if(!this.onGround && this.offGroundTimer < 1.0F) {
this.offGroundTimer = 1.0F;
}
this.offGroundTimer = (float) ((double) this.offGroundTimer * 0.9D);
if(!this.onGround && this.motionY < 0.0D) {
this.motionY *= 0.6D;
}
this.fallTime += this.offGroundTimer * 2.0F;
}
@Override public boolean doesEntityNotTriggerPressurePlate() { return true; }
@Override protected boolean canTriggerWalking() { return false; }
@Override protected void fall(float p_70069_1_) { }
@Override protected void updateFallState(double p_70064_1_, boolean p_70064_3_) { }
}

View File

@ -31,14 +31,5 @@ public class EntityAIFlutterAroundAimlessly extends EntityAIBase {
/*this.living.motionX = this.living.getRNG().nextGaussian() * 0.1;
this.living.motionY = this.living.getRNG().nextGaussian() * 0.1;
this.living.motionZ = this.living.getRNG().nextGaussian() * 0.1;*/
this.living.motionX = 0;
this.living.motionY = this.living.getRNG().nextGaussian() * 0.1;
this.living.motionZ = 0;
if(living.onGround) this.living.motionY = Math.abs(this.living.motionY) + 0.1D;
this.living.moveForward = 0.5F;
this.living.rotationYaw += this.living.getRNG().nextGaussian() * 0.1;
}
}

View File

@ -6,6 +6,8 @@ import com.hbm.lib.RefStrings;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
public class RenderPigeon extends RenderLiving {
@ -23,4 +25,15 @@ public class RenderPigeon extends RenderLiving {
protected ResourceLocation getEntityTexture(EntityPigeon entity) {
return texture;
}
protected float handleRotationFloat(EntityPigeon entity, float interp) {
float f1 = entity.prevFallTime + (entity.fallTime - entity.prevFallTime) * interp;
float f2 = entity.prevDest + (entity.dest - entity.prevDest) * interp;
return (MathHelper.sin(f1) + 1.0F) * f2;
}
@Override
protected float handleRotationFloat(EntityLivingBase entity, float interp) {
return this.handleRotationFloat((EntityPigeon) entity, interp);
}
}

View File

@ -67,7 +67,6 @@ public class ModelPigeon extends ModelBase {
}
public void render(Entity entity, float f0, float f1, float f2, float f3, float f4, float scale) {
//this.initModel();
this.setRotationAngles(f0, f1, f2, f3, f4, scale, entity);
this.head.render(scale);
this.beak.render(scale);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 419 B

After

Width:  |  Height:  |  Size: 748 B