Jump to content

DefectiveProgram

Members
  • Posts

    8
  • Joined

Posts posted by DefectiveProgram

  1. 23 minutes ago, blinky000 said:

    newmtl Material1
    Ka 1.000000 1.000000 1.000000
    Kd 1.000000 1.000000 1.000000
    d 1.000000
    d 1.0

    Hmmm... Those values work just fine for me... Don't know what could be the issue there...

     

    25 minutes ago, blinky000 said:

    map_Kd minecraft:blocks/stone_bricks

     

     2nd problem can't get it to use minecraft textures,  tried with / without doman , and with/without blocks

    Back in 1.13, Mojang dropped the plural off alot of the directories. So textures/blocks is now textures/block.

  2. This thread was made before Forge blockstates were fixed for 1.14.4. With their introduction, manually stitching the texture and loading the block model is no longer necessary as those were workarounds. Item blocks (probably items as well) still need to use the ModelBakeEvent though. For item blocks it would seem you can just grab the model from the model registry, as it appears to be loaded before the event fires. Then pass it through a PerspectiveMapWrapper to apply the perspective transforms. And just put the PerspectiveMapWrapper into the model registry with the inventory variant.

     

    And here are the item block transforms to pass into the PerspectiveMapWrapper:

    private static final TRSRTransformation THIRD_PERSON_BLOCK = Transforms.convert(0, 2.5f, 0, 75, 45, 0, 0.375f);
    private static final ImmutableMap<TransformType, TRSRTransformation> BLOCK_TRANSFORMS = ImmutableMap.<TransformType, TRSRTransformation>builder()
    .put(TransformType.GUI, Transforms.convert(0, 0, 0, 30, 225, 0, 0.625f))
    .put(TransformType.GROUND, Transforms.convert(0, 3, 0, 0, 0, 0, 0.25f)).put(TransformType.FIXED, Transforms.convert(0, 0, 0, 0, 0, 0, 0.5f))
    .put(TransformType.THIRD_PERSON_RIGHT_HAND, THIRD_PERSON_BLOCK)
    .put(TransformType.THIRD_PERSON_LEFT_HAND, Transforms.leftify(THIRD_PERSON_BLOCK))
    .put(TransformType.FIRST_PERSON_RIGHT_HAND, Transforms.convert(0, 0, 0, 0, 45, 0, 0.4f))
    .put(TransformType.FIRST_PERSON_LEFT_HAND, Transforms.convert(0, 0, 0, 0, 225, 0, 0.4f))
    .build();

     

    2 hours ago, blinky000 said:

    now im worried that the texture HAS to me hard coded in the mtl . previous versions you could define the texture in the blockstate

    Yeah, the blockstate loader seems to completely ignore the textures tag.

     

    (I haven't experimented with items, so I can't help as much there.)

  3. Look very closely at the path in your renderer and the path on disk.

    On 5/22/2019 at 12:10 AM, ScootMcShoot said:

    new ResourceLocation("scootsnm", "textures/entities/summmoned_zombie/summoned_zombie.png");

     

    On 5/22/2019 at 4:27 AM, ScootMcShoot said:

    scootsnm\textures\entities\summoned_zombie

     

    • Thanks 1
  4. You're trying to call a client only function on the server.

     

    @Nullable
    @SideOnly(Side.CLIENT)
    public RayTraceResult rayTrace(double blockReachDistance, float partialTicks)
    {
        Vec3d vec3d = this.getPositionEyes(partialTicks);
        Vec3d vec3d1 = this.getLook(partialTicks);
        Vec3d vec3d2 = vec3d.addVector(vec3d1.xCoord * blockReachDistance, vec3d1.yCoord * blockReachDistance, vec3d1.zCoord * blockReachDistance);
        return this.world.rayTraceBlocks(vec3d, vec3d2, false, false, true);
    }

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.