diff --git a/dependencies.gradle b/dependencies.gradle index c5acc9d7..aff22e54 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,31 +1,31 @@ // Add your dependencies here dependencies { - compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta62:api') + compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta66a:api') api("com.github.GTNewHorizons:Mantle:0.5.1:dev") - api("com.github.GTNewHorizons:ForgeMultipart:1.6.8:dev") + api("com.github.GTNewHorizons:ForgeMultipart:1.7.2:dev") // gtnhlib is compileOnlyApi by us, but needed at runtime by nei, so require the correct version - api("com.github.GTNewHorizons:GTNHLib:0.8.17:dev") - implementation("com.github.GTNewHorizons:NotEnoughItems:2.8.14-GTNH:dev") + api("com.github.GTNewHorizons:GTNHLib:0.9.3:dev") + implementation("com.github.GTNewHorizons:NotEnoughItems:2.8.54-GTNH:dev") compileOnlyApi("curse.maven:cofh-core-69162:2388751") compileOnly("com.github.GTNewHorizons:inventory-tweaks:1.7.1:api") - compileOnly("com.github.GTNewHorizons:waila:1.9.2:api") + compileOnly("com.github.GTNewHorizons:waila:1.19.19:api") compileOnly("com.github.GTNewHorizons:Battlegear2:1.4.3:api") compileOnly("curse.maven:minefactory-reloaded-66672:2366150") compileOnly("curse.maven:zelda-sword-skills-220540:2384889") compileOnly("curse.maven:dynamic-sword-skills-226360:2495462") compileOnly("curse.maven:notenoughkeys-224614:2276280") compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") - compileOnly("com.github.GTNewHorizons:Mobs-Info:0.5.6-GTNH:dev") + compileOnly("com.github.GTNewHorizons:Mobs-Info:0.5.9-GTNH:dev") compileOnlyApi("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev") - compileOnlyApi("com.github.GTNewHorizons:Natura:2.8.9:dev") - compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.0-GTNH:dev') + compileOnlyApi("com.github.GTNewHorizons:Natura:2.8.12:dev") + compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.6-GTNH:dev') // For testing scythe crop harvesting // devOnlyNonPublishable("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev") - // devOnlyNonPublishable("com.github.GTNewHorizons:harvestcraft:1.3.2-GTNH:dev") + // devOnlyNonPublishable("com.github.GTNewHorizons:harvestcraft:1.3.8-GTNH:dev") // devOnlyNonPublishable(deobfCurse("pams-harvest-the-nether-231262:2241397")) - // devOnlyNonPublishable("com.github.GTNewHorizons:Natura:2.8.9:dev") - // devOnlyNonPublishable("com.github.GTNewHorizons:EnderCore:0.5.0") + // devOnlyNonPublishable("com.github.GTNewHorizons:Natura:2.8.12:dev") + // devOnlyNonPublishable("com.github.GTNewHorizons:EnderCore:0.5.3") } diff --git a/gradle.properties b/gradle.properties index e020024b..e1fc5436 100644 --- a/gradle.properties +++ b/gradle.properties @@ -39,9 +39,33 @@ remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/co # `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE. developmentEnvironmentUserName = Developer -# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8. -# See https://github.com/bsideup/jabel for details on how this works. -enableModernJavaSyntax = true +# Enables modern Java syntax support. Valid values: +# - false: No modern syntax, Java 8 only +# - jabel: Jabel syntax-only support, compiles to J8 bytecode +# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs) +# - modern: Native modern Java bytecode, no downgrading +enableModernJavaSyntax = jabel + +# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues, +# and should *not* be used in most situations. -1 disables this. +# forceToolchainVersion = -1 + +# Target JVM version for JVM Downgrader bytecode downgrading. +# Only used when enableModernJavaSyntax = jvmDowngrader +# downgradeTargetVersion = 8 + +# Comma-separated list of Java versions for multi-release jar support (JVM Downgrader only). +# Classes will be available in META-INF/versions/N/ for each version N in this list. +# Default: "21,25" (J25+ gets native classes, J21-24 gets partial downgrade, J8-20 gets full downgrade). +# jvmDowngraderMultiReleaseVersions = 21,25 + +# Specifies how JVM Downgrader API stubs are provided. Options: +# - shade: Shade minimized stubs into the jar +# - gtnhlib: GTNHLib provides stubs at runtime (adds version constraint) +# - external: Another dependency provides stubs (no constraint, no warning) +# - (empty): Warning reminding you to configure stubs +# Note: 'shade' option requires you to verify license compliance, see: https://github.com/unimined/JvmDowngrader/blob/main/LICENSE.md +# jvmDowngraderStubsProvider = # Enables injecting missing generics into the decompiled source code for a better coding experience. # Turns most publicly visible List, Map, etc. into proper List, Map types. @@ -96,7 +120,9 @@ usesMixinDebug = false # Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise. mixinPlugin = -# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! +# Specify the package that contains all of your Mixins. The package must exist or +# the build will fail. If you have a package property defined in your mixins..json, +# it must match with this or the build will fail. mixinsPackage = # Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! @@ -172,6 +198,12 @@ curseForgeRelations = # projects. New projects should not use this parameter. # customArchiveBaseName = +# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory. +# runClientWorkingDirectory = run/client + +# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory. +# runServerWorkingDirectory = run/server + # Optional parameter to have the build automatically fail if an illegal version is used. # This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'. # The check is ONLY performed if the version is a git tag. @@ -201,3 +233,6 @@ curseForgeRelations = # This is meant to be set in $HOME/.gradle/gradle.properties. # ideaCheckSpotlessOnBuild = true +# Non-GTNH properties +org.gradle.configuration-cache = true +org.gradle.parallel = true diff --git a/gradle/gradle-daemon-jvm.properties b/gradle/gradle-daemon-jvm.properties new file mode 100644 index 00000000..c29d5076 --- /dev/null +++ b/gradle/gradle-daemon-jvm.properties @@ -0,0 +1,12 @@ +#This file is generated by updateDaemonJvm +toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/fd88a209e0f18ca6eaf97d9fa9e45e01/redirect +toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/1543f336911ae3d7d37bedec8b74d98c/redirect +toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect +toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/1543f336911ae3d7d37bedec8b74d98c/redirect +toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/46949723aaa20c7b64d7ecfed7207034/redirect +toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/99a42fd36e2e41c7c8ed49f423f49fdf/redirect +toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect +toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/1543f336911ae3d7d37bedec8b74d98c/redirect +toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3087f28f30be41ab6818c16a488f5f8a/redirect +toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/552c7bffe0370c66410a51c55985b511/redirect +toolchainVersion=25 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 9bbc975c..f8e1ee31 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37f853b1..23449a2b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index faf93008..adff685a 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -114,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -172,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -212,8 +210,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 9d21a218..c4bdd3ab 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,10 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/settings.gradle b/settings.gradle index 9f80246c..0c877b47 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,7 +17,7 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.43' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.16' } diff --git a/src/main/java/tconstruct/armor/gui/ArmorExtendedGui.java b/src/main/java/tconstruct/armor/gui/ArmorExtendedGui.java index ad442af5..9586e3a1 100644 --- a/src/main/java/tconstruct/armor/gui/ArmorExtendedGui.java +++ b/src/main/java/tconstruct/armor/gui/ArmorExtendedGui.java @@ -1,15 +1,12 @@ package tconstruct.armor.gui; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiInventory; import net.minecraft.client.renderer.InventoryEffectRenderer; -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; import tconstruct.armor.inventory.ArmorExtendedContainer; import tconstruct.armor.player.ArmorExtended; @@ -105,49 +102,13 @@ public class ArmorExtendedGui extends InventoryEffectRenderer { cornerX = this.guiLeft; cornerY = this.guiTop; - drawPlayerOnGui( - this.mc, + // player model render + GuiInventory.func_147046_a( cornerX + 33, cornerY + 75, 30, (float) (cornerX + 51) - this.xSize_lo, - (float) (cornerY + 75 - 50) - this.ySize_lo); + (float) (cornerY + 75 - 50) - this.ySize_lo, + Minecraft.getMinecraft().thePlayer); } - - public static void drawPlayerOnGui(Minecraft par0Minecraft, int par1, int par2, int par3, float par4, float par5) { - GL11.glEnable(GL11.GL_COLOR_MATERIAL); - GL11.glPushMatrix(); - GL11.glTranslatef((float) par1, (float) par2, 50.0F); - GL11.glScalef((float) (-par3), (float) par3, (float) par3); - GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); - float f2 = par0Minecraft.thePlayer.renderYawOffset; - float f3 = par0Minecraft.thePlayer.rotationYaw; - float f4 = par0Minecraft.thePlayer.rotationPitch; - par4 -= 19; - GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F); - RenderHelper.enableStandardItemLighting(); - GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-((float) Math.atan(par5 / 40.0F)) * 20.0F, 1.0F, 0.0F, 0.0F); - par0Minecraft.thePlayer.renderYawOffset = (float) Math.atan(par4 / 40.0F) * 20.0F; - par0Minecraft.thePlayer.rotationYaw = (float) Math.atan(par4 / 40.0F) * 40.0F; - par0Minecraft.thePlayer.rotationPitch = -((float) Math.atan(par5 / 40.0F)) * 20.0F; - par0Minecraft.thePlayer.rotationYawHead = par0Minecraft.thePlayer.rotationYaw; - GL11.glTranslatef(0.0F, par0Minecraft.thePlayer.yOffset, 0.0F); - RenderManager.instance.playerViewY = 180.0F; - RenderManager.instance.renderEntityWithPosYaw(par0Minecraft.thePlayer, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F); - par0Minecraft.thePlayer.renderYawOffset = f2; - par0Minecraft.thePlayer.rotationYaw = f3; - par0Minecraft.thePlayer.rotationPitch = f4; - GL11.glPopMatrix(); - RenderHelper.disableStandardItemLighting(); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); - GL11.glDisable(GL11.GL_TEXTURE_2D); - OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); - } - - /* - * protected void keyTyped(char par1, int par2) { if (par2 == TControls.armorKey.keyCode) { - * this.mc.thePlayer.closeScreen(); } super.keyTyped(par1, par2); } - */ } diff --git a/src/main/java/tconstruct/world/entity/KingBlueSlime.java b/src/main/java/tconstruct/world/entity/KingBlueSlime.java index 7ef988c4..5edb86e3 100644 --- a/src/main/java/tconstruct/world/entity/KingBlueSlime.java +++ b/src/main/java/tconstruct/world/entity/KingBlueSlime.java @@ -163,4 +163,10 @@ public class KingBlueSlime extends SlimeBase implements IBossDisplayData { ToolCore getValidTool() { return TConstructRegistry.tools.get(rand.nextInt(TConstructRegistry.tools.size())); } + + @Override + public void setSlimeSize(int size) { + super.setSlimeSize(size); + this.experienceValue = 500; + } } diff --git a/src/main/java/tconstruct/world/entity/SlimeBase.java b/src/main/java/tconstruct/world/entity/SlimeBase.java index 26e5e40f..2ba5e073 100644 --- a/src/main/java/tconstruct/world/entity/SlimeBase.java +++ b/src/main/java/tconstruct/world/entity/SlimeBase.java @@ -4,18 +4,15 @@ import java.util.ArrayList; import javax.annotation.Nonnull; -import net.minecraft.entity.EntityLiving; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.boss.IBossDisplayData; +import net.minecraft.entity.monster.EntitySlime; import net.minecraft.entity.monster.IMob; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; -import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; -import net.minecraft.world.EnumDifficulty; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; @@ -24,16 +21,13 @@ import com.kuba6000.mobsinfo.api.IMobInfoProvider; import com.kuba6000.mobsinfo.api.MobDrop; import cpw.mods.fml.common.Optional; -import tconstruct.world.TinkerWorld; @Optional.Interface(iface = "com.kuba6000.mobsinfo.api.IMobInfoProvider", modid = "mobsinfo") -public abstract class SlimeBase extends EntityLiving implements IMob, IMobInfoProvider { +public abstract class SlimeBase extends EntitySlime implements IMob, IMobInfoProvider { - public float sizeOffset; - public float sizeFactor; - public float sizeHeight; - - /** the time between each jump of the slime, used for counting */ + /** + * the time between each jump of the slime, used for counting + */ protected int slimeJumpDelay = 0; public SlimeBase(World world) { @@ -41,28 +35,7 @@ public abstract class SlimeBase extends EntityLiving implements IMob, IMobInfoPr initializeSlime(); } - /** Returns the name of the particle used by the slime */ - protected abstract String getSlimeParticle(); - - /** Returns the name of the sound played when the slime jumps. */ - protected String getJumpSound() { - return "mob.slime." + (this.getSlimeSize() > 1 ? "big" : "small"); - } - - /** Returns true if the slime makes a sound when it jumps (based upon the slime's size) */ - protected boolean makesSoundOnJump() { - return this.getSlimeSize() > 0; - } - - /** Returns true if the slime makes a sound when it lands after a jump (based upon the slime's size) */ - protected boolean makesSoundOnLand() { - return this.getSlimeSize() > 2; - } - - public int getSlimeSize() { - return this.dataWatcher.getWatchableObjectByte(16); - } - + @Override public void setSlimeSize(int size) { this.dataWatcher.updateObject(16, (byte) size); this.setSize(0.6F * (float) size, 0.6F * (float) size); @@ -72,10 +45,12 @@ public abstract class SlimeBase extends EntityLiving implements IMob, IMobInfoPr this.jumpMovementFactor = 0.004F * size + 0.01F; - this.experienceValue = size + 2 ^ (size); + this.experienceValue = size + (int) Math.pow(2, size); } - /** returns the health for the slime depending on its size */ + /** + * returns the health for the slime depending on its size + */ protected float getMaxHealthForSize() { int i = this.getSlimeSize(); if (i == 1) return 4; @@ -83,25 +58,14 @@ public abstract class SlimeBase extends EntityLiving implements IMob, IMobInfoPr return (float) Math.min(i * i + 8, 49); } - /** Gets the amount of time the slime needs to wait between jumps. */ + /** + * Gets the amount of time the slime needs to wait between jumps. + */ + @Override protected int getJumpDelay() { return this.rand.nextInt(120) + 40; } - /** - * Indicates weather the slime is able to damage the player (based upon the slime's size) - */ - protected boolean canDamagePlayer() { - return this.getSlimeSize() > 1; - } - - /** - * Gets the amount of damage dealt to the player when "attacked" by the slime. - */ - protected int getAttackStrength() { - return this.getSlimeSize(); - } - /** * Return an instance of the implementing entity here. Used for the slime splitting on death. */ @@ -118,12 +82,6 @@ public abstract class SlimeBase extends EntityLiving implements IMob, IMobInfoPr this.setSlimeSize(size); } - @Override - protected void entityInit() { - super.entityInit(); - this.dataWatcher.addObject(16, (byte) 1); - } - @Override public void jump() { this.motionY = 0.05 * getSlimeSize() + 0.37; @@ -153,64 +111,6 @@ public abstract class SlimeBase extends EntityLiving implements IMob, IMobInfoPr ForgeHooks.onLivingJump(this); } - /** - * Called to update the entity's position/logic. - */ - @Override - public void onUpdate() { - if (!this.worldObj.isRemote && this.worldObj.difficultySetting == EnumDifficulty.PEACEFUL - && this.getSlimeSize() > 0) { - this.isDead = true; - } - - this.sizeFactor += (this.sizeOffset - this.sizeFactor) * 0.5F; - this.sizeHeight = this.sizeFactor; - boolean flag = this.onGround; - super.onUpdate(); - int i; - - if (this.onGround && !flag) { - i = this.getSlimeSize(); - - for (int j = 0; j < i * 8; ++j) { - float f = this.rand.nextFloat() * (float) Math.PI * 2.0F; - float offset = this.rand.nextFloat() * 0.5F + 0.5F; - float xPos = MathHelper.sin(f) * (float) i * 0.5F * offset; - float zPos = MathHelper.cos(f) * (float) i * 0.5F * offset; - TinkerWorld.proxy.spawnParticle( - this.getSlimeParticle(), - this.posX + (double) xPos, - this.boundingBox.minY, - this.posZ + (double) zPos, - 0.0D, - 0.0D, - 0.0D); - } - - if (this.makesSoundOnLand()) { - this.playSound( - this.getJumpSound(), - this.getSoundVolume(), - ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F) / 0.8F); - } - - this.sizeOffset = -0.5F; - } else if (!this.onGround && flag) { - this.sizeOffset = 1.0F; - } - - this.alterSquishAmount(); - - if (this.worldObj.isRemote) { - i = this.getSlimeSize(); - this.setSize(0.6F * (float) i, 0.6F * (float) i); - } - } - - protected void alterSquishAmount() { - this.sizeOffset *= 0.6F; - } - @Override protected void updateEntityActionState() { this.despawnEntity(); @@ -252,19 +152,6 @@ public abstract class SlimeBase extends EntityLiving implements IMob, IMobInfoPr } } - @Override - public void onCollideWithPlayer(EntityPlayer par1EntityPlayer) { - if (this.canDamagePlayer()) { - int i = this.getSlimeSize(); - - if (this.canEntityBeSeen(par1EntityPlayer) - && this.getDistanceSqToEntity(par1EntityPlayer) < 0.6D * (double) i * 0.6D * (double) i - && par1EntityPlayer.attackEntityFrom(DamageSource.causeMobDamage(this), this.getAttackStrength())) { - this.playSound("mob.attack", 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F); - } - } - } - @Override public void setDead() { int size = this.getSlimeSize(); @@ -283,7 +170,7 @@ public abstract class SlimeBase extends EntityLiving implements IMob, IMobInfoPr this.worldObj.spawnEntityInWorld(entityslime); } - super.setDead(); + this.isDead = true; } // Drops items depending on slime size @@ -356,22 +243,6 @@ public abstract class SlimeBase extends EntityLiving implements IMob, IMobInfoPr return this.height * 0.3; } - /** - * Returns the sound this mob makes when it is hurt. - */ - @Override - protected String getHurtSound() { - return getJumpSound(); - } - - /** - * Returns the sound this mob makes on death. - */ - @Override - protected String getDeathSound() { - return getJumpSound(); - } - /** * Returns the volume for the sounds this mob makes. */ @@ -380,26 +251,4 @@ public abstract class SlimeBase extends EntityLiving implements IMob, IMobInfoPr return Math.min(0.05F * (float) this.getSlimeSize(), 0.3f); } - @Override - public int getVerticalFaceSpeed() { - return 0; - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - @Override - public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) { - super.writeEntityToNBT(par1NBTTagCompound); - par1NBTTagCompound.setInteger("Size", this.getSlimeSize() - 1); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - @Override - public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) { - super.readEntityFromNBT(par1NBTTagCompound); - this.setSlimeSize(par1NBTTagCompound.getInteger("Size") + 1); - } } diff --git a/src/main/java/tconstruct/world/model/SlimeRender.java b/src/main/java/tconstruct/world/model/SlimeRender.java index dc4ed623..19572356 100644 --- a/src/main/java/tconstruct/world/model/SlimeRender.java +++ b/src/main/java/tconstruct/world/model/SlimeRender.java @@ -59,8 +59,8 @@ public class SlimeRender extends RenderLiving { */ protected void scaleSlime(SlimeBase par1EdibleSlime, float par2) { float f1 = (float) par1EdibleSlime.getSlimeSize(); - float f2 = (par1EdibleSlime.sizeHeight + (par1EdibleSlime.sizeFactor - par1EdibleSlime.sizeHeight) * par2) - / (f1 * 0.5F + 1.0F); + float f2 = (par1EdibleSlime.prevSquishFactor + + (par1EdibleSlime.squishFactor - par1EdibleSlime.prevSquishFactor) * par2) / (f1 * 0.5F + 1.0F); float f3 = 1.0F / (f2 + 1.0F); GL11.glScalef(f3 * f1, 1.0F / f3 * f1, f3 * f1); }