Skip to content

Commit

Permalink
Improved Rain Collector texture/model
Browse files Browse the repository at this point in the history
  • Loading branch information
Forstride committed Jan 2, 2024
1 parent 40001ee commit 3fc8959
Show file tree
Hide file tree
Showing 14 changed files with 337 additions and 296 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.4 2024-01-02T14:30:50.6090734 Recipes
// 1.20.4 2024-01-02T15:28:15.4211521 Recipes
09252bd5a872203de304820e8d5c5493afe96cf4 data/toughasnails/advancements/recipes/combat/leaf_boots.json
2da825265e95f5dfc0dd4026e0dafee70c17512c data/toughasnails/advancements/recipes/combat/leaf_chestplate.json
6d96cd4baff66d426c9405852ceed3aa8a3cde8f data/toughasnails/advancements/recipes/combat/leaf_helmet.json
Expand All @@ -7,7 +7,7 @@ a0e969384a6e03b816c0cac15787d8f0ff6584ee data/toughasnails/advancements/recipes/
e8c549cdadb494e5854491524dbb6404aeb7f9a9 data/toughasnails/advancements/recipes/combat/wool_chestplate.json
55e82e2e3092ccc58b5747ed2bafb449eccf091f data/toughasnails/advancements/recipes/combat/wool_helmet.json
71aaf601361469d6104d38fb81aebd32861df055 data/toughasnails/advancements/recipes/combat/wool_leggings.json
9bb310dd6cef60765e86a433675344ad054b332f data/toughasnails/advancements/recipes/decorations/rain_collector.json
40c2eb94d0593910a7114f2695c5f3f129f7d035 data/toughasnails/advancements/recipes/decorations/rain_collector.json
bb4f151b3d411b20ad496cfa2a95fd9aba7c1f78 data/toughasnails/advancements/recipes/decorations/water_purifier.json
5f76369328acf2e24354a8918957059d62c035bc data/toughasnails/advancements/recipes/food/apple_juice.json
a566bf835d6a75c46dd173af19b9dd0f4fe7469c data/toughasnails/advancements/recipes/food/cactus_juice.json
Expand Down Expand Up @@ -64,7 +64,7 @@ d15aa59d2053ceaa472b5fad409ca720d37766a5 data/toughasnails/recipes/netherite_wat
23d01cbd22f68c4a24a36a57a11401e9c42d9477 data/toughasnails/recipes/potion.json
e4a98b0325be4fb27194eb56a079871cdc8d4114 data/toughasnails/recipes/pumpkin_juice.json
1ed5721002714ae4029126d79a7b73ac58fa755d data/toughasnails/recipes/purified_water_bottle.json
454a67d0df9042690154a1b3b372a5fff586b47d data/toughasnails/recipes/rain_collector.json
fb03395b2b66dc861d110435b0d5c63a351123cd data/toughasnails/recipes/rain_collector.json
2512026dc3a027f39db7e77e023a7017de386b9c data/toughasnails/recipes/sweet_berry_juice.json
e636bfd4fab8d516083454e872c8115f5c15cf27 data/toughasnails/recipes/temperature_gauge.json
b75d1caa0b1dcb9ae14dc02e47bba2a3c4b4a4dc data/toughasnails/recipes/thermometer.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_barrel": {
"has_string": {
"conditions": {
"items": [
{
"items": [
"minecraft:barrel"
"minecraft:string"
]
}
]
Expand All @@ -23,7 +23,7 @@
"requirements": [
[
"has_the_recipe",
"has_barrel"
"has_string"
]
],
"rewards": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"B": {
"item": "minecraft:barrel"
},
"I": {
"item": "minecraft:iron_ingot"
},
"S": {
"item": "minecraft:string"
},
"W": {
"tag": "minecraft:planks"
}
},
"pattern": [
"ISI",
"IBI"
"WSW",
"W W",
"WWW"
],
"result": {
"item": "toughasnails:rain_collector"
Expand Down
11 changes: 11 additions & 0 deletions common/src/main/java/toughasnails/block/RainCollectorBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@
import net.minecraft.world.level.block.state.properties.IntegerProperty;
import net.minecraft.world.level.pathfinder.PathComputationType;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.shapes.BooleanOp;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape;
import toughasnails.api.item.TANItems;

public class RainCollectorBlock extends Block
{
private static final VoxelShape INSIDE = box(2.0D, 15.0D, 2.0D, 14.0D, 16.0D, 14.0D);
protected static final VoxelShape SHAPE = Shapes.join(Shapes.block(), Shapes.or(INSIDE), BooleanOp.ONLY_FIRST);
public static final IntegerProperty LEVEL = IntegerProperty.create("level", 0, 3);

public RainCollectorBlock(Properties properties)
Expand All @@ -35,6 +41,11 @@ public RainCollectorBlock(Properties properties)
this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, Integer.valueOf(0)));
}

@Override
public VoxelShape getShape(BlockState p_151964_, BlockGetter p_151965_, BlockPos p_151966_, CollisionContext p_151967_) {
return SHAPE;
}

