-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Temporarily removed thalassophobia, crab pots, and mantis shrimp
Added colors to all new spawn eggs Edited entity loot tables Edited some item tags Fixed seahorse texture issue Fixed seahorse AI issue Removed whale shark glow
- Loading branch information
1 parent
5cba4d2
commit 4480264
Showing
22 changed files
with
1,467 additions
and
92 deletions.
There are no files selected for viewing
27 changes: 0 additions & 27 deletions
27
src/client/java/dev/hybridlabs/aquatic/fog/ThalassophobiaFogModifier.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/client/kotlin/dev/hybridlabs/aquatic/client/model/entity/KarkinosEntityModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package dev.hybridlabs.aquatic.client.model.entity | ||
|
||
import dev.hybridlabs.aquatic.entity.critter.HybridAquaticCritterEntity | ||
|
||
class KarkinosEntityModel : HybridAquaticCritterEntityModel<HybridAquaticCritterEntity>("karkinos") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/client/kotlin/dev/hybridlabs/aquatic/client/render/entity/KarkinosEntityRenderer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package dev.hybridlabs.aquatic.client.render.entity | ||
|
||
import dev.hybridlabs.aquatic.client.model.entity.KarkinosEntityModel | ||
import dev.hybridlabs.aquatic.entity.critter.HybridAquaticCritterEntity | ||
import net.minecraft.client.render.VertexConsumerProvider | ||
import net.minecraft.client.render.entity.EntityRendererFactory.Context | ||
import net.minecraft.client.util.math.MatrixStack | ||
import software.bernie.geckolib.renderer.GeoEntityRenderer | ||
|
||
class KarkinosEntityRenderer(context: Context) : GeoEntityRenderer<HybridAquaticCritterEntity>(context, KarkinosEntityModel()) { | ||
override fun render( | ||
entity: HybridAquaticCritterEntity?, | ||
entityYaw: Float, | ||
partialTick: Float, | ||
poseStack: MatrixStack?, | ||
bufferSource: VertexConsumerProvider?, | ||
packedLight: Int | ||
) { | ||
val size = HybridAquaticCritterEntity.getScaleAdjustment(entity!!, 0.05f) | ||
poseStack!!.scale(size, size, size) | ||
super.render(entity, entityYaw, partialTick, poseStack, bufferSource, packedLight) | ||
} | ||
|
||
override fun getMotionAnimThreshold(animatable: HybridAquaticCritterEntity?): Float { | ||
return 0.0025f | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/generated/resources/data/hybrid-aquatic/loot_tables/entities/crayfish.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"type": "minecraft:entity", | ||
"pools": [ | ||
{ | ||
"bonus_rolls": 0.0, | ||
"entries": [ | ||
{ | ||
"type": "minecraft:item", | ||
"functions": [ | ||
{ | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:entity_properties", | ||
"entity": "this", | ||
"predicate": { | ||
"flags": { | ||
"is_on_fire": true | ||
} | ||
} | ||
} | ||
], | ||
"function": "minecraft:furnace_smelt" | ||
}, | ||
{ | ||
"count": { | ||
"type": "minecraft:uniform", | ||
"max": 1.0, | ||
"min": 0.0 | ||
}, | ||
"function": "minecraft:looting_enchant" | ||
}, | ||
{ | ||
"add": false, | ||
"count": { | ||
"type": "minecraft:uniform", | ||
"max": 2.0, | ||
"min": 1.0 | ||
}, | ||
"function": "minecraft:set_count" | ||
} | ||
], | ||
"name": "hybrid-aquatic:crab_claw" | ||
} | ||
], | ||
"rolls": 1.0 | ||
} | ||
] | ||
} |
48 changes: 48 additions & 0 deletions
48
src/generated/resources/data/hybrid-aquatic/loot_tables/entities/lobster.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"type": "minecraft:entity", | ||
"pools": [ | ||
{ | ||
"bonus_rolls": 0.0, | ||
"entries": [ | ||
{ | ||
"type": "minecraft:item", | ||
"functions": [ | ||
{ | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:entity_properties", | ||
"entity": "this", | ||
"predicate": { | ||
"flags": { | ||
"is_on_fire": true | ||
} | ||
} | ||
} | ||
], | ||
"function": "minecraft:furnace_smelt" | ||
}, | ||
{ | ||
"count": { | ||
"type": "minecraft:uniform", | ||
"max": 1.0, | ||
"min": 0.0 | ||
}, | ||
"function": "minecraft:looting_enchant" | ||
}, | ||
{ | ||
"add": false, | ||
"count": { | ||
"type": "minecraft:uniform", | ||
"max": 2.0, | ||
"min": 1.0 | ||
}, | ||
"function": "minecraft:set_count" | ||
} | ||
], | ||
"name": "hybrid-aquatic:crab_claw" | ||
} | ||
], | ||
"rolls": 1.0 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
src/main/kotlin/dev/hybridlabs/aquatic/entity/critter/KarkinosEntity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
package dev.hybridlabs.aquatic.entity.critter | ||
|
||
import net.minecraft.enchantment.EnchantmentHelper | ||
import net.minecraft.enchantment.Enchantments | ||
import net.minecraft.entity.EntityType | ||
import net.minecraft.entity.attribute.DefaultAttributeContainer | ||
import net.minecraft.entity.attribute.EntityAttributes | ||
import net.minecraft.entity.mob.WaterCreatureEntity | ||
import net.minecraft.entity.player.PlayerEntity | ||
import net.minecraft.world.Difficulty | ||
import net.minecraft.world.World | ||
import software.bernie.geckolib.core.animatable.GeoAnimatable | ||
import software.bernie.geckolib.core.animation.AnimationState | ||
import software.bernie.geckolib.core.`object`.PlayState | ||
|
||
class KarkinosEntity(entityType: EntityType<out HybridAquaticCritterEntity>, world: World) : | ||
HybridAquaticCrabEntity(entityType, world) { | ||
|
||
private var isFlipped: Boolean = false | ||
private var flipTimer: Int = 0 | ||
|
||
companion object { | ||
fun createMobAttributes(): DefaultAttributeContainer.Builder { | ||
return WaterCreatureEntity.createMobAttributes() | ||
.add(EntityAttributes.GENERIC_MAX_HEALTH, 100.0) | ||
.add(EntityAttributes.GENERIC_MOVEMENT_SPEED, 0.6) | ||
.add(EntityAttributes.GENERIC_ATTACK_DAMAGE, 4.0) | ||
.add(EntityAttributes.GENERIC_FOLLOW_RANGE, 32.0) | ||
.add(EntityAttributes.GENERIC_KNOCKBACK_RESISTANCE, 100.0) | ||
} | ||
} | ||
|
||
private fun beFlipped() { | ||
isFlipped = true | ||
flipTimer = 100 | ||
} | ||
|
||
override fun damage(source: net.minecraft.entity.damage.DamageSource?, amount: Float): Boolean { | ||
val damaged = super.damage(source, amount) | ||
|
||
if (damaged && source?.source is PlayerEntity && !isFlipped) { | ||
val player = source.source as PlayerEntity | ||
val heldItem = player.mainHandStack | ||
|
||
if (EnchantmentHelper.getLevel(Enchantments.BANE_OF_ARTHROPODS, heldItem) > 2 || | ||
(EnchantmentHelper.getLevel(Enchantments.RIPTIDE, heldItem) > 0) | ||
) { | ||
beFlipped() | ||
} | ||
} | ||
|
||
return damaged | ||
} | ||
|
||
override fun checkDespawn() { | ||
if (world.difficulty == Difficulty.PEACEFUL && this.isDisallowedInPeaceful) { | ||
discard() | ||
} else { | ||
despawnCounter = 0 | ||
} | ||
} | ||
|
||
override fun isPushable(): Boolean = | ||
this.isFlipped | ||
|
||
|
||
|
||
override fun <E : GeoAnimatable> predicate(event: AnimationState<E>): PlayState { | ||
if (isFlipped) { | ||
event.controller.setAnimation(FLIPPED_ANIMATION) | ||
return PlayState.CONTINUE | ||
} | ||
|
||
return super.predicate(event) | ||
} | ||
|
||
|
||
override fun getMovementSpeed(): Float { | ||
return if (isFlipped) 0.0f else super.getMovementSpeed() | ||
} | ||
} |
Oops, something went wrong.