This detailed tutorial walks you through converting a Java mod to Bedrock using PortKit. We'll use a simple "Custom Sword" mod as an example.
For this tutorial, we'll convert a simple Java mod that adds:
- A new sword item (Ruby Sword)
- Custom texture
- Attack damage and durability
Your mod should include:
- Java source files (.java) - the mod logic
- Resource files - textures, models, sounds
- mod metadata - mcmod.info, fabric.json, or forge.mods.toml
rubysword.jar
├── assets/
│ └── rubysword/
│ ├── textures/
│ │ └── items/ruby_sword.png
│ └── models/
│ └── item/ruby_sword.json
├── com/example/rubysword/
│ ├── RubySword.java
│ ├── RubySwordItem.java
│ └── RubySwordMod.java
└── META-INF/
└── mods.toml
- Navigate to portkit.cloud
- Click "Upload Mod" or drag-and-drop your .jar file
- Wait for analysis (30-60 seconds)
Mod Analysis Complete
├── Detected Features
│ ├── Items: 1 (Ruby Sword)
│ ├── Blocks: 0
│ ├── Entities: 0
│ └── Recipes: 0
├── Complexity: Simple
├── Estimated Time: 5 minutes
└── Conversion Confidence: 95%
Before starting, review the AI's plan:
| Component | Java Class | Bedrock Equivalent | Confidence |
|---|---|---|---|
| Ruby Sword Item | RubySwordItem | items/ruby_sword | 95% |
| Texture | ruby_sword.png | textures/items/ruby_sword.png | 100% |
| Model | ruby_sword.json | models/item/ruby_sword.json | 90% |
- High confidence: No issues expected
- Medium confidence: May need manual texture adjustment
- Low confidence: Custom attack logic may need tweaking
Click "Start Conversion" and monitor progress:
✓ Parsing Java code
✓ Building AST (Abstract Syntax Tree)
✓ Analyzing dependencies
✓ Extracting item properties
✓ Creating behavior pack items/
✓ Generating JavaScript item logic
✓ Converting texture format
✓ Creating resource pack structure
✓ Processing textures (PNG optimization)
✓ Converting JSON models
✓ Validating file formats
✓ Syntax checking (JavaScript)
✓ Schema validation (JSON)
✓ Asset integrity check
✓ Packaging into .mcaddon
Once complete, you'll see a detailed report:
Conversion Complete!
Overall Success Rate: 95%
Components Converted: 3/3
Manual Steps Required: 0
| File | Type | Status | Notes |
|---|---|---|---|
behavior_packs/rubysword/items/ruby_sword.json |
Item Definition | ✓ Success | - |
behavior_packs/rubysword/scripts/main.js |
JavaScript Logic | ✓ Success | Attack damage converted |
resource_packs/rubysword/textures/items/ruby_sword.png |
Texture | ✓ Success | Optimized for Bedrock |
The AI explains its decisions:
- Attack Damage: Converted from Java
10to Bedrock attack damage10 - Durability: Mapped to
max_durabilitycomponent - Creative Tab: Assigned to "equipment" category
For simple mods like this, you'll see:
No manual steps required! Your add-on is ready to use.
For complex mods, you might see:
⚠ Manual Steps Required:
1. Custom rendering logic needs JavaScript implementation
2. GUI elements need Bedrock forms (not Java GUI)
3. Network packets need Bedrock scripting API
Click "Download Add-on" to save rubysword.mcaddon (usually 50-200KB).
Windows 10/11:
- Double-click the .mcaddon file
- Minecraft Bedrock opens automatically
- Click "Import" to install
Mobile (iOS/Android):
- Share the file to Minecraft
- Open Minecraft → Settings → Storage → Behavior Packs
- Activate "Ruby Sword"
Console:
- Upload to a file sharing service
- Download in Minecraft Marketplace → My Packs
Create a Test World:
-
Enable cheats and Experimental Features:
- Create new world
- Cheats: ON
- Experimental: "Holiday Creator Features" ON
- "GameTest Framework" ON (if testing)
-
Obtain the item:
/give @p rubysword:ruby_sword -
Test functionality:
- Does the sword appear in your hand?
- Does it deal correct damage?
- Does durability decrease?
- Does the texture look right?
Item doesn't appear:
Solution: Check that Experimental Features are enabled
Texture is missing:
Solution: Verify resource pack is activated in world settings
Wrong damage values:
Solution: Edit behavior_packs/rubysword/items/ruby_sword.json
Adjust the "minecraft:attack_damage" component
If something isn't perfect:
- Extract the .mcaddon (it's a ZIP file)
- Edit the JSON/JavaScript files
- Re-package as .mcaddon
Example - Adjusting Attack Damage:
File: behavior_packs/rubysword/items/ruby_sword.json
{
"format_version": "1.16.0",
"minecraft:item": {
"description": {
"identifier": "rubysword:ruby_sword"
},
"components": {
"minecraft:attack_damage": 12, // Changed from 10
"minecraft:max_durability": 1500,
"minecraft:durability": {
"max_durability": 1500
}
}
}
}If the AI made wrong assumptions:
- Edit the original Java mod
- Re-upload to PortKit
- The AI will learn from the previous conversion
Pro users can edit the conversion in our web-based editor:
- Click "Open in Editor"
- Make changes visually
- Export updated .mcaddon
Once satisfied with your conversion:
- Test in multiple Bedrock platforms (mobile, PC, console)
- Verify all features work as expected
- Check performance (no lag, crashes)
- Create a .mcaddon file (already done)
- Add a README with installation instructions
- Include screenshots or video demo
- Test on a clean installation
Option 1: Free Distribution
- Upload to Modrinth
- Share on Discord/Reddit
- Host on your website
Option 2: Minecraft Marketplace
- Requires Mojang approval
- Must meet quality standards
- Can monetize your add-on
Option 3: Share with Community
- Join our Discord
- Share conversion patterns
- Help improve the AI
For mods with custom entities, dimensions, or GUI:
- Break it down: Convert one feature at a time
- Use batch mode: Convert multiple related files together
- Leverage RAG: Search for similar conversions in our database
- Manual polish: Plan time for manual adjustments
Before conversion:
- Clean up Java code (remove unused imports)
- Standardize naming conventions
- Document custom behaviors
During conversion:
- Review the AI's assumptions
- Check confidence scores
- Read the manual steps carefully
After conversion:
- Test thoroughly on all platforms
- Profile performance
- Gather user feedback
Congratulations! You've successfully converted your first mod. Now:
- Try a complex mod: Entities, dimensions, GUI
- Explore the API: Automate conversions programmatically
- Join the community: Share your experience
- Upgrade to Pro: Unlock unlimited conversions
- Video Tutorial (5 minutes)
- FAQ - Common questions
- API Documentation - For developers
- Community Discord
Need help? Contact us at support@portkit.cloud