-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
39 changed files
with
946 additions
and
10 deletions.
There are no files selected for viewing
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
...client/kotlin/dev/hybridlabs/aquatic/client/model/block/entity/CrabPotBlockEntityModel.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.model.block.entity | ||
|
||
import dev.hybridlabs.aquatic.HybridAquatic | ||
import dev.hybridlabs.aquatic.block.entity.BuoyBlockEntity | ||
import dev.hybridlabs.aquatic.block.entity.CrabPotBlockEntity | ||
import net.minecraft.util.Identifier | ||
import software.bernie.geckolib.model.GeoModel | ||
|
||
class CrabPotBlockEntityModel: GeoModel<CrabPotBlockEntity>() { | ||
override fun getAnimationResource(entity: CrabPotBlockEntity): Identifier { | ||
return ANIMATION_LOCATION | ||
} | ||
|
||
override fun getModelResource(animatable: CrabPotBlockEntity): Identifier { | ||
return MODEL_LOCATION | ||
} | ||
|
||
override fun getTextureResource(entity: CrabPotBlockEntity): Identifier { | ||
return TEXTURE_LOCATION | ||
} | ||
|
||
companion object { | ||
val ANIMATION_LOCATION = Identifier(HybridAquatic.MOD_ID, "animations/crab_pot.animation.json") | ||
val MODEL_LOCATION = Identifier(HybridAquatic.MOD_ID, "geo/entity/block/crab_pot.geo.json") | ||
val TEXTURE_LOCATION = Identifier(HybridAquatic.MOD_ID, "textures/block/crab_pot.png") | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...tlin/dev/hybridlabs/aquatic/client/model/block/entity/HydrothermalVentBlockEntityModel.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,28 @@ | ||
package dev.hybridlabs.aquatic.client.model.block.entity | ||
|
||
import dev.hybridlabs.aquatic.HybridAquatic | ||
import dev.hybridlabs.aquatic.block.entity.BuoyBlockEntity | ||
import dev.hybridlabs.aquatic.block.entity.CrabPotBlockEntity | ||
import dev.hybridlabs.aquatic.block.entity.HydrothermalVentBlockEntity | ||
import net.minecraft.util.Identifier | ||
import software.bernie.geckolib.model.GeoModel | ||
|
||
class HydrothermalVentBlockEntityModel: GeoModel<HydrothermalVentBlockEntity>() { | ||
override fun getAnimationResource(entity: HydrothermalVentBlockEntity): Identifier { | ||
return ANIMATION_LOCATION | ||
} | ||
|
||
override fun getModelResource(animatable: HydrothermalVentBlockEntity): Identifier { | ||
return MODEL_LOCATION | ||
} | ||
|
||
override fun getTextureResource(entity: HydrothermalVentBlockEntity): Identifier { | ||
return TEXTURE_LOCATION | ||
} | ||
|
||
companion object { | ||
val ANIMATION_LOCATION = Identifier(HybridAquatic.MOD_ID, "animations/hydrothermal_vent.animation.json") | ||
val MODEL_LOCATION = Identifier(HybridAquatic.MOD_ID, "geo/entity/block/hydrothermal_vent.geo.json") | ||
val TEXTURE_LOCATION = Identifier(HybridAquatic.MOD_ID, "textures/block/hydrothermal_vent.png") | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...nt/kotlin/dev/hybridlabs/aquatic/client/render/block/entity/CrabPotBlockEntityRenderer.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,8 @@ | ||
package dev.hybridlabs.aquatic.client.render.block.entity | ||
|
||
import dev.hybridlabs.aquatic.block.entity.CrabPotBlockEntity | ||
import dev.hybridlabs.aquatic.client.model.block.entity.CrabPotBlockEntityModel | ||
import net.minecraft.client.render.block.entity.BlockEntityRendererFactory.Context | ||
import software.bernie.geckolib.renderer.GeoBlockRenderer | ||
|
||
class CrabPotBlockEntityRenderer(context: Context) : GeoBlockRenderer<CrabPotBlockEntity>(CrabPotBlockEntityModel()) |
8 changes: 8 additions & 0 deletions
8
.../dev/hybridlabs/aquatic/client/render/block/entity/HydrothermalVentBlockEntityRenderer.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,8 @@ | ||
package dev.hybridlabs.aquatic.client.render.block.entity | ||
|
||
import dev.hybridlabs.aquatic.block.entity.HydrothermalVentBlockEntity | ||
import dev.hybridlabs.aquatic.client.model.block.entity.HydrothermalVentBlockEntityModel | ||
import net.minecraft.client.render.block.entity.BlockEntityRendererFactory.Context | ||
import software.bernie.geckolib.renderer.GeoBlockRenderer | ||
|
||
class HydrothermalVentBlockEntityRenderer(context: Context) : GeoBlockRenderer<HydrothermalVentBlockEntity>(HydrothermalVentBlockEntityModel()) |
30 changes: 30 additions & 0 deletions
30
src/client/kotlin/dev/hybridlabs/aquatic/client/render/item/CrabPotBlockItemRenderer.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,30 @@ | ||
package dev.hybridlabs.aquatic.client.render.item | ||
|
||
import dev.hybridlabs.aquatic.HybridAquaticClient | ||
import dev.hybridlabs.aquatic.block.HybridAquaticBlocks | ||
import dev.hybridlabs.aquatic.block.entity.BuoyBlockEntity | ||
import dev.hybridlabs.aquatic.block.entity.CrabPotBlockEntity | ||
import dev.hybridlabs.aquatic.client.render.block.entity.BuoyBlockEntityRenderer | ||
import dev.hybridlabs.aquatic.client.render.block.entity.CrabPotBlockEntityRenderer | ||
import net.fabricmc.fabric.api.client.rendering.v1.BuiltinItemRendererRegistry.DynamicItemRenderer | ||
import net.minecraft.client.render.VertexConsumerProvider | ||
import net.minecraft.client.render.model.json.ModelTransformationMode | ||
import net.minecraft.client.util.math.MatrixStack | ||
import net.minecraft.item.ItemStack | ||
import net.minecraft.util.math.BlockPos | ||
|
||
class CrabPotBlockItemRenderer: DynamicItemRenderer { | ||
private val crabPotBlockEntity = CrabPotBlockEntity(BlockPos.ORIGIN, HybridAquaticBlocks.CRAB_POT.defaultState) | ||
private val renderer = CrabPotBlockEntityRenderer(HybridAquaticClient.createBlockEntityRendererFactoryContext()) | ||
|
||
override fun render( | ||
stack: ItemStack, | ||
mode: ModelTransformationMode, | ||
matrices: MatrixStack, | ||
vertexConsumers: VertexConsumerProvider, | ||
light: Int, | ||
overlay: Int | ||
) { | ||
renderer.render(crabPotBlockEntity, 1.0f, matrices, vertexConsumers, light, overlay) | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...ent/kotlin/dev/hybridlabs/aquatic/client/render/item/HydrothermalVentBlockItemRenderer.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,31 @@ | ||
package dev.hybridlabs.aquatic.client.render.item | ||
|
||
import dev.hybridlabs.aquatic.HybridAquaticClient | ||
import dev.hybridlabs.aquatic.block.HybridAquaticBlocks | ||
import dev.hybridlabs.aquatic.block.entity.BuoyBlockEntity | ||
import dev.hybridlabs.aquatic.block.entity.CrabPotBlockEntity | ||
import dev.hybridlabs.aquatic.block.entity.HydrothermalVentBlockEntity | ||
import dev.hybridlabs.aquatic.client.render.block.entity.BuoyBlockEntityRenderer | ||
import dev.hybridlabs.aquatic.client.render.block.entity.HydrothermalVentBlockEntityRenderer | ||
import net.fabricmc.fabric.api.client.rendering.v1.BuiltinItemRendererRegistry.DynamicItemRenderer | ||
import net.minecraft.client.render.VertexConsumerProvider | ||
import net.minecraft.client.render.model.json.ModelTransformationMode | ||
import net.minecraft.client.util.math.MatrixStack | ||
import net.minecraft.item.ItemStack | ||
import net.minecraft.util.math.BlockPos | ||
|
||
class HydrothermalVentBlockItemRenderer: DynamicItemRenderer { | ||
private val hydrothermalVentBlockEntity = HydrothermalVentBlockEntity(BlockPos.ORIGIN, HybridAquaticBlocks.HYDROTHERMAL_VENT.defaultState) | ||
private val renderer = HydrothermalVentBlockEntityRenderer(HybridAquaticClient.createBlockEntityRendererFactoryContext()) | ||
|
||
override fun render( | ||
stack: ItemStack, | ||
mode: ModelTransformationMode, | ||
matrices: MatrixStack, | ||
vertexConsumers: VertexConsumerProvider, | ||
light: Int, | ||
overlay: Int | ||
) { | ||
renderer.render(hydrothermalVentBlockEntity, 1.0f, matrices, vertexConsumers, light, overlay) | ||
} | ||
} |
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
20 changes: 20 additions & 0 deletions
20
src/generated/resources/data/hybrid-aquatic/loot_tables/blocks/crab_pot.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,20 @@ | ||
{ | ||
"type": "minecraft:block", | ||
"pools": [ | ||
{ | ||
"bonus_rolls": 0.0, | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:survives_explosion" | ||
} | ||
], | ||
"entries": [ | ||
{ | ||
"type": "minecraft:item", | ||
"name": "hybrid-aquatic:crab_pot" | ||
} | ||
], | ||
"rolls": 1.0 | ||
} | ||
] | ||
} |
20 changes: 20 additions & 0 deletions
20
src/generated/resources/data/hybrid-aquatic/loot_tables/blocks/hydrothermal_vent.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,20 @@ | ||
{ | ||
"type": "minecraft:block", | ||
"pools": [ | ||
{ | ||
"bonus_rolls": 0.0, | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:survives_explosion" | ||
} | ||
], | ||
"entries": [ | ||
{ | ||
"type": "minecraft:item", | ||
"name": "hybrid-aquatic:hydrothermal_vent" | ||
} | ||
], | ||
"rolls": 1.0 | ||
} | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
src/generated/resources/data/hybrid-aquatic/tags/blocks/hydrothermal_vent_generate_in.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,6 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"minecraft:water" | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
...ted/resources/data/hybrid-aquatic/tags/worldgen/biome/hydrothermal_vent_spawn_biomes.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,9 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"minecraft:deep_ocean", | ||
"minecraft:deep_frozen_ocean", | ||
"minecraft:deep_cold_ocean", | ||
"minecraft:deep_lukewarm_ocean" | ||
] | ||
} |
33 changes: 33 additions & 0 deletions
33
...nerated/resources/data/hybrid-aquatic/worldgen/configured_feature/hydrothermal_vents.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,33 @@ | ||
{ | ||
"type": "minecraft:random_patch", | ||
"config": { | ||
"feature": { | ||
"feature": { | ||
"type": "minecraft:simple_block", | ||
"config": { | ||
"to_place": { | ||
"type": "minecraft:simple_state_provider", | ||
"state": { | ||
"Name": "hybrid-aquatic:hydrothermal_vent", | ||
"Properties": { | ||
"waterlogged": "true" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"placement": [ | ||
{ | ||
"type": "minecraft:block_predicate_filter", | ||
"predicate": { | ||
"type": "minecraft:matching_block_tag", | ||
"tag": "hybrid-aquatic:hydrothermal_vent_generate_in" | ||
} | ||
} | ||
] | ||
}, | ||
"tries": 6, | ||
"xz_spread": 2, | ||
"y_spread": 2 | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/generated/resources/data/hybrid-aquatic/worldgen/placed_feature/hydrothermal_vents.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,19 @@ | ||
{ | ||
"feature": "hybrid-aquatic:hydrothermal_vents", | ||
"placement": [ | ||
{ | ||
"type": "minecraft:in_square" | ||
}, | ||
{ | ||
"type": "minecraft:heightmap", | ||
"heightmap": "OCEAN_FLOOR_WG" | ||
}, | ||
{ | ||
"type": "minecraft:count", | ||
"count": 1 | ||
}, | ||
{ | ||
"type": "minecraft:biome" | ||
} | ||
] | ||
} |
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
Oops, something went wrong.