Jump to content

EvilTwin

Members
  • Posts

    22
  • Joined

  • Last visited

Everything posted by EvilTwin

  1. So the Beacon in Minecraft has a Static Blockmodel (the Beacon) and a dynamic model (the beam), the beam only activates when isComplete equals true, but how does it do this, I've been trying to reproduce this for a while now, and I don't see how I should be able to render the beam, after I rendered the "beacon" itself, I have tried to reproduce everything in the Block, the TileEntity and the TileEntityRenderer classes, to an extent that it should work. But I can't seem to find the actual event that calls for the rendering of the beam, looking in the ContainerBeacon and GuiBeacon classes didn't help either. My problem that I have is that I can't find the line that tells the TileEntityRenderer to actually render the beam. I have two instances in which I can have my own TileEntity update it's model/render the beam, but I don't know how to implement it I mean I can't just add in render(TileEntityModEntity te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) and thats it I have to update the TileEntity somehow right? When is this render called by the Beacon, when it should render the Beam?
  2. Alright then this answers all my questions, cheers and thanks a bunch
  3. I can't seem to find RenderWorldEvent.Post could it be that it has been replaced? I can only find RenderWorldLastEvent.
  4. Oh hey this looks great, thanks for that! Just one last question, since there is so many events, which one would you choose to make it render at all times like the beam from the beacon? I thought RenderWorldEvent.Post seemed good but I am not so sure.TickEvent.ClientTickEvent also seems like it could work but I guess this would just draw it every time the client ticks which would result in a million renders. Anyway my actual Question is solved this is just extra, so thanks a lot!
  5. I'm sorry I don't really know how rendering events work, could you send me something to read about it? In the meantime I'll also look for that. Thanks for your help Edit: Found something its pretty old but I guess I can still take something away: https://bedrockminer.jimdo.com/modding-tutorials/advanced-modding/vanilla-rendering/ Edit2: Basically what I am looking for is kind of what the Beacon does, as long as the block is there and a requirement is fulfilled, it should render something, that rotates and covers more than one block. I'll read through the Beacon a bit but I have a feeling like this is a vanilla only thing...
  6. Nevermind I solved it, but thanks anyways
  7. I am trying to create a sort of overlay for Blocks if something ingame happens. This overlay would cover a 3x1x3 area either just over the blocks through one or multiple tileentities, or through a blocktexture. Now this overlay should also animate (in this case rotate), would it be better to have one tileentity in the center that rotates with the whole texture (is that even possible?) or multiple tileentities in every block, that the overlay is on, which slowly go through a texture change, or through texture animation of the blocks? Also important to note is that players shouldn't be able to interact with it at all. Would a TESR be capable of this feat? Sorry if this seems unecessarily complicated those are the only options that come to my mind right now, if there is another way to do this please do tell me so. Thanks in advance!
  8. When I open my chest (36 slots) ingame it first creates a container with 27 slots, and then overrides the first container with a second one with 36 slots. Nowhere in my code did I tell the container the number 27 in the first place, so where does this come from is there a method to stop this? This results in a bug, that results in the item that is in the last row of the chest, to also be placed inside of the players inventory. I don't really want code just food for thought Thanks in advance
  9. Ahh thank you all for the hints, will check em out. I think I have better insight now on this topic Edit: What is that boolean simulate doing in insertItem?
  10. Shouldn't I use isItemValidForSlot then from IInventory in .net.minecraft.inventory? Because it says I should use Slot.isItemValid in the gui. Or should I let it check in the gui instead then?
  11. If I want to make a Chest that has 9 Slots for certain items reserved and 18 Slots for other items reserved, how would I go on to tell the Chest which item to fill in which slot, I have read through the Furnace and Chest TileEntity but that doesnt seem to help me with my core problem. Would I even tell the chest in the TE which item to accept for which slot or in the Container? And would I need to define the slots like in the FurnaceTileEntity (like 9 slots for x and 18 for y) or should I just define all 27 slots in one go and just check every item if it can be accepted for every slot? Just a bump into the right direction would help me already Thanks in advance!
  12. It's working now, I've cleared my cache and rebuilt my Workspace and Project, now it works. Thanks to everyone for their heads up though Edit: no not a single error, and they were in the .json format Edit2: before that I also tried other stuff and before testing it in minecraft again, I also copied the Code, deleted the .json files and put it in new files in the exact same spot with another filename, maybe this could be it too, I don't know but it works for me now.
  13. Didn't work for me sadly
  14. Ok got it thanks a lot if I find a solution I'll post it here!
  15. Where would it be best to make a step in to check if it is the ResourceLocation that is the problem, sorry I don't know where exactly Forge is handling registration of recipes, is it in the same class as the registration of items, blocks etc?
  16. Yep everything is correct, as my textures, models and everything else in my assets/modname folder makes it ingame. Is maybe rebuilding my project gonna help?
  17. Thanks for the heads up I'll check out how minecraft handled advancements. The Gamerule "doLimitedCrafting" is false and thus my crafting shouldn't be tied to advancements. I guess my file and path seem okay, in creative mode I can get my items without fail, so they are registered, and I read that the registering of recipes fires after items and blocks, so that shouldn't be the problem either. Everywhere I go I see that Forge is handling the recipe registration by itself, my guess is that for some reason it can't find my path? I even updated my forge once and it still didn't work (from MC version 1.12 to 1.12.2).
  18. I have created some crafting recipes for my Mod, but when I try to craft them ingame, the result doesn't show up. I also don't get the new recipe in the recipe book after obtaining all ingredients. I have tried to add a custom recipe using only minecraft items, and that didn't work either. They are in the following directory: "src/main/resources/assets/modname/recipes" my textures for this mod are in the folder "src/main/resources/assets/modname/textures" and show up ingame. One of my .json files: { "type": "crafting_shaped", "pattern": [ " ", " O ", "OOO" ], "key": { "O": { "item": "minecraft:obsidian" } }, "result": { "item": "minecraft:diamond_block", "count": 1 } } Do any of you have an idea why the recipes don't seem to work for me?
  19. Hello, I want to be able to rightclick with an item on a block (any block in a 3x3x3 structure for example), this should check if the other Blocks are set, and if they are it should change their Texture, if any of the Blocks get destroyed afterwards, they all should turn back. How would one go on to do this, I have been looking into the Immersive Engineering mod but isn't there a more simple method to implement this? My thought was to make the item rightclick on a specific block call an event that checks the surrounding blocks in a loop until it finds one that is wrong, if the loop finishes it returns a true boolean, if not then false, but how can I change the textures of all the blocks if it returns true? Are Blockstates the way to go here, even if I want to use vanilla blocks for this? And should the structure constantly check if it's still correct or can an event be triggered when a block breaks, that changes the textures back? Can someone please point me to some methods to read through for this? Thanks in advance.
  20. Ahh now I got it thanks that helped a lot!
  21. Since RegistryEvent.Register will make the registration of Blocks fire first and then the Items, how would you go about Blocks that need Items to register before them, like Blocks that drop Items instead of themselves. I get a NullPointerException since Item is obviously null. Do I have to manually register the specific Items beforehand or is there a more concrete solution to this?
  22. But if I move my registration to the registry events, I get a nullpointer exception for my blocks with item dependencies (for drops) since the item is not registered yet, or am I doing something wrong?
×
×
  • Create New...

Important Information

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