Skip to content

Commit

Permalink
chore: datagen all blockstates
Browse files Browse the repository at this point in the history
  • Loading branch information
CallMeEchoCodes committed Jan 20, 2025
1 parent 47e63d6 commit ff261be
Show file tree
Hide file tree
Showing 27 changed files with 271 additions and 322 deletions.
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.modrinth.minotaur.ModrinthExtension

plugins {
java
alias(libs.plugins.fabric.loom)
Expand Down
252 changes: 126 additions & 126 deletions src/client/java/dev/spiritstudios/hollow/datagen/ModelProvider.java

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions src/main/generated/assets/hollow/blockstates/cattail_stem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"variants": {
"bottom=false": [
{
"model": "hollow:block/cattail_stem"
},
{
"model": "hollow:block/cattail_stem_2"
}
],
"bottom=true": {
"model": "hollow:block/cattail_stem_bottom"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,48 @@
"variants": {
"amount=1,facing=east": {
"model": "hollow:block/one_polypore",
"y": 180
"y": 90
},
"amount=1,facing=north": {
"model": "hollow:block/one_polypore",
"y": 90
"model": "hollow:block/one_polypore"
},
"amount=1,facing=south": {
"model": "hollow:block/one_polypore",
"y": 270
"y": 180
},
"amount=1,facing=west": {
"model": "hollow:block/one_polypore"
"model": "hollow:block/one_polypore",
"y": 270
},

"amount=2,facing=east": {
"model": "hollow:block/two_polypore",
"y": 180
"y": 90
},
"amount=2,facing=north": {
"model": "hollow:block/two_polypore",
"y": 90
"model": "hollow:block/two_polypore"
},
"amount=2,facing=south": {
"model": "hollow:block/two_polypore",
"y": 270
"y": 180
},
"amount=2,facing=west": {
"model": "hollow:block/two_polypore"
"model": "hollow:block/two_polypore",
"y": 270
},

"amount=3,facing=east": {
"model": "hollow:block/three_polypore",
"y": 180
"y": 90
},
"amount=3,facing=north": {
"model": "hollow:block/three_polypore",
"y": 90
"model": "hollow:block/three_polypore"
},
"amount=3,facing=south": {
"model": "hollow:block/three_polypore",
"y": 270
"y": 180
},
"amount=3,facing=west": {
"model": "hollow:block/three_polypore"
"model": "hollow:block/three_polypore",
"y": 270
}
}
}
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
{
"variants": {
"type=single,facing=north": {
"model": "hollow:block/stone_chest"
},
"type=left,facing=north": {
"model": "hollow:block/stone_chest_left"
"facing=east,type=left": {
"model": "hollow:block/stone_chest_left",
"y": 90
},
"type=right,facing=north": {
"model": "hollow:block/stone_chest_right"
"facing=east,type=right": {
"model": "hollow:block/stone_chest_right",
"y": 90
},

"type=single,facing=east": {
"facing=east,type=single": {
"model": "hollow:block/stone_chest",
"y": 90
},
"type=left,facing=east": {
"facing=north,type=left": {
"model": "hollow:block/stone_chest_left",
"y": 90
"y": 0
},
"type=right,facing=east": {
"facing=north,type=right": {
"model": "hollow:block/stone_chest_right",
"y": 90
"y": 0
},

"type=single,facing=south": {
"facing=north,type=single": {
"model": "hollow:block/stone_chest",
"y": 180
"y": 0
},
"type=left,facing=south": {
"facing=south,type=left": {
"model": "hollow:block/stone_chest_left",
"y": 180
},
"type=right,facing=south": {
"facing=south,type=right": {
"model": "hollow:block/stone_chest_right",
"y": 180
},

"type=single,facing=west": {
"facing=south,type=single": {
"model": "hollow:block/stone_chest",
"y": 270
"y": 180
},
"type=left,facing=west": {
"facing=west,type=left": {
"model": "hollow:block/stone_chest_left",
"y": 270
},
"type=right,facing=west": {
"facing=west,type=right": {
"model": "hollow:block/stone_chest_right",
"y": 270
},
"facing=west,type=single": {
"model": "hollow:block/stone_chest",
"y": 270
}
}
}
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
{
"variants": {
"type=single,facing=north": {
"model": "hollow:block/stone_chest_lid"
},
"type=left,facing=north": {
"model": "hollow:block/stone_chest_lid_left"
"facing=east,type=left": {
"model": "hollow:block/stone_chest_lid_left",
"y": 90
},
"type=right,facing=north": {
"model": "hollow:block/stone_chest_lid_right"
"facing=east,type=right": {
"model": "hollow:block/stone_chest_lid_right",
"y": 90
},

"type=single,facing=east": {
"facing=east,type=single": {
"model": "hollow:block/stone_chest_lid",
"y": 90
},
"type=left,facing=east": {
"facing=north,type=left": {
"model": "hollow:block/stone_chest_lid_left",
"y": 90
"y": 0
},
"type=right,facing=east": {
"facing=north,type=right": {
"model": "hollow:block/stone_chest_lid_right",
"y": 90
"y": 0
},

"type=single,facing=south": {
"facing=north,type=single": {
"model": "hollow:block/stone_chest_lid",
"y": 180
"y": 0
},
"type=left,facing=south": {
"facing=south,type=left": {
"model": "hollow:block/stone_chest_lid_left",
"y": 180
},
"type=right,facing=south": {
"facing=south,type=right": {
"model": "hollow:block/stone_chest_lid_right",
"y": 180
},

"type=single,facing=west": {
"facing=south,type=single": {
"model": "hollow:block/stone_chest_lid",
"y": 270
"y": 180
},
"type=left,facing=west": {
"facing=west,type=left": {
"model": "hollow:block/stone_chest_lid_left",
"y": 270
},
"type=right,facing=west": {
"facing=west,type=right": {
"model": "hollow:block/stone_chest_lid_right",
"y": 270
},
"facing=west,type=single": {
"model": "hollow:block/stone_chest_lid",
"y": 270
}
}
}
2 changes: 1 addition & 1 deletion src/main/generated/assets/hollow/models/block/cattail.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parent": "minecraft:block/cross",
"textures": {
"cross": "hollow:block/cattail_top"
"cross": "hollow:block/cattail"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parent": "minecraft:block/cross",
"textures": {
"cross": "hollow:block/cattail_base"
"cross": "hollow:block/cattail_stem"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parent": "minecraft:block/cross",
"textures": {
"cross": "hollow:block/cattail_middle"
"cross": "hollow:block/cattail_stem_2"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parent": "minecraft:block/cross",
"textures": {
"cross": "hollow:block/cattail_middle_2"
"cross": "hollow:block/cattail_stem_bottom"
}
}
2 changes: 1 addition & 1 deletion src/main/generated/assets/hollow/models/item/cattail.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hollow:block/cattail_top"
"layer0": "hollow:block/cattail"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ && getFacing(neighborState) == direction.getOpposite()) {

@Override
protected ActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
if (world.isClient) return ActionResult.PASS_TO_DEFAULT_BLOCK_ACTION;

StoneChestBlockEntity blockEntity = (StoneChestBlockEntity) world.getBlockEntity(pos);
return Objects.requireNonNull(blockEntity).use(player, hand, hit.getSide());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,23 @@
package dev.spiritstudios.hollow.block.entity;

import dev.spiritstudios.hollow.registry.HollowBlockEntityTypes;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.DecoratedPotBlockEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.ai.WardenAngerManager;
import net.minecraft.entity.mob.WardenEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Items;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.network.listener.ClientPlayPacketListener;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.s2c.play.BlockEntityUpdateS2CPacket;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.random.Random;
import net.minecraft.world.World;
import net.minecraft.world.event.GameEvent;
import org.jetbrains.annotations.Nullable;

import java.util.List;
import java.util.Optional;

public class EchoingPotBlockEntity extends BlockEntity {
public int activeTime = 0;
public long lastWobbleTime;
Expand Down
Loading

0 comments on commit ff261be

Please sign in to comment.