-
Notifications
You must be signed in to change notification settings - Fork 7
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
1 parent
cc0df92
commit cb13911
Showing
16 changed files
with
272 additions
and
1 deletion.
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
7 changes: 7 additions & 0 deletions
7
src/generated/resources/assets/ultramarine/blockstates/wind_chime.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": "ultramarine:block/wind_chime" | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/generated/resources/assets/ultramarine/models/item/wind_chime.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": "ultramarine:block/wind_chime" | ||
} |
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
34 changes: 34 additions & 0 deletions
34
...d/resources/data/ultramarine/advancements/recipes/ultramarine.decorations/wind_chime.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,34 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"rewards": { | ||
"recipes": [ | ||
"ultramarine:wind_chime" | ||
] | ||
}, | ||
"criteria": { | ||
"has_bronze_ingot": { | ||
"trigger": "minecraft:inventory_changed", | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": [ | ||
"ultramarine:bronze_ingot" | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"has_the_recipe": { | ||
"trigger": "minecraft:recipe_unlocked", | ||
"conditions": { | ||
"recipe": "ultramarine:wind_chime" | ||
} | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_bronze_ingot", | ||
"has_the_recipe" | ||
] | ||
] | ||
} |
16 changes: 16 additions & 0 deletions
16
src/generated/resources/data/ultramarine/loot_tables/blocks/wind_chime.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,16 @@ | ||
{ | ||
"type": "minecraft:block", | ||
"pools": [ | ||
{ | ||
"name": "wind_chime", | ||
"rolls": 1.0, | ||
"bonus_rolls": 0.0, | ||
"entries": [ | ||
{ | ||
"type": "minecraft:item", | ||
"name": "ultramarine:wind_chime" | ||
} | ||
] | ||
} | ||
] | ||
} |
22 changes: 22 additions & 0 deletions
22
src/generated/resources/data/ultramarine/recipes/wind_chime.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,22 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"pattern": [ | ||
"C", | ||
"B", | ||
"P" | ||
], | ||
"key": { | ||
"C": { | ||
"item": "minecraft:chain" | ||
}, | ||
"B": { | ||
"item": "ultramarine:bronze_ingot" | ||
}, | ||
"P": { | ||
"item": "ultramarine:bronze_parts" | ||
} | ||
}, | ||
"result": { | ||
"item": "ultramarine:wind_chime" | ||
} | ||
} |
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
45 changes: 45 additions & 0 deletions
45
src/main/java/com/voxelutopia/ultramarine/world/block/WindChime.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,45 @@ | ||
package com.voxelutopia.ultramarine.world.block; | ||
|
||
import com.voxelutopia.ultramarine.Ultramarine; | ||
import com.voxelutopia.ultramarine.data.shape.RawVoxelShape; | ||
import com.voxelutopia.ultramarine.data.shape.ShapeFunction; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.server.level.ServerLevel; | ||
import net.minecraft.sounds.SoundEvents; | ||
import net.minecraft.sounds.SoundSource; | ||
import net.minecraft.world.entity.player.Player; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
|
||
import java.util.Random; | ||
|
||
public class WindChime extends DecorativeBlock{ | ||
|
||
public WindChime() { | ||
super(DecorativeBlock.with(BaseBlockProperty.BRONZE).shaped(ShapeFunction.simpleShape(new RawVoxelShape(5,-5,5,11,16,11))).noCollision().noOcclusion()); | ||
} | ||
|
||
@Override | ||
public boolean isRandomlyTicking(BlockState pState) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public void randomTick(BlockState pState, ServerLevel pLevel, BlockPos pPos, Random pRandom) { | ||
float rainLevel = pLevel.getRainLevel(0.1f); | ||
if ((pRandom.nextFloat() * rainLevel) > 0.2f){ | ||
playSound(pLevel, pPos, pRandom); | ||
if (pRandom.nextFloat() > 0.5f){ | ||
pLevel.scheduleTick(pPos, this, pRandom.nextInt(3)); | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
public void tick(BlockState pState, ServerLevel pLevel, BlockPos pPos, Random pRandom) { | ||
playSound(pLevel, pPos, pRandom); | ||
} | ||
|
||
private void playSound(ServerLevel pLevel, BlockPos pPos, Random pRandom){ | ||
pLevel.playSound(null, pPos, SoundEvents.NOTE_BLOCK_CHIME, SoundSource.BLOCKS, 1.5F, 2.0f - pRandom.nextFloat() * 0.15f); | ||
} | ||
} |
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
124 changes: 124 additions & 0 deletions
124
src/main/resources/assets/ultramarine/models/block/wind_chime.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,124 @@ | ||
{ | ||
"credit": "Made with Blockbench", | ||
"texture_size": [32, 32], | ||
"render_type": "cutout", | ||
"textures": { | ||
"1": "ultramarine:block/wind_chime", | ||
"particle": "minecraft:block/chain" | ||
}, | ||
"elements": [ | ||
{ | ||
"from": [5, 5, 5], | ||
"to": [11, 6, 11], | ||
"faces": { | ||
"north": {"uv": [8.5, 8, 11.5, 8.5], "texture": "#1"}, | ||
"east": {"uv": [2.5, 9, 5.5, 9.5], "texture": "#1"}, | ||
"south": {"uv": [6, 9, 9, 9.5], "texture": "#1"}, | ||
"west": {"uv": [9.5, 9, 12.5, 9.5], "texture": "#1"}, | ||
"up": {"uv": [3, 3, 0, 0], "texture": "#1"}, | ||
"down": {"uv": [3, 3.5, 0, 6.5], "texture": "#1"} | ||
} | ||
}, | ||
{ | ||
"from": [6, 6, 6], | ||
"to": [10, 11, 10], | ||
"faces": { | ||
"north": {"uv": [3.5, 6, 5.5, 8.5], "texture": "#1"}, | ||
"east": {"uv": [6, 6, 8, 8.5], "texture": "#1"}, | ||
"south": {"uv": [0, 7, 2, 9.5], "texture": "#1"}, | ||
"west": {"uv": [7.5, 0, 9.5, 2.5], "texture": "#1"}, | ||
"up": {"uv": [9.5, 5, 7.5, 3], "texture": "#1"}, | ||
"down": {"uv": [10.5, 5.5, 8.5, 7.5], "texture": "#1"} | ||
} | ||
}, | ||
{ | ||
"from": [7, 11, 7], | ||
"to": [9, 12, 9], | ||
"faces": { | ||
"north": {"uv": [4.5, 10, 5.5, 10.5], "texture": "#1"}, | ||
"east": {"uv": [10, 4.5, 11, 5], "texture": "#1"}, | ||
"south": {"uv": [6, 10, 7, 10.5], "texture": "#1"}, | ||
"west": {"uv": [7.5, 10, 8.5, 10.5], "texture": "#1"}, | ||
"up": {"uv": [4, 11, 3, 10], "texture": "#1"}, | ||
"down": {"uv": [11, 3, 10, 4], "texture": "#1"} | ||
} | ||
}, | ||
{ | ||
"from": [7.5, 11, 7.5], | ||
"to": [8.5, 16, 8.5], | ||
"faces": { | ||
"north": {"uv": [0, 10, 0.5, 12.5], "texture": "#1"}, | ||
"east": {"uv": [10, 0, 10.5, 2.5], "texture": "#1"}, | ||
"south": {"uv": [1, 10, 1.5, 12.5], "texture": "#1"}, | ||
"west": {"uv": [2, 10, 2.5, 12.5], "texture": "#1"}, | ||
"up": {"uv": [3, 7.5, 2.5, 7], "texture": "#1"}, | ||
"down": {"uv": [3, 8, 2.5, 8.5], "texture": "#1"} | ||
} | ||
}, | ||
{ | ||
"from": [6.5, -6, 8], | ||
"to": [9.5, 5, 8], | ||
"faces": { | ||
"north": {"uv": [3.5, 0, 5, 5.5], "texture": "#1"}, | ||
"east": {"uv": [9, 10, 9, 15.5], "texture": "#1"}, | ||
"south": {"uv": [5.5, 0, 7, 5.5], "texture": "#1"}, | ||
"west": {"uv": [9.5, 10, 9.5, 15.5], "texture": "#1"}, | ||
"up": {"uv": [11.5, 10, 10, 10], "texture": "#1"}, | ||
"down": {"uv": [11.5, 10.5, 10, 10.5], "texture": "#1"} | ||
} | ||
}, | ||
{ | ||
"from": [8, -6, 6.5], | ||
"to": [8, 5, 9.5], | ||
"rotation": {"angle": 0, "axis": "y", "origin": [8, -0.5, 8]}, | ||
"faces": { | ||
"north": {"uv": [9, 10, 9, 15.5], "texture": "#1"}, | ||
"east": {"uv": [5.5, 0, 7, 5.5], "texture": "#1"}, | ||
"south": {"uv": [9.5, 10, 9.5, 15.5], "texture": "#1"}, | ||
"west": {"uv": [3.5, 0, 5, 5.5], "texture": "#1"}, | ||
"up": {"uv": [11.5, 10, 10, 10], "rotation": 270, "texture": "#1"}, | ||
"down": {"uv": [11.5, 10.5, 10, 10.5], "rotation": 90, "texture": "#1"} | ||
} | ||
} | ||
], | ||
"display": { | ||
"thirdperson_righthand": { | ||
"rotation": [75, 45, 0], | ||
"scale": [0.375, 0.375, 0.375] | ||
}, | ||
"thirdperson_lefthand": { | ||
"rotation": [75, 45, 0], | ||
"scale": [0.375, 0.375, 0.375] | ||
}, | ||
"firstperson_righthand": { | ||
"rotation": [0, 45, 0], | ||
"translation": [2.25, 2.5, 0], | ||
"scale": [0.4, 0.4, 0.4] | ||
}, | ||
"firstperson_lefthand": { | ||
"rotation": [0, 45, 0], | ||
"translation": [2.25, 2.5, 0], | ||
"scale": [0.4, 0.4, 0.4] | ||
}, | ||
"ground": { | ||
"translation": [0, 3, 0], | ||
"scale": [0.25, 0.25, 0.25] | ||
}, | ||
"gui": { | ||
"rotation": [30, 45, 0], | ||
"translation": [0, 1.25, 0], | ||
"scale": [0.625, 0.625, 0.625] | ||
}, | ||
"head": { | ||
"translation": [0, 0, -7] | ||
} | ||
}, | ||
"groups": [ | ||
{ | ||
"name": "group", | ||
"origin": [0, 0, 0], | ||
"color": 0, | ||
"children": [0, 1, 2, 3, 4, 5] | ||
} | ||
] | ||
} |
Binary file added
BIN
+594 Bytes
src/main/resources/assets/ultramarine/textures/block/wind_chime.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.