Modified some debug data

This commit is contained in:
Justin Parsell 2021-03-29 23:53:46 -04:00
parent 3a1a707eff
commit 575ea6ed40
4 changed files with 32 additions and 20 deletions

View File

@ -7,7 +7,7 @@ import net.parsell.cherry.core.CherryItems;
import net.parsell.cherry.core.CherryRegistry;
public class Cherry implements ModInitializer {
public static final String MODID = "Cherry";
public static final String MODID = "cherry";
@Override
public void onInitialize() {
@ -23,6 +23,6 @@ public class Cherry implements ModInitializer {
CherryFeatures.init();
CherryRegistry.finish();
System.out.println("Cherry finished successfully!");
System.out.println("Cherry setup successfully!");
}
}

View File

@ -44,6 +44,8 @@ public class CherryFeatures {
}
public static void init(){
System.out.println("Cherry Features inititalizating...");
addFeatures();
System.out.println("Cherry Features setup sucessfully!");
}
}

View File

@ -13,20 +13,20 @@ public class CherryItems {
public static final BlockItem CherryPlanks;
private static void registerBlockItems(){
registerBlockItem("cherry_log", CherryBlocks.CHERRYLOG, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("cherry_wood", CherryBlocks.CHERRYWOOD, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("stripped_cherry_log", CherryBlocks.CHERRYLOGSTRIPPED, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("stripped_cherry_wood", CherryBlocks.CHERRYWOODSTRIPPED, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("cherry_leaves", CherryBlocks.CHERRYLEAVES, ItemGroup.BUILDING_BLOCKS, 6649929);
registerBlockItem("cherry_fence", CherryBlocks.CHERRYFENCE, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("cherry_fence_gate", CherryBlocks.CHERRYFENCEGATE, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("cherry_door", CherryBlocks.CHERRYDOOR, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("cherry_trapdoor", CherryBlocks.CHERRYTRAPDOOR, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("cherry_slab", CherryBlocks.CHERRYSLAB, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("cherry_stairs", CherryBlocks.CHERRYSTAIRS, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("cherry_button", CherryBlocks.CHERRYBUTTON, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("cherry_pressure_plate", CherryBlocks.CHERRYPRESSUREPLATE, ItemGroup.BUILDING_BLOCKS);
registerSignItem("cherry_sign", CherryBlocks.CHERRYSIGN, CherryBlocks.CHERRYSIGN, ItemGroup.BUILDING_BLOCKS);
registerBlockItem("cherry_log", CherryBlocks.CHERRYLOG, CherryRegistry.CHERRY_GROUP);
registerBlockItem("cherry_wood", CherryBlocks.CHERRYWOOD, CherryRegistry.CHERRY_GROUP);
registerBlockItem("stripped_cherry_log", CherryBlocks.CHERRYLOGSTRIPPED, CherryRegistry.CHERRY_GROUP);
registerBlockItem("stripped_cherry_wood", CherryBlocks.CHERRYWOODSTRIPPED, CherryRegistry.CHERRY_GROUP);
registerBlockItem("cherry_leaves", CherryBlocks.CHERRYLEAVES, CherryRegistry.CHERRY_GROUP, 6649929);
registerBlockItem("cherry_fence", CherryBlocks.CHERRYFENCE, CherryRegistry.CHERRY_GROUP);
registerBlockItem("cherry_fence_gate", CherryBlocks.CHERRYFENCEGATE, CherryRegistry.CHERRY_GROUP);
registerBlockItem("cherry_door", CherryBlocks.CHERRYDOOR, CherryRegistry.CHERRY_GROUP);
registerBlockItem("cherry_trapdoor", CherryBlocks.CHERRYTRAPDOOR, CherryRegistry.CHERRY_GROUP);
registerBlockItem("cherry_slab", CherryBlocks.CHERRYSLAB, CherryRegistry.CHERRY_GROUP);
registerBlockItem("cherry_stairs", CherryBlocks.CHERRYSTAIRS, CherryRegistry.CHERRY_GROUP);
registerBlockItem("cherry_button", CherryBlocks.CHERRYBUTTON, CherryRegistry.CHERRY_GROUP);
registerBlockItem("cherry_pressure_plate", CherryBlocks.CHERRYPRESSUREPLATE, CherryRegistry.CHERRY_GROUP);
registerSignItem("cherry_sign", CherryBlocks.CHERRYSIGN, CherryBlocks.CHERRYSIGN, CherryRegistry.CHERRY_GROUP);
}
// Register a standard blockItem
@ -51,10 +51,12 @@ public class CherryItems {
}
public static void init(){
System.out.println("Cherry Items initilizating...");
registerBlockItems();
System.out.println("Cherry Items setup correctly!");
}
static{
CherryPlanks = registerBlockItem("cherry_planks", CherryBlocks.CHERRYPLANKS, ItemGroup.BUILDING_BLOCKS);
CherryPlanks = registerBlockItem("cherry_planks", CherryBlocks.CHERRYPLANKS, CherryRegistry.CHERRY_GROUP);
}
}

View File

@ -24,7 +24,7 @@ import net.minecraft.util.registry.Registry;
public class CherryRegistry {
private static Builder<Block, Block> STRIPPABLE_BLOCKS = new Builder<Block, Block>();
public static final ItemGroup CHERRY_GROUP = FabricItemGroupBuilder
.create(new Identifier(Cherry.MODID, "General"))
.create(new Identifier(Cherry.MODID, "general"))
.icon(() -> new ItemStack(CherryItems.CherryPlanks))
.build();
@ -32,10 +32,12 @@ public class CherryRegistry {
AxeItemAccessor.getStrippedLogs().forEach((log, strippedLog) -> {
STRIPPABLE_BLOCKS.put(log, strippedLog);
});
System.out.println("Cherry Registry initilizating...");
}
public static void finish(){
AxeItemAccessor.setStrippedLogs(STRIPPABLE_BLOCKS.build());
System.out.println("Cherry Registry setup correctly!");
}
public static void register(Block block, String id){
@ -51,8 +53,14 @@ public class CherryRegistry {
}
// This registry is unique since I need to save the SignType, and the only way to do that is to register it. So..
public static SignType register(String type) throws IllegalAccessException{
return SignTypeInvoker.register(new CherrySignType(type));
public static SignType register(String type){
try {
return SignTypeInvoker.register(new CherrySignType(type));
} catch (IllegalAccessException iae){
System.out.println("CherryRegistry threw IllegalAccessException when trying to register \"" + type + "\" sign type.");
iae.printStackTrace();
}
return null;
}
public static void registerBurnable(Block block, int burnChance, int burnSpread){