Added better debug method
This commit is contained in:
parent
4044e6ca53
commit
59c7187bab
@ -37,11 +37,11 @@ public class Plugin extends PluginBase {
|
||||
instance = this;
|
||||
entities = new ArrayList<>();
|
||||
entityNames = new ArrayList<>();
|
||||
// %entitynames%
|
||||
// %entitynames%
|
||||
blockNames = new ArrayList<>();
|
||||
// %blocknames%
|
||||
// %blocknames%
|
||||
itemNames = new ArrayList<>();
|
||||
// %itemnames%
|
||||
// %itemnames%
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -67,11 +67,12 @@ public class Plugin extends PluginBase {
|
||||
|
||||
|
||||
for (String blockName : blockNames) {
|
||||
System.out.println("§aLoading custom block " + blockName + "...");
|
||||
getLogger().info("§aLoading custom block " + blockName + "...");
|
||||
try {
|
||||
Class<? extends CustomBlock> clazz = Class.forName("com.cimeyclust.addonreader.resources.custom_blocks." + blockName).asSubclass(CustomBlock.class);
|
||||
Block.registerCustomBlock(Collections.singletonList(clazz)).assertOK();
|
||||
} catch (AssertionError | ClassNotFoundException e) {
|
||||
getLogger().error("§cFailed to load custom block " + blockName + "!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -87,11 +88,12 @@ public class Plugin extends PluginBase {
|
||||
.collect(Collectors.toSet());*/
|
||||
|
||||
for (String itemName : itemNames) {
|
||||
System.out.println("§aLoading custom item " + itemName + "...");
|
||||
getLogger().info("§aLoading custom item " + itemName + "...");
|
||||
try {
|
||||
Class<? extends CustomItem> clazz = Class.forName("com.cimeyclust.addonreader.resources.custom_items." + itemName).asSubclass(CustomItem.class);
|
||||
Item.registerCustomItem(clazz).assertOK();
|
||||
} catch (AssertionError | ClassNotFoundException e) {
|
||||
getLogger().error("§cFailed to load custom item " + itemName + "!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -107,17 +109,18 @@ public class Plugin extends PluginBase {
|
||||
.collect(Collectors.toSet());*/
|
||||
|
||||
for (String entityName : entityNames) {
|
||||
System.out.println("§aLoading custom entity " + entityName + "...");
|
||||
getLogger().info("§aLoading custom entity " + entityName + "...");
|
||||
try {
|
||||
Class<? extends Entity> clazz = Class.forName("com.cimeyclust.addonreader.resources.custom_entities." + entityName).asSubclass(Entity.class);
|
||||
Entity.registerCustomEntity(new CustomClassEntityProvider(clazz)).assertOK();
|
||||
this.entities.add(clazz);
|
||||
} catch (AssertionError | ClassNotFoundException e) {
|
||||
getLogger().error("§cFailed to load custom entity " + entityName + "!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("CustomResources has been enabled!");
|
||||
getLogger().info("CustomResources has been enabled!");
|
||||
}
|
||||
|
||||
public static void tickComponents(Entity entity) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user