Skip to content

Commit

Permalink
Submission prep 4 - fix stupid hammer guy can't beleive it took me 5 …
Browse files Browse the repository at this point in the history
…hours because of a weird hitbox thingy that shouldn't have even happeend but it did and now I lost 5 hours becasue of it but hey at least i got to interact with somebody and htat was really cool

FIX: Fixed a bug where the Hammer Cod would spawn and its entire AI just dies
  • Loading branch information
Superkat32 committed Dec 31, 2023
1 parent 224a970 commit 9df14b1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ The Frogmobile is the ultimate reward. It is crafted using Prismarine Pearls, wh

![frogmobile](https://github.com/Superkat32/FlutterAndFlounder/assets/89557012/5b47a7f3-cdb4-470d-b86f-499288f8dc59)


The Frogmobile moves very fast, and even has a jetpack! You can enable the jetpack by jumping like you would on a horse. The strength of the jump doesn't do anything.

### Other Rewards
Expand Down Expand Up @@ -68,7 +67,6 @@ There are many bosses in a FlounderFest. However, if you want the best experienc
This mod was made for ModFest 1.20! The theme was "Sky And Sea"
[<img src="https://raw.githubusercontent.com/ModFest/art/3bf66556e674d670e30f647d6a48c4e1798c21d4/badge/128h/ModFest%201.20%20Badge%20Cozy.png" width="256" alt="ModFest 1.20">](https://modfest.net/1.20)


## Fun Facts
This mod pulls a lot of inspiration from various sources. I figured I would provide credit to them so you can check them out as well!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class FlutterAndFlounderEntities {
Registries.ENTITY_TYPE,
new Identifier(MOD_ID, "hammercod"),
FabricEntityTypeBuilder.create(SpawnGroup.MONSTER, HammerCodEntity::new)
.dimensions(EntityDimensions.fixed(2f, 3.2f)).build()
.dimensions(EntityDimensions.fixed(1.9f, 2.95f)).build()
);

public static final EntityType<WhackerSalmonEntity> WHACKER_SALMON = Registry.register(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class HammerCodEntity extends CommonBossFish {
protected static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("animation.hammercod.idle");
protected static final RawAnimation ATTACK_ANIM = RawAnimation.begin().thenLoop("animation.hammercod.attack");
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);

public HammerCodEntity(EntityType<? extends HostileEntity> entityType, World world) {
super(entityType, world);
}
Expand All @@ -58,10 +59,8 @@ public void registerControllers(AnimatableManager.ControllerRegistrar controller
protected<E extends HammerCodEntity> PlayState animController(final AnimationState<E> event) {
if(this.isAttacking()) {
return event.setAndContinue(ATTACK_ANIM);
} else if (!event.isMoving()) {
return event.setAndContinue(IDLE_ANIM);
} else {
return PlayState.STOP;
return event.setAndContinue(IDLE_ANIM);
}
}

Expand Down Expand Up @@ -100,6 +99,7 @@ protected SoundEvent getDeathSound() {

@Override
protected SoundEvent getHurtSound(DamageSource source) {
return SoundEvents.ENTITY_COD_HURT;
return SoundEvents.ENTITY_COD_DEATH;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ private static BlockPos fishSpawningPos(ServerWorld world, BlockPos festCenterPo
*/
public static void spawnFlounderFestRewards(ServerWorld world, BlockPos festCenterPos, int totalQuota, boolean didWin) {
//Quota already scales with the amount of players, naturally meaning more players = more rewards
double quotaCalc = totalQuota / (didWin ? 3d : 9d);
int totalRewards = (int) (didWin ? Math.ceil(quotaCalc) : Math.floor(quotaCalc));
double quotaCalc = totalQuota / (didWin ? 3d : 7d);
int totalRewards = (int) Math.ceil(quotaCalc);
if(totalRewards <= 0) {
totalRewards = 1;
}
Expand Down

0 comments on commit 9df14b1

Please sign in to comment.