From ec1714e10bb2deaa28cc95e9fba7b33872bbeefd Mon Sep 17 00:00:00 2001 From: Me <135455255+IcarussOne@users.noreply.github.com> Date: Thu, 25 Apr 2024 18:41:37 -0500 Subject: [PATCH] Castle Renovation -Removed placeholder final boss -Cleaned up castle spawns -Giants can no longer be knocked back --- src/main/java/twilightforest/TFFeature.java | 7 +- src/main/java/twilightforest/TFSounds.java | 3 - .../twilightforest/client/TFClientProxy.java | 1 - .../renderer/entity/RenderTFFinalKobold.java | 21 ----- .../entity/EntityTFGiantMiner.java | 1 + .../twilightforest/entity/TFEntities.java | 1 - .../entity/boss/EntityTFFinalKobold.java | 93 ------------------- .../entity/boss/EntityTFSnowQueen.java | 2 +- .../twilightforest/util/TFEntityNames.java | 10 +- .../assets/twilightforest/sounds.json | 27 ------ 10 files changed, 11 insertions(+), 155 deletions(-) delete mode 100644 src/main/java/twilightforest/client/renderer/entity/RenderTFFinalKobold.java delete mode 100644 src/main/java/twilightforest/entity/boss/EntityTFFinalKobold.java diff --git a/src/main/java/twilightforest/TFFeature.java b/src/main/java/twilightforest/TFFeature.java index 785edeb959..f4ff789de7 100644 --- a/src/main/java/twilightforest/TFFeature.java +++ b/src/main/java/twilightforest/TFFeature.java @@ -393,15 +393,12 @@ public StructureStartTFAbstract provideStructureStart(World world, Random rand, TFFinalCastlePieces.registerFinalCastlePieces(); // plain parts of the castle, like the tower maze - this.addMonster(EntityTFKobold.class, 10, 4, 4) - .addMonster(EntityTFAdherent.class, 10, 1, 1) + this.addMonster(EntityTFAdherent.class, 10, 1, 1) .addMonster(EntityTFHarbingerCube.class, 10, 1, 1) - .addMonster(EntityEnderman.class, 10, 1, 1) // internal castle - .addMonster(1, EntityTFKobold.class, 10, 4, 4) .addMonster(1, EntityTFAdherent.class, 10, 1, 1) .addMonster(1, EntityTFHarbingerCube.class, 10, 1, 1) - .addMonster(1, EntityTFArmoredGiant.class, 10, 1, 1) + .addMonster(1, EntityTFArmoredGiant.class, 10, 1, 1) // Placeholder // dungeons .addMonster(2, EntityTFAdherent.class, 10, 1, 1) // forge diff --git a/src/main/java/twilightforest/TFSounds.java b/src/main/java/twilightforest/TFSounds.java index cf2fd8255e..ebc4d4d538 100644 --- a/src/main/java/twilightforest/TFSounds.java +++ b/src/main/java/twilightforest/TFSounds.java @@ -17,9 +17,6 @@ public final class TFSounds { public static final SoundEvent KOBOLD_AMBIENT = createEvent("mob.kobold.kobold"); public static final SoundEvent KOBOLD_HURT = createEvent("mob.kobold.hurt"); public static final SoundEvent KOBOLD_PARROT = createEvent("mob.kobold.parrot"); - public static final SoundEvent FINAL_KOBOLD_DEATH = createEvent("mob.final_kobold.die"); - public static final SoundEvent FINAL_KOBOLD_AMBIENT = createEvent("mob.final_kobold.kobold"); - public static final SoundEvent FINAL_KOBOLD_HURT = createEvent("mob.final_kobold.hurt"); public static final SoundEvent CICADA = createEvent("mob.cicada"); public static final SoundEvent NAGA_HISS = createEvent("mob.naga.hiss"); public static final SoundEvent NAGA_HURT = createEvent("mob.naga.hurt"); diff --git a/src/main/java/twilightforest/client/TFClientProxy.java b/src/main/java/twilightforest/client/TFClientProxy.java index f12996e0b4..544788280f 100644 --- a/src/main/java/twilightforest/client/TFClientProxy.java +++ b/src/main/java/twilightforest/client/TFClientProxy.java @@ -89,7 +89,6 @@ public void preInit() { RenderingRegistry.registerEntityRenderingHandler(EntityTFRaven.class, m -> new RenderTFBird(m, new ModelTFRaven(), 1.0F, "raven.png")); RenderingRegistry.registerEntityRenderingHandler(EntityTFQuestRam.class, RenderTFQuestRam::new); RenderingRegistry.registerEntityRenderingHandler(EntityTFKobold.class, m -> new RenderTFKobold(m, new ModelTFKobold(), 0.4F, "kobold.png")); - RenderingRegistry.registerEntityRenderingHandler(EntityTFFinalKobold.class, m -> new RenderTFFinalKobold(m, new ModelTFKobold(), 3.2F, "kobold.png")); RenderingRegistry.registerEntityRenderingHandler(EntityTFBoggard.class, m -> new RenderTFBiped<>(m, new ModelTFLoyalZombie(), 0.625F, "kobold.png")); RenderingRegistry.registerEntityRenderingHandler(EntityTFMosquitoSwarm.class, m -> new RenderTFGenericLiving<>(m, new ModelTFMosquitoSwarm(), 0.0F, "mosquitoswarm.png")); RenderingRegistry.registerEntityRenderingHandler(EntityTFDeathTome.class, m -> new RenderTFGenericLiving<>(m, new ModelTFDeathTome(), 0.3F, "textures/entity/enchanting_table_book.png")); diff --git a/src/main/java/twilightforest/client/renderer/entity/RenderTFFinalKobold.java b/src/main/java/twilightforest/client/renderer/entity/RenderTFFinalKobold.java deleted file mode 100644 index 322581f431..0000000000 --- a/src/main/java/twilightforest/client/renderer/entity/RenderTFFinalKobold.java +++ /dev/null @@ -1,21 +0,0 @@ -package twilightforest.client.renderer.entity; - -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.entity.RenderManager; -import twilightforest.entity.boss.EntityTFFinalKobold; - -public class RenderTFFinalKobold extends RenderTFBiped { - - private final float scale; - - public RenderTFFinalKobold(RenderManager manager, ModelBiped modelBiped, float shadowSize, String textureName) { - super(manager, modelBiped, shadowSize, textureName); - this.scale = 8.0F; - } - - @Override - protected void preRenderCallback(EntityTFFinalKobold entitylivingbaseIn, float partialTickTime) { - GlStateManager.scale(this.scale, this.scale, this.scale); - } -} diff --git a/src/main/java/twilightforest/entity/EntityTFGiantMiner.java b/src/main/java/twilightforest/entity/EntityTFGiantMiner.java index cc73407e12..a569a57c13 100644 --- a/src/main/java/twilightforest/entity/EntityTFGiantMiner.java +++ b/src/main/java/twilightforest/entity/EntityTFGiantMiner.java @@ -56,6 +56,7 @@ protected void applyEntityAttributes() { this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.23D); this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(2.0D); this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(40.0D); + this.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(1.0D); } @Override diff --git a/src/main/java/twilightforest/entity/TFEntities.java b/src/main/java/twilightforest/entity/TFEntities.java index 320a8a9ded..b5422d79c7 100644 --- a/src/main/java/twilightforest/entity/TFEntities.java +++ b/src/main/java/twilightforest/entity/TFEntities.java @@ -106,7 +106,6 @@ public static void registerEntities(RegistryEvent.Register event) { helper.registerEntity(TFEntityNames.RAVEN, EntityTFRaven.class, EntityTFRaven::new, 0x000011, 0x222233); helper.registerEntity(TFEntityNames.QUEST_RAM, EntityTFQuestRam.class, EntityTFQuestRam::new, 0xfefeee, 0x33aadd); helper.registerEntity(TFEntityNames.KOBOLD, EntityTFKobold.class, EntityTFKobold::new, 0x372096, 0x895d1b); - helper.registerEntity(TFEntityNames.FINAL_KOBOLD, EntityTFFinalKobold.class, EntityTFFinalKobold::new, 0x372096, 0x895d1b); helper.registerEntity(TFEntityNames.MOSQUITO_SWARM, EntityTFMosquitoSwarm.class, EntityTFMosquitoSwarm::new, 0x080904, 0x2d2f21); helper.registerEntity(TFEntityNames.DEATH_TOME, EntityTFDeathTome.class, EntityTFDeathTome::new, 0x774e22, 0xdbcdbe); helper.registerEntity(TFEntityNames.MINOTAUR, EntityTFMinotaur.class, EntityTFMinotaur::new, 0x3f3024, 0xaa7d66); diff --git a/src/main/java/twilightforest/entity/boss/EntityTFFinalKobold.java b/src/main/java/twilightforest/entity/boss/EntityTFFinalKobold.java deleted file mode 100644 index b0fd63403c..0000000000 --- a/src/main/java/twilightforest/entity/boss/EntityTFFinalKobold.java +++ /dev/null @@ -1,93 +0,0 @@ -package twilightforest.entity.boss; - -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.*; -import net.minecraft.entity.monster.EntityMob; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.SoundEvents; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumParticleTypes; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.SoundEvent; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import twilightforest.TFSounds; -import twilightforest.TwilightForestMod; - -public class EntityTFFinalKobold extends EntityMob { - - public static final ResourceLocation LOOT_TABLE = TwilightForestMod.prefix("entities/final_kobold"); - - public EntityTFFinalKobold(World world) { - super(world); - setSize(5.6F, 7.7F); - } - - @Override - protected void initEntityAI() { - this.tasks.addTask(0, new EntityAISwimming(this)); - this.tasks.addTask(2, new EntityAIAttackMelee(this, 1.0, false) { - @Override - protected double getAttackReachSqr(EntityLivingBase attackTarget) { - return this.attacker.width * this.attacker.width + attackTarget.width; - } - }); - this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0)); - this.tasks.addTask(7, new EntityAIWanderAvoidWater(this, 1.0)); - this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 16.0F)); - this.tasks.addTask(8, new EntityAILookIdle(this)); - this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true)); - this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<>(this, EntityPlayer.class, true)); - } - - @Override - protected void applyEntityAttributes() { - super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.ARMOR).setBaseValue(30); - this.getEntityAttribute(SharedMonsterAttributes.ARMOR_TOUGHNESS).setBaseValue(20); - this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(32); - this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(35); - this.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(1); - this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(1024); - this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.14); - } - - @Override - protected void onDeathUpdate() { - super.onDeathUpdate(); - - for (int i = 0; i < 20; ++i) { - float f = (rand.nextFloat() - 0.5F) * 8.0F; - float f1 = (rand.nextFloat() - 0.5F) * 4.0F; - float f2 = (rand.nextFloat() - 0.5F) * 8.0F; - world.spawnParticle(EnumParticleTypes.EXPLOSION_NORMAL, posX + (double)f, posY + 2.0 + (double)f1, posZ + (double)f2, 0.0, 0.0, 0.0); - } - } - - @Override - protected SoundEvent getAmbientSound() { - return TFSounds.FINAL_KOBOLD_AMBIENT; - } - - @Override - protected SoundEvent getHurtSound(DamageSource source) { - return TFSounds.FINAL_KOBOLD_HURT; - } - - @Override - protected SoundEvent getDeathSound() { - return TFSounds.FINAL_KOBOLD_DEATH; - } - - @Override - protected void playStepSound(BlockPos pos, Block blockIn) { - this.playSound(SoundEvents.ENTITY_IRONGOLEM_STEP, 1.0F, 1.0F); - } - - @Override - public ResourceLocation getLootTable() { - return LOOT_TABLE; - } -} diff --git a/src/main/java/twilightforest/entity/boss/EntityTFSnowQueen.java b/src/main/java/twilightforest/entity/boss/EntityTFSnowQueen.java index 450c981863..fbeed3e331 100644 --- a/src/main/java/twilightforest/entity/boss/EntityTFSnowQueen.java +++ b/src/main/java/twilightforest/entity/boss/EntityTFSnowQueen.java @@ -149,7 +149,7 @@ public ResourceLocation getLootTable() { public void onLivingUpdate() { super.onLivingUpdate(); - if (isBreathing()) playSound(MMSounds.ENTITY_FROSTMAW_ICEBREATH_START, rand.nextFloat() * 0.5F, rand.nextFloat() * 1.5F); + if (isBreathing()) playSound(MMSounds.ENTITY_FROSTMAW_ICEBREATH_START, rand.nextFloat() * 0.75F, rand.nextFloat() * 1.5F); if (!world.isRemote) { bossInfo.setPercent(getHealth() / getMaxHealth()); } else { diff --git a/src/main/java/twilightforest/util/TFEntityNames.java b/src/main/java/twilightforest/util/TFEntityNames.java index 791113c9b6..12957255db 100644 --- a/src/main/java/twilightforest/util/TFEntityNames.java +++ b/src/main/java/twilightforest/util/TFEntityNames.java @@ -90,11 +90,10 @@ public class TFEntityNames { public static final ResourceLocation GIANT_MINER = prefix("giant_miner"); public static final ResourceLocation ARMORED_GIANT = prefix("armored_giant"); + // Final Castle public static final ResourceLocation HARBINGER_CUBE = prefix("harbinger_cube"); public static final ResourceLocation ADHERENT = prefix("adherent"); - public static final ResourceLocation ROVING_CUBE = prefix("roving_cube"); - public static final ResourceLocation SLIDER = prefix("slider"); - public static final ResourceLocation CASTLE_GUARDIAN = prefix("castle_guardian"); + // More castle mobs here // Technical public static final ResourceLocation HYDRA_HEAD = prefix("hydra_head"); @@ -118,6 +117,11 @@ public class TFEntityNames { public static final ResourceLocation SEEKER_ARROW = prefix("seeker_arrow"); public static final ResourceLocation ICE_ARROW = prefix("ice_arrow"); public static final ResourceLocation ICE_SNOWBALL = prefix("ice_snowball"); + + // Unused + public static final ResourceLocation ROVING_CUBE = prefix("roving_cube"); + public static final ResourceLocation SLIDER = prefix("slider"); + public static final ResourceLocation CASTLE_GUARDIAN = prefix("castle_guardian"); private static ResourceLocation prefix(String path) { return new ResourceLocation(TwilightForestMod.ID, path); diff --git a/src/main/resources/assets/twilightforest/sounds.json b/src/main/resources/assets/twilightforest/sounds.json index baede20c94..06ba17a97f 100644 --- a/src/main/resources/assets/twilightforest/sounds.json +++ b/src/main/resources/assets/twilightforest/sounds.json @@ -33,33 +33,6 @@ } ] }, - "mob.final_kobold.die": { - "sounds": [ - { - "type": "event", - "name": "twilightforest:mob.kobold.die", - "pitch": 0.1 - } - ] - }, - "mob.final_kobold.kobold": { - "sounds": [ - { - "type": "event", - "name": "twilightforest:mob.kobold.kobold", - "pitch": 0.1 - } - ] - }, - "mob.final_kobold.hurt": { - "sounds": [ - { - "type": "event", - "name": "twilightforest:mob.kobold.hurt", - "pitch": 0.1 - } - ] - }, "mob.cicada": { "sounds": [ "twilightforest:mob/cicada0",