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

Dakuro

Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Dakuro

  • Rank
    Tree Puncher
  1. Thank you for your response! Oh well, yes that's not so important, I just thought it would be inconsistent to have unwanted potions in the vanilla tabs, but we can't do anything about it. Oh I wasn't aware this was really important, than you for the tip! Just for my curiosity, what kind of problems could it cause?
  2. Hello, I'm currently making an effect and custom potions and it works fine and all, but in the Brewing and Weapons vanilla tabs there is automatically generated potions with my effect (potion, splashpotion, lingering potion and tipped arrows). For example, here is my custom potion : And here is the automatically generated potion : I found a method in the PotionItem and I think it may be related to this : public void fillItemCategory(ItemGroup p_150895_1_, NonNullList<ItemStack> p_150895_2_) { if (this.allowdedIn(p_150895_1_)) { for(Potion
  3. Thanks to you, it now works ! Here's the code if someone wants to do the same thing : public class ModEvents { @SubscribeEvent public void onAstraalClick(PlayerInteractEvent.RightClickItem event) { if(event.getPlayer().getHeldItemMainhand().getItem() == Items.GLASS_BOTTLE) { RayTraceResult raytraceresult = rayTrace(event.getWorld(), event.getPlayer(), RayTraceContext.FluidMode.SOURCE_ONLY); if (raytraceresult.getType() == RayTraceResult.Type.BLOCK) { BlockPos blockpos = ((BlockRayTraceResult)raytraceresult).getPo
  4. Okay thanks again for your guidance. I'll come back when I have done my best to apply your advices ^^
  5. Thank you for your answer ! I made an event as you recommanded but it works only when the player is in the fluid for some reason. public class ModEvents { public ItemStack waterBottle = PotionUtils.addPotionToItemStack(new ItemStack(Items.POTION), Potions.WATER); @SubscribeEvent public void onAstraalClick(PlayerInteractEvent.RightClickItem event) { if(event.getPlayer().getHeldItemMainhand().getItem() == Items.GLASS_BOTTLE) { if(event.getWorld().getFluidState(event.getPos()).getFluid() == ModFluids.ASTRAAL_FLUID.get()){ if(!event.getPla
  6. Hey guys ! I created a fluid and a fluidBlock and I had to associate it with the Water tag in order to have proper physics and it works fine. I made exactly this : public static final ITag.INamedTag<Fluid> ASTRAAL = FluidTags.WATER; I'm trying to make it so that, when you right-click it with a glass bottle, it gives you another item instead of the water bottle. I'm using the onBlockActivated method even if it's deprecated because I read that it was okay to override it, but it seems that it doesn't work in the way it did it. Here's my custom FluidBlock class :
  7. Yes and I tried creating a super but I can't manage to do it without getting errors. I also tried to enchant displayStack using this : displayStack.get().addEnchantment(Enchantments.INFINITY,1); but I can't figure out how to place it, because wherever I tried to place it, it resulted in not working or failing to load the game. How would you properly enchant displayStack ?
  8. Hey guys ! I created an ItemGroup for my mod, which works well, but I would like to have a glint effect (like an enchanted item) on the icon of my ItemGroup. In fact, the item I use to make my icon doesn't have a glint effect (because I don't want it), so I'm searching a way to add the glint effect only to the icon and not directly to the item. I tried to use the hasEffect() thing in many different ways that seemed logic to me, without sucess. Here's my actual code : package net.dakuro.arkhesys.utils; import net.dakuro.arkhesys.init.ModItems; import net.minecraft.item
×
×
  • Create New...

Important Information

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