Jump to content

ChampionAsh5357

Members
  • Posts

    3284
  • Joined

  • Last visited

  • Days Won

    62

Posts posted by ChampionAsh5357

  1. 4 hours ago, Lexjp said:

    How do I disable these in a clean way? I'm unsure what the best practice here would be, and particularly lost on how to disable recipes. Would love a point in the right direction

    Don't. There's a number of issues that can occur when attempting to disable a particular feature. You should either leave the configuration up to the user through the datapack to disable specific recipes or ore generation. Alternatively if this is really necessary, you could use the config with a conditional on the given feature placement and the recipe conditions.

  2. 2 hours ago, perromercenary00 said:

    find an itemstack using the Capability<IItemHandler> to use as example

    I mean...you can use any capability as an example for attaching to an itemstack. First one that comes to mind is the one on BucketItem. Then just swap out with the IItemHandler. If you don't own the item, you just use AttachCapabilitiesEvent.

    2 hours ago, perromercenary00 said:

    theres the problem of geting the new inventory from the gui in the container datapart

    SlotItemHandler? Other than that, pretty much nothing changes.

  3. 23 minutes ago, Jetug said:

    I decided that it would be easier to do this with the resizing of the player texture

    That's a lot harder. You literally just need two models or simply render the head part manually with the applied texture. And then you just need to create the rendertype with the texture twice. It's literally just what the LivingEntityRenderer is doing twice.

    26 minutes ago, Jetug said:

    I think the problem is in this method:

    The pixel information is stored in BGRA format, so that makes sense.

    • Thanks 1
  4. 13 hours ago, WizZzLe said:

    I would like to know if it is possible to add values to a config after it's been registered and built?

    Why not just make a custom datapack entry and datagen the configuration information for each entity? Or, you shouldn't be setting values dynamically and perform an override else default system.

  5. 23 hours ago, Jetug said:

    I understood the logic, but I don't know how to implement it.

    Look at how the LivingEntityRenderer sets the texture and repeat the process in your render method. You already have access to the entity model, so you should know how to render it. As how to separate it, either use two separate models or handle the rendering on the same model in two separate methods or implementations.

  6. 10 hours ago, perromercenary00 said:

    i want the dispenser menu to cameout but from the briefcase_item   but no idea how to call an menu from an item  

    Opening a menu from an item is pretty much the same way as doing so for a block: call `NetworkHooks#openScreen` and pass in the associated inventory which should be attached as a capability to the stack.

    10 hours ago, perromercenary00 said:
    		    private NonNullList<ItemStack> items = NonNullList.withSize(9, ItemStack.EMPTY);   
    

    You cannot just create the list on the item itself since that would apply globally to all instances of the item in the stack and be incorrectly synced.

  7. 14 hours ago, YorickBM said:

    The command is not the actual problem since that is what i did for that, but the code to change the biome between the 2 locations is what I am troubled with. 

    With a quick look at the code, it looks to be the exact same process as 1.19.3. All the associated methods are there to accomplish it

  8. While this stops the entity movement, it doesn't stop an entity from ticking which means the logic is still happening. I think in 1.18 you could use the LivingUpdateEvent to cancel living entity logic, but for all other entities, you would need to use some kind of injection into the entity to achieve the desired result most likely.

  9. 1 hour ago, Somnn said:

    So I managed to make it work however when I drop the item or when it's rendered within a blockentity renderer class it shows the default texture.

    If you're using item properties, there is not effect caused by the player, so the texture normally won't change. You typically need a custom model loader which provides its own itemoverrides if you want something to be effected based on the tag by default.

×
×
  • Create New...

Important Information

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