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


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

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

mdcby's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. ohh maybe i really didn't use gradle build without this check, since it works now then thanks ?
  2. I removed this part and tried to repeat this issue, but seems like everything is working. That time i got this:crash-2020-05-11_21.37.49-server.txt
  3. I got this exception when bat suffocated maybe because of gravel. Blocks dont have this method, but living entities do. But ok let's say there is a problem, then why it works properly when compiled?
  4. Sometimes it crashed the game with NoSuchMethodException when the src didn't have the method getTrueSource, for example when entity was killed by a block.
  5. Just nothing happens. When I run compiled minecraft, it applies potion effect whenever a player kills a mob. With jar it stands still.
  6. I did a small mod for testing with one simple event h andler. It works* until i build it to jar (with gradlew build) and put it in folder. This is what the build outputs:build.txt The mod itself: https://github.com/satyd/TestMod1 *I have no problems/bugs when i compile it, everything works how it supposed to do. Can someone help me, what i did wrong?
  7. Ok, then idk which type of problem do i have. My mod works properly when i compile it in eclipse, but doesn't work when i create jar with "gradlew build". In build.gradle i have this, but eclipse launches 1.15.2 version when i tried to change to 20200414-1.15.2 i got this: What am i doing wrong and what i have to do?
  8. I downloaded the latest forge MDK, but when i type gradlew genEclipseRuns i see this: forge:1.15.2-31.1.77_mapped_snapshot_20200225-1.15.1 It turns out, whenever forge builds a new project it uses gradle version 4.10.3 instead of 5, how do i fix this?
  9. public class myEvents { @SubscribeEvent public void DeathPotion(LivingDeathEvent event){ DamageSource src=null; if(event.getSource()!=null) src=event.getSource(); if(src!=null) { if(src.getTrueSource() instanceof PlayerEntity) { LivingEntity entity=(LivingEntity) src.getTrueSource(); int n=13; int random=(int) (Math.random()*n); EffectInstance killer; switch(random) { case 0: killer=Potions.HARMING.getEffects().get(0); break; case 1: killer=Potions.SLOW_FALLING.getEffects().get(0); break; case 2: killer=Potions.POISON.getEffects().get(0); break; case 3: killer=Potions.HEALING.getEffects().get(0); break; case 4: killer=Potions.LUCK.getEffects().get(0); break; case 5: killer=Potions.LEAPING.getEffects().get(0); break; case 6: killer=Potions.SLOWNESS.getEffects().get(0); break; case 7: killer=Potions.SWIFTNESS.getEffects().get(0); break; case 8: killer=Potions.WEAKNESS.getEffects().get(0); break; case 9: killer=Potions.REGENERATION.getEffects().get(0); break; case 10: killer=Potions.STRENGTH.getEffects().get(0); break; case 11: killer=Potions.STRONG_HARMING.getEffects().get(0); break; case 12: killer=Potions.STRONG_TURTLE_MASTER.getEffects().get(0); break; default: killer=Potions.NIGHT_VISION.getEffects().get(0); break; } entity.addPotionEffect(killer); } } } } This is registration: myEvents m=new myEvents(); MinecraftForge.EVENT_BUS.register(m);
  10. 1) What do you mean reusing? Every time event happens i create new variables pick the player and apply the effect. 2) I also tried to call addPotionEffect directly in switch cases without any unnecessary variables and got the same issue.
  11. I have an eventlistener which applies random potion effects to the player, but it works properly until player is dead. After player respawns function applies only specific and non-instant effects, so i have to restart the game to have the function work properly again. Here's the code: EffectInstance effect; switch(*random n*) {case *random n*: effect=Potions.*Potion_Name*.getEffects().get(0);} LivingEntity entity=(LivingEntity) src.getTrueSource(); entity.addPotionEffect(effect) //or entity.addPotionEffect(effect.getEffectInstance()); it doesn't matter. p.s. -src.getTrueSource() is always instance of PlayerEntity -default defined too -i did Event listener according to forge docs, tried static and everything works till the player is dead. -Then it works, but improperly (applies some effects with very short duration, about few ticks, maybe 1, so they don't have enough time to trigger). Don't know why the problem takes place and what else i can do to make this work
  12. Seems like everything is working, thank you kind stranger! Didn't know that ?
  13. Good evening. Trying to start some modding for 1.15 and got stuck with this issue (for 31.1.0+ forge): This never ends. Checked java_home, points to actual jdk 8, previously worked with 1.12 a bit and it was working. Maybe the problem is in switching versions, i really dont know. Maybe someone got the same problem/knows the solution? p.s. text for search indexation (genEclipseRuns > Resolve dependencies of :runtimeClasspath , genEclipseRuns Resolve dependencies of runtimeClasspath )
  • Create New...

Important Information

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