Slime or honey block properties

Started by TheDuckKnight_Mc on Thu, 05/21/2020 - 13:38

Topic category: Help with modding (Java Edition)

Last seen on 20:24, 26. Jan 2021
Joined Feb 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Slime or honey block properties
Thu, 05/21/2020 - 13:38

I have seen some posts calling for help with slime-like blocks but none have helped me. So please, can someone tell me how to use slime block code and where to get the code from Minecraft? I'm not good at coding, so I need some serious help and I wish someone tells me how to make a slime-like block. Thanks in advance.

Last seen on 04:35, 17. Jan 2021
Joined Sep 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Noone helped you yet... Here…
Mon, 06/01/2020 - 16:12

Noone helped you yet...

Here is what the slime block uses

   public void onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance) {
      if (entityIn.isSuppressingBounce()) {
         super.onFallenUpon(worldIn, pos, entityIn, fallDistance);
      } else {
         entityIn.onLivingFall(fallDistance, 0.0F);
      }

   }

   /**
    * Called when an Entity lands on this Block. This method *must* update motionY because the entity will not do that
    * on its own
    */
   public void onLanded(IBlockReader worldIn, Entity entityIn) {
      if (entityIn.isSuppressingBounce()) {
         super.onLanded(worldIn, entityIn);
      } else {
         this.func_226946_a_(entityIn);
      }

   }

   private void func_226946_a_(Entity p_226946_1_) {
      Vec3d vec3d = p_226946_1_.getMotion();
      if (vec3d.y < 0.0D) {
         double d0 = p_226946_1_ instanceof LivingEntity ? 1.0D : 0.8D;
         p_226946_1_.setMotion(vec3d.x, -vec3d.y * d0, vec3d.z);
      }

   }

I just took out this snippet from the slime block, play around with it.

Last seen on 06:12, 20. Jan 2021
Joined Oct 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How would I go about…
Mon, 11/30/2020 - 00:25

How would I go about implementing this? I'm very unfamiliar with putting custom code in ^u^;

Last seen on 15:06, 13. Jan 2021
Joined May 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You need to code your block…
Tue, 12/01/2020 - 23:06

You need to code your block there is a option in your Mcreator that is for coding, use it and if you are beginner o  this you can see tutorials or the code of some blocks of Minecraft. If you browse in Mcreator you can see the code of slime block and honey block.