- Java 71.4%
- Python 19.6%
- Kotlin 7.1%
- Shell 1.1%
- JavaScript 0.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Per-character skins, Shrek's ears and nose, the guard's crest, and the preview renderer. |
||
| .forgejo/workflows | ||
| buildSrc | ||
| docs | ||
| gradle/wrapper | ||
| src/main | ||
| tools | ||
| .gitattributes | ||
| .gitignore | ||
| build.fabric.gradle.kts | ||
| build.neoforge.gradle.kts | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| README.md | ||
| RELEASE_NOTES.md | ||
| settings.gradle.kts | ||
| stonecutter.gradle.kts | ||
| stonecutter.properties.toml | ||
The Perfect Place Mod
Shrek references in Minecraft, for Fabric and NeoForge. A private mod for us, not for CurseForge or Modrinth.
| Minecraft | Fabric | NeoForge |
|---|---|---|
| 1.21.1 | ✔ | ✔ |
| 1.21.11 | ✔ | ✔ |
| 26.3 | ✔ | ✔ |
What is in it
Duloc spawns once per world, somewhere within 5000 blocks of the world origin (the first 10000 x 10000), on plains if there are any (otherwise another flat-ish biome). It has:
- a town wall and gate, a fountain plaza and signs with the rules of Duloc;
- the welcome booth: dancing puppets and the Duloc Music Box. Walk up to it (or press it): it plays the welcome song, and when the song ends it takes a picture and everybody in the booth gets a Souvenir Photo;
- twenty identical houses, and the bakery of the Muffin Man on Drury Lane (right-click him for muffins, cookies, gumdrop buttons and blocks of dough);
- the castle with a very tall tower, the throne hall and Lord Farquaad on his throne (right-click him), his guards, and two Gingerbread Men in the kitchen (hit one and a gumdrop button falls off).
Rules of Duloc: break a block in town or attack His Lordship and you are wanted for five in-game days of playtime (the timer only runs while you are online, and it survives a restart). The guards come for you.
Shrek's swamp spawns once per world in a mangrove swamp within 5000 blocks of the origin; without one it takes a normal swamp, and without that it searches up to 16000 blocks out. It has Shrek's house (chimney smoke included), the outhouse, the mud pool, an onion garden and Donkey. Come within 20 blocks of the house and Shrek yells "GET OUT OF MY SWAMP!" and chases you until you are out of his territory, then walks home. Hit him and earwax may fall off.
Donkey wants a waffle (2 wheat, an egg and sugar, shapeless). After the first one he is your friend: he follows you and does not stop talking. Every waffle after that makes him run faster for a minute.
Both places, and the Magic Mirror, are findable: /locate structure perfectplace:duloc and
/locate structure perfectplace:shreks_swamp.
Items
- Onion (grow them from onion seeds; one onion crafts into two seeds). Onions have layers: every onion you eat peels the next of four layers, each with its own effect, and the mod remembers which layer you are on.
- Earwax + string = Earwax Candle (a candle like the vanilla ones).
- Magic Mirror (gold ingots around a glass pane, an amethyst shard below): use it to see where Duloc is, sneak and use it for the swamp. It answers with a compass direction and a rough distance, and fires a sparkle that way: follow it to see which way to walk.
- Muffin, Waffle, Gumdrop Button (food).
- Block 'o Dough (nine cookies in a crafting table): a soft block, and cooking it in a furnace or a smoker gives the nine cookies back. Right-click it with a Gumdrop Button to press the button into that side of the block (sneak and right-click with an empty hand to take it off again).
The swamp fart: crouch in water with mud underneath for two seconds. Fish nearby will not survive it.
Mongo is a gingerbread man twelve blocks tall: three times an iron golem in health and in hitting power. There is
no spawn egg, because you build him. Put up a wall of Block 'o Dough thirteen blocks high and five wide, with a
gumdrop button pressed into the middle of the chest on three rows, exactly like this (0 is empty, x is a block of
dough, g is a block of dough with a gumdrop button on it):
00x00
0xxx0
0xxx0
0xxx0
xxgxx
xxxxx
xxgxx
xxxxx
0xgx0
0xxx0
0x0x0
0x0x0
0x0x0
The block that completes the shape wakes him up, and the dough is eaten in the process. Only the dough matters: the empty places in the drawing may be filled with more dough or with anything else. He guards the spot he was baked in against monsters, and he hits back when something hits him. He cannot stand water: in the rain or in water he melts, and that takes about twenty seconds. Build him indoors, or at least under a roof.
There are thirteen advancements in their own tab, and the mod is translated into Dutch.
Your own textures, shapes and sounds
Every character has his own 64 x 64 skin, painted by tools/datagen.py (needs Pillow) into
src/main/resources/assets/perfectplace/textures/entity/<name>.png. The layout is the classic skin layout (see
PPHumanoidModel; the donkey is in DonkeyModel), with the per-character extras — Shrek's ears, nose and belly,
Farquaad's crown, the guard's helmet and crest, the Muffin Man's toque — below y = 32. Paint in the generator rather
than in the PNGs, since running it overwrites them.
python3 tools/preview.py (Pillow and numpy) renders every mob from four angles plus a line-up on true relative scale
into build/previews/, using the same geometry, box UVs and renderer scales as the game, so a model or texture change
can be judged without launching a client.
To change a shape, edit PPHumanoidModel or DonkeyModel and mirror it in tools/preview.py, or export a Blockbench
model as Java (Mojang mappings) and paste it in.
The camera click, the swamp fart and the welcome jingle are real .ogg files, synthesised by tools/sounds.py
(needs pip install soundfile numpy; the script writes straight into assets/perfectplace/sounds/). Shrek's yell,
Lord Farquaad's speech and Donkey's chatter still point at vanilla sounds: those need recording, not synthesis. To
use your own sound, drop an .ogg in assets/perfectplace/sounds/ and point the entry in sounds.json at it, for
example
"shrek_yell": {"subtitle": "subtitles.perfectplace.shrek_yell", "sounds": ["perfectplace:shrek_yell"]}
for assets/perfectplace/sounds/shrek_yell.ogg. The welcome song is duloc_welcome; its length is
DulocMusicBoxBlock.SONG_TICKS (20 seconds now, 20 ticks per second).
Building
./gradlew build
builds every version and loader (jars in versions/<version>-<loader>/build/libs/). Gradle runs on Java 25; the
toolchains for Java 21 (1.21.x) and 25 (26.x) are picked automatically. Single versions:
./gradlew :1.21.1-neoforge:build, ./gradlew :26.3-fabric:runServer, …
The sources use Stonecutter and are written in 1.21.1 form; all Minecraft version differences are kept in the compatibility layer. See docs/UPDATING.md for adding a Minecraft version.
Generated resources come from two scripts (run from the repository root):
python3 tools/datagen.py(needs Pillow): textures, models, language files, recipes, loot tables, advancements, worldgen JSON;python3 tools/structures.py: the Duloc and swamp structure templates.
Releasing
Push a tag like v0.1.0. The Forgejo workflow builds every enabled version and publishes the jars as a release, with
RELEASE_NOTES.md as its text.
Layout
src/main/java/nl/bewerkt/perfectplace/common: the mod, version-neutral (entities, items, blocks, Duloc, the swamp, worldgen).src/main/java/nl/bewerkt/perfectplace/client: models and renderers.src/main/java/nl/bewerkt/perfectplace/compat: the version compatibility layer (guides indocs/compat/).src/main/java/nl/bewerkt/perfectplace/platform,mixin: loader entry points and mixins.tools/: resource generators, CI scripts and version rules.buildSrc/: Gradle helpers, including the per-version resource transform.