-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added base block for Thermoregulator and fixed models
- Loading branch information
Showing
37 changed files
with
364 additions
and
219 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
common/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d
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,4 +1,5 @@ | ||
// 1.20.4 2024-01-01T08:38:05.3377628 Loot Tables | ||
// 1.20.4 2024-01-04T10:16:03.4651007 Loot Tables | ||
8fca2e50f9df3893ec7ecb84fb15e5f83b33508a data/toughasnails/loot_tables/blocks/rain_collector.json | ||
5b982875ef4148c8acb507e82e690b7ffd814749 data/toughasnails/loot_tables/blocks/temperature_gauge.json | ||
3014cc41e7b43922f50ec3eb6c2eb83fbf3201d2 data/toughasnails/loot_tables/blocks/thermoregulator.json | ||
1410cb58946442b13107a7153298bdcdc8ccaacc data/toughasnails/loot_tables/blocks/water_purifier.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
4 changes: 2 additions & 2 deletions
4
common/src/generated/resources/.cache/d6a68f98580d9908a43dbfe9cc754bc0c1ac14b0
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,5 @@ | ||
// 1.20.4 2024-01-04T08:50:19.999926 Tags for minecraft:block mod id toughasnails | ||
// 1.20.4 2024-01-04T10:16:03.4641005 Tags for minecraft:block mod id toughasnails | ||
dfed6a08d97cca915d349d312f18532c01063afa data/minecraft/tags/blocks/mineable/axe.json | ||
204b99a448ab27dca7519b0ea2c4e0a422b1f12a data/minecraft/tags/blocks/mineable/pickaxe.json | ||
2268290ab36d87a8ceacfe6fdbf187ed29a4dc80 data/minecraft/tags/blocks/mineable/pickaxe.json | ||
eed9ca8217c04724f67008aba1a0a5edde5697c2 data/toughasnails/tags/blocks/cooling_blocks.json | ||
658fab0118eb1ac9896e1b9ab89f2d5ed055a967 data/toughasnails/tags/blocks/heating_blocks.json |
1 change: 1 addition & 0 deletions
1
common/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.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": [ | ||
"toughasnails:thermoregulator", | ||
"toughasnails:temperature_gauge", | ||
"toughasnails:water_purifier" | ||
] | ||
|
34 changes: 34 additions & 0 deletions
34
...nerated/resources/data/toughasnails/advancements/recipes/decorations/thermoregulator.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", | ||
"criteria": { | ||
"has_the_recipe": { | ||
"conditions": { | ||
"recipe": "toughasnails:thermoregulator" | ||
}, | ||
"trigger": "minecraft:recipe_unlocked" | ||
}, | ||
"has_thermometer": { | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"items": [ | ||
"toughasnails:thermometer" | ||
] | ||
} | ||
] | ||
}, | ||
"trigger": "minecraft:inventory_changed" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_the_recipe", | ||
"has_thermometer" | ||
] | ||
], | ||
"rewards": { | ||
"recipes": [ | ||
"toughasnails:thermoregulator" | ||
] | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
common/src/generated/resources/data/toughasnails/loot_tables/blocks/thermoregulator.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": "toughasnails:thermoregulator" | ||
} | ||
], | ||
"rolls": 1.0 | ||
} | ||
], | ||
"random_sequence": "toughasnails:blocks/thermoregulator" | ||
} |
26 changes: 26 additions & 0 deletions
26
common/src/generated/resources/data/toughasnails/recipes/thermoregulator.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,26 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"category": "misc", | ||
"key": { | ||
"G": { | ||
"item": "minecraft:glass" | ||
}, | ||
"I": { | ||
"item": "minecraft:iron_ingot" | ||
}, | ||
"S": { | ||
"item": "minecraft:smooth_stone" | ||
}, | ||
"T": { | ||
"item": "toughasnails:thermometer" | ||
} | ||
}, | ||
"pattern": [ | ||
"SGS", | ||
"ITI", | ||
"SGS" | ||
], | ||
"result": { | ||
"item": "toughasnails:thermoregulator" | ||
} | ||
} |
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
40 changes: 40 additions & 0 deletions
40
common/src/main/java/toughasnails/block/ThermoregulatorBlock.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,40 @@ | ||
/******************************************************************************* | ||
* Copyright 2021, the Glitchfiend Team. | ||
* All rights reserved. | ||
******************************************************************************/ | ||
package toughasnails.block; | ||
|
||
import net.minecraft.world.level.block.Block; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
import net.minecraft.world.level.block.state.StateDefinition; | ||
import net.minecraft.world.level.block.state.properties.BooleanProperty; | ||
|
||
import java.util.function.ToIntFunction; | ||
|
||
public class ThermoregulatorBlock extends Block | ||
{ | ||
public static final BooleanProperty COOLING = BooleanProperty.create("cooling"); | ||
public static final BooleanProperty HEATING = BooleanProperty.create("heating"); | ||
|
||
public ThermoregulatorBlock(Properties properties) | ||
{ | ||
super(properties); | ||
this.registerDefaultState(this.stateDefinition.any().setValue(COOLING, false).setValue(HEATING, false)); | ||
} | ||
|
||
public static ToIntFunction<BlockState> lightLevel(int level) | ||
{ | ||
return (state) -> { | ||
boolean cooling = state.getValue(COOLING); | ||
boolean heating = state.getValue(HEATING); | ||
|
||
return ((cooling ? 1: 0) + (heating ? 1: 0)) * level; | ||
}; | ||
} | ||
|
||
@Override | ||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) | ||
{ | ||
builder.add(COOLING, HEATING); | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
common/src/main/resources/assets/toughasnails/blockstates/thermoregulator.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 @@ | ||
{ | ||
"variants": { | ||
"cooling=false,heating=false": { | ||
"model": "toughasnails:block/thermoregulator_inactive" | ||
}, | ||
"cooling=true,heating=false": { | ||
"model": "toughasnails:block/thermoregulator_cooling_active" | ||
}, | ||
"cooling=false,heating=true": { | ||
"model": "toughasnails:block/thermoregulator_heating_active" | ||
}, | ||
"cooling=true,heating=true": { | ||
"model": "toughasnails:block/thermoregulator_active" | ||
} | ||
} | ||
} |
68 changes: 0 additions & 68 deletions
68
common/src/main/resources/assets/toughasnails/blockstates/thermoregulator.txt
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
common/src/main/resources/assets/toughasnails/models/block/thermoregulator.json
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
common/src/main/resources/assets/toughasnails/models/block/thermoregulator_active.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,46 @@ | ||
{ | ||
"parent": "block/block", | ||
"textures": { | ||
"particle": "toughasnails:block/thermoregulator_side_active", | ||
"side": "toughasnails:block/thermoregulator_side_active", | ||
"top": "toughasnails:block/thermoregulator_top_active", | ||
"bottom": "minecraft:block/blast_furnace_top" | ||
}, | ||
"elements": [ | ||
{ | ||
"from": [0, 16, 0], | ||
"to": [8, 16, 16], | ||
"faces": { | ||
"up": {"uv": [0, 0, 8, 16], "texture": "#top"} | ||
} | ||
}, | ||
{ | ||
"from": [8, 16, 0], | ||
"to": [16, 16, 16], | ||
"faces": { | ||
"up": {"uv": [8, 0, 16, 16], "texture": "#top"} | ||
} | ||
}, | ||
{ | ||
"from": [0, 8, 0], | ||
"to": [16, 16, 16], | ||
"faces": { | ||
"north": {"uv": [0, 0, 16, 8], "texture": "#side"}, | ||
"east": {"uv": [0, 0, 16, 8], "texture": "#side"}, | ||
"south": {"uv": [0, 0, 16, 8], "texture": "#side"}, | ||
"west": {"uv": [0, 0, 16, 8], "texture": "#side"} | ||
} | ||
}, | ||
{ | ||
"from": [0, 0, 0], | ||
"to": [16, 8, 16], | ||
"faces": { | ||
"north": {"uv": [0, 8, 16, 16], "texture": "#side"}, | ||
"east": {"uv": [0, 8, 16, 16], "texture": "#side"}, | ||
"south": {"uv": [0, 8, 16, 16], "texture": "#side"}, | ||
"west": {"uv": [0, 8, 16, 16], "texture": "#side"}, | ||
"down": {"uv": [0, 0, 16, 16], "texture": "#bottom"} | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.