Skip to content

Commit

Permalink
Fix bleeding effect
Browse files Browse the repository at this point in the history
  • Loading branch information
andantet committed Nov 18, 2023
1 parent b691d90 commit 60adc2b
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 29 deletions.
7 changes: 1 addition & 6 deletions src/main/kotlin/dev/hybridlabs/aquatic/HybridAquatic.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import dev.hybridlabs.aquatic.block.HybridAquaticBlocks
import dev.hybridlabs.aquatic.block.PlushieBlock
import dev.hybridlabs.aquatic.block.SeaMessage
import dev.hybridlabs.aquatic.block.entity.HybridAquaticBlockEntityTypes
import dev.hybridlabs.aquatic.effects.HybridAquaticStatusEffects
import dev.hybridlabs.aquatic.effects.HybridAquaticStatusEffects.BLEEDING
import dev.hybridlabs.aquatic.effect.HybridAquaticStatusEffects
import dev.hybridlabs.aquatic.enchantment.HybridAquaticEnchantments
import dev.hybridlabs.aquatic.entity.HybridAquaticEntityTypes
import dev.hybridlabs.aquatic.entity.SpawnRestrictionRegistry
Expand All @@ -24,7 +23,6 @@ import net.fabricmc.fabric.api.event.registry.DynamicRegistries
import net.fabricmc.fabric.api.`object`.builder.v1.trade.TradeOfferHelper
import net.minecraft.item.BlockItem
import net.minecraft.registry.Registries
import net.minecraft.util.Identifier
import net.minecraft.village.TradeOffers.SellItemFactory
import org.slf4j.Logger
import org.slf4j.LoggerFactory
Expand All @@ -36,9 +34,6 @@ object HybridAquatic : ModInitializer {
override fun onInitialize() {
logger.info("Initializing $MOD_ID")

net.minecraft.registry.Registry.register(Registries.STATUS_EFFECT, Identifier("hybrid_aquatic", "bleeding"), BLEEDING)


HybridAquaticBlocks
HybridAquaticBlockEntityTypes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dev.hybridlabs.aquatic.data.client
import dev.hybridlabs.aquatic.block.HybridAquaticBlocks
import dev.hybridlabs.aquatic.block.SeaMessage
import dev.hybridlabs.aquatic.data.HybridAquaticDataGenerator.filterHybridAquatic
import dev.hybridlabs.aquatic.effects.HybridAquaticStatusEffects
import dev.hybridlabs.aquatic.effect.HybridAquaticStatusEffects
import dev.hybridlabs.aquatic.enchantment.HybridAquaticEnchantments
import dev.hybridlabs.aquatic.entity.HybridAquaticEntityTypes
import dev.hybridlabs.aquatic.item.HybridAquaticItemGroups
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.hybridlabs.aquatic.effects
package dev.hybridlabs.aquatic.effect

import net.minecraft.entity.LivingEntity
import net.minecraft.entity.effect.StatusEffect
Expand All @@ -16,4 +16,4 @@ class Bleeding : StatusEffect(StatusEffectCategory.HARMFUL, 0xee4049) {
entity.health = maxOf(entity.health - 2.0f, targetHealth)
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package dev.hybridlabs.aquatic.effect

import dev.hybridlabs.aquatic.HybridAquatic
import net.minecraft.entity.effect.StatusEffect
import net.minecraft.registry.Registries
import net.minecraft.registry.Registry
import net.minecraft.util.Identifier

object HybridAquaticStatusEffects {
val BLEEDING = register("bleeding", Bleeding())

private fun register(id: String, effect: StatusEffect): StatusEffect {
return Registry.register(Registries.STATUS_EFFECT, Identifier(HybridAquatic.MOD_ID, id), effect)
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
package dev.hybridlabs.aquatic.entity.shark

import dev.hybridlabs.aquatic.effects.HybridAquaticStatusEffects
import dev.hybridlabs.aquatic.effect.HybridAquaticStatusEffects
import dev.hybridlabs.aquatic.item.HybridAquaticItems
import dev.hybridlabs.aquatic.tag.HybridAquaticEntityTags
import net.minecraft.block.Blocks
import net.minecraft.entity.*
import net.minecraft.entity.EntityData
import net.minecraft.entity.EntityDimensions
import net.minecraft.entity.EntityPose
import net.minecraft.entity.EntityType
import net.minecraft.entity.LivingEntity
import net.minecraft.entity.SpawnReason
import net.minecraft.entity.ai.control.AquaticMoveControl
import net.minecraft.entity.ai.control.YawAdjustingLookControl
import net.minecraft.entity.ai.goal.*
import net.minecraft.entity.ai.goal.ActiveTargetGoal
import net.minecraft.entity.ai.goal.ChaseBoatGoal
import net.minecraft.entity.ai.goal.LookAroundGoal
import net.minecraft.entity.ai.goal.LookAtEntityGoal
import net.minecraft.entity.ai.goal.MeleeAttackGoal
import net.minecraft.entity.ai.goal.RevengeGoal
import net.minecraft.entity.ai.goal.SwimAroundGoal
import net.minecraft.entity.ai.goal.UniversalAngerGoal
import net.minecraft.entity.ai.pathing.PathNodeType
import net.minecraft.entity.ai.pathing.SwimNavigation
import net.minecraft.entity.damage.DamageSource
import net.minecraft.entity.data.DataTracker
import net.minecraft.entity.data.TrackedData
import net.minecraft.entity.data.TrackedDataHandlerRegistry
import net.minecraft.entity.effect.StatusEffectInstance
import net.minecraft.entity.effect.StatusEffects
import net.minecraft.entity.mob.Angerable
import net.minecraft.entity.mob.WaterCreatureEntity
import net.minecraft.entity.player.PlayerEntity
Expand All @@ -37,11 +48,14 @@ import net.minecraft.world.WorldAccess
import software.bernie.geckolib.animatable.GeoEntity
import software.bernie.geckolib.core.animatable.GeoAnimatable
import software.bernie.geckolib.core.animatable.instance.AnimatableInstanceCache
import software.bernie.geckolib.core.animation.*
import software.bernie.geckolib.core.animation.AnimatableManager
import software.bernie.geckolib.core.animation.Animation
import software.bernie.geckolib.core.animation.AnimationController
import software.bernie.geckolib.core.animation.AnimationState
import software.bernie.geckolib.core.animation.RawAnimation
import software.bernie.geckolib.core.`object`.PlayState
import software.bernie.geckolib.util.GeckoLibUtil
import java.util.*
import java.util.UUID


@Suppress("LeakingThis")
Expand Down

0 comments on commit 60adc2b

Please sign in to comment.