csontgolyo

Develop a Minecraft mod that introduces a customizable "Copycat Block" modeled after a Koenigsegg Jesko car, designed to fit aroumd a 3x9x1 platform. The full structure should have dimensions of 5x11x3, allowing players to replicate and create large-scale designs, with options for different textures and colors. Include permissions for usage and a configuration file for customizing the block's properties. The copycat blocks should be working like the mod "framed blocks" or "create copycats".

Kodari AI
KodariSep 9 at 4:37 am 2
JeskoCopycatBlock
Adds a customizable Copycat Block inspired by a Koenigsegg Jesko, fitting a 3x9x1 platform with overall 5x11x3 dimensions. Players can replicate large-scale designs using framed-block mechanics, with configurable textures, colors, and properties via a configuration file. Includes permission checks for placement and usage, supporting both survival and creative modes. The block mimics adjacent block appearances while maintaining structural integrity, similar to Framed Blocks or Create Copycats, with full Fabric API integration for 1.21.1.
  1. Build the Fabric 1.21.11 project structure and metadata.

  2. Add the configurable Copycat Block, block entity storage, placement/use behavior, and permissions.

  3. Add client rendering, item models, language, recipes, and configuration resources.

  1. Created a complete Fabric 1.21.11 project with Yarn mappings, split client source sets, Gradle configuration, and mod metadata.

  2. Added the configurable Jesko Copycat Block with:

    • Block entity-backed copied block appearance

    • Right-click block copying

    • Sneak-right-click clearing

    • Copied appearance preserved when broken and replaced

    • Configurable hardness, blast resistance, permissions, and block-entity appearance behavior

  3. Added server-side permission checks using the configured permission level.

  4. Added client block-entity rendering that displays the copied block model.

  5. Added registration, creative-tab integration, crafting recipe, block state, item definition, model, language file, and generated JSON configuration support.

csontgolyo

The compilation failed with this error:

code
Compilation failed with 20 error(s):

ERROR in src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java at line 4: cannot find symbol
import net.minecraft.client.render.CameraRenderState;
                                  ^
  symbol: class CameraRenderState
  location: package net.minecraft.client.render

ERROR in src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java at line 31: cannot find symbol
            CameraRenderState camera
            ^
  symbol: class CameraRenderState
  location: class CopycatBlockEntityRenderer

ERROR in src/main/java/com/kodari/jeskocopycat/item/CopycatBlockItemData.java at line 36: cannot find symbol
        return Registries.BLOCK.getOrEmpty(identifier)
                               ^
  symbol: method getOrEmpty(Identifier)
  location: variable BLOCK of type DefaultedRegistry<Block>

