Ported the ladder sfx and slime split fix

master
Wynd 2025-04-11 23:37:47 +03:00
parent 6c1bdfb3e1
commit cdb70c2521
4 changed files with 51 additions and 4 deletions

View File

@ -0,0 +1,23 @@
--- src/EntityLiving.java.bak 2025-04-11 18:43:27.259084241 +0300
+++ src/EntityLiving.java 2025-04-11 23:25:51.479951056 +0300
@@ -6,6 +6,8 @@
import java.util.List;
import java.util.Random;
+import net.minecraft.src.finalbeta.ModConfig;
+import net.minecraft.src.finalbeta.WyHelper;
// Referenced classes of package net.minecraft.src:
// Entity, Vec3D, World, Material,
@@ -448,6 +450,11 @@
public void moveEntityWithHeading(float f, float f1)
{
+ if (ModConfig.ADD_MORE_SOUNDS.get() && this.isOnLadder() && !(this instanceof EntitySpider) && (this.motionY > 0.1 || this.motionY < -0.1) && this.ticksExisted % 15 == 0 && !this.onGround) {
+ float pitch = WyHelper.clamp(0.85f + this.worldObj.rand.nextFloat() / 2, 0.0f, 1.0f);
+ this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "sound3.step.ladder", 0.3f, pitch);
+ }
+
if(isInWater())
{
double d = posY;

View File

@ -0,0 +1,22 @@
--- src/EntitySlime.java.bak 2025-04-11 18:43:27.571080165 +0300
+++ src/EntitySlime.java 2025-04-11 23:37:10.340857026 +0300
@@ -4,7 +4,7 @@
package net.minecraft.src;
-import java.util.Random;
+import net.minecraft.src.finalbeta.ModConfig;
// Referenced classes of package net.minecraft.src:
// EntityLiving, IMob, DataWatcher, NBTTagCompound,
@@ -118,6 +118,10 @@
public void setEntityDead()
{
+ if (ModConfig.FIX_SLIME_SPLITS.get()) {
+ this.health = Math.max(this.health, 0);
+ }
+
int i = getSlimeSize();
if(!worldObj.multiplayerWorld && i > 1 && health == 0)
{

View File

@ -1,5 +1,5 @@
--- src/ItemBow.java.bak 2025-04-11 18:43:28.565067182 +0300 --- src/ItemBow.java.bak 2025-04-11 18:43:28.565067182 +0300
+++ src/ItemBow.java 2025-04-11 18:47:58.895659634 +0300 +++ src/ItemBow.java 2025-04-11 23:15:48.052227346 +0300
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
package net.minecraft.src; package net.minecraft.src;
@ -13,11 +13,11 @@
super(i); super(i);
maxStackSize = 1; maxStackSize = 1;
+ +
+ if (ModConfig.FIX_BOW_MODEL.get()) { + if (ModConfig.FIX_BOW_MODEL.get()) {
+ this.setFull3D(); + this.setFull3D();
+ } + }
+ +
+ if (ModConfig.FIX_BOW_DURABILITY.get()) { + if (ModConfig.FIX_BOW_DURABILITY.get()) {
+ this.setMaxDamage(385); + this.setMaxDamage(385);
+ } + }
} }

View File

@ -64,6 +64,8 @@ public class mod_FinalBeta extends BaseMod {
// minecraft.thePlayer.dropItem(Block.stoneOvenIdle.blockID, 1); // minecraft.thePlayer.dropItem(Block.stoneOvenIdle.blockID, 1);
// minecraft.thePlayer.dropItem(ModBlock.COAL_BLOCK.blockID, 1); // minecraft.thePlayer.dropItem(ModBlock.COAL_BLOCK.blockID, 1);
minecraft.thePlayer.dropItem(Block.ladder.blockID, 64);
// minecraft.thePlayer.dropItem(Block.grass.blockID, 2); // minecraft.thePlayer.dropItem(Block.grass.blockID, 2);
// minecraft.thePlayer.dropItem(Block.fence.blockID, 64); // minecraft.thePlayer.dropItem(Block.fence.blockID, 64);