Skip to content

Commit

Permalink
1.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
ammoore00 committed Jun 16, 2022
1 parent ee58b0c commit 978f349
Show file tree
Hide file tree
Showing 87 changed files with 1,823 additions and 1,051 deletions.
34 changes: 34 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
## Version 1.3.9 ##
Thanks to the following people who have contributed to this release!
- Dawnraider
- Zhil
- Hiracho
- slzei

/--General--/
- Added the ability to load addons from the ./mods folder. Note, however, that addons must declare their main addon class in their own package as the loader will not check the base MC package.
- Added several new splash texts, and removed a few that no longer fit with the current state of the mod. Thanks to everyone who suggested new splash texts!
- Tweaked some translation entries for the Turkish translation.

/--Gameplay--/
- Added a config option to disable the HCS radius increase in large biomes.
- Changed hardcore spawn to try not to respawn the player in the jungle or ocean. Do note that it is still possible to spawn there if no other location is found within a reasonable time.
- Changed the block dispenser to only place a minecart in the world if one is not already present in front of it.
- Changed block dispensers to eject minecarts with some velocity if a rail is present.
- Changed the position at which a block dispenser places a minecart without rails to make it easier to fit them down a 1x1 hole.
- Changed minecarts with chests to be more predictable when spilling items when broken.
- Changed hoppers to no longer reset the number of contained souls when the soul sand filter is removed to make it more difficult to circumvent breaking the hopper when not powered.
- Changed tools to no longer be placed inside of replaceable blocks to prevent using them to put out fires.
- Changed snow placed during world generation to fill in tall grass and other snowloggable blocks.
- Changed (increased) the volume of the splash sound when a fish grabs a fish hook.
- Fixed an issue where crafting crucibles on a turntable did not eject a clay ball.
- Fixed an issue where carrots required natural light to grow.
- Fixed an issue where the health regen changes from last release did not get applied to multiplayer.
- Fixed an issue where some block place events were using the step sound instead of the place sound.

/--Addon API--/
- Added hooks to define behavior when entities are consumed by a block dispenser.
- Added hooks to prevent the player from respawning in certain biomes.
- Added hooks to change the volume and pitch of different block sounds (place, step, break) independently of one another.
- Added hooks to define more properties for daily growth crops.

## Version 1.3.8 ##
Thanks to the following people who contributed to this release!
-Dawnraider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,16 @@
}

int var12;
@@ -543,6 +571,10 @@
@@ -539,10 +567,18 @@
{
this.worldObj.setBlock(var12 + var4, var14, var13 + var5, Block.snow.blockID, 0, 2);
}
+ else if (this.worldObj.canSnowAt(var12 + var4, var14 + 1, var13 + var5))
+ {
+ this.worldObj.setBlock(var12 + var4, var14 + 1, var13 + var5, Block.snow.blockID, 0, 2);
}
}
+ }

BlockSand.fallInstantly = false;
+
Expand All @@ -139,7 +147,7 @@
}

/**
@@ -612,4 +644,67 @@
@@ -612,4 +648,67 @@
this.scatteredFeatureGenerator.generate(this, this.worldObj, par1, par2, (byte[])null);
}
}
Expand Down
23 changes: 18 additions & 5 deletions patches/minecraft/net/minecraft/src/Entity.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
StepSound var5 = Block.blocksList[par4].stepSound;

if (this.worldObj.getBlockId(par1, par2 + 1, par3) == Block.snow.blockID)
@@ -976,6 +1010,19 @@
@@ -976,9 +1010,22 @@
var5 = Block.snow.stepSound;
this.playSound(var5.getStepSound(), var5.getVolume() * 0.15F, var5.getPitch());
}
Expand All @@ -198,14 +198,18 @@
+
+ if ( blockAbove != null && blockAbove.IsGroundCover( ) )
+ {
+ var5 = blockAbove.stepSound;
+ var5 = blockAbove.GetStepSound(this.worldObj, par1, par2, par3);
+
+ playSound( var5.getStepSound(), var5.getVolume() * 0.15F, var5.getPitch() );
+ playSound( var5.getStepSound(), var5.getStepVolume() * 0.15F, var5.getStepPitch() );
+ }
+ // END FCMOD
else if (!Block.blocksList[par4].blockMaterial.isLiquid())
{
this.playSound(var5.getStepSound(), var5.getVolume() * 0.15F, var5.getPitch());
- this.playSound(var5.getStepSound(), var5.getVolume() * 0.15F, var5.getPitch());
+ this.playSound(var5.getStepSound(), var5.getStepVolume() * 0.15F, var5.getStepPitch());
}
}

@@ -1057,7 +1104,10 @@
*/
public boolean isWet()
Expand Down Expand Up @@ -290,7 +294,7 @@
}

