Skip to content

Commit

Permalink
[release] General code cleanup and new textures/models and another mo…
Browse files Browse the repository at this point in the history
…d integration.

- Aurora's deco integration (azalea and jacaranda beams)
- Code cleanup for the block java files
- Removed ".nonOpaque()" for most of the blocks in ArchitectureExtensionsBlocks.java and ArchExSoul_IceCompat.java
- New roof models by Azagwen: #7
- New textures for Iron H-Beam by Carter: #8
- Update registry methods for ArchExSoul_IceCompat.java; thanks acikek!

Signed-off-by: woodiertexas <woodytexas8088@gmail.com>
  • Loading branch information
woodiertexas committed May 23, 2022
1 parent 16dcc8c commit 4266543
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ public class ArchitectureExtensionsBlocks {
static {

// Block string names
String[] blocksArray = {"andesite_column", "blackstone_column", "brick_column", "cobbled_deepslate_column",
String[] blocksArray = {
"andesite_column", "blackstone_column", "brick_column", "cobbled_deepslate_column",
"cobblestone_column", "dark_prismarine_column", "deepslate_brick_column", "deepslate_tile_column", "diorite_column",
"end_stone_brick_column", "granite_column", "mossy_cobblestone_column", "mossy_stone_brick_column", "nether_brick_column",
"polished_blackstone_brick_column", "polished_blackstone_column", "polished_deepslate_column", "prismarine_brick_column",
Expand Down Expand Up @@ -134,7 +135,6 @@ public class ArchitectureExtensionsBlocks {
NETHER_BRICK_ROOF, RED_NETHER_BRICK_ROOF, SMOOTH_QUARTZ_ROOF, SMOOTH_RED_SANDSTONE_ROOF, SMOOTH_SANDSTONE_ROOF,
STONE_BRICK_ROOF, OAK_CROWN_MOLDING, DEBUGGY_BLOCK, FAKE_END_PORTAL_BLOCK, BAMBOO_ROD, COPPER_ROD,
END_ROD_NUBLESS

};

// Checks to see if the arrays are of the same length. If not, stop the Minecraft process.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,29 @@
import org.quiltmc.qsl.block.extensions.api.QuiltBlockSettings;
import org.quiltmc.qsl.item.setting.api.QuiltItemSettings;

import java.util.LinkedHashMap;
import java.util.Map;

public class ArchExAurorasDecoCompat {
// Beam Blocks
public static final BeamBlock AZALEA_BEAM = new BeamBlock(QuiltBlockSettings.of(Material.WOOD).strength(2f).sounds(BlockSoundGroup.WOOD));
public static final BeamBlock JACARANDA_BEAM = new BeamBlock(QuiltBlockSettings.of(Material.WOOD).strength(2f).sounds(BlockSoundGroup.WOOD));


static {

// Block string names
String[] blocksArray = {
"azalea_beam", "jacaranda_beam"
};

// Block literal names
Block[] anotherBlocksArray = {
AZALEA_BEAM, JACARANDA_BEAM
};

// Checks to see if the arrays are of the same length. If not, stop the Minecraft process.
if (blocksArray.length != anotherBlocksArray.length) {
throw new RuntimeException("Mismatched array lengths.\nLength of blocksArray: " + blocksArray.length +
"\nLength of anotherBlocksArray: " + anotherBlocksArray.length);
}

// Loops through the length of both arrays and registers the blocks found in said arrays.
for (int i = 0; i < blocksArray.length; i++) {
Registry.register(Registry.BLOCK, new Identifier("architecture_extensions", blocksArray[i]), anotherBlocksArray[i]);
Registry.register(Registry.ITEM, new Identifier("architecture_extensions", blocksArray[i]),
new BlockItem(anotherBlocksArray[i], new QuiltItemSettings().group(ItemGroup.DECORATIONS)));
/*
List of blocks to be registered in key, value pairs.
For example, "cobblestone_column, COBBLESTONE_COLUMN"
*/
Map<String, Block> blocks = new LinkedHashMap<>();
blocks.put("azalea_beam", AZALEA_BEAM);
blocks.put("jacaranda_beam", JACARANDA_BEAM);

// Registering the blocks and corresponding block items.
for (Map.Entry<String, Block> entry : blocks.entrySet()) {
Registry.register(Registry.BLOCK, new Identifier("architecture_extensions", entry.getKey()), entry.getValue());
Registry.register(Registry.ITEM, new Identifier("architecture_extensions", entry.getKey()),
new BlockItem(entry.getValue(), new QuiltItemSettings().group(ItemGroup.DECORATIONS)));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
import org.quiltmc.qsl.block.extensions.api.QuiltBlockSettings;
import org.quiltmc.qsl.item.setting.api.QuiltItemSettings;

import java.util.LinkedHashMap;
import java.util.Map;

public class ArchExSoul_IceCompat {
// Columns
public static final ColumnBlock HARDENED_LIGHTSTONE_COLUMN = new ColumnBlock(QuiltBlockSettings.of(Material.ICE).strength(3f).sounds(BlockSoundGroup.POLISHED_DEEPSLATE));
Expand All @@ -35,34 +38,33 @@ public class ArchExSoul_IceCompat {


static {
/*
List of blocks to be registered in key, value pairs.
For example, "cobblestone_column, COBBLESTONE_COLUMN"
*/
Map<String, Block> blocks = new LinkedHashMap<>();
blocks.put("hardened_lightstone_column", HARDENED_LIGHTSTONE_COLUMN);
blocks.put("lightstone_column", LIGHTSTONE_COLUMN);
blocks.put("lightstone_brick_column", LIGHTSTONE_BRICK_COLUMN);
blocks.put("polished_lightstone_column", POLISHED_LIGHTSTONE_COLUMN);
blocks.put("polished_soul_ice_column", POLISHED_SOUL_ICE_COLUMN);
blocks.put("soul_ice_column", SOUL_ICE_COLUMN);
blocks.put("soul_ice_brick_column", SOUL_ICE_BRICK_COLUMN);
blocks.put("hardened_lightstone_post", HARDENED_LIGHTSTONE_POST);
blocks.put("lightstone_post", LIGHTSTONE_POST);
blocks.put("lightstone_brick_post", LIGHTSTONE_BRICK_POST);
blocks.put("polished_lightstone_post", POLISHED_LIGHTSTONE_POST);
blocks.put("polished_soul_ice_post", POLISHED_SOUL_ICE_POST);
blocks.put("soul_ice_post", SOUL_ICE_POST);
blocks.put("soul_ice_brick_post", SOUL_ICE_BRICK_POST);

// Block string names
String[] blocksArray = {
"hardened_lightstone_column", "lightstone_column", "lightstone_brick_column", "polished_lightstone_column",
"polished_soul_ice_column", "soul_ice_column", "soul_ice_brick_column", "hardened_lightstone_post",
"lightstone_post", "lightstone_brick_post", "polished_lightstone_post", "soul_ice_post", "soul_ice_brick_post",
"polished_soul_ice_post"
};

// Block literal names
Block[] anotherBlocksArray = {
HARDENED_LIGHTSTONE_COLUMN, LIGHTSTONE_COLUMN, LIGHTSTONE_BRICK_COLUMN, POLISHED_LIGHTSTONE_COLUMN,
POLISHED_SOUL_ICE_COLUMN, SOUL_ICE_COLUMN, SOUL_ICE_BRICK_COLUMN, HARDENED_LIGHTSTONE_POST, LIGHTSTONE_POST,
LIGHTSTONE_BRICK_POST, POLISHED_LIGHTSTONE_POST, SOUL_ICE_POST, SOUL_ICE_BRICK_POST, POLISHED_SOUL_ICE_POST
};

// Checks to see if the arrays are of the same length. If not, stop the Minecraft process.
if (blocksArray.length != anotherBlocksArray.length) {
throw new RuntimeException("Mismatched array lengths.\nLength of blocksArray: " + blocksArray.length +
"\nLength of anotherBlocksArray: " + anotherBlocksArray.length);
// Registering the blocks and corresponding block items.
for (Map.Entry<String, Block> entry : blocks.entrySet()) {
Registry.register(Registry.BLOCK, new Identifier("architecture_extensions", entry.getKey()), entry.getValue());
Registry.register(Registry.ITEM, new Identifier("architecture_extensions", entry.getKey()),
new BlockItem(entry.getValue(), new QuiltItemSettings().group(ItemGroup.DECORATIONS)));
}

// Loops through the length of both arrays and registers the blocks found in said arrays.
for (int i = 0; i < blocksArray.length; i++) {
Registry.register(Registry.BLOCK, new Identifier("architecture_extensions", blocksArray[i]), anotherBlocksArray[i]);
Registry.register(Registry.ITEM, new Identifier("architecture_extensions", blocksArray[i]),
new BlockItem(anotherBlocksArray[i], new QuiltItemSettings().group(ItemGroup.DECORATIONS)));
}
}

public static void init() {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"parent": "architecture_extensions:block/h_beam_block",
"textures": {
"texture": "minecraft:block/anvil"
"beam": "architecture_extensions:block/h_beam",
"beam_side": "architecture_extensions:block/h_beam_side"
}
}
9 changes: 7 additions & 2 deletions src/main/resources/quilt.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@
"metadata": {
"name": "Architecture Extensions",
"description": "A mod that extends one's creativity by implementing new blocks to Minecraft.",
"icon": "assets/architecture_extensions/icon.png",
"contributors": {
"woodiertexas": "General Mod Dev",
"KJP12": "Datagen",
"Crackers0106": "Mod Icon",
"Carter": "Textures",
"Azagwen": "Block Models"
}
},
"contact": {
"homepage": "https://modrinth.com/mod/arch-ex",
"issues": "https://github.com/woodiertexas/architecture-extensions/issues",
"sources": "https://github.com/woodiertexas/architecture-extensions"
},
"icon": "assets/architecture_extensions/icon.png"
},
"intermediate_mappings": "net.fabricmc:intermediary",
"entrypoints": {
Expand Down

0 comments on commit 4266543

Please sign in to comment.