the_deep_forest-1.0.0-neoforge-26.1.2.jar
Curse Maven Snippet
What's new
Changelog
1.0.0 - Initial release
Target: Minecraft 26.1.2, NeoForge. Mod ID: the_deep_forest.
Registry content
Blocks and items
| ID | Notes |
|---|---|
deepwood_log |
Log block; tagged minecraft:logs_that_burn, mineable/axe |
deepwood_planks |
Tagged minecraft:planks, mineable/axe |
deepwood_leaves |
UntintedParticleLeavesBlock (pale oak leaf particle), cutout-mipped transparency, light dampening 1; tagged minecraft:leaves, mineable/hoe |
deepwood_sapling |
SaplingBlock with TreeGrower pointing at the_deep_forest:deepwood_tree; tagged minecraft:saplings |
deepwood_sign / deepwood_wall_sign |
Standing and wall sign on wood type the_deep_forest:deepwood_sign (BlockSetType.OAK); entity texture at textures/entity/signs/deepwood_sign.png |
black_tulip |
Cross-model flower; tagged minecraft:small_flowers |
compressed_xylem |
Intermediate crafting block; mineable/axe |
burnt_compressed_xylem |
Portal frame block; mineable/pickaxe, needs_iron_tool |
corrupting_obsidian |
Transitional block for the portal ignition animation; unbreakable, no item |
deep_forest_portal |
Portal block implementing net.minecraft.world.level.block.Portal; unbreakable, no item, light level 11 |
portal_sign |
Horizontal-facing attachment block for portal configuration |
Recipes
| Recipe | Type | Result |
|---|---|---|
deepwood_planks |
Shapeless: 1 deepwood_log |
4 deepwood_planks |
compressed_xylem |
Shapeless: dark oak log, warped stem, spruce log, mangrove log | 1 compressed_xylem |
burnt_compressed_xylem |
Smelting, 200 ticks, 0.3 XP | 1 burnt_compressed_xylem |
deepwood_sign |
Shaped: 6 planks + 1 stick | 3 deepwood_sign |
portal_sign |
Shaped 3x3: signs in corners, emeralds on edges, deepwood_log center |
1 portal_sign |
black_dye_from_black_tulip |
Shapeless | 1 minecraft:black_dye |
Loot
deepwood_leaves: drops itself with shears or Silk Touch; otherwise 5% sapling chance (Fortune-scaled) and the standard stick roll.corrupting_obsidiananddeep_forest_portalhave no drops.
Creative tab
the_deep_forest_tab, icondeep_forest_portal.deepwood_leavesis inserted afterdeepwood_planksthroughBuildCreativeModeTabContentsEvent, since its element is code-locked.
Other registrations
- POI type
the_deep_forest:deep_forest_portal, covering every state ofdeep_forest_portal. Registered viaRegisterEventonRegistries.POINT_OF_INTEREST_TYPE. - Tree decorator types
the_deep_forest:trim_loose_leavesandthe_deep_forest:deep_roots, registered viaRegisterEventonRegistries.TREE_DECORATOR_TYPE.
World generation
Dimension the_deep_forest:the_deep_forest_dimension
- Dimension type:
coordinate_scale64. The Nether's scale of 8 gives an effective 1:8 between the Deep Forest and the Nether.min_y0,height256.
- Generator:
minecraft:noisewith inline noise settings.minecraft:fixedbiome source pointing atthe_deep_forest:the_deep_forest.- Settings:
sea_level7,aquifers_enabledfalse,ore_veins_enabledfalse,disable_mob_generationtrue,default_blockdirt,default_fluidwater.
- Noise router:
- All climate inputs are zeroed.
final_densityandpreliminary_surface_levelboth use density functionthe_deep_forest:deep_forest/surface_height, added to ay_clamped_gradient(0 to -256 over y 0–256), which gives a heightmap-style surface.find_top_surfaceis bounded to y 0–32.
surface_height:- The base terrain is a
cache_2dsample of noise with about ±2.5 blocks of variation around the base height. - Rivers come from a narrow band of
minecraft:surface_secondarynoise sampled atxz_scale0.12: threshold 0.0025, multiplier 500. - Channel width and depth were tuned offline against a reimplementation of
NormalNoiseto give channels about 3 blocks wide and 2 deep.
- The base terrain is a
- Surface rule:
- Bedrock at y 0.
- Grass block on the floor surface when not underwater.
- Dirt everywhere else.
Biome the_deep_forest:the_deep_forest
- Not injected into any vanilla biome source:
- Overworld, Nether and cave spawning are all disabled.
- No biome tags.
- No structures.
- Spawn entries are empty.
- Default features: forest grass and plains tall grass.
- Custom sky, fog, water, water-fog, grass and foliage colors.
Feature the_deep_forest:deepwood_tree
minecraft:random_selectorover fourminecraft:treeconfigurations, all with a straight trunk placer:Weight Foliage placer Base trunk height 0.30 Blob 7 0.43 Random spread 6 0.50 Fancy 8 Default Wide random spread 7 Decorators on every configuration, in order:
trim_loose_leaves, thendeep_roots.Placement: count 1, in square, surface water depth 0,
OCEAN_FLOORheightmap, biome filter, sapling survival filter.Added to the biome only, via the NeoForge biome modifier
deepwood_tree_biome_modifier(vegetal_decoration).
Feature the_deep_forest:black_tulip
- Flower patch: count 128, xz spread ±10.
- Placed feature with
rarity_filter120. - Added to the biome only, via
black_tulip_biome_modifier.
Tree decorators
TrimLooseLeavesDecorator:- Runs a breadth-first search from the tree's logs through its own leaves, up to distance 6, matching the vanilla leaf decay limit.
- Removes any leaf the search doesn't reach.
- This keeps random-spread canopies from producing leaves that decay right after generation.
DeepRootsDecorator: extends the lowest log 2 blocks downward, replacing#minecraft:dirt,#minecraft:sandor gravel. It stops at the first block that doesn't qualify.
Portal system
Ignition (CorruptingObsidianBlock)
- Trigger:
BlockEvent.EntityPlaceEventfor obsidian queues a check 1 tick later. - The check (
tryIgnite) tests both horizontal axes for a 1x2 interior of obsidian enclosed by a 6-blockburnt_compressed_xylemframe. - When it matches, both interior blocks become
corrupting_obsidianwith anAXISstate. - Animation:
STAGE0–7, 10 ticks per stage, 4 seconds in total, advanced by scheduled ticks.- The collision and outline shape thins per stage, from 16 to 4 px.
- Light level is
2 + stage. - Server-side dust particles (
DustParticleOptions(0x050806, 2.2F)) and glow particles, plus sculk spread and catalyst sounds.
- At stage 7 each block is replaced with
deep_forest_portal(flags 18), and the bottom block registers the portal inPortalRegistry. - If the frame stops validating mid-animation, the block reverts to obsidian.
Portal block (DeepForestPortalBlock)
- Shape and frame:
- Horizontal
AXISstate with a 4 px column shape. updateShapereplaces the block with air when the frame no longer validates.
- Horizontal
- Teleport behavior:
entityInsidecallssetAsInsidePortal.- The transition time follows the vanilla Nether portal game rules (default and creative delay).
- Local transition:
CONFUSION.
- Portal identity is the bottom interior block position plus the dimension ID.
getPortalDestinationresolves the destination in this order:- Destination dimension.
- Portals in the Overworld or Nether lead to the Deep Forest.
- Deep Forest portals follow their
toNethertoggle, unless split mode applies (see below).
- Explicit link. Used if it is set, still points at a portal block, and isn't in the same dimension. A stale link is cleared.
- Travel partner for the destination dimension, if that block is still a portal. A stale partner is removed.
- POI search in a square around the scaled position, closest first: radius 128 in the Overworld, 16 elsewhere.
- New portal, via
createPortal.
- Destination dimension.
- After resolving, the pairing is recorded in both directions with
putIfAbsent, keyed per dimension, so an existing partner is never overwritten by travel. - Coordinate scaling uses
DimensionType.getTeleportationScaleand applies to X and Z only. createPortal:- Searches a 16-block spiral around the target.
- Dimensions with a ceiling get a per-column vertical scan for an air pocket on solid ground.
- Open dimensions take the surface Y from the
MOTION_BLOCKING_NO_LEAVESheightmap, read after the chunk has been loaded. This fixesLevel#getHeightreturningminYfor unloaded chunks, which buried new portals. - Placements with clearance on both sides are preferred.
- If nothing fits, it builds a 3x3 platform with clearance.
- The new portal is registered.
affectNeighborsAfterRemoval:- Removes the registry entries for
posandpos.below(). - Removes the destroyed portal from every partner's
pairs. - Refreshes labels on any former partners in loaded chunks.
- Removes the registry entries for
- Client:
animateTickemits glow particles and ink dust.ClientEffects(client-only subscriber) tracks whether the player's last portal contact was a Deep Forest portal.- During
RenderGuiLayerEvent.PreforVanillaGuiLayers.CAMERA_OVERLAYS, it temporarily zeroesportalEffectIntensityandoPortalEffectIntensity, so the vanilla Nether overlay draws nothing. - In
Post, it restores both values and blits the Deep Forest portal sprite using the vanilla alpha curve. - The confusion wobble and sound are unchanged.
Split-sided portals
- A Deep Forest portal is split when all of the following hold:
- It has partners in both
minecraft:overworldandminecraft:the_nether. - A
portal_signis attached to its top frame block.
- It has partners in both
- Destination by entry side:
- The sign side leads to the Overworld; the back leads to the Nether.
- Entry side is the sign of the dot product between the entity's horizontal look vector and the sign's facing.
- If the look vector is close to vertical, the entity's position relative to the portal plane is used instead.
- An explicit link only applies on the side whose dimension matches it.
PortalRegistry (SavedData)
- Stored server-wide through
server.getDataStorage(),SavedDataTypeIDthe_deep_forest:portals. - Codec fields per entry:
dim,posname(max 32)to_netherlink_dim/link_pos(both optional)pairs(an unboundedString -> BlockPosmap, defaulting to empty)
- Queries:
find,ensure,remove,nearby(square radius, sorted by horizontal distance),pairedWith,pairIn.
Portal Sign
Block (PortalSignBlock)
FACING, with a 2 px plaque shape rotated from a north-facing box.- Placement is only allowed on the front or back face of a
burnt_compressed_xylemblock that has a portal directly below it, on a face axis that differs from the portal axis. - A second sign on the opposite face is destroyed on placement.
canSurviveandupdateShapekeep the sign tied to its supporting frame block.- Right-clicking a lit portal's sign opens the configuration screen.
Networking (PortalSignNetwork)
- Payloads are registered in
RegisterPayloadHandlersEventunder registrarthe_deep_forest. OpenSign(server to client) carries:- Portal dimension and position, name, the
toNethertoggle. - Flags:
deepForestSide,splitSides,canOverride,refresh. - Partner and link summaries.
- Two candidate lists, natural range and override range, each capped at 96 entries.
- Portal dimension and position, name, the
SignAction(client to server): rename, toggle, link, unlink.- Every action is re-validated on the server:
- Distance to the portal (10 blocks).
- That the target block is a portal.
- Rename: control characters stripped, length capped at 32.
- Toggle: Deep Forest only.
- Link targets: must be in a different dimension and appear in the candidate list computed server-side for that player.
- Candidate lists:
- Natural range: 1024 blocks in the Overworld, 128 in the Nether, 16 in the Deep Forest. This range is symmetric across the 64x scale.
- Override range: 4x the natural range, and only computed for creative players or players with
Permissions.COMMANDS_GAMEMASTER. - The current partners are listed first. Portals whose partner is this portal are always included.
- Entries confirmed missing in loaded chunks are pruned from the registry.
- Linking sets
pairs[targetDim], replacing the previous partner in that dimension. Switching a link to another dimension drops the old link's partner entry. Unlinking removes the partner that came from the link. - After an action, the server refreshes the screen for every player near the portal. A refresh packet only updates a screen that is already open for that portal and never reopens a closed one.
Screen (PortalSignScreen, client only)
- Built from
LinearLayoutandFrameLayout. - Main page:
- Name field (max 32), with save on Done or Enter.
- Clear name.
- Toggle, or a split-sides notice.
- Partner and link status.
- Link and clear-link buttons, and the admin override button.
- Link page:
- Rows sized to the window height.
- Mouse-wheel scrolling plus up/down buttons and a position readout.
- The current partners are disabled and highlighted.
Labels (PortalSignLabels)
- Labels are
Display.TextDisplayentities withFIXEDbillboard and 0.5 scale. - The name label sits flat on the sign plaque and is tagged
the_deep_forest_portal_name. - Split portals get "Overworld" and "Nether" labels on each face of the top portal block, 0.45 blocks out to clear the particle spread, tagged
the_deep_forest_portal_side. - The private display setters are resolved by reflection once and cached.
- Labels are rebuilt on rename, link changes, sign placement and removal, partner changes, and portal removal.
- Clicking a sign only rebuilds labels when the label count doesn't match the expected state.
- When a tagged label loads from disk (
EntityJoinLevelEvent), it is dropped if its sign or portal is gone, or, for side labels, if the portal is no longer split. Positions that aren't loaded are left alone.
Compatibility
- Experimental settings warning. A mixin on
WorldDimensions#checkStabilityreturnsLifecycle.stable()for dimensions in thethe_deep_forestnamespace. Vanilla treats any non-vanilla dimension as experimental, which made world creation show the experimental settings warning. Dimensions from other mods are not affected. - Coexistence with vanilla portals. The mod adds no new obsidian or portal logic to vanilla Nether portals. The ignition hook only reacts to obsidian placed inside a valid xylem frame.
Fixes and hardening in this release
- Sign actions now check distance before looking up the block at the client-supplied position. Previously a crafted packet could force-load a chunk anywhere.
- The candidate list writer now caps its length at the same limit as the reader. A portal referenced by many partner portals could previously write more entries than the client would read, corrupting the packet and disconnecting the client.
- Delayed obsidian ignition now checks that its server and level are still live. The shared work queue survives a singleplayer world exit and could otherwise run against a stopped level.
- Label reflection lookups are cached instead of resolved on every spawn.
- Removed an unused duplicate sign entity texture.
This mod has no additional files