Skip to content

Commit bb8423d

Browse files
authored
Merge pull request #6 from Mxpea/dev2
添加贴图,注释掉无用代码
2 parents a328902 + 537ac72 commit bb8423d

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

src/main/java/io/github/mxpea/fadingshadow/Config.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ public class Config {
3838

3939
private static boolean validateItemName(final Object obj) {
4040
return obj instanceof String itemName && BuiltInRegistries.ITEM.containsKey(ResourceLocation.parse(itemName));
41+
4142
}
4243
}

src/main/java/io/github/mxpea/fadingshadow/FadingShadow.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,16 @@ public FadingShadow(IEventBus modEventBus, ModContainer modContainer) {
9494
private void commonSetup(FMLCommonSetupEvent event) {
9595
// Some common setup code
9696
LOGGER.info("▩▩▩▩▩▮▬▬▦▥▨");
97-
97+
/*
9898
if (Config.LOG_DIRT_BLOCK.getAsBoolean()) {
9999
LOGGER.info("DIRT BLOCK >> {}", BuiltInRegistries.BLOCK.getKey(Blocks.DIRT));
100100
}
101101
102102
LOGGER.info("{}{}", Config.MAGIC_NUMBER_INTRODUCTION.get(), Config.MAGIC_NUMBER.getAsInt());
103103
104104
Config.ITEM_STRINGS.get().forEach((item) -> LOGGER.info("ITEM >> {}", item));
105+
106+
*/
105107
}
106108

107109
// Add the example block item to the building blocks tab

src/main/java/io/github/mxpea/fadingshadow/item/ModItem.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@
1212
public class ModItem {
1313
public static final DeferredRegister.Items ITEMS =
1414
DeferredRegister.createItems(FadingShadow.MODID);
15-
15+
//在这里注册物品,复制就行
1616
public static final DeferredItem<Item> reality_fabric =
1717
ITEMS.register("reality_fabric", () -> new Item(new Item.Properties()));
18+
1819
public static final DeferredItem<Item> apple_juice =
1920
ITEMS.register("apple_juice", () -> new Item(new Item.Properties()));
2021

22+
23+
//下面是初始化的,不要动
2124
public static void register(IEventBus eventBus) {
2225
ITEMS.register(eventBus);
2326
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "item/generated",
3+
"textures": {
4+
"layer0": "fadingshadow:item/apple_juice"
5+
}
6+
}
382 Bytes
Loading

0 commit comments

Comments
 (0)