Hello, I had trouble creating a new block and putting a texture in the blocks library. The problem is that when I create a new block and I create a new material to put in, the texture gets stretched and deformed. (The texture is 64x64)
it looks like that when it should be like that:
By the way, here is the code
Material mat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md"); mat.setTexture("DiffuseMap", assetManager.loadTexture("Textures/test_texture.png")); Terranum.typeRegistry.register("TEST_BLOCK_TYPE",mat); Block block = Block.builder() .name("TEST_BLOCK") .shape(ShapeIds.CUBE) .type("TEST_BLOCK_TYPE") .usingMultipleImages(true) .transparent(false) .solid(true) .build(); BlocksConfig.getInstance().getBlockRegistry().register("TEST_BLOCK",block);
if you need something more just tell me.
Thanks