Skip to content

Commit

Permalink
the horror (failed skybox attempt)
Browse files Browse the repository at this point in the history
hub blocks
fix grass & vines
hub flame particle
  • Loading branch information
ice-nuclearcrackhead239 committed Dec 30, 2024
1 parent 6997dfa commit ffe1d04
Show file tree
Hide file tree
Showing 65 changed files with 255 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
public class ModBlockEntityRenderers {
public static void init() {
BlockEntityRendererFactories.register(ModBlockEntityTypes.BLACKSTONE_PEDESTAL, BlackstonePedestalEntityRenderer::new);
//BlockEntityRendererFactories.register(ModBlockEntityTypes.SKYBOX_HUB, SkyboxHubEntityRenderer::new);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ public static void init() {
ModBlocks.MYCELIA,
ModBlocks.MYCELIA_BLOOM,
ModBlocks.MYCELIA_STALKS,
ModBlocks.MYCELIAL_EYE
ModBlocks.MYCELIA_STALKS,
ModBlocks.MYCELIAL_EYE,
ModBlocks.HUB_GLASS,
ModBlocks.HUB_TORCH,
ModBlocks.HUB_WALL_TORCH
);

BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getTranslucent(),
Expand All @@ -69,6 +73,10 @@ public static void init() {
ModBlocks.WATER_SILK
);

BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getEndGateway(),
ModBlocks.SKYBOX_SPACE
);

BlockRenderLayerMap.INSTANCE.putFluids(RenderLayer.getTranslucent(), RADIOACTIVE_STILL, RADIOACTIVE_FLOWING);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ public class ModItemGroups {
entries.add(ModBlocks.MAGENTA_WALLPAPER);
entries.add(ModBlocks.PINK_WALLPAPER);
entries.add(ModBlocks.FIREBLU);
entries.add(ModBlocks.HUB_BRICKS_4);
entries.add(ModBlocks.HUB_BRICKS_3);
entries.add(ModBlocks.HUB_BRICKS_2);
entries.add(ModBlocks.HUB_BRICKS_1);
entries.add(ModBlocks.HUB_TILES);
entries.add(ModBlocks.HUB_TILE_YELLOW);
entries.add(ModBlocks.HUB_TILE_BLUE);
entries.add(ModBlocks.HUB_GLASS);
entries.add(ModItems.HUB_TORCH);
entries.add(ModBlocks.SKYBOX_SPACE);
entries.add(ModBlocks.EXAMPLE_BLOCK);
})
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
import com.nuclearcrackhead.serverboss.content.particle.BounceParticle;
import com.nuclearcrackhead.serverboss.content.particle.SoaringParticle;
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;
import net.minecraft.client.particle.FlameParticle;
import net.minecraft.client.particle.SoulParticle;