public boolean func_96091_a(Explosion par1Explosion, World par2World, int par3, int par4, int par5, int par6, float par7)
@@ -2400,4 +2470,709 @@
@@ -2400,4 +2470,718 @@
{
return this.getEntityName();
}
Expand Down Expand Up @@ -999,4 +1003,13 @@
+ }
+ }
+ // END FCMOD
+
+
+ /**
+ * Called when block dispenser tries to eat this entity, return true if the Dispenser should stop looking for more stuff to consume
+ */
+ public boolean onBlockDispenserConsume(FCBlockBlockDispenser blockDispenser, FCTileEntityBlockDispenser tileEentityDispenser) {
+ return false;
+
+ }
+}
13 changes: 12 additions & 1 deletion patches/minecraft/net/minecraft/src/EntityBoat.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
{
this.worldObj.setBlockToAir(var27, var21, var19);
}
@@ -547,4 +606,40 @@
@@ -547,4 +606,51 @@
{
this.field_70279_a = par1;
}
Expand Down Expand Up @@ -157,4 +157,15 @@
+ }
+ }
+ // END FCMOD
+
+ @Override
+ public boolean onBlockDispenserConsume(FCBlockBlockDispenser blockDispenser, FCTileEntityBlockDispenser tileEentityDispenser) {
+ setDead();
+
+ FCUtilsInventory.AddSingleItemToInventory( tileEentityDispenser, Item.boat.itemID, 0 );
+
+ worldObj.playAuxSFX( 1001, (int)posX, (int)posY, (int)posZ, 0 ); // high pitch click
+
+ return true;
+ }
+}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
{
if (this.ticksCatchable > 0)
{
@@ -348,14 +367,19 @@
@@ -348,18 +367,23 @@
}
else
{
Expand All @@ -96,6 +96,11 @@
{
this.ticksCatchable = this.rand.nextInt(30) + 10;
this.motionY -= 0.20000000298023224D;
- this.playSound("random.splash", 0.25F, 1.0F + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.4F);
+ this.playSound("random.splash", 0.5F, 1.0F + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.4F);
float var30 = (float)MathHelper.floor_double(this.boundingBox.minY);
int var15;
float var17;
@@ -378,19 +402,26 @@
var17 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width;
this.worldObj.spawnParticle("splash", this.posX + (double)var31, (double)(var30 + 1.0F), this.posZ + (double)var17, this.motionX, this.motionY, this.motionZ);
Expand Down
11 changes: 11 additions & 0 deletions patches/minecraft/net/minecraft/src/EntityLiving.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,17 @@
super.fall(par1);
int var2 = MathHelper.ceiling_float_int(par1 - 3.0F);

@@ -1345,8 +1456,8 @@

if (var3 > 0)
{
- StepSound var4 = Block.blocksList[var3].stepSound;
- this.playSound(var4.getStepSound(), var4.getVolume() * 0.5F, var4.getPitch() * 0.75F);
+ StepSound var4 = Block.blocksList[var3].GetStepSound(this.worldObj, (int) this.posX, (int) this.posY, (int) this.posZ);
+ this.playSound(var4.getStepSound(), var4.getStepVolume() * 0.5F, var4.getStepPitch() * 0.75F);
}
}
}
@@ -1368,6 +1479,12 @@
this.motionZ *= 0.800000011920929D;
this.motionY -= 0.02D;
Expand Down
30 changes: 29 additions & 1 deletion patches/minecraft/net/minecraft/src/EntityMinecart.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

public Vec3 func_70495_a(double par1, double par3, double par5, double par7)
{
@@ -1133,4 +1149,12 @@
@@ -1133,4 +1149,40 @@
{
return this.entityName;
}
Expand All @@ -69,4 +69,32 @@
+ return !entity.IsItemEntity();
}
+ // END FCMOD
+
+ @Override
+ public boolean onBlockDispenserConsume(FCBlockBlockDispenser blockDispenser, FCTileEntityBlockDispenser tileEentityDispenser) {
+
+ int minecartType = getMinecartType();
+ // dismount any entities riding the minecart
+ if( riddenByEntity != null) {
+ riddenByEntity.mountEntity( this );
+ }
+
+ setDead();
+ switch ( minecartType ) {
+ case 1: // chest cart
+ FCUtilsInventory.AddSingleItemToInventory( tileEentityDispenser, Item.minecartCrate.itemID, 0 );
+ break;
+
+ case 2: // furnace
+ FCUtilsInventory.AddSingleItemToInventory( tileEentityDispenser, Item.minecartPowered.itemID, 0 );
+ break;
+
+ default: // 0 = empty cart, and this also covers the new minecart types (tnt, hopper & mob-spawner)
+ FCUtilsInventory.AddSingleItemToInventory( tileEentityDispenser, Item.minecartEmpty.itemID, 0 );
+ break;
+ }
+
+ worldObj.playAuxSFX( 1001, (int)posX, (int)posY, (int)posZ, 0 ); // high pitch click
+ return true;
+ }
+}
Original file line number Diff line number Diff line change
@@ -1,20 +1,50 @@
--- a/minecraft/net/minecraft/src/EntityMinecartContainer.java
+++ b/minecraft/net/minecraft/src/EntityMinecartContainer.java
@@ -44,7 +44,7 @@
@@ -30,9 +30,6 @@

