-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
burial dirt, holler AI & correct stone tablet lang keys
- Loading branch information
1 parent
67b0439
commit 5378b47
Showing
22 changed files
with
192 additions
and
28 deletions.
There are no files selected for viewing
6 changes: 4 additions & 2 deletions
6
src/generated/resources/.cache/5bb646c3cee204f41a1b59a2c0d9083b5f7155b0
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
// 1.20.1 2024-10-29T21:45:26.5470397 Oreganized Block Tags | ||
// 1.20.1 2024-10-31T10:50:07.0060003 Oreganized Block Tags | ||
25423f94c07158f094e4e9733efc1d1814551369 data/doom_and_gloom/tags/blocks/burial_dirt_convertible.json | ||
589cbf5d60b97fd78f711d832bfddf03263777f2 data/doom_and_gloom/tags/blocks/gravetender_lightables.json | ||
09f2b6ffb4a23fce3358928616260d7ffaa73074 data/doom_and_gloom/tags/blocks/vigil_candles.json | ||
01bff27953e934409d6d1175c4932c12a6f535c7 data/minecraft/tags/blocks/candles.json | ||
422eaf060e2279ae1bb4992ab5b94a47f193a3d8 data/minecraft/tags/blocks/mineable/pickaxe.json | ||
6e91c0be5e5b3d50cf0d1a8dec3e23c0ee042c05 data/minecraft/tags/blocks/dirt.json | ||
734c9c36a0d0f32caf72e941b2f0d14e9f0b5b6d data/minecraft/tags/blocks/mineable/pickaxe.json | ||
6b73bb0ce38222c428d54ee64e82ffa1d96c64d7 data/oreganized/tags/blocks/fire_source.json |
7 changes: 7 additions & 0 deletions
7
src/generated/resources/assets/doom_and_gloom/blockstates/burial_dirt.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,7 @@ | ||
{ | ||
"variants": { | ||
"": { | ||
"model": "doom_and_gloom:block/burial_dirt" | ||
} | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
src/generated/resources/assets/doom_and_gloom/models/block/burial_dirt.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,7 @@ | ||
{ | ||
"parent": "minecraft:block/cube_top", | ||
"textures": { | ||
"side": "minecraft:block/dirt", | ||
"top": "doom_and_gloom:block/burial_dirt" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/generated/resources/assets/doom_and_gloom/models/item/burial_dirt.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,3 @@ | ||
{ | ||
"parent": "doom_and_gloom:block/burial_dirt" | ||
} |
21 changes: 21 additions & 0 deletions
21
src/generated/resources/data/doom_and_gloom/loot_tables/blocks/burial_dirt.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,21 @@ | ||
{ | ||
"type": "minecraft:block", | ||
"pools": [ | ||
{ | ||
"bonus_rolls": 0.0, | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:survives_explosion" | ||
} | ||
], | ||
"entries": [ | ||
{ | ||
"type": "minecraft:item", | ||
"name": "minecraft:dirt" | ||
} | ||
], | ||
"rolls": 1.0 | ||
} | ||
], | ||
"random_sequence": "doom_and_gloom:blocks/burial_dirt" | ||
} |
9 changes: 9 additions & 0 deletions
9
src/generated/resources/data/doom_and_gloom/tags/blocks/gravetender_lightables.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 @@ | ||
{ | ||
"values": [ | ||
"#minecraft:candles", | ||
{ | ||
"id": "#amendments:skull_candles", | ||
"required": false | ||
} | ||
] | ||
} |
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 @@ | ||
{ | ||
"values": [ | ||
"doom_and_gloom:burial_dirt" | ||
] | ||
} |
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
65 changes: 65 additions & 0 deletions
65
src/main/java/galena/doom_and_gloom/content/block/BurialDirtBlock.java
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,65 @@ | ||
package galena.doom_and_gloom.content.block; | ||
|
||
import galena.doom_and_gloom.index.OTags; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.server.level.ServerLevel; | ||
import net.minecraft.util.RandomSource; | ||
import net.minecraft.world.effect.MobEffectInstance; | ||
import net.minecraft.world.effect.MobEffects; | ||
import net.minecraft.world.entity.EntityType; | ||
import net.minecraft.world.entity.Mob; | ||
import net.minecraft.world.entity.MobSpawnType; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.level.Level; | ||
import net.minecraft.world.level.block.Block; | ||
import net.minecraft.world.level.block.Blocks; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
|
||
public class BurialDirtBlock extends Block { | ||
|
||
public BurialDirtBlock(Properties properties) { | ||
super(properties.randomTicks()); | ||
} | ||
|
||
@Override | ||
public void spawnAfterBreak(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean pDropExperience) { | ||
spawnMonster(level, pos); | ||
} | ||
|
||
private EntityType<? extends Mob> randomMonster(RandomSource random) { | ||
if (random.nextDouble() < 0.3) return EntityType.SKELETON; | ||
return EntityType.ZOMBIE; | ||
} | ||
|
||
public void spawnMonster(Level level, BlockPos pos) { | ||
if (!(level instanceof ServerLevel serverLevel)) return; | ||
|
||
var monster = randomMonster(level.random).create(level); | ||
if (monster != null) { | ||
monster.moveTo(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5, 0, 0); | ||
monster.addEffect(new MobEffectInstance(MobEffects.LEVITATION, 14, 2, false, false)); | ||
serverLevel.addFreshEntity(monster); | ||
monster.finalizeSpawn(serverLevel, serverLevel.getCurrentDifficultyAt(pos), MobSpawnType.NATURAL, null, null); | ||
monster.spawnAnim(); | ||
} | ||
} | ||
|
||
private void discard(ServerLevel level, BlockPos pos) { | ||
level.setBlockAndUpdate(pos, Blocks.DIRT.defaultBlockState()); | ||
} | ||
|
||
@Override | ||
public void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { | ||
if(random.nextInt(64) == 0) return; | ||
|
||
if (level.isNight() && random.nextInt(32) == 0) { | ||
spawnMonster(level, pos); | ||
discard(level, pos); | ||
return; | ||
} | ||
|
||
if (!level.getBlockState(pos.above()).canBeReplaced()) { | ||
discard(level, pos); | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.