Skip to content

Commit

Permalink
feat: aethersent golem
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoLezury committed Feb 13, 2025
1 parent 142857c commit 3d18e79
Show file tree
Hide file tree
Showing 32 changed files with 532 additions and 41 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.1 2025-02-11T12:24:12.7349676 Loot Tables
// 1.21.1 2025-02-13T21:32:58.9330421 Loot Tables
2b18f4ee4964de853f965809175e41672c73f2a3 data/eternal_starlight/loot_table/blocks/abyssal_fire.json
188b8614ef4815c81bb45c3a918877795892cf25 data/eternal_starlight/loot_table/blocks/abyssal_geyser.json
77967e1af1e01fc2bbf8f97dd52c510df8648a4c data/eternal_starlight/loot_table/blocks/abyssal_kelp.json
Expand Down Expand Up @@ -636,6 +636,7 @@ e7a4432f13c78aadaee5cb60b6c6ec9a2131bbf5 data/eternal_starlight/loot_table/bosse
817f9a82cca0cb3344de3bb32e8bde62c3aae487 data/eternal_starlight/loot_table/chests/cursed_garden.json
a17c39e100a98bcc3ecff5dd8c27bed6ec49668c data/eternal_starlight/loot_table/chests/golem_forge.json
505d9a4868fc7eb145a066fcc20989938728b822 data/eternal_starlight/loot_table/chests/music_discs.json
6b6f0e7d5564829e079406c182b5c4b1c98e8743 data/eternal_starlight/loot_table/entities/aethersent_golem.json
a461217c956af4bd0fb8803afa168aeb4b966da2 data/eternal_starlight/loot_table/entities/astral_golem.json
7f94abc7aae330ee290d6e0d4ee4b67e4bab1f18 data/eternal_starlight/loot_table/entities/aurora_deer.json
fa0d1dceaeb0277bfa61ee74b03cfbe13644ee9c data/eternal_starlight/loot_table/entities/boarwarf.json
Expand All @@ -658,7 +659,7 @@ d11b744e9604cb530323d11c95d7f6301f6acef4 data/eternal_starlight/loot_table/entit
cdfda6f90f96ac9dd5c8997e86411f844ff69411 data/eternal_starlight/loot_table/entities/tangled_hatred.json
babe6abda538bda4948feaa3bb8d8965deff0d8b data/eternal_starlight/loot_table/entities/tangled_skull.json
b01bfc5a45f772ef5c880ced1d46e07c8a9613f6 data/eternal_starlight/loot_table/entities/the_gatekeeper.json
5d9a6a5389e54faca2c0597fa733a5a68ac14490 data/eternal_starlight/loot_table/entities/thirst_walker.json
394cea953eb6f0917e73c3821ea2b7e33c36cd79 data/eternal_starlight/loot_table/entities/thirst_walker.json
ed91cb96fb35e52e950d7a03bb62f4f8db3070f1 data/eternal_starlight/loot_table/entities/tiny_creteor.json
ea366c80eba1228ca61060c8975d24a771d86c82 data/eternal_starlight/loot_table/entities/tower_squid.json
9742c2717dc30701fa79d4ab3d735a2201afc8b9 data/eternal_starlight/loot_table/entities/twilight_gaze.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.1 2025-01-21T22:40:03.9807247 Tags for minecraft:entity_type mod id eternal_starlight
// 1.21.1 2025-02-13T17:53:49.4616158 Tags for minecraft:entity_type mod id eternal_starlight
5466319e12aea1f42139ac09c8ffdd0620c716d0 data/c/tags/entity_type/boats.json
d44f14633b66cf9ee5f04c1bb297ee340a53e288 data/c/tags/entity_type/bosses.json
7c4a83216410b5cc42cab8c49f3ef1afb4bb9ebc data/eternal_starlight/tags/entity_type/abyssal_fire_immune.json
Expand All @@ -10,7 +10,7 @@ be4ff0376ac9ff8a51eab4ae581131fd7b545de1 data/eternal_starlight/tags/entity_type
9579375f7c0346ef4ec7823ef881994b11c55b8d data/minecraft/tags/entity_type/arrows.json
3f853abb02779d1f23df9823ebb9d8707f24ddc9 data/minecraft/tags/entity_type/arthropod.json
0119460c4a1c254622e0f5a1b11847ceb1464491 data/minecraft/tags/entity_type/can_breathe_under_water.json
d8ee7cf341d31cccb0314d84c97e3e6567b95b60 data/minecraft/tags/entity_type/fall_damage_immune.json
c1b449952fdf84542a45629dcec3b9b589fcfa5b data/minecraft/tags/entity_type/fall_damage_immune.json
f6eb1b878dcda83e8e0f0c5388c37999f2e0ec47 data/minecraft/tags/entity_type/freeze_immune_entity_types.json
f627b828af90e448f9c5322878730dddd94748ff data/minecraft/tags/entity_type/immune_to_infested.json
81a6c1860d98805184066dd01894829e9b9830ec data/minecraft/tags/entity_type/skeletons.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.1 2025-02-12T17:52:32.3457228 Item Models: eternal_starlight
// 1.21.1 2025-02-13T17:53:49.4616158 Item Models: eternal_starlight
f36b77087c8c68017703cd72753faa9ec0bb05c9 assets/eternal_starlight/models/item/abyssal_fruit.json
566abbb0b7c88c3e62953e9a59a3c7a789481e57 assets/eternal_starlight/models/item/abyssal_geyser.json
22602a3404b600eeca3221ff2689c59995af1cfc assets/eternal_starlight/models/item/abyssal_magma_block.json
Expand All @@ -7,6 +7,7 @@ aefbf234c6d365b47ec376cd21dc1466745acf08 assets/eternal_starlight/models/item/ab
fe7306c93bf1160b307aadac41e110b8646db1cd assets/eternal_starlight/models/item/aethersent_boots.json
381a125bf62079c212d3d4fb061f87489fb0bfd1 assets/eternal_starlight/models/item/aethersent_bottoms.json
c6bfef1ed529d339e0a66bad564b57071160d9a7 assets/eternal_starlight/models/item/aethersent_cape.json
63ec6c618a3a23eab4cab9c52d7d3250de9b516e assets/eternal_starlight/models/item/aethersent_golem_spawn_egg.json
487a980156ba5a388b63c97a459bb9b5337182ff assets/eternal_starlight/models/item/aethersent_hood.json
42c29417680db9a21399143fe130336922d42358 assets/eternal_starlight/models/item/aethersent_hood_amethyst_trim.json
0c74227eba977335bf574bd30cb71e9af8195cb7 assets/eternal_starlight/models/item/aethersent_hood_copper_trim.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.1 2025-01-26T23:30:11.7542554 Advancements
// 1.21.1 2025-02-13T21:32:58.9513671 Advancements
bc79d3aedb5c3d78bbdf8ea64070159bb3371cb4 data/eternal_starlight/advancement/all_starlight_biomes.json
f669cf32323b8189231a1ea04f94718c156a21b5 data/eternal_starlight/advancement/chain_tangled_skull_explosion.json
bbc7597d700cf173452d0d1ae7c5a94322ce9ddc data/eternal_starlight/advancement/challenge_gatekeeper.json
Expand Down Expand Up @@ -33,6 +33,7 @@ ea92e71eb7ad11f8c88fa1a238bc4b2b0fc5082f data/eternal_starlight/advancement/obta
02791f85a73f95f74c1dd667154917459d2d61e4 data/eternal_starlight/advancement/obtain_tooth_of_hunger_blocks.json
a0dc8d246f5d8e11fca25090bc5d41b3d933c502 data/eternal_starlight/advancement/root.json
7b7c39c8a41e3d55dbca94b6189e20d9123cab2a data/eternal_starlight/advancement/saturate_dagger_of_hunger.json
52900675d4a6553e79995b6ffa6c5dc1d3c8e8de data/eternal_starlight/advancement/summon_aethersent_golem.json
40d15157c75157bc1ffdebdde016029473a01955 data/eternal_starlight/advancement/summon_grimstone_golem.json
d1b5287e3a3c43c00a7aef0db4a5168532d8b679 data/eternal_starlight/advancement/tame_crystallized_moth.json
370c4174af4a372ecac94bdd34f6ee9dfb392021 data/eternal_starlight/advancement/throw_gleech_egg.json
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "minecraft:item/template_spawn_egg"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"parent": "eternal_starlight:obtain_aethersent_ingot",
"criteria": {
"summon": {
"conditions": {
"entity": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"type": "eternal_starlight:aethersent_golem"
}
}
]
},
"trigger": "minecraft:summoned_entity"
}
},
"display": {
"description": {
"translate": "advancements.eternal_starlight.summon_aethersent_golem.description"
},
"icon": {
"count": 1,
"id": "eternal_starlight:starfall_longbow"
},
"title": {
"translate": "advancements.eternal_starlight.summon_aethersent_golem.title"
}
},
"requirements": [
[
"summon"
]
],
"sends_telemetry_event": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"type": "minecraft:entity",
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"add": false,
"count": {
"type": "minecraft:uniform",
"max": 4.0,
"min": 2.0
},
"function": "minecraft:set_count"
},
{
"count": {
"type": "minecraft:uniform",
"max": 1.0,
"min": 0.0
},
"enchantment": "minecraft:looting",
"function": "minecraft:enchanted_count_increase"
}
],
"name": "eternal_starlight:aethersent_ingot"
}
],
"rolls": 1.0
},
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"add": false,
"count": {
"type": "minecraft:uniform",
"max": 4.0,
"min": 2.0
},
"function": "minecraft:set_count"
},
{
"count": {
"type": "minecraft:uniform",
"max": 1.0,
"min": 0.0
},
"enchantment": "minecraft:looting",
"function": "minecraft:enchanted_count_increase"
}
],
"name": "eternal_starlight:raw_aethersent"
}
],
"rolls": 1.0
}
],
"random_sequence": "eternal_starlight:entities/aethersent_golem"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"bonus_rolls": 0.0,
"conditions": [
{
"chance": 0.4,
"chance": 0.6,
"condition": "minecraft:random_chance"
}
],
Expand Down Expand Up @@ -36,6 +36,42 @@
}
],
"rolls": 1.0
},
{
"bonus_rolls": 0.0,
"conditions": [
{
"chance": 0.2,
"condition": "minecraft:random_chance"
}
],
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"add": false,
"count": {
"type": "minecraft:uniform",
"max": 2.0,
"min": 1.0
},
"function": "minecraft:set_count"
},
{
"count": {
"type": "minecraft:uniform",
"max": 1.0,
"min": 0.0
},
"enchantment": "minecraft:looting",
"function": "minecraft:enchanted_count_increase"
}
],
"name": "eternal_starlight:seeking_eye"
}
],
"rolls": 1.0
}
],
"random_sequence": "eternal_starlight:entities/thirst_walker"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"eternal_starlight:tiny_creteor",
"eternal_starlight:crystallized_moth",
"eternal_starlight:shimmer_lacewing",
"eternal_starlight:grimstone_golem"
"eternal_starlight:grimstone_golem",
"eternal_starlight:aethersent_golem"
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package cn.leolezury.eternalstarlight.common.block;

