Modified some debug data
This commit is contained in:
parent
3a1a707eff
commit
575ea6ed40
|
@ -7,7 +7,7 @@ import net.parsell.cherry.core.CherryItems;
|
||||||
import net.parsell.cherry.core.CherryRegistry;
|
import net.parsell.cherry.core.CherryRegistry;
|
||||||
|
|
||||||
public class Cherry implements ModInitializer {
|
public class Cherry implements ModInitializer {
|
||||||
public static final String MODID = "Cherry";
|
public static final String MODID = "cherry";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
|
@ -23,6 +23,6 @@ public class Cherry implements ModInitializer {
|
||||||
CherryFeatures.init();
|
CherryFeatures.init();
|
||||||
|
|
||||||
CherryRegistry.finish();
|
CherryRegistry.finish();
|
||||||
System.out.println("Cherry finished successfully!");
|
System.out.println("Cherry setup successfully!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,8 @@ public class CherryFeatures {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
|
System.out.println("Cherry Features inititalizating...");
|
||||||
addFeatures();
|
addFeatures();
|
||||||
|
System.out.println("Cherry Features setup sucessfully!");
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -13,20 +13,20 @@ public class CherryItems {
|
||||||
public static final BlockItem CherryPlanks;
|
public static final BlockItem CherryPlanks;
|
||||||
|
|
||||||
private static void registerBlockItems(){
|
private static void registerBlockItems(){
|
||||||
registerBlockItem("cherry_log", CherryBlocks.CHERRYLOG, ItemGroup.BUILDING_BLOCKS);
|
registerBlockItem("cherry_log", CherryBlocks.CHERRYLOG, CherryRegistry.CHERRY_GROUP);
|
||||||
registerBlockItem("cherry_wood", CherryBlocks.CHERRYWOOD, ItemGroup.BUILDING_BLOCKS);
|
registerBlockItem("cherry_wood", CherryBlocks.CHERRYWOOD, CherryRegistry.CHERRY_GROUP);
|
||||||
registerBlockItem("stripped_cherry_log", CherryBlocks.CHERRYLOGSTRIPPED, ItemGroup.BUILDING_BLOCKS);
|
registerBlockItem("stripped_cherry_log", CherryBlocks.CHERRYLOGSTRIPPED, CherryRegistry.CHERRY_GROUP);
|
||||||
registerBlockItem("stripped_cherry_wood", CherryBlocks.CHERRYWOODSTRIPPED, ItemGroup.BUILDING_BLOCKS);
|
registerBlockItem("stripped_cherry_wood", CherryBlocks.CHERRYWOODSTRIPPED, CherryRegistry.CHERRY_GROUP);
|
||||||
registerBlockItem("cherry_leaves", CherryBlocks.CHERRYLEAVES, ItemGroup.BUILDING_BLOCKS, 6649929);
|
registerBlockItem("cherry_leaves", CherryBlocks.CHERRYLEAVES, CherryRegistry.CHERRY_GROUP, 6649929);
|
||||||
registerBlockItem("cherry_fence", CherryBlocks.CHERRYFENCE, ItemGroup.BUILDING_BLOCKS);
|
registerBlockItem("cherry_fence", CherryBlocks.CHERRYFENCE, CherryRegistry.CHERRY_GROUP);
|
||||||
registerBlockItem("cherry_fence_gate", CherryBlocks.CHERRYFENCEGATE, ItemGroup.BUILDING_BLOCKS);
|
registerBlockItem("cherry_fence_gate", CherryBlocks.CHERRYFENCEGATE, CherryRegistry.CHERRY_GROUP);
|
||||||
registerBlockItem("cherry_door", CherryBlocks.CHERRYDOOR, ItemGroup.BUILDING_BLOCKS);
|
registerBlockItem("cherry_door", CherryBlocks.CHERRYDOOR, CherryRegistry.CHERRY_GROUP);
|
||||||
registerBlockItem("cherry_trapdoor", CherryBlocks.CHERRYTRAPDOOR, ItemGroup.BUILDING_BLOCKS);
|
registerBlockItem("cherry_trapdoor", CherryBlocks.CHERRYTRAPDOOR, CherryRegistry.CHERRY_GROUP);
|
||||||
registerBlockItem("cherry_slab", CherryBlocks.CHERRYSLAB, ItemGroup.BUILDING_BLOCKS);
|
registerBlockItem("cherry_slab", CherryBlocks.CHERRYSLAB, CherryRegistry.CHERRY_GROUP);
|
||||||
registerBlockItem("cherry_stairs", CherryBlocks.CHERRYSTAIRS, ItemGroup.BUILDING_BLOCKS);
|
registerBlockItem("cherry_stairs", CherryBlocks.CHERRYSTAIRS, CherryRegistry.CHERRY_GROUP);
|
||||||
registerBlockItem("cherry_button", CherryBlocks.CHERRYBUTTON, ItemGroup.BUILDING_BLOCKS);
|
registerBlockItem("cherry_button", CherryBlocks.CHERRYBUTTON, CherryRegistry.CHERRY_GROUP);
|
||||||
registerBlockItem("cherry_pressure_plate", CherryBlocks.CHERRYPRESSUREPLATE, ItemGroup.BUILDING_BLOCKS);
|
registerBlockItem("cherry_pressure_plate", CherryBlocks.CHERRYPRESSUREPLATE, CherryRegistry.CHERRY_GROUP);
|
||||||
registerSignItem("cherry_sign", CherryBlocks.CHERRYSIGN, CherryBlocks.CHERRYSIGN, ItemGroup.BUILDING_BLOCKS);
|
registerSignItem("cherry_sign", CherryBlocks.CHERRYSIGN, CherryBlocks.CHERRYSIGN, CherryRegistry.CHERRY_GROUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register a standard blockItem
|
// Register a standard blockItem
|
||||||
|
@ -51,10 +51,12 @@ public class CherryItems {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
|
System.out.println("Cherry Items initilizating...");
|
||||||
registerBlockItems();
|
registerBlockItems();
|
||||||
|
System.out.println("Cherry Items setup correctly!");
|
||||||
}
|
}
|
||||||
|
|
||||||
static{
|
static{
|
||||||
CherryPlanks = registerBlockItem("cherry_planks", CherryBlocks.CHERRYPLANKS, ItemGroup.BUILDING_BLOCKS);
|
CherryPlanks = registerBlockItem("cherry_planks", CherryBlocks.CHERRYPLANKS, CherryRegistry.CHERRY_GROUP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ import net.minecraft.util.registry.Registry;
|
||||||
public class CherryRegistry {
|
public class CherryRegistry {
|
||||||
private static Builder<Block, Block> STRIPPABLE_BLOCKS = new Builder<Block, Block>();
|
private static Builder<Block, Block> STRIPPABLE_BLOCKS = new Builder<Block, Block>();
|
||||||
public static final ItemGroup CHERRY_GROUP = FabricItemGroupBuilder
|
public static final ItemGroup CHERRY_GROUP = FabricItemGroupBuilder
|
||||||
.create(new Identifier(Cherry.MODID, "General"))
|
.create(new Identifier(Cherry.MODID, "general"))
|
||||||
.icon(() -> new ItemStack(CherryItems.CherryPlanks))
|
.icon(() -> new ItemStack(CherryItems.CherryPlanks))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
@ -32,10 +32,12 @@ public class CherryRegistry {
|
||||||
AxeItemAccessor.getStrippedLogs().forEach((log, strippedLog) -> {
|
AxeItemAccessor.getStrippedLogs().forEach((log, strippedLog) -> {
|
||||||
STRIPPABLE_BLOCKS.put(log, strippedLog);
|
STRIPPABLE_BLOCKS.put(log, strippedLog);
|
||||||
});
|
});
|
||||||
|
System.out.println("Cherry Registry initilizating...");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void finish(){
|
public static void finish(){
|
||||||
AxeItemAccessor.setStrippedLogs(STRIPPABLE_BLOCKS.build());
|
AxeItemAccessor.setStrippedLogs(STRIPPABLE_BLOCKS.build());
|
||||||
|
System.out.println("Cherry Registry setup correctly!");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void register(Block block, String id){
|
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..
|
// 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{
|
public static SignType register(String type){
|
||||||
|
try {
|
||||||
return SignTypeInvoker.register(new CherrySignType(type));
|
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){
|
public static void registerBurnable(Block block, int burnChance, int burnSpread){
|
||||||
|
|
Loading…
Reference in New Issue