Jump to content

modders2

Members
  • Posts

    26
  • Joined

  • Last visited

Recent Profile Visitors

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

modders2's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. So I've attempted to create a BasicParticleType with deferred registries, I'll place all my code here as well as my latest.log! ParticleInit: public static final DeferredRegister<ParticleType<?>> PARTICLES = new DeferredRegister<>(ForgeRegistries.PARTICLE_TYPES, Reference.MODID); public static final RegistryObject<BasicParticleType> TEST_PARTICLE = PARTICLES.register("test_particle", () -> new BasicParticleType(false)); Main Class: ParticleList.PARTICLES.register(FMLJavaModLoadingContext.get().getModEventBus()); assets/testmod/particles/test_particle.json: { "textures": [ "testmod:test_particle" ] } The texture is located inside of assets/testmod/textures/particle/test_particle.png And my Latest.log is in this pastebin: https://pastebin.com/eVMuCPUf
  2. Hi, I looked on the docs about loot tables, however it seems that that section is gone now I'm guessing that maybe someone is updating them or just removing content that isn't very up to date. However, I was wondering how to add my item to a block's drop loot table (leaves). I am aware of the LootTableLoadEvent, however, I am unsure on how to use it
  3. Okay, so I've done this and I have the following: BrewingRecipeRegistry.addRecipe(Ingredient.fromStacks(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTION), Potions.AWKWARD)), Ingredient.fromItems(ItemList.PEPPERS.get()), PotionUtils.addPotionToItemStack(new ItemStack(Items.POTION), PotionList.MORE_HEALTH_POTION.get())); Only problem with this, is that I can put one in, and it brews fine, however, putting more than one in will just keep brewing, it is accepting all potions, and overriding them if they aren't the output one
  4. Okay.... So I have BrewingRecipeRegistry.addRecipe(Ingredient.fromStacks(PotionUtils.addPotionToItemStack(here, Potions.AWKWARD))); But I'm not sure what to put for 'here' as it wants an ItemStack..
  5. Hi, I'm using a method to create a brewing recipe, and it is asking for Ingredient, all I can see from the Ingredient class is to get an item, however, I need to specify a paticular potion, how would I do this?
  6. I was wondering how to remove an item from a slot in my GUI. I currently have 2 slots, and I want to, when the user clicks a button in the GUI, to remove it from the slot and then place a different item into the second slot. I have the button setup like this currently in the Screen class: @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { super.drawGuiContainerForegroundLayer(mouseX, mouseY); this.font.drawString(this.title.getFormattedText(), 51.0f, 6.0f, 4210752); this.font.drawString(this.playerInventory.getDisplayName().getFormattedText(), 8.0f, 112.0f, 4210752); this.addButton(new ImageButton(this.guiLeft + 77, this.guiTop + 24, 21, 20, 0, 208, 21, BACKGROUND_TEXTURE, (e) -> { System.out.println("Hello"); })); } And the PlayerInventory, along with the two slots are initialised inside of the Container class constructor here: this.addSlot(new Slot(tileEntity, 0, 16, 26)); this.addSlot(new Slot(tileEntity, 1, 52, 26));
  7. Okay, so I think I have what I need, what should I put for IPressable?
  8. So I currently have a GUI/Screen setup with a container and Tile Entity and I was wondering how to add a button to the Container GUI
  9. Is there a set way in which I should call my registries: Should I register items before blocks? Should I register Particles before Items? Should I register Tile Entities before Particles? I was wondering if there is a set way in which everything is registered
  10. So I've copied the vanilla particles, and I'm wondering which event I register them?
  11. Hello there, I was wondering how I could add a custom textured particle. Would it be better to use Deferred Registries or Registry Events? How would I setup the classes for the Particle?
  12. I've had a look, but where do they store the textures for them? I'm looking for the particle that comes from the end rod, but I can't find it
  13. Do you have an example I could look at maybe?
  14. Any help would be appreciated
  15. How do I create a custom particle in 1.15? I am using deferred registries - and I have this public static DeferredRegister<ParticleType<?>> PARTICLE = new DeferredRegister<>(ForgeRegistries.PARTICLE_TYPES, Main.MOD_ID); public static RegistryObject<ParticleType<?>> CARBON = PARTICLE.register("carbon", () -> new BasicParticleType(false)); However, I'm not sure what to do from here, if this is all I need or I need to add a directory to the actual texture file
×
×
  • Create New...

Important Information

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