import cn.leolezury.eternalstarlight.common.entity.living.AethersentGolem;
import cn.leolezury.eternalstarlight.common.entity.living.GrimstoneGolem;
import cn.leolezury.eternalstarlight.common.registry.ESBlocks;
import cn.leolezury.eternalstarlight.common.registry.ESEntities;
Expand Down Expand Up @@ -44,6 +45,10 @@ public class CarvedLunarisCactusFruitBlock extends HorizontalDirectionalBlock {
private BlockPattern grimstoneGolemBase;
@Nullable
private BlockPattern grimstoneGolemFull;
@Nullable
private BlockPattern aethersentGolemBase;
@Nullable
private BlockPattern aethersentGolemFull;
private static final Predicate<BlockState> LUNARIS_CACTUS_FRUIT_PREDICATE = (state) -> state != null && (state.is(ESBlocks.CARVED_LUNARIS_CACTUS_FRUIT.get()) || state.is(ESBlocks.LUNARIS_CACTUS_FRUIT_LANTERN.get()));

public CarvedLunarisCactusFruitBlock(Properties properties) {
Expand All @@ -65,13 +70,14 @@ protected void onPlace(BlockState blockState, Level level, BlockPos blockPos, Bl
}

public boolean canSpawnGolem(LevelReader levelReader, BlockPos blockPos) {
return this.getOrCreateSnowGolemBase().find(levelReader, blockPos) != null || this.getOrCreateIronGolemBase().find(levelReader, blockPos) != null || this.getOrCreateGrimstoneGolemBase().find(levelReader, blockPos) != null;
return this.getOrCreateSnowGolemBase().find(levelReader, blockPos) != null || this.getOrCreateIronGolemBase().find(levelReader, blockPos) != null || this.getOrCreateGrimstoneGolemBase().find(levelReader, blockPos) != null || this.getOrCreateAethersentGolemBase().find(levelReader, blockPos) != null;
}

private void trySpawnGolem(Level level, BlockPos blockPos) {
BlockPattern.BlockPatternMatch snowGolemMatch = this.getOrCreateSnowGolemFull().find(level, blockPos);
BlockPattern.BlockPatternMatch ironGolemMatch = this.getOrCreateIronGolemFull().find(level, blockPos);
BlockPattern.BlockPatternMatch grimstoneGolemMatch = this.getOrCreateGrimstoneGolemFull().find(level, blockPos);
BlockPattern.BlockPatternMatch aethersentGolemMatch = this.getOrCreateAethersentGolemFull().find(level, blockPos);
if (snowGolemMatch != null) {
SnowGolem snowGolem = EntityType.SNOW_GOLEM.create(level);
if (snowGolem != null) {
Expand All @@ -88,6 +94,11 @@ private void trySpawnGolem(Level level, BlockPos blockPos) {
if (grimstoneGolem != null) {
spawnGolemInWorld(level, grimstoneGolemMatch, grimstoneGolem, grimstoneGolemMatch.getBlock(0, 1, 0).getPos());
}
} else if (aethersentGolemMatch != null) {
AethersentGolem aethersentGolem = ESEntities.AETHERSENT_GOLEM.get().create(level);
if (aethersentGolem != null) {
spawnGolemInWorld(level, aethersentGolemMatch, aethersentGolem, aethersentGolemMatch.getBlock(0, 1, 0).getPos());
}
}
}

Expand Down Expand Up @@ -168,7 +179,7 @@ private BlockPattern getOrCreateIronGolemFull() {

private BlockPattern getOrCreateGrimstoneGolemBase() {
if (this.grimstoneGolemBase == null) {
this.grimstoneGolemBase = BlockPatternBuilder.start().aisle(" ", "#").where('#', BlockInWorld.hasState(BlockStatePredicate.forBlock(ESBlocks.GRIMSTONE_BRICKS.get()))).where('~', (blockInWorld) -> blockInWorld.getState().isAir()).build();
this.grimstoneGolemBase = BlockPatternBuilder.start().aisle(" ", "#").where('#', BlockInWorld.hasState(BlockStatePredicate.forBlock(ESBlocks.GRIMSTONE_BRICKS.get()))).build();
}

return this.grimstoneGolemBase;
Expand All @@ -181,4 +192,20 @@ private BlockPattern getOrCreateGrimstoneGolemFull() {

return this.grimstoneGolemFull;
}

private BlockPattern getOrCreateAethersentGolemBase() {
if (this.aethersentGolemBase == null) {
this.aethersentGolemBase = BlockPatternBuilder.start().aisle(" ", "#").where('#', BlockInWorld.hasState(BlockStatePredicate.forBlock(ESBlocks.AETHERSENT_BLOCK.get()))).build();
}

return this.aethersentGolemBase;
}

private BlockPattern getOrCreateAethersentGolemFull() {
if (this.aethersentGolemFull == null) {
this.aethersentGolemFull = BlockPatternBuilder.start().aisle("^", "#").where('^', BlockInWorld.hasState(LUNARIS_CACTUS_FRUIT_PREDICATE)).where('#', BlockInWorld.hasState(BlockStatePredicate.forBlock(ESBlocks.AETHERSENT_BLOCK.get()))).build();
}

return this.aethersentGolemFull;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,7 @@ public static void registerEntityRenderers(EntityRendererRegisterStrategy strate
strategy.register(ESEntities.CRYSTALLIZED_MOTH.get(), CrystallizedMothRenderer::new);
strategy.register(ESEntities.SHIMMER_LACEWING.get(), ShimmerLacewingRenderer::new);
strategy.register(ESEntities.GRIMSTONE_GOLEM.get(), GrimstoneGolemRenderer::new);
strategy.register(ESEntities.AETHERSENT_GOLEM.get(), AethersentGolemRenderer::new);
strategy.register(ESEntities.TOWER_SQUID.get(), TowerSquidRenderer::new);
strategy.register(ESEntities.LUMINOFISH.get(), LuminoFishRenderer::new);
strategy.register(ESEntities.LUMINARIS.get(), LuminarisRenderer::new);
Expand Down Expand Up @@ -766,6 +767,7 @@ public static void registerLayers(RendererLayerRegisterStrategy strategy) {
strategy.register(CrystallizedMothModel.LAYER_LOCATION, CrystallizedMothModel::createBodyLayer);
strategy.register(ShimmerLacewingModel.LAYER_LOCATION, ShimmerLacewingModel::createBodyLayer);
strategy.register(GrimstoneGolemModel.LAYER_LOCATION, GrimstoneGolemModel::createBodyLayer);
strategy.register(AethersentGolemModel.LAYER_LOCATION, AethersentGolemModel::createBodyLayer);
strategy.register(TowerSquidModel.LAYER_LOCATION, TowerSquidModel::createBodyLayer);
strategy.register(LuminoFishModel.LAYER_LOCATION, LuminoFishModel::createBodyLayer);
strategy.register(LuminarisModel.LAYER_LOCATION, LuminarisModel::createBodyLayer);
Expand Down
Loading

0 comments on commit 3d18e79

Please sign in to comment.