-
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.
- Loading branch information
1 parent
e207457
commit a923572
Showing
32 changed files
with
262 additions
and
75 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
7 changes: 7 additions & 0 deletions
7
src/main/generated/assets/ragium/blockstates/auto_illuminator.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": "ragium:block/auto_illuminator" | ||
} | ||
} | ||
} |
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
6 changes: 6 additions & 0 deletions
6
src/main/generated/assets/ragium/models/block/auto_illuminator.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:block/cube_all", | ||
"textures": { | ||
"all": "ragium:block/auto_illuminator" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/main/generated/assets/ragium/models/item/auto_illuminator.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": "ragium:block/auto_illuminator" | ||
} |
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
32 changes: 32 additions & 0 deletions
32
src/main/generated/data/ragium/advancement/recipes/misc/shaped/auto_illuminator.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,32 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"criteria": { | ||
"has_the_item": { | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": "ragium:crimson_crystal" | ||
} | ||
] | ||
}, | ||
"trigger": "minecraft:inventory_changed" | ||
}, | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "ragium:shaped/auto_illuminator" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_the_recipe", | ||
"has_the_item" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"ragium:shaped/auto_illuminator" | ||
] | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/generated/data/ragium/loot_table/blocks/auto_illuminator.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": "ragium:auto_illuminator" | ||
} | ||
], | ||
"rolls": 1.0 | ||
} | ||
] | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/generated/data/ragium/recipe/shaped/auto_illuminator.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,24 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"category": "misc", | ||
"key": { | ||
"A": { | ||
"tag": "c:plates/deep_steel" | ||
}, | ||
"B": { | ||
"tag": "c:plates/gold" | ||
}, | ||
"C": { | ||
"item": "ragium:crimson_crystal" | ||
} | ||
}, | ||
"pattern": [ | ||
"ABA", | ||
"BCB", | ||
"ABA" | ||
], | ||
"result": { | ||
"count": 1, | ||
"id": "ragium:auto_illuminator" | ||
} | ||
} |
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
36 changes: 36 additions & 0 deletions
36
src/main/kotlin/hiiragi283/ragium/common/block/entity/HTAutoIlluminatorBlockEntity.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,36 @@ | ||
package hiiragi283.ragium.common.block.entity | ||
|
||
import hiiragi283.ragium.common.init.RagiumBlockEntityTypes | ||
import net.minecraft.block.BlockState | ||
import net.minecraft.block.Blocks | ||
import net.minecraft.sound.SoundCategory | ||
import net.minecraft.sound.SoundEvents | ||
import net.minecraft.util.math.BlockPos | ||
import net.minecraft.world.World | ||
|
||
class HTAutoIlluminatorBlockEntity(pos: BlockPos, state: BlockState) : | ||
HTBlockEntityBase(RagiumBlockEntityTypes.AUTO_ILLUMINATOR, pos, state) { | ||
private val yRange: IntRange | ||
get() = (world?.bottomY ?: 0)..<pos.y | ||
|
||
override val tickRate: Int = 1 | ||
|
||
override fun tickSecond(world: World, pos: BlockPos, state: BlockState) { | ||
for (x: Int in (pos.x - 64..pos.x + 64)) { | ||
for (z: Int in (pos.z - 64..pos.z + 64)) { | ||
for (y: Int in yRange) { | ||
val posIn = BlockPos(x, y, z) | ||
val stateIn: BlockState = world.getBlockState(posIn) | ||
if (stateIn.isAir) { | ||
if (!world.isSkyVisible(posIn) && world.getLightLevel(posIn) <= 7) { | ||
world.setBlockState(posIn, Blocks.LIGHT.defaultState) | ||
return | ||
} | ||
} | ||
} | ||
} | ||
} | ||
world.playSound(null, pos, SoundEvents.ENTITY_EXPERIENCE_ORB_PICKUP, SoundCategory.MASTER, 10.0f, 0.5f) | ||
world.breakBlock(pos, true) | ||
} | ||
} |
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
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.