
DC Render API
DC Render API: Custom graphics API powering exclusive visual effects for Dragon Curse Chronicles.
About this Mod
DC Render API
DC Render API is a Minecraft Forge mod that provides advanced particle rendering and animation systems, offering powerful particle effect creation tools for mod developers.
Features
Core Features
- Controllable Particle System: Create and manage controllable particle instances
- Particle Animation System: Built-in multiple preset animation effects and timeline system
- Server-side Particle Synchronization: Achieve particle state synchronization between client and server
- Particle Group Management: Batch management of particle effects
- Particle Emitter System: Create and manage particle emission sources
- Particle Style System: Customize particle appearance and behavior
- Barrage System: Create complex barrage effects
- Display Entity System: Manage and render display entities
- Effect System: Combine multiple particle and animation effects
- Event System: Respond to game events and particle lifecycle
- Noise System: Generate natural random effects
Animation Effects
- Circular orbit animation
- Spiral orbit animation
- Wave motion animation
- Random walk animation
- Ease animation
- Timeline animation
- Combined animation
Project Structure
DC Render API/
├── src/
│ └── main/
│ ├── java/com/qituo/dcrapi/
│ │ ├── DcRenderApi.java # Main mod class
│ │ ├── network/ # Network related classes
│ │ │ ├── DcRenderApiNetwork.java # Network packet registration
│ │ │ ├── ParticleGroupPacket.java # Particle group synchronization packet
│ │ │ └── ParticleSyncPacket.java # Particle synchronization packet
│ │ ├── particles/ # Particle related classes
│ │ │ ├── emitters/ # Particle emitters
│ │ │ │ ├── ParticleEmitter.java # Particle emitter interface
│ │ │ │ └── ParticleEmitterManager.java # Particle emitter manager
│ │ │ ├── style/ # Particle styles
│ │ │ │ ├── ParticleStyle.java # Particle style interface
│ │ │ │ └── ParticleStyleManager.java # Particle style manager
│ │ │ ├── ClientParticleGroupManager.java # Client particle group management
│ │ │ ├── ControlableParticle.java # Controllable particle interface
│ │ │ ├── DcRenderApiParticleManager.java # Particle manager
│ │ │ ├── ParticleAnimationExample.java # Particle animation examples
│ │ │ ├── ServerParticleGroup.java # Server-side particle group
│ │ │ └── ServerParticleGroupManager.java # Server-side particle group management
│ │ └── platform/ # Platform related classes
│ │ └── DcRenderApiServices.java # Service interface
│ └── kotlin/com/qituo/dcrapi/ # Kotlin implementation
│ ├── animation/ # Animation system
│ │ ├── timeline/ # Timeline system
│ │ │ ├── DoubleConstTimeAnimator.kt
│ │ │ ├── Ease.kt
│ │ │ ├── Eases.kt
│ │ │ ├── Timeline.kt
│ │ │ └── ValueConstTimeAnimator.kt
│ │ ├── Animate.kt
│ │ └── AnimateManager.kt
│ ├── barrages/ # Barrage system
│ │ ├── Barrage.kt
│ │ └── BarrageManager.kt
│ ├── color/ # Color system
│ │ └── Color.kt
│ ├── config/ # Configuration system
│ │ ├── Config.kt
│ │ └── ConfigManager.kt
│ ├── display/ # Display entity system
│ │ ├── DisplayEntity.kt
│ │ └── DisplayEntityManager.kt
│ ├── effects/ # Effect system
│ │ ├── Effect.kt
│ │ └── EffectManager.kt
│ ├── event/ # Event system
│ │ ├── Event.kt
│ │ ├── EventBus.kt
│ │ └── Events.kt
│ ├── math/ # Math utilities
│ │ └── Vec3.kt
│ ├── noise/ # Noise system
│ │ ├── Noise.kt
│ │ └── PerlinNoise.kt
│ ├── particles/ # Particle system
│ │ ├── emitters/ # Particle emitter implementation
│ │ │ └── BasicParticleEmitter.kt
│ │ ├── style/ # Particle style implementation
│ │ │ └── BasicParticleStyle.kt
│ │ └── ParticleAnimation.kt # Particle animation implementation
│ ├── render/ # Render system
│ │ ├── Render.kt
│ │ └── RenderManager.kt
│ └── shapes/ # Shape system
│ ├── Circle.kt
│ └── Shape.kt
├── build.gradle # Gradle build file
├── gradle.properties # Gradle properties
└── settings.gradle # Gradle settings
Quick Start
Requirements
- Minecraft 1.20.1+
- Forge 47.4.17+
- Java 17+
Installation
- Place the mod JAR file into the
modsfolder of your Minecraft game directory - Start the game, and the mod will load automatically
API Usage Examples
Creating Controllable Particles
import com.qituo.dcrapi.particles.DcRenderApiParticleManager;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.world.phys.Vec3;
// Create a controllable particle
Vec3 position = new Vec3(0, 0, 0);
int particleId = DcRenderApiParticleManager.createParticle(
ParticleTypes.FLAME,
ParticleTypes.FLAME.get(),
position
);
Using Particle Animations
import com.qituo.dcrapi.particles.ParticleAnimation;
import net.minecraft.world.phys.Vec3;
// Create circular orbit animation
Vec3 center = new Vec3(0, 0, 0);
Vec3 animatedPosition = ParticleAnimation.createCircleOrbit(
center, // Center point
2.0, // Radius
0.1, // Speed
tick // Current tick
);
// Create spiral orbit animation
Vec3 spiralPosition = ParticleAnimation.createSpiralOrbit(
center, // Center point
1.0, // Radius
3.0, // Height
0.1, // Speed
tick // Current tick
);
Server-side Particles
import com.qituo.dcrapi.particles.DcRenderApiParticleManager;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.phys.Vec3;
// Create server-side particle
ServerLevel level = ...;
Vec3 position = new Vec3(0, 0, 0);
DcRenderApiParticleManager.createServerParticle(
level,
ParticleTypes.FLAME,
ParticleTypes.FLAME.get(),
position
);
Particle Group Management
Creating Particle Groups
import com.qituo.dcrapi.particles.ServerParticleGroupManager;
import net.minecraft.world.phys.Vec3;
// Create particle group
Vec3 position = new Vec3(0, 0, 0);
int groupId = ServerParticleGroupManager.createGroup(position);
// Add particle to group
ServerParticleGroupManager.addParticleToGroup(
groupId,
ParticleTypes.FLAME,
ParticleTypes.FLAME.get()
);
// Start group animation
ServerParticleGroupManager.startGroupAnimation(
groupId,
"circle", // Animation type
2.0, // Radius
0.1 // Speed
);
Particle Emitter System
Creating Particle Emitters
import com.qituo.dcrapi.particles.emitters.ParticleEmitterManager;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.world.phys.Vec3;
// Create particle emitter
Vec3 position = new Vec3(0, 0, 0);
int emitterId = ParticleEmitterManager.createEmitter(
position,
ParticleTypes.FLAME,
10, // Particles per second
2.0 // Particle speed
);
// Start emitter
ParticleEmitterManager.startEmitter(emitterId);
// Stop emitter
ParticleEmitterManager.stopEmitter(emitterId);
Particle Style System
Creating Custom Particle Styles
import com.qituo.dcrapi.particles.style.ParticleStyleManager;
import net.minecraft.world.phys.Vec3;
// Create particle style
int styleId = ParticleStyleManager.createStyle(
1.0, // Size
0.5, // Alpha
new Vec3(1, 0, 0), // Color (red)
2.0 // Lifetime
);
// Apply style to particle
ParticleStyleManager.applyStyleToParticle(particleId, styleId);
Barrage System
Creating Barrages
import com.qituo.dcrapi.barrages.BarrageManager;
import net.minecraft.world.phys.Vec3;
// Create barrage
Vec3 position = new Vec3(0, 0, 0);
int barrageId = BarrageManager.createBarrage(
position,
"circle", // Barrage type
10, // Barrage count
2.0, // Barrage speed
1.0 // Barrage radius
);
// Start barrage
BarrageManager.startBarrage(barrageId);
Timeline Animation
Creating Timeline Animations
import com.qituo.dcrapi.animation.timeline.Timeline;
import com.qituo.dcrapi.animation.timeline.Eases;
import net.minecraft.world.phys.Vec3;
// Create timeline
Timeline timeline = new Timeline();
// Add position animation
Vec3 startPos = new Vec3(0, 0, 0);
Vec3 endPos = new Vec3(10, 5, 0);
timeline.addPositionAnimation(
startPos,
endPos,
200, // Duration (ticks)
Eases.easeInOutCubic // Ease function
);
// Add scale animation
timeline.addScaleAnimation(
1.0,
2.0,
200,
Eases.easeOutBounce
);
// Start timeline
timeline.start();
Effect System
Creating Composite Effects
import com.qituo.dcrapi.effects.EffectManager;
import net.minecraft.world.phys.Vec3;
// Create effect
Vec3 position = new Vec3(0, 0, 0);
int effectId = EffectManager.createEffect(position);
// Add particle to effect
EffectManager.addParticleToEffect(effectId, ParticleTypes.FLAME);
// Add animation to effect
EffectManager.addAnimationToEffect(effectId, "spiral", 2.0, 0.1);
// Start effect
EffectManager.startEffect(effectId);
Development Guide
Dependency Configuration
Add the following dependency to your mod's build.gradle file:
dependencies {
implementation fg.deobf("com.qituo:dcrapi:1.0.0")
}
Registering Particle Types
import com.qituo.dcrapi.particles.DcRenderApiParticleManager;
import net.minecraft.core.particles.SimpleParticleType;
import net.minecraftforge.registries.RegistryObject;
// Register custom particle type
public static final RegistryObject<SimpleParticleType> CUSTOM_PARTICLE =
DcRenderApiParticleManager.PARTICLE_TYPES.register(
"custom_particle",
() -> new SimpleParticleType(false)
);
Custom Particle Emitters
import com.qituo.dcrapi.particles.emitters.ParticleEmitter;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.world.phys.Vec3;
// Create custom particle emitter
public class CustomEmitter implements ParticleEmitter {
private Vec3 position;
private int particleCount;
public CustomEmitter(Vec3 position, int particleCount) {
this.position = position;
this.particleCount = particleCount;
}
@Override
public void emit() {
// Custom emission logic
for (int i = 0; i < particleCount; i++) {
// Calculate emission position
Vec3 emitPos = position.add(
(Math.random() - 0.5) * 2,
(Math.random() - 0.5) * 2,
(Math.random() - 0.5) * 2
);
// Emit particle
// Here you can use DcRenderApiParticleManager.createParticle
}
}
@Override
public void update() {
// Custom update logic
}
@Override
public boolean isAlive() {
// Custom alive logic
return true;
}
}
Custom Particle Styles
import com.qituo.dcrapi.particles.style.ParticleStyle;
import net.minecraft.world.phys.Vec3;
// Create custom particle style
public class CustomStyle implements ParticleStyle {
private float size;
private float alpha;
private Vec3 color;
private float lifetime;
public CustomStyle(float size, float alpha, Vec3 color, float lifetime) {
this.size = size;
this.alpha = alpha;
this.color = color;
this.lifetime = lifetime;
}
@Override
public float getSize() {
return size;
}
@Override
public float getAlpha() {
return alpha;
}
@Override
public Vec3 getColor() {
return color;
}
@Override
public float getLifetime() {
return lifetime;
}
@Override
public void update() {
// Custom update logic
size *= 0.99f;
alpha *= 0.95f;
}
}
Custom Animations
import com.qituo.dcrapi.animation.Animate;
import net.minecraft.world.phys.Vec3;
// Create custom animation
public class CustomAnimation implements Animate {
private Vec3 startPos;
private Vec3 endPos;
private int duration;
private int ticks;
public CustomAnimation(Vec3 startPos, Vec3 endPos, int duration) {
this.startPos = startPos;
this.endPos = endPos;
this.duration = duration;
this.ticks = 0;
}
@Override
public Vec3 animate() {
float progress = (float) ticks / duration;
progress = Math.min(progress, 1.0f);
// Custom animation logic
return startPos.add(endPos.subtract(startPos).scale(progress));
}
@Override
public boolean isDone() {
return ticks >= duration;
}
@Override
public void tick() {
ticks++;
}
}
License
This project is licensed under the QSUP License. See the LICENSE.md file for details.
Contributing
Welcome to submit Issues and Pull Requests to improve this project!
Contact
- GitHub: 19136644525lxy/DC-Render-API
Available Versions
How to Install DC Render API on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set forge Loader
In the panel under "Egg", select the forge loader and matching Minecraft version (1.20.1).
Install Mod
Open the mod browser in the dashboard and search for "DC Render API". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
1.20.1
Server-side
✓ RequiredRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
DC Render API server crashes on startup – what to do?
Most common cause: wrong forge version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.20.1). You can switch loaders with one click in the panel.
Is DC Render API compatible with forge?
DC Render API officially supports forge for Minecraft 1.20.1. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with DC Render API – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if DC Render API consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install DC Render API with just one click on your server.