Migrate to BCLib (WIP)
This commit is contained in:
parent
6ca0d284a9
commit
746613cbf1
5 changed files with 69 additions and 56 deletions
|
@ -1,21 +1,21 @@
|
||||||
# Done to increase the memory available to gradle.
|
# Done to increase the memory available to gradle.
|
||||||
org.gradle.jvmargs=-Xmx2G
|
org.gradle.jvmargs=-Xmx2G
|
||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
minecraft_version=1.16.5
|
minecraft_version=1.16.5
|
||||||
yarn_mappings=6
|
yarn_mappings=6
|
||||||
loader_version=0.11.3
|
loader_version=0.11.3
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 0.9.7-pre
|
mod_version = 0.9.7-pre
|
||||||
maven_group = ru.betterend
|
maven_group = ru.betterend
|
||||||
archives_base_name = better-end
|
archives_base_name = better-end
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||||
patchouli_version = 50-FABRIC
|
patchouli_version = 50-FABRIC
|
||||||
fabric_version = 0.32.9+1.16
|
fabric_version = 0.32.9+1.16
|
||||||
canvas_version = 1.0.+
|
canvas_version = 1.0.+
|
||||||
rei_version = 5.8.10
|
bclib_version = 0.1.10
|
||||||
bclib_version = 0.1.7
|
rei_version = 5.8.10
|
17
src/main/java/ru/betterend/blocks/basis/EndPathBlock.java
Normal file
17
src/main/java/ru/betterend/blocks/basis/EndPathBlock.java
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
package ru.betterend.blocks.basis;
|
||||||
|
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
import ru.bclib.blocks.BasePathBlock;
|
||||||
|
|
||||||
|
public class EndPathBlock extends BasePathBlock {
|
||||||
|
|
||||||
|
public EndPathBlock(Block source) {
|
||||||
|
super(source);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Block getBottomBlock() {
|
||||||
|
return Blocks.END_STONE;
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,23 +11,7 @@ import ru.bclib.blocks.BasePathBlock;
|
||||||
import ru.bclib.registry.BlocksRegistry;
|
import ru.bclib.registry.BlocksRegistry;
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.blocks.*;
|
import ru.betterend.blocks.*;
|
||||||
import ru.betterend.blocks.basis.EndCropBlock;
|
import ru.betterend.blocks.basis.*;
|
||||||
import ru.betterend.blocks.basis.EndFurnaceBlock;
|
|
||||||
import ru.betterend.blocks.basis.EndLeavesBlock;
|
|
||||||
import ru.betterend.blocks.basis.EndOreBlock;
|
|
||||||
import ru.betterend.blocks.basis.EndPillarBlock;
|
|
||||||
import ru.betterend.blocks.basis.EndSlabBlock;
|
|
||||||
import ru.betterend.blocks.basis.EndStairsBlock;
|
|
||||||
import ru.betterend.blocks.basis.EndTerrainBlock;
|
|
||||||
import ru.betterend.blocks.basis.EndUnderwaterWallPlantBlock;
|
|
||||||
import ru.betterend.blocks.basis.EndWallPlantBlock;
|
|
||||||
import ru.betterend.blocks.basis.FurBlock;
|
|
||||||
import ru.betterend.blocks.basis.SimpleLeavesBlock;
|
|
||||||
import ru.betterend.blocks.basis.StalactiteBlock;
|
|
||||||
import ru.betterend.blocks.basis.StoneLanternBlock;
|
|
||||||
import ru.betterend.blocks.basis.TripleTerrainBlock;
|
|
||||||
import ru.betterend.blocks.basis.VineBlock;
|
|
||||||
import ru.betterend.blocks.basis.WallMushroomBlock;
|
|
||||||
import ru.betterend.blocks.complex.ColoredMaterial;
|
import ru.betterend.blocks.complex.ColoredMaterial;
|
||||||
import ru.betterend.blocks.complex.CrystalSubblocksMaterial;
|
import ru.betterend.blocks.complex.CrystalSubblocksMaterial;
|
||||||
import ru.betterend.blocks.complex.MetalMaterial;
|
import ru.betterend.blocks.complex.MetalMaterial;
|
||||||
|
@ -38,6 +22,8 @@ import ru.betterend.item.material.EndArmorMaterial;
|
||||||
import ru.betterend.item.material.EndToolMaterial;
|
import ru.betterend.item.material.EndToolMaterial;
|
||||||
import ru.betterend.tab.CreativeTabs;
|
import ru.betterend.tab.CreativeTabs;
|
||||||
|
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
public class EndBlocks extends BlocksRegistry {
|
public class EndBlocks extends BlocksRegistry {
|
||||||
// Terrain //
|
// Terrain //
|
||||||
public static final Block ENDSTONE_DUST = registerBlock("endstone_dust", new EndstoneDustBlock());
|
public static final Block ENDSTONE_DUST = registerBlock("endstone_dust", new EndstoneDustBlock());
|
||||||
|
@ -54,17 +40,17 @@ public class EndBlocks extends BlocksRegistry {
|
||||||
public static final Block RUTISCUS = registerBlock("rutiscus", new EndTerrainBlock(MaterialColor.COLOR_ORANGE));
|
public static final Block RUTISCUS = registerBlock("rutiscus", new EndTerrainBlock(MaterialColor.COLOR_ORANGE));
|
||||||
|
|
||||||
// Roads //
|
// Roads //
|
||||||
public static final Block END_MYCELIUM_PATH = registerBlock("end_mycelium_path", new BasePathBlock(END_MYCELIUM));
|
public static final Block END_MYCELIUM_PATH = registerBlock("end_mycelium_path", new EndPathBlock(END_MYCELIUM));
|
||||||
public static final Block END_MOSS_PATH = registerBlock("end_moss_path", new BasePathBlock(END_MOSS));
|
public static final Block END_MOSS_PATH = registerBlock("end_moss_path", new EndPathBlock(END_MOSS));
|
||||||
public static final Block CHORUS_NYLIUM_PATH = registerBlock("chorus_nylium_path", new BasePathBlock(CHORUS_NYLIUM));
|
public static final Block CHORUS_NYLIUM_PATH = registerBlock("chorus_nylium_path", new EndPathBlock(CHORUS_NYLIUM));
|
||||||
public static final Block CAVE_MOSS_PATH = registerBlock("cave_moss_path", new BasePathBlock(CAVE_MOSS));
|
public static final Block CAVE_MOSS_PATH = registerBlock("cave_moss_path", new EndPathBlock(CAVE_MOSS));
|
||||||
public static final Block CRYSTAL_MOSS_PATH = registerBlock("crystal_moss_path", new BasePathBlock(CRYSTAL_MOSS));
|
public static final Block CRYSTAL_MOSS_PATH = registerBlock("crystal_moss_path", new EndPathBlock(CRYSTAL_MOSS));
|
||||||
public static final Block SHADOW_GRASS_PATH = registerBlock("shadow_grass_path", new BasePathBlock(SHADOW_GRASS));
|
public static final Block SHADOW_GRASS_PATH = registerBlock("shadow_grass_path", new EndPathBlock(SHADOW_GRASS));
|
||||||
public static final Block PINK_MOSS_PATH = registerBlock("pink_moss_path", new BasePathBlock(PINK_MOSS));
|
public static final Block PINK_MOSS_PATH = registerBlock("pink_moss_path", new EndPathBlock(PINK_MOSS));
|
||||||
public static final Block AMBER_MOSS_PATH = registerBlock("amber_moss_path", new BasePathBlock(AMBER_MOSS));
|
public static final Block AMBER_MOSS_PATH = registerBlock("amber_moss_path", new EndPathBlock(AMBER_MOSS));
|
||||||
public static final Block JUNGLE_MOSS_PATH = registerBlock("jungle_moss_path", new BasePathBlock(JUNGLE_MOSS));
|
public static final Block JUNGLE_MOSS_PATH = registerBlock("jungle_moss_path", new EndPathBlock(JUNGLE_MOSS));
|
||||||
public static final Block SANGNUM_PATH = registerBlock("sangnum_path", new BasePathBlock(SANGNUM));
|
public static final Block SANGNUM_PATH = registerBlock("sangnum_path", new EndPathBlock(SANGNUM));
|
||||||
public static final Block RUTISCUS_PATH = registerBlock("rutiscus_path", new BasePathBlock(RUTISCUS));
|
public static final Block RUTISCUS_PATH = registerBlock("rutiscus_path", new EndPathBlock(RUTISCUS));
|
||||||
|
|
||||||
public static final Block MOSSY_OBSIDIAN = registerBlock("mossy_obsidian", new MossyObsidian());
|
public static final Block MOSSY_OBSIDIAN = registerBlock("mossy_obsidian", new MossyObsidian());
|
||||||
public static final Block DRAGON_BONE_BLOCK = registerBlock("dragon_bone_block", new EndPillarBlock(Blocks.BONE_BLOCK));
|
public static final Block DRAGON_BONE_BLOCK = registerBlock("dragon_bone_block", new EndPillarBlock(Blocks.BONE_BLOCK));
|
||||||
|
|
|
@ -12,6 +12,7 @@ import net.minecraft.world.entity.EquipmentSlot;
|
||||||
import net.minecraft.world.food.FoodProperties;
|
import net.minecraft.world.food.FoodProperties;
|
||||||
import net.minecraft.world.food.Foods;
|
import net.minecraft.world.food.Foods;
|
||||||
import net.minecraft.world.item.*;
|
import net.minecraft.world.item.*;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
import ru.bclib.items.BaseArmorItem;
|
import ru.bclib.items.BaseArmorItem;
|
||||||
import ru.bclib.items.tool.*;
|
import ru.bclib.items.tool.*;
|
||||||
import ru.bclib.registry.ItemsRegistry;
|
import ru.bclib.registry.ItemsRegistry;
|
||||||
|
@ -120,22 +121,22 @@ public class EndItems extends ItemsRegistry {
|
||||||
// Drinks //
|
// Drinks //
|
||||||
public final static Item UMBRELLA_CLUSTER_JUICE = registerEndDrink("umbrella_cluster_juice", 5, 0.7F);
|
public final static Item UMBRELLA_CLUSTER_JUICE = registerEndDrink("umbrella_cluster_juice", 5, 0.7F);
|
||||||
|
|
||||||
private final static ItemsRegistry ITEM_REGISTRY = new EndItems(CreativeTabs.TAB_ITEMS);
|
private static ItemsRegistry ITEM_REGISTRY;
|
||||||
|
|
||||||
protected EndItems(CreativeModeTab creativeTab) {
|
protected EndItems(CreativeModeTab creativeTab) {
|
||||||
super(creativeTab);
|
super(creativeTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Item registerEndDisc(String name, int power, SoundEvent sound) {
|
public static Item registerEndDisc(String name, int power, SoundEvent sound) {
|
||||||
return ITEM_REGISTRY.registerDisc(name, power, sound);
|
return getItemRegistry().registerDisc(name, power, sound);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Item registerEndItem(String name) {
|
public static Item registerEndItem(String name) {
|
||||||
return ITEM_REGISTRY.registerItem(name);
|
return getItemRegistry().registerItem(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Item registerEndItem(String name, Item item) {
|
public static Item registerEndItem(String name, Item item) {
|
||||||
return ITEM_REGISTRY.register(BetterEnd.makeID(name), item);
|
return getItemRegistry().register(BetterEnd.makeID(name), item);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Item registerEndItem(ResourceLocation id, Item item) {
|
public static Item registerEndItem(ResourceLocation id, Item item) {
|
||||||
|
@ -145,7 +146,7 @@ public class EndItems extends ItemsRegistry {
|
||||||
if (!Configs.ITEM_CONFIG.getBoolean("items", id.getPath(), true)) {
|
if (!Configs.ITEM_CONFIG.getBoolean("items", id.getPath(), true)) {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
ITEM_REGISTRY.register(id, item);
|
getItemRegistry().register(id, item);
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +154,7 @@ public class EndItems extends ItemsRegistry {
|
||||||
if (!Configs.ITEM_CONFIG.getBoolean("armor", itemId.getPath(), true)) {
|
if (!Configs.ITEM_CONFIG.getBoolean("armor", itemId.getPath(), true)) {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
ITEM_REGISTRY.register(itemId, item);
|
getItemRegistry().register(itemId, item);
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,31 +162,31 @@ public class EndItems extends ItemsRegistry {
|
||||||
if (!Configs.ITEM_CONFIG.getBoolean("tools", name, true)) {
|
if (!Configs.ITEM_CONFIG.getBoolean("tools", name, true)) {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
return ITEM_REGISTRY.registerTool(name, item);
|
return getItemRegistry().registerTool(name, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Item registerEndEgg(String name, EntityType<?> type, int background, int dots) {
|
public static Item registerEndEgg(String name, EntityType<?> type, int background, int dots) {
|
||||||
return ITEM_REGISTRY.registerEgg(name, type, background, dots);
|
return getItemRegistry().registerEgg(name, type, background, dots);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Item registerEndFood(String name, int hunger, float saturation, MobEffectInstance... effects) {
|
public static Item registerEndFood(String name, int hunger, float saturation, MobEffectInstance... effects) {
|
||||||
return ITEM_REGISTRY.registerFood(name, hunger, saturation, effects);
|
return getItemRegistry().registerFood(name, hunger, saturation, effects);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Item registerEndFood(String name, FoodProperties foodComponent) {
|
public static Item registerEndFood(String name, FoodProperties foodComponent) {
|
||||||
return ITEM_REGISTRY.registerFood(name, foodComponent);
|
return getItemRegistry().registerFood(name, foodComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Item registerEndDrink(String name) {
|
public static Item registerEndDrink(String name) {
|
||||||
return ITEM_REGISTRY.registerDrink(name);
|
return getItemRegistry().registerDrink(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Item registerEndDrink(String name, FoodProperties foodComponent) {
|
public static Item registerEndDrink(String name, FoodProperties foodComponent) {
|
||||||
return ITEM_REGISTRY.registerDrink(name, foodComponent);
|
return getItemRegistry().registerDrink(name, foodComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Item registerEndDrink(String name, int hunger, float saturation) {
|
public static Item registerEndDrink(String name, int hunger, float saturation) {
|
||||||
return ITEM_REGISTRY.registerDrink(name, hunger, saturation);
|
return getItemRegistry().registerDrink(name, hunger, saturation);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FabricItemSettings makeEndItemSettings() {
|
public static FabricItemSettings makeEndItemSettings() {
|
||||||
|
@ -196,4 +197,12 @@ public class EndItems extends ItemsRegistry {
|
||||||
public ResourceLocation createModId(String name) {
|
public ResourceLocation createModId(String name) {
|
||||||
return BetterEnd.makeID(name);
|
return BetterEnd.makeID(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private static ItemsRegistry getItemRegistry() {
|
||||||
|
if (ITEM_REGISTRY == null) {
|
||||||
|
ITEM_REGISTRY = new EndItems(CreativeTabs.TAB_ITEMS);
|
||||||
|
}
|
||||||
|
return ITEM_REGISTRY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,8 @@
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.11.0",
|
"fabricloader": ">=0.11.0",
|
||||||
"fabric": ">=0.32.0",
|
"fabric": ">=0.32.0",
|
||||||
"minecraft": ">=1.16.4"
|
"minecraft": ">=1.16.4",
|
||||||
|
"bclib": ">=0.1.10"
|
||||||
},
|
},
|
||||||
"suggests": {
|
"suggests": {
|
||||||
"byg": ">=1.1.3",
|
"byg": ">=1.1.3",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue