Skip to content

Commit

Permalink
2.9.0 for 1.16.1
Browse files Browse the repository at this point in the history
Updated to 1.16.1, thanks to @vaerian !
Added new default piece sets for 1.16 blocks (and Honeycomb from 1.15)
Fixed Prismarine Brick and Smooth Quartz pieces being improperly named
Added Special Thanks to description
  • Loading branch information
Shnupbups committed Jul 31, 2020
1 parent 707f05c commit 2a7a515
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 38 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.9.0+build.204

# Mod Properties
mod_version = 2.8.3+1.16.1
mod_version = 2.9.0+1.16.1
maven_group = com.shnupbups
archives_base_name = extrapieces

Expand Down
14 changes: 5 additions & 9 deletions src/main/java/com/shnupbups/extrapieces/ExtraPieces.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,24 @@
import com.shnupbups.extrapieces.core.PieceSets;
import com.shnupbups.extrapieces.core.PieceTypes;
import com.shnupbups.extrapieces.debug.DebugItem;
import com.shnupbups.extrapieces.mixin.MinecraftServerAccessor;
import com.shnupbups.extrapieces.register.ModBlocks;
import com.shnupbups.extrapieces.register.ModConfigs;
import com.swordglowsblue.artifice.api.Artifice;
import com.swordglowsblue.artifice.api.ArtificeResourcePack;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.event.server.ServerStartCallback;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.text.LiteralText;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.io.File;
import java.util.UUID;