ERROR in src/main/java/com/kodari/jeskocopycat/interaction/CopycatInteraction.java at line 32: isClient has private access in World
        if (world.isClient) {
                 ^

ERROR in src/main/java/com/kodari/jeskocopycat/interaction/CopycatInteraction.java at line 38: cannot find symbol
                || !serverPlayer.hasPermissionLevel(CopycatConfig.get().permissionLevel)) {
                                ^
  symbol: method hasPermissionLevel(int)
  location: variable serverPlayer of type ServerPlayerEntity

ERROR in src/main/java/com/kodari/jeskocopycat/block/CopycatBlock.java at line 36: isClient has private access in World
        if (!world.isClient && world.getBlockEntity(pos) instanceof CopycatBlockEntity blockEntity) {
                  ^

ERROR in src/main/java/com/kodari/jeskocopycat/block/CopycatBlock.java at line 46: onBreak(World,BlockPos,BlockState,PlayerEntity) in CopycatBlock cannot override onBreak(World,BlockPos,BlockState,PlayerEntity) in Block
    public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
                ^

ERROR in src/main/java/com/kodari/jeskocopycat/block/CopycatBlock.java at line 45: method does not override or implement a method from a supertype
    @Override
    ^

ERROR in src/main/java/com/kodari/jeskocopycat/block/CopycatBlock.java at line 47: isClient has private access in World
        if (!world.isClient && !player.isCreative() && world.getBlockEntity(pos) instanceof CopycatBlockEntity blockEntity) {
                  ^

ERROR in src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java at line 21: method does not override or implement a method from a supertype
    @Override
    ^

ERROR in   src/main/java/com/kodari/jeskocopycat/block/CopycatBlock.java at line 46: onBreak(World,BlockPos,BlockState,PlayerEntity) in CopycatBlock cannot override onBreak(World,BlockPos,BlockState,PlayerEntity) in Block
      public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
                  ^

ERROR in   src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java at line 4: cannot find symbol
  import net.minecraft.client.render.CameraRenderState;
                                    ^
  symbol: class CameraRenderState
  location: package net.minecraft.client.render

ERROR in   src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java at line 31: cannot find symbol
              CameraRenderState camera
              ^
  symbol: class CameraRenderState
  location: class CopycatBlockEntityRenderer

ERROR in   src/main/java/com/kodari/jeskocopycat/interaction/CopycatInteraction.java at line 32: isClient has private access in World
          if (world.isClient) {
                   ^

ERROR in   src/main/java/com/kodari/jeskocopycat/block/CopycatBlock.java at line 36: isClient has private access in World
          if (!world.isClient && world.getBlockEntity(pos) instanceof CopycatBlockEntity blockEntity) {
                    ^

ERROR in   src/main/java/com/kodari/jeskocopycat/block/CopycatBlock.java at line 47: isClient has private access in World
          if (!world.isClient && !player.isCreative() && world.getBlockEntity(pos) instanceof CopycatBlockEntity blockEntity) {
                    ^

ERROR in   src/main/java/com/kodari/jeskocopycat/block/CopycatBlock.java at line 45: method does not override or implement a method from a supertype
      @Override
      ^

ERROR in   src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java at line 21: method does not override or implement a method from a supertype
      @Override
      ^

ERROR in   src/main/java/com/kodari/jeskocopycat/item/CopycatBlockItemData.java at line 36: cannot find symbol
          return Registries.BLOCK.getOrEmpty(identifier)
                                 ^
  symbol: method getOrEmpty(Identifier)
  location: variable BLOCK of type DefaultedRegistry<Block>

ERROR in   src/main/java/com/kodari/jeskocopycat/interaction/CopycatInteraction.java at line 38: cannot find symbol
                  || !serverPlayer.hasPermissionLevel(CopycatConfig.get().permissionLevel)) {
                                  ^
  symbol: method hasPermissionLevel(int)
  location: variable serverPlayer of type ServerPlayerEntity


=== COMPILATION ERROR ANALYSIS ===

MISSING CLASSES:
  - CameraRenderState
ACTION: Create these classes or check imports

MISSING METHODS:
  - getOrEmpty(Identifier)
  - hasPermissionLevel(int)
ACTION: Check method names and signatures

FILES TO INVESTIGATE:
  - src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java
  - src/main/java/com/kodari/jeskocopycat/item/CopycatBlockItemData.java
  - src/main/java/com/kodari/jeskocopycat/interaction/CopycatInteraction.java
  - src/main/java/com/kodari/jeskocopycat/block/CopycatBlock.java
  -   src/main/java/com/kodari/jeskocopycat/block/CopycatBlock.java
  -   src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java
  -   src/main/java/com/kodari/jeskocopycat/interaction/CopycatInteraction.java
  -   src/main/java/com/kodari/jeskocopycat/item/CopycatBlockItemData.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariSep 9 at 4:40 am 2
  1. Correct the 1.21.11 render-state package and renderer override.

  2. Update registry, world-side, permission, and block replacement APIs.

  3. Preserve copycat drops through the current server-side replacement hook.

Fixed the Fabric 1.21.11 compilation errors:

  • Moved CameraRenderState import to net.minecraft.client.render.state.

  • Replaced Registries.BLOCK.getOrEmpty() with getOptional().

  • Updated world.isClient to world.isClient().

  • Replaced hasPermissionLevel() with serverPlayer.getCommandSource().hasPermissionLevel(...).

  • Replaced the removed onBreak() override with the 1.21.11 onStateReplaced(...) hook.

  • Preserved custom copycat block drops during block replacement.

csontgolyo

The compilation failed with this error:

code
Compilation failed with 6 error(s):

ERROR in src/main/java/com/kodari/jeskocopycat/item/CopycatBlockItemData.java at line 36: no suitable method found for getOptional(Identifier)
        return Registries.BLOCK.getOptional(identifier)
                               ^

ERROR in src/main/java/com/kodari/jeskocopycat/interaction/CopycatInteraction.java at line 39: cannot find symbol
                        .hasPermissionLevel(CopycatConfig.get().permissionLevel)) {
                        ^
  symbol: method hasPermissionLevel(int)
  location: class ServerCommandSource

ERROR in src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java at line 21: method does not override or implement a method from a supertype
    @Override
    ^

ERROR in   src/main/java/com/kodari/jeskocopycat/item/CopycatBlockItemData.java at line 36: no suitable method found for getOptional(Identifier)
          return Registries.BLOCK.getOptional(identifier)
                                 ^

ERROR in   src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java at line 21: method does not override or implement a method from a supertype
      @Override
      ^

ERROR in   src/main/java/com/kodari/jeskocopycat/interaction/CopycatInteraction.java at line 39: cannot find symbol
                          .hasPermissionLevel(CopycatConfig.get().permissionLevel)) {
                          ^
  symbol: method hasPermissionLevel(int)
  location: class ServerCommandSource


=== COMPILATION ERROR ANALYSIS ===

MISSING METHODS:
  - hasPermissionLevel(int)
ACTION: Check method names and signatures

FILES TO INVESTIGATE:
  - src/main/java/com/kodari/jeskocopycat/item/CopycatBlockItemData.java
  - src/main/java/com/kodari/jeskocopycat/interaction/CopycatInteraction.java
  - src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java
  -   src/main/java/com/kodari/jeskocopycat/item/CopycatBlockItemData.java
  -   src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java
  -   src/main/java/com/kodari/jeskocopycat/interaction/CopycatInteraction.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariSep 9 at 12:26 pm 2
  1. Replaced getOptional with Yarn 1.21.11’s getOptionalValue.

  2. Replaced hasPermissionLevel with ServerCommandSource.hasPermission.

  3. Updated updateRenderState to the 1.21.11 renderer signature with camera position and crumbling-overlay parameters.

  4. Added the required renderer imports.

The corrected artifact has been applied to the affected files.

csontgolyo

The compilation failed with this error:

code
Compilation failed with 6 error(s):

ERROR in src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java at line 8: cannot find symbol
import net.minecraft.client.render.command.CrumblingOverlayCommand;
                                          ^
  symbol: class CrumblingOverlayCommand
  location: package net.minecraft.client.render.command

ERROR in src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java at line 29: cannot find symbol
            CrumblingOverlayCommand crumblingOverlay
            ^
  symbol: class CrumblingOverlayCommand
  location: class CopycatBlockEntityRenderer

ERROR in src/main/java/com/kodari/jeskocopycat/interaction/CopycatInteraction.java at line 39: cannot find symbol
                        .hasPermission(CopycatConfig.get().permissionLevel)) {
                        ^
  symbol: method hasPermission(int)
  location: class ServerCommandSource

ERROR in   src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java at line 8: cannot find symbol
  import net.minecraft.client.render.command.CrumblingOverlayCommand;
                                            ^
  symbol: class CrumblingOverlayCommand
  location: package net.minecraft.client.render.command

ERROR in   src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java at line 29: cannot find symbol
              CrumblingOverlayCommand crumblingOverlay
              ^
  symbol: class CrumblingOverlayCommand
  location: class CopycatBlockEntityRenderer

ERROR in   src/main/java/com/kodari/jeskocopycat/interaction/CopycatInteraction.java at line 39: cannot find symbol
                          .hasPermission(CopycatConfig.get().permissionLevel)) {
                          ^
  symbol: method hasPermission(int)
  location: class ServerCommandSource


=== COMPILATION ERROR ANALYSIS ===

MISSING CLASSES:
  - CrumblingOverlayCommand
ACTION: Create these classes or check imports

MISSING METHODS:
  - hasPermission(int)
ACTION: Check method names and signatures

FILES TO INVESTIGATE:
  - src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java
  - src/main/java/com/kodari/jeskocopycat/interaction/CopycatInteraction.java
  -   src/main/java/client/java/com/kodari/jeskocopycat/client/CopycatBlockEntityRenderer.java
  -   src/main/java/com/kodari/jeskocopycat/interaction/CopycatInteraction.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariSep 9 at 12:36 pm 3
  1. Correct the 1.21.11 renderer callback type and signature.

  2. Replace the unavailable command permission API with the server-player permission check supported by this mapping.

Fixed the remaining compilation errors:

  • Replaced the missing CrumblingOverlayCommand import with ModelCommandRenderer.CrumblingOverlayCommand.

  • Updated the renderer’s updateRenderState parameter type.

  • Replaced the unavailable integer permission method with:

    Java
    serverPlayer.getPermissions().hasPermission(
        new Permission.Level(PermissionLevel.fromLevel(permissionLevel))
    )
    
  • Confirmed block lookup uses Registries.BLOCK.getOptionalValue(identifier).

The corrected artifact has been applied.

csontgolyo

There is only 1 block while the stucture needs to be buildt with around 70-85 block that wrpas around a 3x7-9 platfrom, plus some of the blocks should have multiple copycat parts

Kodari AI
KodariSep 9 at 12:58 pm 2
  1. Trace the current structure-generation and copycat-part code.

  2. Expand the structure into the requested 3×7–9 platform wrapper with varied copycat parts and verify registrations/assets.

The current layout would place 103 blocks, so I’m tightening it to 83 blocks: a 3×9 platform, two-layer perimeter, and eight raised corner/side pieces. Those eight pieces will render two copied parts each.

  1. Added CopycatStructureGenerator, triggered by sneak-clicking an existing copycat block with an empty hand.

  2. The generated structure contains 83 copycat blocks arranged around a 3×7 platform.

  3. Added perimeter layers and raised side elements for a wrapped platform design.

  4. Extended CopycatBlockEntity to support multiple copied parts per block.

  5. Updated the client render state and renderer to render every copycat part.

  6. Eight raised blocks contain multiple parts, including dark oak logs and lanterns.

  7. Existing single-part copycat blocks remain compatible through legacy data loading.

csontgolyo

There is still only one block, MAKE THAT SO THERE IS 1 BLOCK FOR EVERY PART OF THE CAR plus fix the issue with blocks copying bc i can't put blocks in it

Kodari AI
KodariSep 9 at 1:25 pm 2
  1. Map the current car-part layout and placement interaction.

  2. Generate one copycat block per car part and make block insertion work reliably.

  3. Update rendering/state handling only where required for multi-part blocks.

  1. Reworked the generated car structure to contain 80 individual copycat blocks:

    • 27 blocks for the 3×9 platform

    • 18 side supports

    • 14 glass side sections

    • 6 front/rear bumper blocks

    • 15 raised roof/details blocks

  2. Removed the multi-part lantern block so every car part now has its own copycat block.

  3. Fixed block insertion by validating the held item as a BlockItem directly instead of relying on Block.getBlockFromItem.

  4. Added block-entity synchronization after copying, so changes are sent to the client and become visible immediately.

  5. Removed duplicate update handling that could prevent copied blocks from refreshing correctly.

The corrected artifact has been applied.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
23 750
src/client/java/com/kodari/jeskocopycat/JeskoCopycatClient.java
package com.kodari.jeskocopycat;

import com.kodari.jeskocopycat.block.entity.ModBlockEntities;
import com.kodari.jeskocopycat.client.CopycatBlockEntityRenderer;
import net.fabricmc.api.ClientModInitializer;
import net.minecraft.client.render.block.entity.BlockEntityRendererFactories;

public class JeskoCopycatClient implements ClientModInitializer {
    @Override
    public void onInitializeClient() {
        BlockEntityRendererFactories.register(ModBlockEntities.COPYCAT_BLOCK_ENTITY, CopycatBlockEntityRenderer::new);
    }
}