From 26eb25ed0428b0be695e9a1ece9da3cd2ffc3026 Mon Sep 17 00:00:00 2001 From: ZXMushroom63 Date: Fri, 31 Jan 2025 15:30:31 +0800 Subject: [PATCH] duck mod fixes i think --- examplemods/DuckMod.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examplemods/DuckMod.js b/examplemods/DuckMod.js index 39a8efb..c1f2592 100644 --- a/examplemods/DuckMod.js +++ b/examplemods/DuckMod.js @@ -21,6 +21,7 @@ var nme_EntityDuck = function nme_EntityDuck($worldIn) { entitySuper(this, $worldIn); this.wrapped ||= ModAPI.util.wrap(this).getCorrective(); + console.log(this.$setSize); this.wrapped.setSize(0.4, 0.7); this.wrapped.tasks.addTask(0, AITask("EntityAISwimming", 1)(this)); this.wrapped.tasks.addTask(1, AITask("EntityAIPanic", 2)(this, 1.9)); @@ -67,7 +68,6 @@ } nme_EntityDuck.prototype.$playStepSound = function () { this.wrapped ||= ModAPI.util.wrap(this).getCorrective(); - debugger; this.wrapped.playSound(ModAPI.util.str("mob.duck.step"), 0.2, 1); } nme_EntityDuck.prototype.$getDropItem = function () { @@ -75,7 +75,7 @@ } nme_EntityDuck.prototype.$createChild = function (otherParent) { this.wrapped ||= ModAPI.util.wrap(this).getCorrective(); - return new nme_EntityDuck(this.wrapped.worldObj); + return new nme_EntityDuck(this.wrapped.worldObj?.getRef() ?? null); } nme_EntityDuck.prototype.$isBreedingItem = function (itemstack) { return itemstack !== null && itemstack.$getItem() === ModAPI.items.bread.getRef();