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

ChampionAsh5357

Members
  • Posts

    1217
  • Joined

  • Last visited

  • Days Won

    23

Posts posted by ChampionAsh5357

  1. Please show the entire class and the ClockworksDoorModel. I'm imagining you are incorrectly binding information here. The block atlas will not hold your texture unless some block is also using it. Also, RenderMaterials do not contain the full path, just a relative ResourceLocation. I would instead follow the BoatRenderer model here since it will be much easier to use with the current data you are trying to draw.

  2. 9 hours ago, izofar said:

    Is there an easier way to do this? How would the iron golem have spawned in the first place without chunk deadlocks? Is it easier to modify the villager behavior to spawn the modded entity instead?

     

    1. Not afaik.

    2. The entity is was already added and deferred to load at the correct time already. Follow the event call and you'll see that entities are loaded at a very specific point when processing. Trying to add your own entity at any point in this process would mean you could be loading a chunk that's already loading.

    3. No, that is much more difficult.

    • Thanks 1
  3. Reading the javadoc on the event tells you: "Note:  This event may be called before the underlying Chunk is promoted to ChunkStatus#FULL. You will cause chunk loading deadlocks if you don't delay your world interactions."

    As such, you should probably keep a queue of entities added along with the world and position you would like it to spawn at. Then, on the next tick in probably WorldTickEvent, check if the chunk is loaded at the position of spawning and if so spawn the entity. Otherwise, recycle into the queue until next tick.

    • Thanks 1
  4. I'm confused on why you are using reflection. Everything above does not need it. All are public except for the method which just returns itself so it doesn't matter. They are all forge registry entries which you can register normally.

    • Like 1
  5. Did you register `RECIPE_SERIALIZERS` to the mod event bus in your main constructor?

     

    Also:

    1. Do not static init SMITHING_RECIPE_SERIALIZER, just use the registry object.

    2. You shouldn't be doing this with getRecipes. Just call the method when needed.

    3. registerType and RecipeType are unnecessary, just call IRecipeType#register.

    • Thanks 1
  6. 1. Transfer what subject? The focus of the screen? It's always on the currently open screen.

    2. Changing anything on the client does not work, you would need to send a packet back to the server with the change or have the logic execute on the server (preferably the latter).

    On 5/22/2021 at 1:57 PM, Sleepwalkerx said:

    Also, I essentially need to register my Container with Forge, but this registration is done through the IFactory method, which forces it to adhere to one pattern.

    It's a factory to create a container for a specific circumstance. It's not supposed to be reusable for every single thing you do. If you wanted that, do some inheritance to make it to the point where the amount of code needed to modify is minimal.

    On 5/22/2021 at 1:57 PM, Sleepwalkerx said:

    I also wanted to ask for a bonus, is it possible to open Gui by their registration id?

    Screens don't have a registry object, they are only present on the logical client. They can be attached to containers to give a server a client form or they can just be standalone. If you're going to open a screen, you can simply just call the display screen method either in Minecraft or ClientPlayerEntity similar to how the sign does it.

  7. Minecraft does not really have a concept of colored light. As such, if you wanted the color of a specific face, you would need to go into the baked model, grab the top quad, get the color of the quad, and apply the brightness modifier to it. At that point though it's not particularly worth it.

  8. Found the error, and its annoying. The resource location being passed into the rendering handler has the modid written twice, once in the namespace and once in the path. The path does not accept colons, so an error was thrown which was eaten by the lambda and discarded. All you need to do is remove the modid and the colon from the path of the resource location in ModRenderers.

  9. There's nothing that suggests the error is outside of #shouldRender meaning that the entity renderer might be null somehow. However, there is nothing that suggests an error can occur there with the snippets.

    Would you mind posting a link to your repository on Github, Gitlab, etc.? I'm going to build a local workspace and see if I can't debug it.

  10. 13 minutes ago, skip999 said:

    The problem is that when I do that, I can only have one folder inside the \recipes directory e.g. \recipes\mineralcrusher . What I want to do is something along the lines of \recipes\o2o\mineralcrusher. I'm not sure how to do that.

    You can have a subdirectory within the recipes. If you're talking about generating them with RecipeProvider, then you would need to write the handling for that within the #save method or something similar.

  11. 17 minutes ago, skip999 said:

    It's mainly for organizational purposes, to keep the code easier to read. I'm not doing anything with the vanilla crafting table recipes or furnace recipes.

    That doesn't mean you need a custom recipe system. The RecipeManager can support any recipe as long as you give it a recipe type and serializer to work with. The IRecipe class could then be up for interpretation of implementation.

    As for organizational purposes, the recipe manager will check any subdirectories, so it makes no difference.

×
×
  • Create New...

Important Information

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