Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

PianoManu

Members
  • Content Count

    26
  • Joined

  • Last visited

Everything posted by PianoManu

  1. 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 l
  2. 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!
  3. 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 "Reg
  4. Thanks to you both @Beethoven92 and @Draco18s. That fixed my problem and helped a lot!
  5. 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
  6. 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
  7. 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
  8. 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> createCuboi
  9. 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
  10. 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 fil
  11. 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
  12. 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, SoulQuant
  13. 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
  14. 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!
  15. 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
  16. 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 ha
  17. 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!
  18. Hey, thanks for your reply! I've read your text several times and I'm beginning to understand, but I've never worked with the FaceBakery before, so I don't have any experiences with that. Do I have to rewrite the whole baked model class to extend the FaceBakery instead of implementing IDynamicBakedModel? I've looked through the FaceBakery class and the IVertexBuilder, but I have no clue where to begin with... Maybe you could give me a hint? Or do I have to rewrite everything at all? Also, where is this code part from? I couldn't find anything on Google, when I searched fo
  19. Hey guys! I created a block (slab, to be axact), that takes on the texture of the block it is clicked on. For that I used Baked Models. Now nearly everything works fine, but the slab texture (when covered by a block) is way too dark (see attached pictures), as if the light level was zero. As you can see in the first picture, it works well for the json-block-model, when the slab does not contain any block (oak planks texture). So I guess the problem is somewhere in the baked model, but I can't figure it out. Here's the code for my BakedModel-Class extending IDynamicBakedModel: ge
  20. Oh.. Okay, thank you very much. I'll try this! Have a nice day and thanks for telling me ?
  21. Hey guys! I want to make something like a coverable block, that get's a texture depending on its blockstate. For that I already made a class CoverableBlock with a Property "BlockContainerProperty" extending Property<String>. The BlockContainerProperty could take every possible block (see code below), and it already works with a block of the CoverableBlock-class. So for example, if the property of the block is set to "diamond ore", it will look like diamond ore. Well, I know the basics of JSON-blockmodels and that I could manually make these models, but then I would have to create to
  22. Nevermind, I found a solution. I made a class with a setup() method (which I call in my main class) that uses the BiomeManager.addBiome-function and it works now public static void setup() { for(Biome biome : ForgeRegistries.BIOMES) { BiomeManager.addBiome(BiomeManager.BiomeType.WARM, new BiomeManager.BiomeEntry(BiomesList.WET_FOREST_BIOME, 20)); BiomeManager.addSpawnBiome(BiomesList.WET_FOREST_BIOME); BiomeProvider.BIOMES_TO_SPAWN_IN.add(BiomesList.WET_FOREST_BIOME); } } Thanks Y'all, see you
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.