public class ModParticleFactories {

public static void init() {
ParticleFactoryRegistry.getInstance().register(ModParticles.AGONY_SOUL, SoulParticle.Factory::new);
ParticleFactoryRegistry.getInstance().register(ModParticles.HUB_FLAME, FlameParticle.Factory::new);
ParticleFactoryRegistry.getInstance().register(ModParticles.SOARING, SoaringParticle.Factory::new);
ParticleFactoryRegistry.getInstance().register(ModParticles.BOUNCE, BounceParticle.Factory::new);
ParticleFactoryRegistry.getInstance().register(ModParticles.SPEED_BLAST, BounceParticle.Factory::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.block.piston.PistonBehavior;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
Expand Down Expand Up @@ -210,6 +211,20 @@ public static void init() {}

public static final Block DARK_GLASS = register("dark_glass", TransparentBlock::new, AbstractBlock.Settings.copy(Blocks.GLASS));

//todo shader stupid shit i stupdishi GRRRRR AAAAAAA i hate this
public static final Block SKYBOX_SPACE = register("skybox_space", EndGatewayBlock::new, AbstractBlock.Settings.create().mapColor(MapColor.BLACK).noCollision().luminance((state) -> 15).strength(-1.0F, 3600000.0F).dropsNothing().pistonBehavior(PistonBehavior.BLOCK));

public static final Block HUB_TORCH = registerBlock("hub_torch", (settings) -> new TorchBlock(ModParticles.HUB_FLAME, settings), AbstractBlock.Settings.create().noCollision().breakInstantly().luminance((state) -> 15).sounds(BlockSoundGroup.WOOD).pistonBehavior(PistonBehavior.DESTROY));
public static final Block HUB_WALL_TORCH = registerBlock("hub_wall_torch", (settings) -> new WallTorchBlock(ModParticles.HUB_FLAME, settings), AbstractBlock.Settings.create().noCollision().breakInstantly().luminance((state) -> 15).sounds(BlockSoundGroup.WOOD).pistonBehavior(PistonBehavior.DESTROY));
public static final Block HUB_BRICKS_1 = register("hub_bricks_1", Block::new, AbstractBlock.Settings.copy(Blocks.STONE_BRICKS));
public static final Block HUB_BRICKS_2 = register("hub_bricks_2", Block::new, AbstractBlock.Settings.copy(Blocks.STONE_BRICKS));
public static final Block HUB_BRICKS_3 = register("hub_bricks_3", Block::new, AbstractBlock.Settings.copy(Blocks.STONE_BRICKS));
public static final Block HUB_BRICKS_4 = register("hub_bricks_4", Block::new, AbstractBlock.Settings.copy(Blocks.STONE_BRICKS));
public static final Block HUB_TILES = register("hub_tiles", Block::new, AbstractBlock.Settings.copy(Blocks.DIAMOND_BLOCK));
public static final Block HUB_TILE_YELLOW = register("hub_tile_yellow", Block::new, AbstractBlock.Settings.copy(Blocks.DIAMOND_BLOCK));
public static final Block HUB_TILE_BLUE = register("hub_tile_blue", Block::new, AbstractBlock.Settings.copy(Blocks.DIAMOND_BLOCK));
public static final Block HUB_GLASS = register("hub_glass", Block::new, AbstractBlock.Settings.copy(Blocks.GLASS));

public static final Block HAZARD_MARKER = register("hazard_marker", Block::new, AbstractBlock.Settings.copy(Blocks.GOLD_BLOCK));
public static final Block HAZARD_MARKER_SLAB = register("hazard_marker_slab", SlabBlock::new,
AbstractBlock.Settings.copy(Blocks.GOLD_BLOCK));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
import com.nuclearcrackhead.serverboss.SVBCR;
import com.nuclearcrackhead.serverboss.content.item.dev.*;
import com.nuclearcrackhead.serverboss.content.item.*;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.item.*;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.Direction;

import java.util.function.BiFunction;
import java.util.function.Function;

import static com.nuclearcrackhead.serverboss.registry.ModFluids.RADIOACTIVE_STILL;
Expand Down Expand Up @@ -54,7 +58,7 @@ public static void init() {
public static final Item PROP_PUDDLE = register("prop_puddle", settings -> new BlockItem(ModBlocks.PUDDLE, settings), new Item.Settings());
public static final Item PROP_GRAVEL_PATCH = register("prop_gravel_patch", settings -> new BlockItem(ModBlocks.GRAVEL_PATCH, settings), new Item.Settings());
public static final Item PROP_PEBBLES = register("prop_pebbles", settings -> new BlockItem(ModBlocks.PEBBLES, settings), new Item.Settings());

public static final Item HUB_TORCH = register((Block)ModBlocks.HUB_TORCH, (BiFunction)((block, settings) -> new VerticallyAttachableBlockItem((Block) block, ModBlocks.HUB_WALL_TORCH, Direction.DOWN, (Item.Settings) settings)));

public static final Item GLOWING_MUSHROOMS = register("glowing_mushrooms", settings -> new BlockItem(ModBlocks.GLOWING_MUSHROOMS, settings), new Item.Settings());

Expand All @@ -69,6 +73,27 @@ public static void init() {
// GUNS YEE HAW
public static final Item PISTOL = register("pistol", Pistol::new, new Item.Settings());

public static Item register(Block block, BiFunction<Block, Item.Settings, Item> factory) {
return register(block, factory, new Item.Settings());
}

public static Item register(Block block, BiFunction<Block, Item.Settings, Item> factory, Item.Settings settings) {
return register((RegistryKey)keyOf(block.getRegistryEntry().registryKey()), (Function)((itemSettings) -> (Item)factory.apply(block, (Item.Settings) itemSettings)), settings.useBlockPrefixedTranslationKey());
}

private static RegistryKey<Item> keyOf(RegistryKey<Block> blockKey) {
return RegistryKey.of(RegistryKeys.ITEM, blockKey.getValue());
}

public static Item register(RegistryKey<Item> key, Function<Item.Settings, Item> factory, Item.Settings settings) {
Item item = (Item)factory.apply(settings.registryKey(key));
if (item instanceof BlockItem blockItem) {
blockItem.appendBlocks(Item.BLOCK_ITEMS, item);
}

return (Item)Registry.register(Registries.ITEM, key, item);
}

public static Item register(String path, Function<Item.Settings, Item> function, Item.Settings settings) {
Identifier id = SVBCR.of(path);
RegistryKey<Item> key = RegistryKey.of(RegistryKeys.ITEM, id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ public class ModParticles {
public static final SimpleParticleType SOARING = FabricParticleTypes.simple();
public static final SimpleParticleType BOUNCE = FabricParticleTypes.simple();
public static final SimpleParticleType SPEED_BLAST = FabricParticleTypes.simple();
public static final SimpleParticleType HUB_FLAME = FabricParticleTypes.simple();

public static void init() {
Registry.register(Registries.PARTICLE_TYPE, SVBCR.of("agony_soul"), AGONY_SOUL);
Registry.register(Registries.PARTICLE_TYPE, SVBCR.of("soaring"), SOARING);
Registry.register(Registries.PARTICLE_TYPE, SVBCR.of("bounce"), BOUNCE);
Registry.register(Registries.PARTICLE_TYPE, SVBCR.of("speedpad"), SPEED_BLAST);
Registry.register(Registries.PARTICLE_TYPE, SVBCR.of("hub_flame"), HUB_FLAME);
}

}
7 changes: 7 additions & 0 deletions src/main/resources/assets/svbcr/blockstates/hub_bricks_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "svbcr:block/hub_bricks_1"
}
}
}
7 changes: 7 additions & 0 deletions src/main/resources/assets/svbcr/blockstates/hub_bricks_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "svbcr:block/hub_bricks_2"
}
}
}
7 changes: 7 additions & 0 deletions src/main/resources/assets/svbcr/blockstates/hub_bricks_3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "svbcr:block/hub_bricks_3"
}
}
}
7 changes: 7 additions & 0 deletions src/main/resources/assets/svbcr/blockstates/hub_bricks_4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "svbcr:block/hub_bricks_4"
}
}
}
7 changes: 7 additions & 0 deletions src/main/resources/assets/svbcr/blockstates/hub_glass.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "svbcr:block/hub_glass"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "svbcr:block/hub_tile_blue"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "svbcr:block/hub_tile_yellow"
}
}
}
7 changes: 7 additions & 0 deletions src/main/resources/assets/svbcr/blockstates/hub_tiles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "svbcr:block/hub_tiles"
}
}
}
7 changes: 7 additions & 0 deletions src/main/resources/assets/svbcr/blockstates/hub_torch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "svbcr:block/hub_torch"
}
}
}
19 changes: 19 additions & 0 deletions src/main/resources/assets/svbcr/blockstates/hub_wall_torch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"variants": {
"facing=east": {
"model": "svbcr:block/hub_wall_torch"
},
"facing=north": {
"model": "svbcr:block/hub_wall_torch",
"y": 270
},
"facing=south": {
"model": "svbcr:block/hub_wall_torch",
"y": 90
},
"facing=west": {
"model": "svbcr:block/hub_wall_torch",
"y": 180
}
}
}
8 changes: 8 additions & 0 deletions src/main/resources/assets/svbcr/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@
"block.svbcr.flesh_holes": "Flesh Holes",
"block.svbcr.flesh_mesh": "Flesh Mesh",
"block.svbcr.flesh_spine": "Flesh Spine",
"block.svbcr.hub_bricks_1": "Hub Bricks (I)",
"block.svbcr.hub_bricks_2": "Hub Bricks (II)",
"block.svbcr.hub_bricks_3": "Hub Bricks (III)",
"block.svbcr.hub_bricks_4": "Hub Bricks (IV)",
"block.svbcr.hub_tiles": "Hub Tiles",
"block.svbcr.hub_tile_yellow": "Hub Tile (Yellow)",
"block.svbcr.hub_tile_blue": "Hub Tile (Blue)",
"block.svbcr.hub_glass": "Hub Glass",
"block.svbcr.forcefield": "Forcefield",
"block.svbcr.forcefield.tooltip": "Togglable by [room_brush controller]",
"block.svbcr.forcefield.tooltip2": "Can be waterlogged to turn into water",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "svbcr:block/hub_bricks_1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "svbcr:block/hub_bricks_2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "svbcr:block/hub_bricks_3"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "svbcr:block/hub_bricks_4"
}
}
6 changes: 6 additions & 0 deletions src/main/resources/assets/svbcr/models/block/hub_glass.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "svbcr:block/hub_glass"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "svbcr:block/hub_tile_blue"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "svbcr:block/hub_tile_yellow"
}
}
6 changes: 6 additions & 0 deletions src/main/resources/assets/svbcr/models/block/hub_tiles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "svbcr:block/hub_tiles"
}
}
6 changes: 6 additions & 0 deletions src/main/resources/assets/svbcr/models/block/hub_torch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/template_torch",
"textures": {
"torch": "svbcr:block/hub_torch"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/template_torch_wall",
"textures": {
"torch": "svbcr:block/hub_torch"
}
}
3 changes: 3 additions & 0 deletions src/main/resources/assets/svbcr/models/item/hub_bricks_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "svbcr:block/hub_bricks_1"
}
3 changes: 3 additions & 0 deletions src/main/resources/assets/svbcr/models/item/hub_bricks_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "svbcr:block/hub_bricks_1"
}
3 changes: 3 additions & 0 deletions src/main/resources/assets/svbcr/models/item/hub_bricks_3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "svbcr:block/hub_bricks_3"
}
3 changes: 3 additions & 0 deletions src/main/resources/assets/svbcr/models/item/hub_bricks_4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "svbcr:block/hub_bricks_4"
}
3 changes: 3 additions & 0 deletions src/main/resources/assets/svbcr/models/item/hub_glass.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "svbcr:block/hub_glass"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "svbcr:block/hub_tile_blue"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "svbcr:block/hub_tile_yellow"
}
3 changes: 3 additions & 0 deletions src/main/resources/assets/svbcr/models/item/hub_tiles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "svbcr:block/hub_tiles"
}
Loading

0 comments on commit ffe1d04

Please sign in to comment.