Jump to content

DirtEngineer

Members
  • Posts

    17
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

DirtEngineer's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I am not configuring the ExistingFileHelper. I am using the one from GatherDataEvent. Are you suggesting that I make my own instance of ExistingFileHelper? When I run it in debug, it shows that my test mod is the only existing pack and that forge is the only existing mod.
  2. It's 1.19.2. The textures are in the correct directory location in the called mod. Yes. Substituting "minecraft:item/apple" works for the calling mod. Look at generateCompoundModels() on line 33 in ModItemModelGenerator.java. The current location for the .texture is cleaned up. I tried various configurations for the location. One aspect that might that may be pertinent is that this is called by the calling mod from its datagen events as registered in addListeners() on line 104 in AddonRegisters.java.
  3. I am working on extending a mod that creates custom chemical compounds so that other mods could make their own custom compounds under their own namespace. Drop a JSON in your data folder, call a few methods, fire and forget. I want the calling mod's products to use the same textures as the core mod for ease of use and consistency. I can't seem to successfully access the textures in the core mod from the calling mod. I can force the model generation. When I do, everything runs fine. It's just that the items are completely invisible. No magenta/black block, simply invisible. That tells me that the model is there and being accessed, just no access to the textures that it references. I want to avoid requiring that the consumer load a set of textures manually. Here is an example of an item model that is generated. { "parent": "minecraft:item/generated", "textures": { "layer0": "basemod:items/the_item_layer_0", "layer1": "basemod:items/the_item_layer_1" } }
  4. That would be relatively simple, but there is a little twist. 1. It is a projectile, not a living entity. 2. The projectile holds any one of several custom fluids, the color of which is impossible to determine until runtime. Being a projectile that is removed from the game within a few ticks of impact, I don't have to be concerned with unsetting the color change. I do have a minimal custom renderer that extends ArrowRenderer. Perhaps I could override the render method in EntityRenderer. One concern is that, due to the singleton nature of items, blocks, entities, it may cause every one of these currently in the game to be tinted the same way. It would seem to be a bit of overkill to make a custom capability just for this minor effect. But, if that is what it takes, I'm up for it. Reality check: am I even approaching it correctly?
  5. Is there a way to change the color of an entity like with the Item and block color handler events?
  6. Looking at brewing did help. I believe that I have figured it out. The approach that I am taking is to use the potion itself as an ingredient in my recipes from my provider and let my machine block do all of the vetting and massaging. The player would be putting a stack into the slot. Since the actual potion information is held in the stack's tags, my block would look there to determine if it holds a potion and what kind of potion it is before selecting the appropriate recipe. For actual processing, it passes the potion to the recipe. I still have to work out the new UI, but I am confident that this approach will work. Here is one recipe.
  7. I have items that use a reference to potions to get mob effects and a machine to make them. I can't simply use a potion as an input for the recipe since the player doesn't directly interact with potions but potion items. I can get the registry location for the potion easily enough. How do I get a reference to the actual potion item to set an an input for the recipe?
  8. Yes, those exist, but readFromNBT takes a CompoundTag as an argument.
  9. I'm making a projectile weapon item that fires a fluid. Currently, I am using a FluidTank to store said fluid in the weapon. My issue is that I can load a different fluid into the weapon, but that fluid does not persist for the next instance. I know about NBT data and I know that the bare-bones FluidTank and FluidStack have logic to save the data and load it from a provided tag. I see where, with a Block Entity, the actual data is made available via a provided tag on the Load() method. I don't see any such mechanism for the FluidTank. Am I just looking at this completely incorrectly?
  10. I was able to do it by adding a new array to the JSON entries and adding the effects when I build them for registration. <, "effect": [ { "location": "minecraft:nausea", "duration": "600", "amplifier": 2 }, { "location": "minecraft:slowness", "duration": "600", "amplifier": 0 }, { "location": "minecraft:weakness", "duration": "600", "amplifier": 0 } ]>
  11. I am generating items from a JSON file. I want to add one or more effects to some of them, like a potion. What is the format for the JSON element that would do that? As in <"blah": "minecraft.effect.whatever_effect">
  12. The DynamicFluidContainerModel is looking more like the way to go here. Could anyone provide information on how to use model loaders?
  13. That did the trick. Lifted the part of AbstractClientPlayer.getFieldOfViewModifer() that dealt with the Bow and rolled with it. https://github.com/DirtEngineers/Squirtgun-1.19/blob/main/src/main/java/net/dirtengineers/squirtgun/client/events/ClientForgeEventHandler.java Thanks a lot. You have been a huge help.
  14. That only changes the colors of the item. it does that during registration. The arrow entity takes its effect based on the tipped arrow fired. It doesn't change the appearance of the actual entity.
  15. I made a weapon that extends BowItem. The item animations work, but the screen doesn't zoom in like when you use the regular Bow. I had to override the use method because it uses a custom projectile. I thought that I called all of the appropriate events. What am I missing? Github repository: https://github.com/DirtEngineers/Squirtgun-1.19/blob/main/src/main/java/net/dirtengineers/squirtgun/common/item/SquirtgunItem.java#L43
×
×
  • Create New...

Important Information

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