@Override
public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,74 +1,82 @@
{
"parent": "block/block",
"ambientocclusion": false,
"textures": {
"textures": {
"particle": "toughasnails:block/rain_collector_side",
"top": "toughasnails:block/rain_collector_top",
"bottom": "minecraft:block/barrel_bottom",
"bottom": "toughasnails:block/rain_collector_bottom",
"side": "toughasnails:block/rain_collector_side",
"inside": "minecraft:block/barrel_top_open"
},
"elements": [
{ "from": [ 0, 0, 0 ],
"to": [ 2, 16, 16 ],
"faces": {
"down": { "texture": "#bottom" },
"up": { "texture": "#top" },
"north": { "texture": "#side" },
"south": { "texture": "#side" },
"west": { "texture": "#side" },
"east": { "texture": "#side" }
}
},
{ "from": [ 2, 0, 2 ],
"to": [ 14, 4, 14 ],
"faces": {
"down": { "texture": "#bottom" },
"up": { "texture": "#inside" },
"north": { "texture": "#side" },
"south": { "texture": "#side" },
"west": { "texture": "#side" },
"east": { "texture": "#side" }
}
},
{ "from": [ 14, 0, 0 ],
"to": [ 16, 16, 16 ],
"faces": {
"down": { "texture": "#bottom" },
"up": { "texture": "#top" },
"north": { "texture": "#side" },
"south": { "texture": "#side" },
"west": { "texture": "#side" },
"east": { "texture": "#side" }
}
},
{ "from": [ 2, 0, 0 ],
"to": [ 14, 16, 2 ],
"faces": {
"down": { "texture": "#bottom" },
"up": { "texture": "#top" },
"north": { "texture": "#side" },
"south": { "texture": "#side" },
"west": { "texture": "#side" },
"east": { "texture": "#side" }
}
},
{ "from": [ 2, 0, 14 ],
"to": [ 14, 16, 16 ],
"faces": {
"down": { "texture": "#bottom" },
"up": { "texture": "#top" },
"north": { "texture": "#side" },
"south": { "texture": "#side" },
"west": { "texture": "#side" },
"east": { "texture": "#side" }
}
},
{ "from": [ 2, 16, 2 ],
"to": [ 14, 16, 14 ],
"faces": {
"up": { "texture": "#top" }
}
}
]
"side_inner": "toughasnails:block/rain_collector_side_inner",
"inside": "toughasnails:block/rain_collector_inner",
"water": "minecraft:block/water_still"
},
"elements": [
{
"from": [0, 0, 0],
"to": [2, 16, 16],
"faces": {
"north": {"uv": [14, 0, 16, 16], "texture": "#side"},
"east": {"uv": [0, 0, 16, 16], "texture": "#side_inner"},
"south": {"uv": [0, 0, 2, 16], "texture": "#side"},
"west": {"uv": [0, 0, 16, 16], "texture": "#side"},
"up": {"uv": [0, 0, 2, 16], "texture": "#top"},
"down": {"uv": [0, 0, 2, 16], "texture": "#bottom"}
}
},
{
"from": [2, 0, 2],
"to": [14, 4, 14],
"faces": {
"north": {"uv": [2, 12, 14, 16], "texture": "#side"},
"east": {"uv": [2, 12, 14, 16], "texture": "#side"},
"south": {"uv": [2, 12, 14, 16], "texture": "#side"},
"west": {"uv": [2, 12, 14, 16], "texture": "#side"},
"up": {"uv": [2, 2, 14, 14], "texture": "#inside"},
"down": {"uv": [2, 2, 14, 14], "texture": "#bottom"}
}
},
{
"from": [14, 0, 0],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [0, 0, 2, 16], "texture": "#side"},
"east": {"uv": [0, 0, 16, 16], "texture": "#side"},
"south": {"uv": [14, 0, 16, 16], "texture": "#side"},
"west": {"uv": [0, 0, 16, 16], "texture": "#side_inner"},
"up": {"uv": [14, 0, 16, 16], "texture": "#top"},
"down": {"uv": [14, 0, 16, 16], "texture": "#bottom"}
}
},
{
"from": [2, 0, 0],
"to": [14, 16, 2],
"faces": {
"north": {"uv": [2, 0, 14, 16], "texture": "#side"},
"east": {"uv": [14, 0, 16, 16], "texture": "#side"},
"south": {"uv": [2, 0, 14, 16], "texture": "#side_inner"},
"west": {"uv": [0, 0, 2, 16], "texture": "#side"},
"up": {"uv": [2, 0, 14, 2], "texture": "#top"},
"down": {"uv": [2, 14, 14, 16], "texture": "#bottom"}
}
},
{
"from": [2, 0, 14],
"to": [14, 16, 16],
"faces": {
"north": {"uv": [2, 0, 14, 16], "texture": "#side_inner"},
"east": {"uv": [0, 0, 2, 16], "texture": "#side"},
"south": {"uv": [2, 0, 14, 16], "texture": "#side"},
"west": {"uv": [14, 0, 16, 16], "texture": "#side"},
"up": {"uv": [2, 14, 14, 16], "texture": "#top"},
"down": {"uv": [2, 0, 14, 2], "texture": "#bottom"}
}
},
{
"from": [2, 15, 2],
"to": [14, 15, 14],
"faces": {
"up": {"uv": [2, 2, 14, 14], "texture": "#top"}
}
}
]
}
Loading

0 comments on commit 3fc8959

Please sign in to comment.