Compatibility
Minecraft: Java Edition
1.21.1
1.20.1
Platforms
Supported environments
Creators
Details
Licensed MIT
Published last month
Updated 3 weeks ago
Changelog
Changelog - Forge 1.20.1 Port
[1.20.1-0.0.4] - 2025-11-19
Port Information
Complete port from NeoForge 1.21.1 to Forge 1.20.1
Changed - Build System
- Gradle: Downgraded from 9.2.0 to 8.7 for ForgeGradle compatibility
- Java: Downgraded from Java 21 to Java 17 (required for Minecraft 1.20.1)
- Mod Loader: Migrated from NeoForge MDG 2.0.118 to ForgeGradle 6.0
- Minecraft Version: 1.21.1 → 1.20.1
- Forge Version: 47.3.0 with Parchment Mappings 2023.09.03-1.20.1
- Metadata File: Created new
mods.tomlfor Forge (replacing NeoForge's format) - Build Output:
coppergolemlegacy-1.20.1-0.0.3.jar(1.38 MB)
Changed - Core API Migration
- Package Imports: All
net.neoforged.*imports replaced withnet.minecraftforge.* - Event Bus:
NeoForge.EVENT_BUS→MinecraftForge.EVENT_BUS - Event Package:
net.neoforged.neoforge.event.level→net.minecraftforge.event.level - Registry System:
DeferredRegister.createItems()→DeferredRegister.create(ForgeRegistries.ITEMS, ...)DeferredRegister.create(Registries.*)→DeferredRegister.create(ForgeRegistries.*, ...)DeferredHolder<T>→RegistryObject<T>DeferredItem<T>→RegistryObject<Item>
- Mod Constructor: Forge 1.20.1 doesn't support IEventBus constructor parameter injection
- From:
public CopperGolemLegacy(IEventBus modEventBus) - To:
public CopperGolemLegacy()withFMLJavaModLoadingContext.get().getModEventBus()
- From:
Changed - Block Interaction API
- Method Signature:
useItemOn()withItemInteractionResult→use()withInteractionResult - Return Type:
ItemInteractionResultremoved (1.21+ exclusive) →InteractionResultused throughout - Parameter Changes:
useItemOn(ItemStack, BlockState, ...)→use(BlockState, ..., ItemStack from hand) - Affected Classes:
CopperButtonBlock.javaWaxedCopperButtonBlock.javaCopperGolemStatueBlock.java
Changed - Button Block API
- Constructor Signature: Parameter order changed for
ButtonBlock- From:
super(BlockSetType, int, Properties) - To:
super(Properties, BlockSetType, int, boolean)
- From:
- BlockSetType:
BlockSetType.COPPER→BlockSetType.IRON(COPPER doesn't exist in 1.20.1) - Method Removal:
useWithoutItem()removed (doesn't exist in 1.20.1) - Affected Classes:
CopperButtonBlock.java- Constructor updated, oxidized button check logic adjustedWaxedCopperButtonBlock.java- Constructor updated
Changed - Entity API
- defineSynchedData(): Method signature changed
- From:
defineSynchedData(SynchedEntityData.Builder builder) - To:
defineSynchedData()withthis.entityData.define()calls
- From:
- finalizeSpawn(): Added
CompoundTagparameter- From:
finalizeSpawn(ServerLevelAccessor, DifficultyInstance, MobSpawnType, SpawnGroupData) - To:
finalizeSpawn(ServerLevelAccessor, DifficultyInstance, MobSpawnType, SpawnGroupData, CompoundTag)
- From:
- dropCustomDeathLoot(): Signature changed
- From:
dropCustomDeathLoot(ServerLevel, DamageSource, boolean) - To:
dropCustomDeathLoot(DamageSource, int, boolean)
- From:
- Attributes:
Attributes.STEP_HEIGHTremoved (doesn't exist in 1.20.1) - Pathfinding:
PathType→BlockPathTypesenum - AI Behavior:
AnimalPanic<>→AnimalPanic(not generic in 1.20.1) - TransportItemsBetweenContainers: Multiple 1.20.1 API fixes
ChunkPos.rangeClosed()→ Manual chunk iteration loopgetChunkNow()→getChunk()path.getEndNode().asBlockPos()→new BlockPos(node.x, node.y, node.z)getBoundingBox().getYsize()→getBbHeight()AABB.ofSize()→ Manual AABB constructorDirection.stream()→Arrays.stream(Direction.values())
- Affected Classes:
CopperGolemEntity.javaCopperGolemAi.javaTransportItemsBetweenContainers.java
Changed - Block Entity API
- saveAdditional(): Removed
HolderLookup.Providerparameter- From:
saveAdditional(CompoundTag, HolderLookup.Provider) - To:
saveAdditional(CompoundTag)
- From:
- load(): Method changed from
loadAdditional()- From:
loadAdditional(CompoundTag, HolderLookup.Provider) - To:
load(CompoundTag)
- From:
- getUpdateTag(): Added missing override
- Returns:
this.saveWithoutMetadata()
- Returns:
- Affected Classes:
CopperGolemStatueBlockEntity.java
Changed - Resource Location API
- Constructor: Static method removed
- From:
ResourceLocation.fromNamespaceAndPath(namespace, path) - To:
new ResourceLocation(namespace, path)
- From:
- Affected Files: All files using ResourceLocation (20+ files)
Changed - Global Position API
- Constructor: Changed from public to private
- From:
new GlobalPos(dimension, pos) - To:
GlobalPos.of(dimension, pos)
- From:
- Affected Classes:
InteractWithDoor.javaPressRandomCopperButton.javaTransportItemsBetweenContainers.java
Changed - ItemStack API
- ItemStack API:
stack.consume()→stack.shrink()isSameItemSameComponents()→isSameItemSameTags()
- hurtAndBreak(): Signature changed
- From:
hurtAndBreak(int, ServerLevel, ServerPlayer, Consumer) - To:
hurtAndBreak(int, LivingEntity, Consumer)
- From:
- Spawn Egg API: Changed from
SpawnEggItemtoForgeSpawnEggItem- From:
new SpawnEggItem(COPPER_GOLEM.get(), color1, color2, properties) - To:
new ForgeSpawnEggItem(COPPER_GOLEM, color1, color2, properties) ForgeSpawnEggItemacceptsRegistryObject<EntityType<?>>directly (lazy initialization)
- From:
- Affected Classes: Multiple block and AI behavior classes
Changed - Rendering API
- renderToBuffer(): Parameter count increased
- From:
renderToBuffer(PoseStack, VertexConsumer, int, int, int)with color as single int - To:
renderToBuffer(PoseStack, VertexConsumer, int, int, float, float, float, float)with RGBA
- From:
- Color Format: Changed from packed int (-1 for white) to RGBA floats (1.0F, 1.0F, 1.0F, 1.0F)
- Affected Classes:
CopperGolemStatueRenderer.javaCopperGolemEyesLayer.java
Removed - 1.21+ Exclusive Features
- MapCodec System: Completely removed (doesn't exist in 1.20.1)
- Removed
codec()method fromCopperGolemStatueBlock.java - Removed
CODECconstant andcodec()fromWeatheringCopperGolemStatueBlock.java - Removed all
RecordCodecBuilderusage
- Removed
- DataComponents API: Removed (1.21+ only)
- Removed component-based data storage from block entities
- Reverted to CompoundTag-based NBT storage
- StreamCodec: Removed (1.21+ only)
- Config Screen Handler: Removed
ConfigScreenHandler.setScreenFactory()(doesn't exist in Forge 1.20.1)- Config screen registration removed from
CopperGolemLegacyClient.java
- Config screen registration removed from
Fixed - Compilation Issues
- PowerShell Script Errors: Fixed literal backtick characters (`) in Java source files
- PowerShell escape sequences (`n for newline) were written literally
- Manually replaced with proper Java syntax in affected files
- Missing Imports: Added
InteractionResultimport toCopperGolemStatueBlock.java - Missing Semicolons: Fixed missing semicolon in
CopperGolemEntity.javaattribute builder - Method Overrides: Fixed incorrect
@Overrideannotations for methods that don't exist in 1.20.1
Fixed - Runtime Issues
- NoSuchMethodException: Fixed constructor injection incompatibility
- Forge 1.20.1 requires parameterless constructor with manual event bus retrieval
- Fixed in
CopperGolemLegacy.java
- Missing pack.mcmeta: Created resource pack metadata file
- Added with
pack_format: 15for Minecraft 1.20.1 - Includes
forge:resource_pack_format: 15andforge:data_pack_format: 12
- Added with
- Missing Block Tag: Created
data/coppergolemlegacy/tags/blocks/copper.json- Contains all 8 copper block variants (copper_block, exposed, weathered, oxidized, waxed variants)
- Required for golem spawning mechanic (pumpkin + copper block detection)
- Copper Chest Interaction: Created
data/coppergolemlegacy/tags/blocks/copper_chests.json- Contains all 4 copper chest variants (copper_chest, exposed, weathered, oxidized)
- Required for item transport behavior (golem finding copper chests)
- Missing Sound File: Sound
coppergolemlegacy:sounds/entity/copper_golem/become_statue.oggreferenced but not included- Warning logged but doesn't prevent gameplay
Technical Details - Migration Process
- Automated Conversion: Created PowerShell scripts for mass API replacement
convert_to_forge.ps1- Package imports conversionfix_block_interactions.ps1- Block interaction API updatesfix_api_changes.ps1- Resource location and registry fixesfix_entity_blockentity.ps1- Entity and block entity method updates
- Manual Fixes: 30+ compilation errors fixed through targeted code changes
- Build System: Complete restructuring of
build.gradlefor ForgeGradle compatibility - Gradle Wrapper: Downgraded and regenerated for version 8.7
- UTF-8 Encoding: All file operations use UTF-8 without BOM to prevent compiler issues
Compatibility Notes
- Breaking Changes: This is a complete rewrite for Forge 1.20.1
- No Backward Compatibility: Cannot be used with Minecraft 1.21+
- Mod Dependencies: Requires Forge 47.3.0 or higher for Minecraft 1.20.1
- Java Requirement: Java 17 (not compatible with Java 21)
Known Limitations
- Config Screen: In-game config GUI available via Mods menu
- Copper BlockSetType: Uses IRON instead of COPPER (not available in 1.20.1)
- Button Behavior: Oxidized button check moved from
useWithoutItem()to mainuse()method
Added - Configuration System
- Config Screen: In-game GUI for mod configuration
- Accessible via Mods menu → Copper Golem Legacy → Config button
- Toggle button for "Golem Presses Buttons" setting
- Visual feedback: Green text when enabled, red when disabled
- Tooltip explains behavior: "20% chance every 7.5 seconds"
- Changes save automatically to
config/coppergolemlegacy-common.toml
- Config Registration: Properly registered using Forge's
ConfigScreenHandler.ConfigScreenFactory- Registered in
FMLClientSetupEventfor thread-safety - Uses
event.enqueueWork()for proper initialization timing
- Registered in
Added - AI Behavior System
- Item Transport Behavior: Golems now transport items between containers
- Automatically finds copper chests with items within a 65×17×65 block cubic area centered on the golem
- Transports items to regular chests or trapped chests
- Walks to chest, waits for 60 ticks while interacting, picks up items
- Carries items in main hand while walking to destination chest
- Places items in destination chest and returns to idle behavior
- Transport behavior has highest priority (Priority 0) but won't interrupt button pressing
- Cooldown system (60-100 ticks) prevents constant transport spam
- Tracks visited and unreachable containers to avoid getting stuck
- Button Press Behavior: Enhanced with interruption protection
- 20% random chance to press buttons (checked every 7.5 seconds)
- Finds copper buttons within 16 block horizontal, 4 block vertical radius
- Cannot be interrupted by transport behavior once started (via IS_PRESSING_BUTTON memory flag)
- 5-15 second cooldown after pressing any button
- 20-40 second cooldown before visiting the same button again
- Priority 1 (lower than transport) but protected from interruption
- Memory System: New memory types for behavior coordination
IS_PRESSING_BUTTON: Boolean flag prevents interruption of button pressingTRANSPORT_ITEMS_COOLDOWN_TICKS: Cooldown between transport operationsVISITED_BLOCK_POSITIONS: Tracks visited containers to avoid repetitionUNREACHABLE_TRANSPORT_BLOCK_POSITIONS: Tracks unreachable containers
- Behavior Priority System: Intelligent task management
- Priority 0: Item Transport (highest priority, can start anytime)
- Priority 1: Button Press (protected from interruption once started)
- Priority 2: Look at players
- Priority 3: Random walking / idle standing
File Changes Summary
- Modified: 40+ Java source files
- Core API migration (35+ files)
- AI behavior enhancements (3 files:
CopperGolemAi.java,PressRandomCopperButton.java,TransportItemsBetweenContainers.java) - Config screen implementation (2 files:
CopperGolemLegacyClient.java,CopperGolemLegacyConfig.java)
- Created: 5 new files
META-INF/mods.toml(Forge metadata)pack.mcmeta(Resource pack metadata)data/coppergolemlegacy/tags/blocks/copper.json(Block tag for spawning)data/coppergolemlegacy/tags/blocks/copper_chests.json(Block tag for item transport)ModMemoryTypes.javaenhancement (added IS_PRESSING_BUTTON memory type)
- Build Files: 5 files changed (
build.gradle,gradle.properties,settings.gradle,gradle-wrapper.properties,.github/workflows/release.yml) - Total Lines Changed: 800+ lines of code
Development Notes
- Port completed on November 19, 2025
- All NeoForge-specific APIs successfully replaced with Forge equivalents
- No features were removed; all functionality preserved
- Ready for release pending runtime testing
Version Naming Convention: [minecraft_version]-[mod_version]
Build Location: build/libs/coppergolemlegacy-1.20.1-0.0.3.jar
Forge Version: 47.3.0 for Minecraft 1.20.1
License: MIT License (Copyright 2025 Marc Schirrmann)
Files
Metadata
Release channel
ReleaseVersion number
0.0.4Loaders
Game versions
1.20.1Downloads
267Publication date
November 19, 2025 at 9:02 PMPublisher

Smallinger
Member