if (var3 != null)
{
- float var4 = this.rand.nextFloat() * 0.8F + 0.1F;
- float var5 = this.rand.nextFloat() * 0.8F + 0.1F;
- float var6 = this.rand.nextFloat() * 0.8F + 0.1F;

while (var3.stackSize > 0)
{
@@ -44,8 +41,8 @@
}

var3.stackSize -= var7;
- EntityItem var8 = new EntityItem(this.worldObj, this.posX + (double)var4, this.posY + (double)var5, this.posZ + (double)var6, new ItemStack(var3.itemID, var7, var3.getItemDamage()));
+ EntityItem var8 = (EntityItem) EntityList.createEntityOfType(EntityItem.class, this.worldObj, this.posX + (double)var4, this.posY + (double)var5, this.posZ + (double)var6, new ItemStack(var3.itemID, var7, var3.getItemDamage()));
float var9 = 0.05F;
- float var9 = 0.05F;
+ EntityItem var8 = (EntityItem) EntityList.createEntityOfType(EntityItem.class, this.worldObj, this.posX, this.posY, this.posZ, new ItemStack(var3.itemID, var7, var3.getItemDamage()));
+ float var9 = 0.08F;
var8.motionX = (double)((float)this.rand.nextGaussian() * var9);
var8.motionY = (double)((float)this.rand.nextGaussian() * var9 + 0.2F);
@@ -206,7 +206,7 @@
var8.motionZ = (double)((float)this.rand.nextGaussian() * var9);
@@ -192,9 +189,6 @@

if (var2 != null)
{
- float var3 = this.rand.nextFloat() * 0.8F + 0.1F;
- float var4 = this.rand.nextFloat() * 0.8F + 0.1F;
- float var5 = this.rand.nextFloat() * 0.8F + 0.1F;

while (var2.stackSize > 0)
{
@@ -206,14 +200,14 @@
}

var2.stackSize -= var6;
- EntityItem var7 = new EntityItem(this.worldObj, this.posX + (double)var3, this.posY + (double)var4, this.posZ + (double)var5, new ItemStack(var2.itemID, var6, var2.getItemDamage()));
+ EntityItem var7 = (EntityItem) EntityList.createEntityOfType(EntityItem.class, this.worldObj, this.posX + (double)var3, this.posY + (double)var4, this.posZ + (double)var5, new ItemStack(var2.itemID, var6, var2.getItemDamage()));
+ EntityItem var7 = (EntityItem) EntityList.createEntityOfType(EntityItem.class, this.worldObj, this.posX , this.posY, this.posZ, new ItemStack(var2.itemID, var6, var2.getItemDamage()));

if (var2.hasTagCompound())
{
var7.getEntityItem().setTagCompound((NBTTagCompound)var2.getTagCompound().copy());
}

- float var8 = 0.05F;
+ float var8 = 0.08F;
var7.motionX = (double)((float)this.rand.nextGaussian() * var8);
var7.motionY = (double)((float)this.rand.nextGaussian() * var8 + 0.2F);
var7.motionZ = (double)((float)this.rand.nextGaussian() * var8);
6 changes: 3 additions & 3 deletions patches/minecraft/net/minecraft/src/EntityPlayer.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -747,15 +747,15 @@
+
+ if ( blockAbove != null && blockAbove.IsGroundCover( ) )
+ {
+ StepSound stepSound = blockAbove.stepSound;
+ StepSound stepSound = blockAbove.GetStepSound(this.worldObj, i, j, k);
+
+ worldObj.playSoundAtEntity( this, stepSound.getStepSound(), stepSound.getVolume() * 0.3F, stepSound.getPitch() * 0.75F );
+ worldObj.playSoundAtEntity( this, stepSound.getStepSound(), stepSound.getStepVolume() * 0.3F, stepSound.getStepPitch() * 0.75F );
+ }
+ else if ( !Block.blocksList[iBlockID].blockMaterial.isLiquid() )
+ {
+ StepSound stepSound = Block.blocksList[iBlockID].GetStepSound( worldObj, i, j, k );
+
+ worldObj.playSoundAtEntity( this, stepSound.getStepSound(), stepSound.getVolume() * 0.3F, stepSound.getPitch() * 0.5F );
+ worldObj.playSoundAtEntity( this, stepSound.getStepSound(), stepSound.getStepVolume() * 0.3F, stepSound.getStepPitch() * 0.5F );
+ }
+ }
+ else
Expand Down
Loading

0 comments on commit 978f349

Please sign in to comment.