public class ExtraPieces implements ModInitializer {
public static final String mod_id = "extrapieces";
public static final String mod_name = "Extra Pieces";
public static final String piece_pack_version = "2.8.1";
public static final String piece_pack_version = "2.9.0";
public static final Logger logger = LogManager.getFormatterLogger(mod_name);

public static ArtificeResourcePack datapack;
Expand Down Expand Up @@ -59,7 +56,7 @@ public static Identifier appendToPath(Identifier id, String app) {

public static File getConfigDirectory() {
if (configDir == null) {
configDir = new File(FabricLoader.getInstance().getConfigDirectory(), mod_id);
configDir = new File(FabricLoader.getInstance().getConfigDir().toFile(), mod_id);
configDir.mkdirs();
}
return configDir;
Expand Down Expand Up @@ -87,7 +84,6 @@ public static void dump() {
}
}

@SuppressWarnings("deprecation")
@Override
public void onInitialize() {
ModConfigs.init();
Expand All @@ -100,11 +96,11 @@ public void onInitialize() {
datapack = Artifice.registerData(getID("ep_data"), ModBlocks::init);
Registry.register(Registry.ITEM, getID("debug_item"), new DebugItem());

ServerStartCallback.EVENT.register(server -> {
ServerLifecycleEvents.SERVER_STARTED.register(server -> {
if (ModBlocks.setBuilders.size() != PieceSets.registry.size()) {
for (PieceSet.Builder psb : ModBlocks.setBuilders.values()) {
if (!psb.isBuilt())
((MinecraftServerAccessor) server).getLogger().info("Piece Set " + psb.toString() + " could not be built, make sure the base and any vanilla pieces actually exist!");
System.out.println("Piece Set " + psb.toString() + " could not be built, make sure the base and any vanilla pieces actually exist!");
}
}
});
Expand Down

This file was deleted.

56 changes: 56 additions & 0 deletions src/main/java/com/shnupbups/extrapieces/register/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,33 @@ public class ModBlocks {
public static PieceSet GREEN_STAINED_GLASS_PIECES;
public static PieceSet RED_STAINED_GLASS_PIECES;
public static PieceSet BLACK_STAINED_GLASS_PIECES;
public static PieceSet CRIMSON_PIECES;
public static PieceSet WARPED_PIECES;
public static PieceSet CRIMSON_STEM_PIECES;
public static PieceSet WARPED_STEM_PIECES;
public static PieceSet STRIPPED_CRIMSON_STEM_PIECES;
public static PieceSet STRIPPED_WARPED_STEM_PIECES;
public static PieceSet CRIMSON_HYPHAE_PIECES;
public static PieceSet WARPED_HYPHAE_PIECES;
public static PieceSet STRIPPED_CRIMSON_HYPHAE_PIECES;
public static PieceSet STRIPPED_WARPED_HYPHAE_PIECES;
public static PieceSet HONEYCOMB_PIECES;
public static PieceSet BASALT_PIECES;
public static PieceSet POLISHED_BASALT_PIECES;
public static PieceSet BLACKSTONE_PIECES;
public static PieceSet POLISHED_BLACKSTONE_PIECES;
public static PieceSet CHISELED_POLISHED_BLACKSTONE_PIECES;
public static PieceSet POLISHED_BLACKSTONE_BRICK_PIECES;
public static PieceSet CRACKED_POLISHED_BLACKSTONE_BRICK_PIECES;
public static PieceSet NETHERITE_PIECES;
public static PieceSet CHISELED_NETHER_BRICK_PIECES;
public static PieceSet CRACKED_NETHER_BRICK_PIECES;
public static PieceSet CRYING_OBSIDIAN_PIECES;
public static PieceSet GILDED_BLACKSTONE_PIECES;
public static PieceSet QUARTZ_BRICK_PIECES;
public static PieceSet SHROOMLIGHT_PIECES;
public static PieceSet SOUL_SOIL_PIECES;
public static PieceSet WARPED_WART_PIECES;
static int built = 0;

public static void generateDefaultSets() {
Expand Down Expand Up @@ -337,6 +364,35 @@ public static void generateDefaultSets() {
GREEN_STAINED_GLASS_PIECES = PieceSets.createDefaultSet(Blocks.GREEN_STAINED_GLASS, "green_stained_glass").setUncraftable(PieceTypes.WALL);
RED_STAINED_GLASS_PIECES = PieceSets.createDefaultSet(Blocks.RED_STAINED_GLASS, "red_stained_glass").setUncraftable(PieceTypes.WALL);
BLACK_STAINED_GLASS_PIECES = PieceSets.createDefaultSet(Blocks.BLACK_STAINED_GLASS, "black_stained_glass").setUncraftable(PieceTypes.WALL);

CRIMSON_PIECES = PieceSets.createDefaultSet(Blocks.CRIMSON_PLANKS, "crimson", PieceSet.JUST_EXTRAS_AND_WALL).setUncraftable(PieceTypes.WALL).addVanillaPiece(PieceTypes.SLAB, Blocks.CRIMSON_SLAB).addVanillaPiece(PieceTypes.STAIRS, Blocks.CRIMSON_STAIRS).addVanillaPiece(PieceTypes.FENCE, Blocks.CRIMSON_FENCE).addVanillaPiece(PieceTypes.FENCE_GATE, Blocks.CRIMSON_FENCE_GATE);
WARPED_PIECES = PieceSets.createDefaultSet(Blocks.WARPED_PLANKS, "warped", PieceSet.JUST_EXTRAS_AND_WALL).setUncraftable(PieceTypes.WALL).addVanillaPiece(PieceTypes.SLAB, Blocks.WARPED_SLAB).addVanillaPiece(PieceTypes.STAIRS, Blocks.WARPED_STAIRS).addVanillaPiece(PieceTypes.FENCE, Blocks.WARPED_FENCE).addVanillaPiece(PieceTypes.FENCE_GATE, Blocks.WARPED_FENCE_GATE);
CRIMSON_STEM_PIECES = PieceSets.createDefaultSet(Blocks.CRIMSON_STEM, "crimson_stem").setTopTexture("crimson_stem_top");
WARPED_STEM_PIECES = PieceSets.createDefaultSet(Blocks.WARPED_STEM, "warped_stem").setTopTexture("warped_stem_top");
STRIPPED_CRIMSON_STEM_PIECES = PieceSets.createDefaultSet(Blocks.STRIPPED_CRIMSON_STEM, "stripped_crimson_stem").setTopTexture("stripped_crimson_stem_top");
STRIPPED_WARPED_STEM_PIECES = PieceSets.createDefaultSet(Blocks.STRIPPED_WARPED_STEM, "stripped_warped_stem").setTopTexture("stripped_warped_stem_top");
CRIMSON_HYPHAE_PIECES = PieceSets.createDefaultSet(Blocks.CRIMSON_HYPHAE, "crimson_hyphae").setTexture("crimson_stem");
WARPED_HYPHAE_PIECES = PieceSets.createDefaultSet(Blocks.WARPED_HYPHAE, "warped_hyphae").setTexture("warped_stem");
STRIPPED_CRIMSON_HYPHAE_PIECES = PieceSets.createDefaultSet(Blocks.STRIPPED_CRIMSON_HYPHAE, "stripped_crimson_hyphae").setTexture("stripped_crimson_stem");
STRIPPED_WARPED_HYPHAE_PIECES = PieceSets.createDefaultSet(Blocks.STRIPPED_WARPED_HYPHAE, "stripped_warped_hyphae").setTexture("stripped_warped_stem");
HONEYCOMB_PIECES = PieceSets.createDefaultSet(Blocks.HONEYCOMB_BLOCK, "honeycomb");
BASALT_PIECES = PieceSets.createDefaultSet(Blocks.BASALT, "basalt").setTexture("basalt_side").setTopTexture("basalt_top");
POLISHED_BASALT_PIECES = PieceSets.createDefaultSet(Blocks.POLISHED_BASALT, "polished_basalt").setTexture("polished_basalt_side").setTopTexture("polished_basalt_top");
BLACKSTONE_PIECES = PieceSets.createDefaultSet(Blocks.BLACKSTONE, "blackstone", PieceSet.NO_SLAB_STAIRS_OR_WALL).setTopTexture("blackstone_top").addVanillaPiece(PieceTypes.SLAB, Blocks.BLACKSTONE_SLAB).addVanillaPiece(PieceTypes.STAIRS, Blocks.BLACKSTONE_STAIRS).addVanillaPiece(PieceTypes.WALL, Blocks.BLACKSTONE_WALL);
POLISHED_BLACKSTONE_PIECES = PieceSets.createDefaultSet(Blocks.POLISHED_BLACKSTONE, "polished_blackstone").addVanillaPiece(PieceTypes.SLAB, Blocks.POLISHED_BLACKSTONE_SLAB).addVanillaPiece(PieceTypes.STAIRS, Blocks.POLISHED_BLACKSTONE_STAIRS).addVanillaPiece(PieceTypes.WALL, Blocks.POLISHED_BLACKSTONE_WALL);
CHISELED_POLISHED_BLACKSTONE_PIECES = PieceSets.createDefaultSet(Blocks.CHISELED_POLISHED_BLACKSTONE, "chiseled_polished_blackstone");
POLISHED_BLACKSTONE_BRICK_PIECES = PieceSets.createDefaultSet(Blocks.POLISHED_BLACKSTONE_BRICKS, "polished_blackstone_brick").addVanillaPiece(PieceTypes.SLAB, Blocks.POLISHED_BLACKSTONE_BRICK_SLAB).addVanillaPiece(PieceTypes.STAIRS, Blocks.POLISHED_BLACKSTONE_BRICK_STAIRS).addVanillaPiece(PieceTypes.WALL, Blocks.POLISHED_BLACKSTONE_BRICK_WALL);
CRACKED_POLISHED_BLACKSTONE_BRICK_PIECES = PieceSets.createDefaultSet(Blocks.CRACKED_POLISHED_BLACKSTONE_BRICKS, "cracked_polished_blackstone_brick");
NETHERITE_PIECES = PieceSets.createDefaultSet(Blocks.NETHERITE_BLOCK, "netherite");
CHISELED_NETHER_BRICK_PIECES = PieceSets.createDefaultSet(Blocks.CHISELED_NETHER_BRICKS, "chiseled_nether_brick");
CRACKED_NETHER_BRICK_PIECES = PieceSets.createDefaultSet(Blocks.CRACKED_NETHER_BRICKS, "cracked_nether_brick");
CRYING_OBSIDIAN_PIECES = PieceSets.createDefaultSet(Blocks.CRYING_OBSIDIAN, "crying_obsidian");
GILDED_BLACKSTONE_PIECES = PieceSets.createDefaultSet(Blocks.GILDED_BLACKSTONE, "gilded_blackstone");
QUARTZ_BRICK_PIECES = PieceSets.createDefaultSet(Blocks.QUARTZ_BRICKS, "quartz_brick");
SHROOMLIGHT_PIECES = PieceSets.createDefaultSet(Blocks.SHROOMLIGHT, "shroomlight");
SOUL_SOIL_PIECES = PieceSets.createDefaultSet(Blocks.SOUL_SOIL, "soul_soil");
WARPED_WART_PIECES = PieceSets.createDefaultSet(Blocks.WARPED_WART_BLOCK, "warped_wart");

ExtraPieces.debugLog("Generated Default Sets");
}

Expand Down
13 changes: 12 additions & 1 deletion src/main/resources/assets/extrapieces/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@
"pieceSet.jungle_leaf": "Jungle Leaf",
"pieceSet.acacia_leaf": "Acacia Leaf",
"pieceSet.dark_oak_leaf": "Dark Oak Leaf",
"pieceSet.prismarine_brick": "Prismarine Brick",
"pieceSet.smooth_quartz": "Smooth Quartz",
"pieceSet.crimson": "Crimson",
"pieceSet.warped": "Warped",
"pieceSet.honeycomb": "Honeycomb",
"pieceSet.polished_blackstone_brick": "Polished Blackstone Brick",
"pieceSet.cracked_polished_blackstone_brick": "Cracked Polished Blackstone Brick",
"pieceSet.netherite": "Netherite",
"pieceSet.chiseled_nether_brick": "Chiseled Nether Brick",
"pieceSet.cracked_nether_brick": "Cracked Nether Brick",
"pieceSet.quartz_brick": "Quartz Brick",
"pieceSet.warped_wart": "Warped Wart",

"pieceSet.blaze_brick": "Blaze Brick",
"pieceSet.sandstone_brick": "Sandstone Brick",
Expand Down Expand Up @@ -124,7 +136,6 @@
"pieceSet.black_white_tile": "Black/White Tile",
"pieceSet.blue_cyan_tile": "Blue/Cyan Tile",
"pieceSet.bamboo": "Bamboo",
"pieceSet.quartz_brick": "Quartz Brick",
"pieceSet.love": "§4<3 Love",
"pieceSet.purpur_bricks": "Purpur Brick",
"pieceSet.purpur_line": "Purpur Line",
Expand Down
11 changes: 0 additions & 11 deletions src/main/resources/extrapieces.mixins.json

This file was deleted.

6 changes: 3 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"schemaVersion": 1,
"id": "extrapieces",
"version": "2.8.3",
"version": "2.9.0",

"name": "Extra Pieces",
"description": "Adds more block shapes to Minecraft!",
"description": "Adds more block shapes to Minecraft! Special thanks to coderbot, Florens Pauwels, Vaerian, jcaimeey and Zachary Wright.",
"authors": [
"Shnupbups"
],
"contributors": [
"coderbot",
"coderbot",
"Florens Pauwels",
"Vaerian"
],
Expand Down

0 comments on commit 2a7a515

Please sign in to comment.