Jump to content

PianoManu

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by PianoManu

  1. I'm sorry I scared you with my stupidity 😛 Many thanks for your help!
  2. Hey guys, I'm updating my mod to 1.19 and I realized, the "getRegistryName()" method for blocks and items anymore. I guess there's a new way for that I don't know about yet? To be more specific, I've created a block overriding the use(...) method, and I want to check in there, whether the held item is from my own mod (then nothing should happen). In 1.18 and prior I achieved this via public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitresult) { //The item the player is holding Item item = player.getItemInHand(hand).getItem(); if (!level.isClientSide) { //compare namespace of item whether it is from my mod -> then nothing should happen if(item.getRegistryName().getNamespace().equals(BlockCarpentryMain.MOD_ID)) { return InteractionResult.PASS; } ... } } But now the getRegistryName() can't be called anymore and the ForgeRegistryEntry class seems to be gone. So my question is: Is there a new or different method now? Or should I do something completely different to retrieve the item's origin? As always, many thanks in advance for your help! Regards, Manu
  3. You're awesome! Thank you so much for your help, this fixed it for me! Regards, Manu This topic can be closed now, as the problem is solved.
  4. public class RenderSetup { public static void setup() { ... ItemBlockRenderTypes.setRenderLayer(Registration.STAIRS_FRAMEBLOCK.get(), RenderType.translucent()); ... } } Here's what I'm currently doing in my setup class. And the setup() method is called when the FMLClientSetupEvent is fired. The "..." are similar lines I removed, because the only things that change, are the blocks in the first parameter... As I said, I already used RenderType.solid() and RenderType.cutout() and although it changed the model's appearance, it did not fix the problem. Or perhaps I misunderstood you? In that case, could you please be more specific, what I should do? Many thanks for your help! Regards, Manu
  5. Hey guys! I encountered the following problem when updating my mod from 1.16 to 1.17: If I place a block of my mod (e.g. stairs) in front of another block, the hidden side of the back block is not rendered. It worked perfectly on 1.16, the problem only appeared when I moved to 1.17. I have already tried setting the render layer of the blocks from translucent to solid and to cutout, but nothing has changed. The main feature of my mod is that the blocks of my mod (frames) can take the texture of any block. If I then take a transparent block (e.g. red stained glass) and "disguise" the frame stairs with it, you can see that on all sides that are completely covered by the stairs, the blocks behind them become invisible. (see 2nd picture) But on the side that is only covered to 3/4, the grass block behind is visible through the "red stained glass stairs" (see 3rd picture), which is correct. For the stairs used in the first picture, a classic json model is used; when the stairs are disguised (2nd and 3rd picture), I created a BakedModel. Please let me know, if you need more information or specific code parts. It looks to me like I'm missing on something very obvious, so I'm sorry if this question is stupid... please don't be mad at me Here's my github repository: https://github.com/PianoManu/BlockCarpentry/tree/Forge-1.17 The block's main class is mod.pianomanu.blockcarpentry.block.StairsFrameBlock The class where I created the baked model is mod.pianomanu.blockcarpentry.bakedmodels.StairsBakedModel I'm setting the render layers in mod.pianomanu.blockcarpentry.setup.RenderSetup All blocks and items are registered in mod.pianomanu.blockcarpentry.setup.Registration Thanks in advance!! Regards, Manu
  6. Hey, thank you very much for your tip! Your approach was very veeeeeery helpful. That gave me a good idea and it works now, although I've chosen a slightly different way. This is how I solved the problem: At first I took a look into the PlayerEvent class (which is highly documentated, special thanks to whoever did that - it is unfortunately not very common), so I had the idea to search for some sort of "WorldEvent" class and check, whether it contains some useful events, and tah-dah, it contains a static class "WorldEvent.Load", where I can get an IWorld-instance, that features a player list. (The WorldEvent class is also documented pretty well, thanks again, you've made it easy for me!) I concluded, that I have to listen for both events, since I need the world (with the player list) and the player entity (to check, whether he is already registered in said list. The exact code looks like this: @SubscribeEvent public void playerLogginIn(final PlayerEvent.PlayerLoggedInEvent event) { //listen for "logging in"-event ServerPlayerEntity player = (ServerPlayerEntity) event.getPlayer(); if (!world.players().contains(player)) { //check whether the player (who is logging in) is already listed in the list of players on this world ServerWorld deepDark = player.server.getLevel(DDDMain.DEEP_DARK_DIMENSION); //if it's not the case (i.e. the player is new to this world), we need to teleport the player to this dimension instead if (deepDark != null) { DDDTeleporter teleporter = new DDDTeleporter(DDDConfig.SPAWN_POS); teleporter.setOverworldTeleporterPos(player.blockPosition()); player.setPos(DDDConfig.SPAWN_POS.getX(), DDDConfig.SPAWN_POS.getY(), DDDConfig.SPAWN_POS.getZ()); player.changeDimension(deepDark, teleporter); } } } @SubscribeEvent public void playerLoadsWorld(final WorldEvent.Load event) { //is called before "playerLoggingIn", so we can collect the world the player is joining world = event.getWorld(); //world is a private static IWorld-variable } After that, I registered this class to the MinecraftForge.EVENT_BUS in my Main class between "enqueueIMC" and "processIMC". I hope this was correct, I'm not quite sure where to put it, but it's working, so I think it should be okay. (Pls correct me if I'm wrong) Thanks again to you @ChampionAsh5357 for your helpful tip ❤️ Kind regards, Manu
  7. Hey guys, I made a custom dimension and everything is working completely fine (like world-generation, entering and exiting the dimension via portal block, respawning in the dimension, etc.), so I had the idea that after creating a new world, the player would start directly in my dimension instead of in the overworld. How could I achieve this? Thanks in advance, and kind regards, Manu Edit: if you need my github repository, here it is!
  8. Hey guys! I have some problems with the RenderLayers when testing my mod together with OptiFine. Some backstory: I made blocks, that can take on the model of any block using a tileentity that "stores" said block, and I also created baked models for all of them. It worked fine for solid blocks but not for transparent blocks, as they lose their transparency (see below). So I decided to change the RenderLayer to "translucent" using RenderTypeLookup.setRenderLayer(Registration.FRAMEBLOCK.get(), RenderType.getTranslucent()); where FRAMEBLOCK is the corresponding RegistryObject and "Registration" is the class where I register all my blocks and items. Right now it looks like that: (below you can see the "empty" frame blocks, namely cube, slab and stairs) You can right-click them to change the texture to the texture of the block you're holding. As I said, I used baked models to achieve the "mimicking"-effect. As you can see, it works fine, but only without OptiFine. When I use OptiFine, all my blocks are invisible and you can only see the black boundary box. I guess, it has something to do with the render layers, because I changed the RenderLayer for the "cube"-block to "solid", and the model is being rendered, again (but without transparency, see below) (Same three blocks, but I changed the RenderLayer-Type to "solid" for the cube block, the other two blocks - glass slab and stairs - are invisible, probably because of them being "translucent" and I guess OptiFine changes something how baked models are rendered) Now my question is: what can I do to make it work when using OptiFine? I already tried using "cutout" and "cutout-mipped" render types, but it wont change anything, the blocks stay invisible... Any help is appreciated. Regards, Manu If you want to take a look at the baked model: https://pastebin.com/MVPR7JW0 In case you need it, this is the github repository of my mod: https://github.com/PianoManu/BlockCarpentry/tree/Forge-1.16.2
  9. Thanks to you both @Beethoven92 and @Draco18s. That fixed my problem and helped a lot!
  10. Hey guys! I ran into some obstinate NoSuchMethodError today whilst testing my mod on a server (locally). I made a block with a tile entity, that mimics another block when it's right-clicked with said block. When I break the block containing the other block, my method "dropContainedBlock" is called to spawn an ItemEntity of the mimicked block. Now that is where I get the NoSuchMethodError exception and the server crashes. Here's my method. I mainly copied it from the vanilla jukebox, but the jukebox works a bit different because it "stores" only records, not blocks: //Used to drop the contained block //We check the tile entity, get the block from the tile entity and drop it at the block pos plus some small random coords in the world protected void dropContainedBlock(World worldIn, BlockPos pos) { if (!worldIn.isRemote) { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof FrameBlockTile) { FrameBlockTile frameTileEntity = (FrameBlockTile) tileentity; //My custom tile entity BlockState blockState = frameTileEntity.getMimic(); //the contained blockstate if (!(blockState == null)) { worldIn.playEvent(1010, pos, 0); //some coords to spawn the item entity double d0 = (double) (worldIn.rand.nextFloat() * 0.7F) + (double) 0.15F; double d1 = (double) (worldIn.rand.nextFloat() * 0.7F) + (double) 0.060000002F + 0.6D; double d2 = (double) (worldIn.rand.nextFloat() * 0.7F) + (double) 0.15F; ItemStack itemstack1 = blockState.getBlock().asItem().getDefaultInstance(); //<---- THAT IS WHERE I GET THE ERROR ItemEntity itementity = new ItemEntity(worldIn, (double) pos.getX() + d0, (double) pos.getY() + d1, (double) pos.getZ() + d2, itemstack1); itementity.setDefaultPickupDelay(); worldIn.addEntity(itementity); //this should spawn the item entity - works fine in singleplayer but not on servers frameTileEntity.clear(); //resets my tile entity } } } } It works fine in singleplayer, but when I tried it on a local server, it crashes. I get the following error: "java.lang.NoSuchMethodError: net.minecraft.item.Item.func_190903_i()Lnet/minecraft/item/ItemStack;". This "func_190903_i()" has to be the "getDefaultInstance()"-method, it is annotated as @OnlyIn(Dist.CLIENT) and I guess that's the reason why it does not work on servers. Now my question: How do I get it to work on servers? Sorry if this is dumb, I'm pretty new and inexperienced... Regards, Manu In case you need the complete crash report: https://pastebin.com/hAa3Mcfz
  11. Oh okay, I didn't know this. I'll continue experimenting with this. Glass was the more important block right now. Thank you very much for your help! Regards, Manu
  12. I'm so stupid, you're right. Thank you so much! It works for glass, but the ice fence is still not translucent... I've changed the alpha value to 0.0f and it's working fine for glass. I also changed the render layer as you said: public static void setup() { RenderTypeLookup.setRenderLayer(Registration.FENCE_FRAMEBLOCK.get(), RenderType.getTranslucent()); } This method is called when the FMLClientSetupEvent is fired. Did I forget something concerning the ice block? As I wrote in the first post, it only needs to be translucent for ice and glass blocks and it is already very nice, that it works for glass. Thank you so much! Regards, Manu
  13. Hey guys, I'm again having a question concerning baked quads/models. How do I create transparent quads? This fence block I created takes the texture of the block it is clicked with (it can mimic blocks), but for glass and ice, the block appears solid. How can I make them transparent? Here you can see an example screenshot of the problem so far. I made a class that implements IDynamicBakedModel and for the getQuads(...)-method I made a method "createCuboid()" that returns a list of baked quads The createCuboid(...)-method: public static List<BakedQuad> createCuboid(float xl, float xh, float yl, float yh, float zl, float zh, TextureAtlasSprite texture, int tintIndex) { List<BakedQuad> quads = new ArrayList<>(); //Eight corners of the block Vec3d NWU = v(xl, yh, zl); //North-West-Up Vec3d NEU = v(xl, yh, zh); //... Vec3d NWD = v(xl, yl, zl); Vec3d NED = v(xl, yl, zh); Vec3d SWU = v(xh, yh, zl); Vec3d SEU = v(xh, yh, zh); Vec3d SWD = v(xh, yl, zl); Vec3d SED = v(xh, yl, zh); //South-East-Down //following if statements check whether one of the values goes over the block bounds -> increment/decrement them if (xl < 0) { xl++; } if (xh > 1) { xh--; } if (yl < 0) { yl++; } if (yh > 1) { yh--; } if (zl < 0) { zl++; } if (zh > 1) { zh--; } //six faces of the block, createQuad(...)-method is shown below // 1st vector, 2nd, 3rd, 4th, , small u, high u, small v, high v, quads.add(createQuad(NWU, NEU, SEU, SWU, texture, xl * 16, xh * 16, zl * 16, zh * 16, tintIndex)); quads.add(createQuad(SWD, SED, NED, NWD, texture, xl * 16, xh * 16, zl * 16, zh * 16, tintIndex)); quads.add(createQuad(SWU, SWD, NWD, NWU, texture, xl * 16, xh * 16, 16 - yh * 16, 16 - yl * 16, tintIndex)); quads.add(createQuad(NEU, NED, SED, SEU, texture, xl * 16, xh * 16, 16 - yh * 16, 16 - yl * 16, tintIndex)); quads.add(createQuad(NWU, NWD, NED, NEU, texture, zl * 16, zh * 16, 16 - yh * 16, 16 - yl * 16, tintIndex)); quads.add(createQuad(SEU, SED, SWD, SWU, texture, zl * 16, zh * 16, 16 - yh * 16, 16 - yl * 16, tintIndex)); return quads; } The createQuad(...)-method: private static BakedQuad createQuad(Vec3d v1, Vec3d v2, Vec3d v3, Vec3d v4, TextureAtlasSprite sprite, float ulow, float uhigh, float vlow, float vhigh, int tintIndex) { //normal vector for vertices and orientation Vec3d normal = v3.subtract(v2).crossProduct(v1.subtract(v2)).normalize(); BakedQuadBuilder builder = new BakedQuadBuilder(sprite); builder.setQuadOrientation(Direction.getFacingFromVector(normal.x, normal.y, normal.z)); //I've tried adding diffuse lighting but it didn't change much builder.setApplyDiffuseLighting(true); //only for tintable blocks like grass if (tintIndex > -1) { builder.setQuadTint(tintIndex); } //constructing vertices for the quad putVertex(builder, normal, v1.x, v1.y, v1.z, ulow, vlow, sprite, 1.0f, 1.0f, 1.0f); putVertex(builder, normal, v2.x, v2.y, v2.z, ulow, vhigh, sprite, 1.0f, 1.0f, 1.0f); putVertex(builder, normal, v3.x, v3.y, v3.z, uhigh, vhigh, sprite, 1.0f, 1.0f, 1.0f); putVertex(builder, normal, v4.x, v4.y, v4.z, uhigh, vlow, sprite, 1.0f, 1.0f, 1.0f); return builder.build(); } And the putVertex(...)-method: private static void putVertex(BakedQuadBuilder builder, Vec3d normal, double x, double y, double z, float u, float v, TextureAtlasSprite sprite, float r, float g, float b) { //lift of all vertexFormatElements saved in the builder and created in the makeQuads(...)-method ImmutableList<VertexFormatElement> elements = builder.getVertexFormat().getElements().asList(); for (int j = 0; j < elements.size(); j++) { //iterate through all elements and get the usage, add the corresponding values VertexFormatElement e = elements.get(j); switch (e.getUsage()) { case POSITION: builder.put(j, (float) x, (float) y, (float) z, 1.0f); break; case COLOR: builder.put(j, r, g, b, 1.0f); break; case UV: switch (e.getIndex()) { case 0: float iu = sprite.getInterpolatedU(u); float iv = sprite.getInterpolatedV(v); builder.put(j, iu, iv); break; case 2: builder.put(j, (short) 0, (short) 0); break; default: builder.put(j); break; } break; case NORMAL: builder.put(j, (float) normal.x, (float) normal.y, (float) normal.z); break; default: builder.put(j); break; } } } For this method, I've got some help from a tutorial by TurtyWurty Now as I said, I'm trying to get transparent quads. How would I achieve that? Thanks in advance, Manu
  14. Thanks to both of you, I'll try that out Regards, Manu
  15. I'm sorry to bother you again, but how would I do that? I've tried it that way: BlockState mimic = ...; //the block I want my block to mimic (from vanilla minecraft) ModelResourceLocation location = BlockModelShapes.getModelLocation(mimic); IBakedModel model = Minecraft.getInstance().getModelManager().getModel(location); //and now? How do I get the texture of the IBakedModel? I found no methods that would return the texture but I can't figure out how to get the texture of the model... Thanks for your help in advance! Regards, Manu
  16. Oh, I didn't think of that. I will try that, thank you very much
  17. Hey guys! I want to read a string from a json file. To be specific, I want to get the textures from a given block, that are included in its model file as a string. To be more specific, I need the texture of the given block, because I made a block that mimics said block using baked models (these work quite fine right now). The reason for this topic is, that there are blocks with different textures on each side (e.g. furnace has at least 4 textures, I think). Now I think, I know the basics of Gson and Json, but I have two questions: 1. How do I get the path of the model file of the said block? I've thought of something like this: public static TextureAtlasSprite getTextureFromJson(Block block, String namespace, String blockName) { Gson gson = new Gson(); String location = block.getRegistryName().getPath(); try { //determine the needed file - that's the problem BufferedReader br = new BufferedReader(new FileReader("--- I don't know what to put here ---")); //read value from file - I hope that's correct String blockTexture = gson.fromJson(br,String.class); //get the correct texture from the TextureAtlas, determined by the namespace (see question 2) and the read value from the model file return Minecraft.getInstance().getAtlasSpriteGetter(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(new ResourceLocation(namespace, blockTexture));; } catch (FileNotFoundException e) { e.printStackTrace(); } return null; } And as I said, I don't know what to put in the FileReader... or should I use a completely different way? 2. How would I do the same with blocks from other mods? Yeah, I would use the namespace for the last part (getting the texture from the Atlas), but AFAIK model files from modded blocks are saved in their assets/models/block - directory or something like that. That second question is not very important at the moment, I would be glad, if I could get some help for the first question, maybe I could figure out the answer for the second question myself. Thanks in advance, I hope the questions are not too stupid Regards, Manu Sorry for bad english, I tried my best
  18. I'M COMPLETELY STUPID. You're right, at least nearly. I put the wrong blockstate in the getMimicQuads method, that's why I got those errors. It's working pretty well by now. That means I only had to change the first parameter from the method from "mimic" (which would be the block in the slab) to "state" (which is the state of the button) So I changed in the code from if (model != null) { //only if model (from block saved in tile entity) exists: return getMimicQuads(mimic, side, rand, extraData); } to if (model != null) { //only if model (from block saved in tile entity) exists: return getMimicQuads(state, side, rand, extraData); //first parameter was the problem } Thank you very much, dear SoulQuantum! (Thread can be closed, Problem is solved)
  19. Thanks for your reply! Yeah, that's what I tried at first, but the problem is, that this state only determines the block, that is saved in the button, not the button itself. I just tried it again, but Minecraft crashes and I get the error "Cannot get property DirectionProperty{name=facing, clazz=class net.minecraft.util.Direction, values=[north, south, west, east]} as it does not exist in Block{minecraft:spruce_planks}", obviously because Minecraft tries to get directions from planks, which have no directions... I still haven't found a solution Nevermind, SoulQuantum is right and I'm retarded (see last post)
  20. Hey guys, it's me again. I have another question regarding baked models. I made some blocks, that take on the texture of the block they are clicked on with. Full blocks are working flawless and slabs almost too, but I'm wondering if I really have to make a baked model for every block state. Well, for slabs there are only three block states and it's not a big deal to make two baked models and two loaders (for bottom half and top half). But currently I'm trying to get buttons to work and they have 12 block states (6 directions * 2 pressed or not) and I would have to make 12 baked models and 12 loaders. Of course, I tried rotating the model in the blockstates json-file, but it seems that this does not affect baked models. Now my question is: Is there a way to rotate/translate the baked model without making a new baked model class for every possible blockstate? As you can see in the following pictures, these two buttons on the floor have two different rotations, and the model I made works correctly for the right button, but not for the left button, which is rotated by 90 degrees. I don't know if you need it, but this is the code for the baked model: public List<BakedQuad> getQuads(@Nullable BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull IModelData extraData) { //get block saved in frame tile BlockState mimic = extraData.getData(FrameBlockTile.MIMIC); if (mimic != null && !(mimic.getBlock() instanceof FrameBlock)) { ModelResourceLocation location = BlockModelShapes.getModelLocation(mimic); if (location != null) { IBakedModel model = Minecraft.getInstance().getModelManager().getModel(location); model.getBakedModel().getQuads(mimic, side, rand, extraData); if (model != null) { //only if model (from block saved in tile entity) exists: return getMimicQuads(mimic, side, rand, extraData); } } } return Collections.emptyList(); } The getMimicQuads method, which is called: public List<BakedQuad> getMimicQuads(@Nullable BlockState state, @Nullable Direction side, @Nonnull Random rand, @Nonnull IModelData extraData) { if (side != null) { return Collections.emptyList(); } BlockState mimic = extraData.getData(FrameBlockTile.MIMIC); if (mimic!=null) { //get texture from block in tile entity and apply it to the quads TextureAtlasSprite texture = Minecraft.getInstance().getAtlasSpriteGetter(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(new ResourceLocation(mimic.getBlock().getRegistryName().getNamespace(), "block/" + mimic.getBlock().getRegistryName().getPath())); List<BakedQuad> quads = new ArrayList<>(); //down quads.add(createUpDownQuad(v(5 / 16f, 0, 6 / 16f), v(11 / 16f, 0, 6 / 16f), v(11 / 16f, 0, 10 / 16f), v(5 / 16f, 0, 10 / 16f), texture)); //up quads.add(createUpDownQuad(v(5 / 16f, 2/16f, 10 / 16f), v(11 / 16f, 2/16f, 10 / 16f), v(11 / 16f, 2/16f, 6 / 16f), v(5 / 16f, 2/16f, 6 / 16f), texture)); //sides quads.add(createLongSideQuad(v(5/16f, 0, 10/16f), v(5/16f, 2/16f, 10/16f), v(5/16f, 2/16f, 6/16f), v(5/16f, 0, 6/16f), texture)); quads.add(createLongSideQuad(v(11/16f, 0, 6/16f), v(11/16f, 2/16f, 6/16f), v(11/16f, 2/16f, 10/16f), v(11/16f, 0, 10/16f), texture)); quads.add(createShortSideQuad(v(5/16f, 0, 6/16f), v(5/16f, 2/16f, 6/16f), v(11/16f, 2/16f, 6/16f), v(11/16f, 0, 6/16f), texture)); quads.add(createShortSideQuad(v(11/16f, 0, 10/16f), v(11/16f, 2/16f, 10/16f), v(5/16f, 2/16f, 10/16f), v(5/16f, 0, 10/16f), texture)); return quads; } return Collections.emptyList(); } createUpDownQuad, createLongSideQuad and createShortSideQuad have very similar code and only differ in the arguments for putVertex(): private BakedQuad createUpDownQuad(Vec3d v1, Vec3d v2, Vec3d v3, Vec3d v4, TextureAtlasSprite sprite) { Vec3d normal = v3.subtract(v2).crossProduct(v1.subtract(v2)).normalize(); BakedQuadBuilder builder = new BakedQuadBuilder(sprite); builder.setQuadOrientation(Direction.getFacingFromVector(normal.x, normal.y, normal.z)); builder.setApplyDiffuseLighting(true); putVertex(builder, normal, v1.x, v1.y, v1.z, 5, 6, sprite, 1.0f, 1.0f, 1.0f); putVertex(builder, normal, v2.x, v2.y, v2.z, 5, 10, sprite, 1.0f, 1.0f, 1.0f); putVertex(builder, normal, v3.x, v3.y, v3.z, 11, 10, sprite, 1.0f, 1.0f, 1.0f); putVertex(builder, normal, v4.x, v4.y, v4.z, 11, 6, sprite, 1.0f, 1.0f, 1.0f); return builder.build(); } the putVertex method: private void putVertex(BakedQuadBuilder builder, Vec3d normal, double x, double y, double z, float u, float v, TextureAtlasSprite sprite, float r, float g, float b) { ImmutableList<VertexFormatElement> elements = SLAB_BLOCK.getElements().asList(); for (int j = 0 ; j < elements.size() ; j++) { VertexFormatElement e = elements.get(j); switch (e.getUsage()) { case POSITION: builder.put(j, (float) x, (float) y, (float) z, 1.0f); break; case COLOR: builder.put(j, r, g, b, 1.0f); break; case UV: switch (e.getIndex()) { case 0: float iu = sprite.getInterpolatedU(u); float iv = sprite.getInterpolatedV(v); builder.put(j, iu, iv); break; case 2: builder.put(j, (short)0, (short)0); break; default: builder.put(j); break; } break; case NORMAL: builder.put(j, (float) normal.x, (float) normal.y, (float) normal.z); break; default: builder.put(j); break; } } builder.setApplyDiffuseLighting(true); } Thanks for help in advance! Regards, Manu Edit: I know about the BakedQuadBuilder method "setQuadOrientation()", but I cannot use it as I don't have any information about the block, when creating the baked model. At least that's how I understand it, because the baked model is created in a static context and the tile entity is not. Or am I wrong?
  21. Oh my... I'm so stupid. Thank you very much, that solved it! Many thanks for your effort!! Problem is solved, thread can be closed!
  22. To be honest, I don't know anymore why I used the loop. It's not necessary. I guess I was very tired when I created this
  23. Thank you very much! This is my git repository: https://github.com/PianoManu/BlockCarpentry The registration of the block is located in the setup-package in the Registration class. The model loaders are registered in the setup-package in the ClientSetup class - there are three model loaders, the "frameloader" loads the full block and works fine. The problematic one is the "frame_slab_bottom_loader". The Baked Model for the slab is located in the bakedmodels package as "SlabFrameBottomBakedModel" class Thank you very much for your help! I will be really happy if you find my mistake ? Regards, Manu Edit: for some weird reason, the "main" directory is outside of the "src" directory in the git repository and you can't open the src directory... But everything is contained in the main directory so I guess it's fine...
  24. Sorry for bothering you again, but I've searched and tested a bit further and honestly I don't know how to put it into the vertex as I don't have any lightmap information (as far as I know) and both the BakedQuadBuilder and the VertexFormatElement do not take/contain any lighting information. How do you mean that? Like, what do I have to add? Thanks for helping me!
×
×
  • Create New...

Important Information

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