-
Posts
8 -
Joined
Posts posted by DefectiveProgram
-
-
28 minutes ago, blinky000 said:
Ok, now its almost working , get the model, and the item. The item looks fine, the block is too dark.
What is your "Kd" property set to in the .mtl?
-
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.)
-
You can use "TextureStitchEvent.Pre" to load the texture. And the z-fighting is either an issue with your model or the parser.
- 2
-
Try using a vanilla texture (Also without ".png" as that appears to be automatically appended.) I'm guessing the texture isn't being loaded.
-
Try removing ".png" from the texture path in your .mtl maybe?
-
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
- 1
-
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); }
[1.14.4][RESOLVED] OBJ Models: How to Get Started
in Modder Support
Posted
Hmmm... Those values work just fine for me... Don't know what could be the issue there...
Back in 1.13, Mojang dropped the plural off alot of the directories. So textures/blocks is now textures/block.