Skip to content

Commit

Permalink
feat: Update Forge and NeoForge to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Jun 14, 2024
1 parent a1b8db4 commit 20add26
Show file tree
Hide file tree
Showing 12 changed files with 180 additions and 192 deletions.
4 changes: 2 additions & 2 deletions common/src/main/java/net/blay09/mods/waystones/Waystones.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public static void initialize() {
ModEventHandlers.initialize();
ModNetworking.initialize(Balm.getNetworking());
ModBlocks.initialize(Balm.getBlocks());
ModBlockEntities.initialize(Balm.getBlockEntities());
ModBlockEntities.initialize();
ModItems.initialize(Balm.getItems());
ModMenus.initialize(Balm.getMenus());
ModMenus.initialize();
ModWorldGen.initialize(Balm.getWorldGen());
ModCommands.initialize(Balm.getCommands());
ModComponents.initialize(Balm.getComponents());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.blay09.mods.waystones.block.entity;

import net.blay09.mods.balm.api.Balm;
import net.blay09.mods.balm.api.DeferredObject;
import net.blay09.mods.balm.api.block.BalmBlockEntities;
import net.blay09.mods.waystones.Waystones;
Expand All @@ -9,20 +10,21 @@
import net.minecraft.world.level.block.entity.BlockEntityType;

public class ModBlockEntities {
public static DeferredObject<BlockEntityType<WaystoneBlockEntity>> waystone;
public static DeferredObject<BlockEntityType<SharestoneBlockEntity>> sharestone;
public static DeferredObject<BlockEntityType<WarpPlateBlockEntity>> warpPlate;
public static DeferredObject<BlockEntityType<PortstoneBlockEntity>> portstone;
private static final BalmBlockEntities blockEntities = Balm.getBlockEntities();
public static DeferredObject<BlockEntityType<WaystoneBlockEntity>> waystone = blockEntities.registerBlockEntity(id("waystone"),
WaystoneBlockEntity::new,
() -> new Block[]{ModBlocks.waystone, ModBlocks.mossyWaystone, ModBlocks.sandyWaystone, ModBlocks.deepslateWaystone, ModBlocks.blackstoneWaystone, ModBlocks.endStoneWaystone});
public static DeferredObject<BlockEntityType<SharestoneBlockEntity>> sharestone = blockEntities.registerBlockEntity(id("sharestone"),
SharestoneBlockEntity::new,
() -> ModBlocks.sharestones);
public static DeferredObject<BlockEntityType<WarpPlateBlockEntity>> warpPlate = blockEntities.registerBlockEntity(id("warp_plate"),
WarpPlateBlockEntity::new,
() -> new Block[]{ModBlocks.warpPlate});
public static DeferredObject<BlockEntityType<PortstoneBlockEntity>> portstone = blockEntities.registerBlockEntity(id("portstone"),
PortstoneBlockEntity::new,
() -> ModBlocks.portstones);

public static void initialize(BalmBlockEntities blockEntities) {
waystone = blockEntities.registerBlockEntity(id("waystone"),
WaystoneBlockEntity::new,
() -> new Block[]{ModBlocks.waystone, ModBlocks.mossyWaystone, ModBlocks.sandyWaystone, ModBlocks.deepslateWaystone, ModBlocks.blackstoneWaystone, ModBlocks.endStoneWaystone});
sharestone = blockEntities.registerBlockEntity(id("sharestone"),
SharestoneBlockEntity::new,
() -> ModBlocks.sharestones);
warpPlate = blockEntities.registerBlockEntity(id("warp_plate"), WarpPlateBlockEntity::new, () -> new Block[]{ModBlocks.warpPlate});
portstone = blockEntities.registerBlockEntity(id("portstone"), PortstoneBlockEntity::new, () -> ModBlocks.portstones);
public static void initialize() {
}

private static ResourceLocation id(String name) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
package net.blay09.mods.waystones.client;

import net.blay09.mods.balm.api.Balm;
import net.blay09.mods.balm.api.client.BalmClient;
import net.blay09.mods.balm.api.event.client.UseItemInputEvent;
import net.blay09.mods.waystones.InternalClientMethodsImpl;
import net.blay09.mods.waystones.api.client.WaystonesClientAPI;
import net.blay09.mods.waystones.block.entity.WaystoneBlockEntityBase;
import net.blay09.mods.waystones.client.requirement.RequirementClientRegistry;
import net.blay09.mods.waystones.compat.Compat;
import net.blay09.mods.waystones.network.message.RequestEditWaystoneMessage;
import net.minecraft.client.ClientBrandRetriever;
import net.minecraft.client.Minecraft;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.HitResult;

import java.util.Locale;

Expand All @@ -24,7 +17,6 @@ public static void initialize() {
ModClientEventHandlers.initialize();
ModRenderers.initialize(BalmClient.getRenderers());
ModScreens.initialize(BalmClient.getScreens());
ModTextures.initialize(BalmClient.getTextures());
ModModels.initialize(BalmClient.getModels());

InventoryButtonGuiHandler.initialize();
Expand Down
Loading

0 comments on commit 20add26

Please sign in to comment.