Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
172 additions
and
18 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
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
4 changes: 2 additions & 2 deletions
4
src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8
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,2 +1,2 @@ | ||
// 1.20.1 2024-03-31T23:06:05.6075035 Languages: en_us | ||
d9b9c8767ce581805ad226b20b579026dd6fd793 assets/deeperdarker/lang/en_us.json | ||
// 1.20.1 2024-04-03T16:31:59.8068017 Languages: en_us | ||
5c069c5699d7744b9335b43474580a66c22666e2 assets/deeperdarker/lang/en_us.json |
7 changes: 7 additions & 0 deletions
7
src/generated/resources/assets/deeperdarker/blockstates/ice_lily.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": "deeperdarker:block/ice_lily" | ||
} | ||
} | ||
} |
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/deeperdarker/models/block/ice_lily.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": "deeperdarker:block/ice_waterlily", | ||
"textures": { | ||
"flower": "deeperdarker:block/lily_flower", | ||
"texture": "deeperdarker:block/ice_lily" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/generated/resources/assets/deeperdarker/models/item/ice_lily.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 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "deeperdarker:block/ice_lily" | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/generated/resources/data/deeperdarker/loot_tables/blocks/ice_lily.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": "deeperdarker:ice_lily" | ||
} | ||
], | ||
"rolls": 1.0 | ||
} | ||
], | ||
"random_sequence": "deeperdarker:blocks/ice_lily" | ||
} |
3 changes: 2 additions & 1 deletion
3
src/generated/resources/data/minecraft/tags/blocks/inside_step_sound_blocks.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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"values": [ | ||
"deeperdarker:glowing_flowers" | ||
"deeperdarker:glowing_flowers", | ||
"deeperdarker:ice_lily" | ||
] | ||
} |
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
52 changes: 52 additions & 0 deletions
52
src/main/java/com/kyanite/deeperdarker/content/blocks/vegetation/IceLilyBlock.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,52 @@ | ||
package com.kyanite.deeperdarker.content.blocks.vegetation; | ||
|
||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.server.level.ServerLevel; | ||
import net.minecraft.world.entity.Entity; | ||
import net.minecraft.world.entity.vehicle.Boat; | ||
import net.minecraft.world.level.BlockGetter; | ||
import net.minecraft.world.level.Level; | ||
import net.minecraft.world.level.block.Block; | ||
import net.minecraft.world.level.block.BushBlock; | ||
import net.minecraft.world.level.block.IceBlock; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
import net.minecraft.world.level.material.FluidState; | ||
import net.minecraft.world.level.material.Fluids; | ||
import net.minecraft.world.phys.shapes.CollisionContext; | ||
import net.minecraft.world.phys.shapes.Shapes; | ||
import net.minecraft.world.phys.shapes.VoxelShape; | ||
|
||
@SuppressWarnings({"deprecation", "NullableProblems"}) | ||
public class IceLilyBlock extends BushBlock { | ||
private static final VoxelShape LILY_PAD = Block.box(1, 0, 1, 15, 1.5, 15); | ||
private static final VoxelShape FLOWER = Block.box(5, 0, 5, 11, 12, 11); | ||
|
||
public IceLilyBlock(Properties pProperties) { | ||
super(pProperties); | ||
} | ||
|
||
@Override | ||
protected boolean mayPlaceOn(BlockState pState, BlockGetter pLevel, BlockPos pPos) { | ||
FluidState fluidState = pLevel.getFluidState(pPos); | ||
FluidState fluidStateAbove = pLevel.getFluidState(pPos.above()); | ||
return (fluidState.getType() == Fluids.WATER || pState.getBlock() instanceof IceBlock) && fluidStateAbove.getType() == Fluids.EMPTY; | ||
} | ||
|
||
@Override | ||
public void entityInside(BlockState pState, Level pLevel, BlockPos pPos, Entity pEntity) { | ||
super.entityInside(pState, pLevel, pPos, pEntity); | ||
if(pLevel instanceof ServerLevel && pEntity instanceof Boat) { | ||
pLevel.destroyBlock(new BlockPos(pPos), true, pEntity); | ||
} | ||
} | ||
|
||
@Override | ||
public VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) { | ||
return Shapes.or(LILY_PAD, FLOWER); | ||
} | ||
|
||
@Override | ||
public VoxelShape getCollisionShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) { | ||
return LILY_PAD; | ||
} | ||
} |
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.