refactor: 适配到Lib39 V0.5.5版本
This commit is contained in:
parent
2e4bd500f2
commit
81dbc80a45
|
|
@ -217,7 +217,7 @@ dependencies {
|
|||
implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:0.4.1"))
|
||||
modImplementation(jarJar("io.github.llamalad7:mixinextras-forge:0.4.1"))
|
||||
compileOnly ('me.lucko:spark-api:0.1-SNAPSHOT')
|
||||
modImplementation("top.r3944realms.lib39:lib39:1.20.1-${lib39_version}")
|
||||
modImplementation("top.r3944realms.lib39:lib39-forge-1.20.1:${lib39_version}")
|
||||
implementation("io.zershyan:sccore:1.20.1-1.0.0")
|
||||
modImplementation(jarJar("top.leisuiretimedock.animationcore:animcore:${accore_version}"))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ minecraft_version=1.20.1
|
|||
# as they do not follow standard versioning conventions.
|
||||
minecraft_version_range=[1.20.1, 1.21)
|
||||
# The Forge version must agree with the Minecraft version to get a valid artifact
|
||||
forge_version=47.1.3
|
||||
forge_version=47.2.30
|
||||
# The Forge version range can use any version of Forge as bounds
|
||||
forge_version_range=[47.1.3,)
|
||||
forge_version_range=[47.2.30,)
|
||||
# The loader version range can only use the major version of FML as bounds
|
||||
loader_version_range=[47,)
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ emi_version=1.1.22+1.20.1
|
|||
player_anim_version=1.0.2-rc1+1.20
|
||||
geckolib_version=4.2.1
|
||||
curios_version=5.5.0+1.20.1
|
||||
lib39_version=0.4.1
|
||||
lib39_version=0.5.5
|
||||
accore_version=1.20.1-26H7
|
||||
super_lead_version=1.20.1-1.2.1
|
||||
## Mod Properties
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
|||
import com.mojang.brigadier.context.CommandContext;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import com.mojang.brigadier.suggestion.SuggestionProvider;
|
||||
import net.minecraft.commands.CommandBuildContext;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.Commands;
|
||||
import net.minecraft.commands.arguments.EntityArgument;
|
||||
|
|
@ -38,7 +39,6 @@ import net.minecraft.world.item.ItemStack;
|
|||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraftforge.common.util.FakePlayerFactory;
|
||||
import net.minecraftforge.event.RegisterCommandsEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import top.r3944realms.eroticdungeongame.api.workspace.Services;
|
||||
|
|
@ -60,9 +60,10 @@ import java.util.UUID;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
public class EDGCommand extends SimpleHelpCommand {
|
||||
public EDGCommand(@NotNull RegisterCommandsEvent event) {
|
||||
super(event);
|
||||
registerCommands(event.getDispatcher());
|
||||
public EDGCommand(CommandDispatcher<CommandSourceStack> dispatcher,
|
||||
CommandBuildContext context) {
|
||||
super(dispatcher, context);
|
||||
registerCommands(dispatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -23,11 +23,12 @@ import org.jetbrains.annotations.NotNull;
|
|||
import top.r3944realms.eroticdungeongame.api.capability.IPlayerDungeonData;
|
||||
import top.r3944realms.eroticdungeongame.content.entity.SeatEntity;
|
||||
import top.r3944realms.eroticdungeongame.core.device.ISeatType;
|
||||
import top.r3944realms.lib39.core.sync.IForgeUpdate;
|
||||
import top.r3944realms.lib39.core.sync.NBTEntitySyncData;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public sealed abstract class AbstractPlayerDungeonData extends NBTEntitySyncData implements IPlayerDungeonData permits PlayerDungeonData {
|
||||
public sealed abstract class AbstractPlayerDungeonData extends NBTEntitySyncData implements IForgeUpdate, IPlayerDungeonData permits PlayerDungeonData {
|
||||
protected AbstractPlayerDungeonData(ResourceLocation id) {
|
||||
super(id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ import net.minecraft.world.entity.player.Player;
|
|||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import top.r3944realms.eroticdungeongame.content.animation.IEDGAnimation;
|
||||
import top.r3944realms.eroticdungeongame.content.block.ISeatBlock;
|
||||
import top.r3944realms.eroticdungeongame.content.block.blockentity.BaseSeatBlockEntity;
|
||||
|
|
@ -32,20 +32,14 @@ import top.r3944realms.lib39.core.sync.CachedSyncManager;
|
|||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
public class DungeonDataSyncManager extends CachedSyncManager<UUID, AbstractPlayerDungeonData> {
|
||||
public static Map<UUID, AbstractPlayerDungeonData> playerDungeonData = new HashMap<>();
|
||||
public class DungeonDataSyncManager extends CachedSyncManager<Capability<AbstractPlayerDungeonData>, AbstractPlayerDungeonData> {
|
||||
public Map<Capability<AbstractPlayerDungeonData>, AbstractPlayerDungeonData> playerDungeonData = new HashMap<>();
|
||||
@Override
|
||||
public Map<UUID, AbstractPlayerDungeonData> getSyncMap() {
|
||||
public Map<Capability<AbstractPlayerDungeonData>, AbstractPlayerDungeonData> getSyncMap() {
|
||||
return playerDungeonData;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public AbstractPlayerDungeonData getPlayerDungeonData(UUID uuid) {
|
||||
return playerDungeonData.get(uuid);
|
||||
}
|
||||
|
||||
public static void tick(@NotNull Player player) {
|
||||
player.getCapability(PlayerDungeonDataProvider.PLAYER_DUNGEON_DATA_CAP).ifPresent(
|
||||
cap -> {
|
||||
|
|
|
|||
|
|
@ -35,12 +35,12 @@ import top.r3944realms.eroticdungeongame.api.workspace.Services;
|
|||
import top.r3944realms.eroticdungeongame.content.block.ISeatBlock;
|
||||
import top.r3944realms.eroticdungeongame.content.block.blockentity.BaseSeatBlockEntity;
|
||||
import top.r3944realms.eroticdungeongame.content.item.DeviceKeyItem;
|
||||
import top.r3944realms.lib39.core.compat.ICompat;
|
||||
import top.r3944realms.lib39.core.compat.IForgeCompat;
|
||||
import tschipp.carryon.common.carry.CarryOnData;
|
||||
import tschipp.carryon.common.carry.CarryOnDataManager;
|
||||
import tschipp.carryon.events.EntityPickupEvent;
|
||||
|
||||
public class CarryOnCompat implements ICompat {
|
||||
public class CarryOnCompat implements IForgeCompat {
|
||||
public static CarryOnCompat INSTANCE = new CarryOnCompat();
|
||||
public static ResourceLocation ID = EroticDungeon.rl("carryon");
|
||||
public boolean initialize = false;
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ package top.r3944realms.eroticdungeongame.core.compat;
|
|||
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import top.r3944realms.eroticdungeongame.EroticDungeon;
|
||||
import top.r3944realms.lib39.core.compat.CompatManager;
|
||||
import top.r3944realms.lib39.core.compat.ForgeCompatManager;
|
||||
|
||||
public class EDGCompatManager extends CompatManager {
|
||||
public class EDGCompatManager extends ForgeCompatManager {
|
||||
public EDGCompatManager(String id, IEventBus modEventBus, IEventBus gameEventBus) {
|
||||
super(EroticDungeon.rl(id), modEventBus, gameEventBus);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ import net.minecraftforge.eventbus.api.IEventBus;
|
|||
import net.minecraftforge.fml.ModList;
|
||||
import top.r3944realms.eroticdungeongame.EroticDungeon;
|
||||
import top.r3944realms.eroticdungeongame.api.workspace.Services;
|
||||
import top.r3944realms.lib39.core.compat.ICompat;
|
||||
import top.r3944realms.lib39.core.compat.IForgeCompat;
|
||||
|
||||
public class EmoteCraftCompat implements ICompat {
|
||||
public class EmoteCraftCompat implements IForgeCompat {
|
||||
public static EmoteCraftCompat INSTANCE = new EmoteCraftCompat();
|
||||
public static ResourceLocation ID = EroticDungeon.rl("emotecraft");
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ import net.minecraftforge.eventbus.api.IEventBus;
|
|||
import net.minecraftforge.fml.ModList;
|
||||
import top.r3944realms.eroticdungeongame.EroticDungeon;
|
||||
import top.r3944realms.eroticdungeongame.api.EroticDungeonGameApi;
|
||||
import top.r3944realms.lib39.core.compat.ICompat;
|
||||
import top.r3944realms.lib39.core.compat.IForgeCompat;
|
||||
|
||||
public class FirstPersonModelAndRealCameraCompat implements ICompat {
|
||||
public class FirstPersonModelAndRealCameraCompat implements IForgeCompat {
|
||||
public static FirstPersonModelAndRealCameraCompat INSTANCE = new FirstPersonModelAndRealCameraCompat();
|
||||
public static ResourceLocation ID = EroticDungeon.rl("firstperson_realcamera");
|
||||
public boolean initialize = false;
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ import net.minecraftforge.fml.ModList;
|
|||
import net.xolt.freecam.Freecam;
|
||||
import top.r3944realms.eroticdungeongame.EroticDungeon;
|
||||
import top.r3944realms.eroticdungeongame.client.util.RendererUtil;
|
||||
import top.r3944realms.lib39.core.compat.ICompat;
|
||||
import top.r3944realms.lib39.core.compat.IForgeCompat;
|
||||
|
||||
public class FreecamCompat implements ICompat {
|
||||
public class FreecamCompat implements IForgeCompat {
|
||||
public static FreecamCompat INSTANCE = new FreecamCompat();
|
||||
public static ResourceLocation ID = EroticDungeon.rl("freecam");
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraftforge.fml.ModList;
|
||||
import top.r3944realms.eroticdungeongame.EroticDungeon;
|
||||
import top.r3944realms.eroticdungeongame.api.EroticDungeonGameApi;
|
||||
import top.r3944realms.lib39.core.compat.ICompat;
|
||||
import top.r3944realms.lib39.core.compat.IForgeCompat;
|
||||
|
||||
public class RealCameraCompat implements ICompat {
|
||||
public class RealCameraCompat implements IForgeCompat {
|
||||
public static RealCameraCompat INSTANCE = new RealCameraCompat();
|
||||
public static ResourceLocation ID = EroticDungeon.rl("realcamera");
|
||||
public boolean initialize = false;
|
||||
|
|
|
|||
|
|
@ -43,13 +43,13 @@ import top.r3944realms.eroticdungeongame.client.EDGKeyBindings;
|
|||
import top.r3944realms.eroticdungeongame.content.block.blockentity.BaseSeatBlockEntity;
|
||||
import top.r3944realms.eroticdungeongame.content.util.FurnitureHelper;
|
||||
import top.r3944realms.eroticdungeongame.core.network.EDGNetworkHandler;
|
||||
import top.r3944realms.lib39.core.compat.ICompat;
|
||||
import top.r3944realms.lib39.core.compat.IForgeCompat;
|
||||
import top.r3944realms.superleadrope.api.SuperLeadRopeApi;
|
||||
import top.r3944realms.superleadrope.api.type.util.ILeashHelper;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class SuperLeadRopeCompat implements ICompat {
|
||||
public class SuperLeadRopeCompat implements IForgeCompat {
|
||||
public static SuperLeadRopeCompat INSTANCE = new SuperLeadRopeCompat();
|
||||
public static ResourceLocation ID = EroticDungeon.rl("superleadrope");
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ import org.jetbrains.annotations.NotNull;
|
|||
import top.r3944realms.eroticdungeongame.EroticDungeon;
|
||||
import top.r3944realms.eroticdungeongame.core.register.EDGCreativeTabs;
|
||||
import top.r3944realms.eroticdungeongame.core.register.EDGItems;
|
||||
import top.r3944realms.lib39.core.compat.ICompat;
|
||||
import top.r3944realms.lib39.core.compat.IForgeCompat;
|
||||
|
||||
public class TouhouLittleMaidCompat implements ICompat {
|
||||
public class TouhouLittleMaidCompat implements IForgeCompat {
|
||||
public static TouhouLittleMaidCompat INSTANCE = new TouhouLittleMaidCompat();
|
||||
public static ResourceLocation ID = EroticDungeon.rl("touhou_little_maid");
|
||||
public boolean initialize = false;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ package top.r3944realms.eroticdungeongame.core.compat.jei;
|
|||
|
||||
import mezz.jei.api.IModPlugin;
|
||||
import mezz.jei.api.JeiPlugin;
|
||||
import mezz.jei.api.registration.*;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.crafting.RecipeManager;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ public class CommonHandler {
|
|||
public static void syncCapabilities(SyncManagerRegisterEvent event) {
|
||||
dungeonDataSyncManager = new DungeonDataSyncManager();
|
||||
event.registerSyncManager(DUNGEON_SYNC, dungeonDataSyncManager, PlayerDungeonDataProvider.PLAYER_DUNGEON_DATA_CAP);
|
||||
event.addAllowEntityClass(DUNGEON_SYNC, Player.class);
|
||||
}
|
||||
private static char ticks = 0;
|
||||
@SubscribeEvent
|
||||
|
|
@ -96,7 +97,7 @@ public class CommonHandler {
|
|||
}
|
||||
@SubscribeEvent
|
||||
public static void onCommandRegister(RegisterCommandsEvent event) {
|
||||
EDGCommand command = new EDGCommand(event);
|
||||
EDGCommand command = new EDGCommand(event.getDispatcher(), event.getBuildContext());
|
||||
}
|
||||
}
|
||||
@net.minecraftforge.fml.common.Mod.EventBusSubscriber(modid = EroticDungeon.MOD_ID, bus = net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus.MOD)
|
||||
|
|
|
|||
|
|
@ -52,17 +52,17 @@ public class EDGBlocks {
|
|||
public static final Map<ColorContent, RegistryObject<Block>> DISPLAY_RACKS = new HashMap<>();
|
||||
public static final Map<ColorContent, RegistryObject<Block>> STAINED_GLASS_DISPLAY_RACKS = new HashMap<>();
|
||||
|
||||
public static final RegistryObject<Block> DUNGEON_CRAFTING_TABLE = BlockRegistryBuilder.create()
|
||||
public static final RegistryObject<Block> DUNGEON_CRAFTING_TABLE = (RegistryObject<Block>) BlockRegistryBuilder.create()
|
||||
.withName("dungeon_crafting_table")
|
||||
.registerBlock(BLOCKS, () -> new DungeonCraftingTableBlock(BlockBehaviour.Properties.copy(Blocks.CRAFTING_TABLE)))
|
||||
.registerBlock(BLOCKS::register, () -> new DungeonCraftingTableBlock(BlockBehaviour.Properties.copy(Blocks.CRAFTING_TABLE)))
|
||||
.build();
|
||||
public static final RegistryObject<Block> END_ROD_LOVE_MACHINE = BlockRegistryBuilder.create()
|
||||
public static final RegistryObject<Block> END_ROD_LOVE_MACHINE = (RegistryObject<Block>) BlockRegistryBuilder.create()
|
||||
.withName("end_rod_love_machine")
|
||||
.registerBlock(BLOCKS, () -> new LoveMachineBlock(BlockBehaviour.Properties.copy(Blocks.PISTON), "end_rod"))
|
||||
.registerBlock(BLOCKS::register, () -> new LoveMachineBlock(BlockBehaviour.Properties.copy(Blocks.PISTON), "end_rod"))
|
||||
.build();
|
||||
public static final RegistryObject<Block> LIGHTNING_ROD_LOVE_MACHINE = BlockRegistryBuilder.create()
|
||||
public static final RegistryObject<Block> LIGHTNING_ROD_LOVE_MACHINE = (RegistryObject<Block>) BlockRegistryBuilder.create()
|
||||
.withName("lightning_rod_love_machine")
|
||||
.registerBlock(BLOCKS, () -> new LoveMachineBlock(BlockBehaviour.Properties.copy(Blocks.PISTON), "lightning_rod"))
|
||||
.registerBlock(BLOCKS::register, () -> new LoveMachineBlock(BlockBehaviour.Properties.copy(Blocks.PISTON), "lightning_rod"))
|
||||
.build();
|
||||
public static final RegistryObject<Block> WHITE_CUFF_BED = registerCuffBed(ColorContent.WHITE);
|
||||
public static final RegistryObject<Block> ORANGE_CUFF_BED = registerCuffBed(ColorContent.ORANGE);
|
||||
|
|
@ -129,10 +129,10 @@ public class EDGBlocks {
|
|||
public static final RegistryObject<Block> MANGROVE_CRUX = registerCrux(WoodType.MANGROVE);
|
||||
public static final RegistryObject<Block> BAMBOO_CRUX = registerCrux(WoodType.BAMBOO);
|
||||
|
||||
public static final RegistryObject<Block> IRON_CAGE = BlockRegistryBuilder
|
||||
public static final RegistryObject<Block> IRON_CAGE = (RegistryObject<Block>) BlockRegistryBuilder
|
||||
.create()
|
||||
.withName("iron_cage")
|
||||
.registerBlock(BLOCKS, IronCageBlock::new)
|
||||
.registerBlock(BLOCKS::register, IronCageBlock::new)
|
||||
.build();
|
||||
|
||||
public static final RegistryObject<Block> OAK_SPANISH_DONKEY = registerSpanishDonkey(WoodType.OAK);
|
||||
|
|
@ -425,10 +425,10 @@ public class EDGBlocks {
|
|||
|
||||
private static RegistryObject<Block> registerProneBench (@NotNull ColorContent color, @NotNull WoodType woodType) {
|
||||
String name = color.getName() + "_" + woodType.name() + "_prone_bench";
|
||||
RegistryObject<Block> block = BlockRegistryBuilder
|
||||
RegistryObject<Block> block = (RegistryObject<Block>) BlockRegistryBuilder
|
||||
.create()
|
||||
.withName(name)
|
||||
.registerBlock(BLOCKS, () -> new ProneBenchBlock(woodType, color))
|
||||
.registerBlock(BLOCKS::register, () -> new ProneBenchBlock(woodType, color))
|
||||
.build();
|
||||
PRONE_BENCH_BLOCKS.put(Pair.of(color, woodType), block);
|
||||
SEAT_BLOCKS.add(block);
|
||||
|
|
@ -445,10 +445,10 @@ public class EDGBlocks {
|
|||
|
||||
private static RegistryObject<Block> registerCuffPole(@NotNull WoodType woodType) {
|
||||
String name = woodType.name() + "_cuff_pole";
|
||||
RegistryObject<Block> block = BlockRegistryBuilder
|
||||
RegistryObject<Block> block = (RegistryObject<Block>) BlockRegistryBuilder
|
||||
.create()
|
||||
.withName(name)
|
||||
.registerBlock(BLOCKS, () -> new CuffPoleBlock(woodType))
|
||||
.registerBlock(BLOCKS::register, () -> new CuffPoleBlock(woodType))
|
||||
.build();
|
||||
CUFF_POLE_BLOCKS.put(woodType, block);
|
||||
SEAT_BLOCKS.add(block);
|
||||
|
|
@ -465,10 +465,10 @@ public class EDGBlocks {
|
|||
|
||||
private static RegistryObject<Block> registerWallRack(@NotNull WoodType woodType) {
|
||||
String name = woodType.name() + "_wall_rack";
|
||||
RegistryObject<Block> block = BlockRegistryBuilder
|
||||
RegistryObject<Block> block = (RegistryObject<Block>) BlockRegistryBuilder
|
||||
.create()
|
||||
.withName(name)
|
||||
.registerBlock(BLOCKS, () -> new WallRackBlock(woodType))
|
||||
.registerBlock(BLOCKS::register, () -> new WallRackBlock(woodType))
|
||||
.build();
|
||||
WALL_RACK_BLOCKS.put(woodType, block);
|
||||
SEAT_BLOCKS.add(block);
|
||||
|
|
@ -485,10 +485,10 @@ public class EDGBlocks {
|
|||
|
||||
private static RegistryObject<Block> registerPillory(@NotNull WoodType woodType) {
|
||||
String name = woodType.name() + "_pillory";
|
||||
RegistryObject<Block> block = BlockRegistryBuilder
|
||||
RegistryObject<Block> block = (RegistryObject<Block>) BlockRegistryBuilder
|
||||
.create()
|
||||
.withName(name)
|
||||
.registerBlock(BLOCKS, () -> new PilloryBlock(woodType))
|
||||
.registerBlock(BLOCKS::register, () -> new PilloryBlock(woodType))
|
||||
.build();
|
||||
PILLORY_BLOCKS.put(woodType, block);
|
||||
SEAT_BLOCKS.add(block);
|
||||
|
|
@ -505,10 +505,10 @@ public class EDGBlocks {
|
|||
|
||||
private static RegistryObject<Block> registerSpanishDonkey(@NotNull WoodType woodType) {
|
||||
String name = woodType.name() + "_spanish_donkey";
|
||||
RegistryObject<Block> block = BlockRegistryBuilder
|
||||
RegistryObject<Block> block = (RegistryObject<Block>) BlockRegistryBuilder
|
||||
.create()
|
||||
.withName(name)
|
||||
.registerBlock(BLOCKS, () -> new SpanishDonkeyBlock(woodType))
|
||||
.registerBlock(BLOCKS::register, () -> new SpanishDonkeyBlock(woodType))
|
||||
.build();
|
||||
SPANISH_DONKEY_BLOCKS.put(woodType, block);
|
||||
SEAT_BLOCKS.add(block);
|
||||
|
|
@ -525,10 +525,10 @@ public class EDGBlocks {
|
|||
|
||||
private static RegistryObject<Block> registerCuffBed(@NotNull ColorContent color) {
|
||||
String name = color.getName() + "_cuff_bed";
|
||||
RegistryObject<Block> block = BlockRegistryBuilder
|
||||
RegistryObject<Block> block = (RegistryObject<Block>) BlockRegistryBuilder
|
||||
.create()
|
||||
.withName(name)
|
||||
.registerBlock(BLOCKS, () -> new CuffBedBlock(color))
|
||||
.registerBlock(BLOCKS::register, () -> new CuffBedBlock(color))
|
||||
.build();
|
||||
CUFF_BED_BLOCKS.put(color, block);
|
||||
SEAT_BLOCKS.add(block);
|
||||
|
|
@ -545,10 +545,10 @@ public class EDGBlocks {
|
|||
|
||||
private static RegistryObject<Block> registerRack(@NotNull WoodType woodType) {
|
||||
String name = woodType.name() + "_rack";
|
||||
RegistryObject<Block> block = BlockRegistryBuilder
|
||||
RegistryObject<Block> block = (RegistryObject<Block>) BlockRegistryBuilder
|
||||
.create()
|
||||
.withName(name)
|
||||
.registerBlock(BLOCKS, () -> new RackBlock(woodType))
|
||||
.registerBlock(BLOCKS::register, () -> new RackBlock(woodType))
|
||||
.build();
|
||||
RACK_BLOCKS.put(woodType, block);
|
||||
SEAT_BLOCKS.add(block);
|
||||
|
|
@ -566,10 +566,10 @@ public class EDGBlocks {
|
|||
|
||||
private static RegistryObject<Block> registerXCross(@NotNull WoodType woodType) {
|
||||
String name = woodType.name() + "_x_cross";
|
||||
RegistryObject<Block> block = BlockRegistryBuilder
|
||||
RegistryObject<Block> block = (RegistryObject<Block>) BlockRegistryBuilder
|
||||
.create()
|
||||
.withName(name)
|
||||
.registerBlock(BLOCKS, () -> new XCrossBlock(woodType))
|
||||
.registerBlock(BLOCKS::register, () -> new XCrossBlock(woodType))
|
||||
.build();
|
||||
X_CROSS_BLOCKS.put(woodType, block);
|
||||
SEAT_BLOCKS.add(block);
|
||||
|
|
@ -582,10 +582,10 @@ public class EDGBlocks {
|
|||
|
||||
private static RegistryObject<Block> registerPetrineCross(@NotNull WoodType woodType) {
|
||||
String name = woodType.name() + "_petrine_cross";
|
||||
RegistryObject<Block> block = BlockRegistryBuilder
|
||||
RegistryObject<Block> block = (RegistryObject<Block>) BlockRegistryBuilder
|
||||
.create()
|
||||
.withName(name)
|
||||
.registerBlock(BLOCKS, () -> new PetrineCrossBlock(woodType))
|
||||
.registerBlock(BLOCKS::register, () -> new PetrineCrossBlock(woodType))
|
||||
.build();
|
||||
PETRINE_CROSS_BLOCKS.put(woodType, block);
|
||||
SEAT_BLOCKS.add(block);
|
||||
|
|
@ -610,10 +610,10 @@ public class EDGBlocks {
|
|||
|
||||
private static RegistryObject<Block> registerCrux(@NotNull WoodType woodType) {
|
||||
String name = woodType.name() + "_crux";
|
||||
RegistryObject<Block> block = BlockRegistryBuilder
|
||||
RegistryObject<Block> block = (RegistryObject<Block>) BlockRegistryBuilder
|
||||
.create()
|
||||
.withName(name)
|
||||
.registerBlock(BLOCKS, () -> new CruxBlock(woodType))
|
||||
.registerBlock(BLOCKS::register, () -> new CruxBlock(woodType))
|
||||
.build();
|
||||
CRUX_BLOCKS.put(woodType, block);
|
||||
SEAT_BLOCKS.add(block);
|
||||
|
|
@ -626,10 +626,10 @@ public class EDGBlocks {
|
|||
|
||||
private static RegistryObject<Block> registerHangingPost(@NotNull WoodType woodType) {
|
||||
String name = woodType.name() + "_hanging_post";
|
||||
RegistryObject<Block> block = BlockRegistryBuilder
|
||||
RegistryObject<Block> block = (RegistryObject<Block>) BlockRegistryBuilder
|
||||
.create()
|
||||
.withName(name)
|
||||
.registerBlock(BLOCKS, () -> new HangingPostBlock(woodType))
|
||||
.registerBlock(BLOCKS::register, () -> new HangingPostBlock(woodType))
|
||||
.build();
|
||||
HANGING_POST_BLOCKS.put(woodType, block);
|
||||
SEAT_BLOCKS.add(block);
|
||||
|
|
@ -647,10 +647,10 @@ public class EDGBlocks {
|
|||
private static RegistryObject<Block> registerDisplayRack(ColorContent color) {
|
||||
|
||||
String name = color.getName() + "display_rack";
|
||||
RegistryObject<Block> block = BlockRegistryBuilder
|
||||
RegistryObject<Block> block = (RegistryObject<Block>) BlockRegistryBuilder
|
||||
.create()
|
||||
.withName(name)
|
||||
.registerBlock(BLOCKS, () -> new DisplayRackBlock(color))
|
||||
.registerBlock(BLOCKS::register, () -> new DisplayRackBlock(color))
|
||||
.build();
|
||||
DISPLAY_RACKS.put(color, block);
|
||||
SEAT_BLOCKS.add(block);
|
||||
|
|
@ -672,18 +672,18 @@ public class EDGBlocks {
|
|||
private static RegistryObject<Block> registerGlassDisplayRack(@Nullable ColorContent color) {
|
||||
if (color != null) {
|
||||
String name = color.getName() + "_stained_glass_display_rack";
|
||||
RegistryObject<Block> block = BlockRegistryBuilder
|
||||
RegistryObject<Block> block = (RegistryObject<Block>) BlockRegistryBuilder
|
||||
.create()
|
||||
.withName(name)
|
||||
.registerBlock(BLOCKS, () -> new GlassDisplayRackBlock(color))
|
||||
.registerBlock(BLOCKS::register, () -> new GlassDisplayRackBlock(color))
|
||||
.build();
|
||||
STAINED_GLASS_DISPLAY_RACKS.put(color, block);
|
||||
SEAT_BLOCKS.add(block);
|
||||
return block;
|
||||
}
|
||||
return BlockRegistryBuilder.create()
|
||||
return (RegistryObject<Block>) BlockRegistryBuilder.create()
|
||||
.withName("glass_display_rack")
|
||||
.registerBlock(BLOCKS, GlassDisplayRackBlock::new)
|
||||
.registerBlock(BLOCKS::register, GlassDisplayRackBlock::new)
|
||||
.build();
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user