Add credits field and fix portal block activation logic

Added a "credits" field to gradle properties and updated its usage in the build script. Refactored `onBlockActivated` logic in the `Window` block to improve code clarity and handle dimension-specific teleportation more robustly. Updated `ModBlocks` to properly register the custom `Window` block.

Signed-off-by: dragonruler1000 <github@me.minecraftchest2.us>
This commit is contained in:
dragonruler1000 2025-05-17 15:49:16 -05:00 committed by dragonruler1000
parent d962b7d8b7
commit 8de9596a60
4 changed files with 27 additions and 22 deletions

View file

@ -11,6 +11,7 @@ import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import us.minecraftchest2.hdm_mod.Hdm_mod;
import us.minecraftchest2.hdm_mod.block.custom.Window;
import us.minecraftchest2.hdm_mod.item.ModItems;
import us.minecraftchest2.hdm_mod.item.ModItemGroup;
@ -40,7 +41,7 @@ public class ModBlocks {
// Registering a "portal" block called "window" with different properties
public static final RegistryObject<Block> PORTAL_BLOCK = registerBlock("window",
() -> new Block(
() -> new Window(
AbstractBlock.Properties.create(Material.PORTAL) // Base material is portal
.doesNotBlockMovement() // Entities can move through this block
.harvestLevel(10) // High harvest level