Started by
TheTepig
on
Topic category: Advanced modding
Hello people! Thanks for clicking on my topic, I thank you for even click on it :P Anyhow, how would I go about making a block that bounces you like a slime block? I want it to be like a trampoline but with a much higher bounce then a normal slime block, in other words, I want it to send you high up into the trees and then back down and not take full damage when bouncing on it.
Thanks! (Hope it was clear!)
~Tepig.
nope, so sorry.
PS: hi! how are you? :)
@#1 Do you know how I could at least get my hands on the code for slimeblocks? If I can it would not be that hard to edit.
These are they:
public void onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance)
{
if (entityIn.isSneaking())
{
super.onFallenUpon(worldIn, pos, entityIn, fallDistance);
}
else
{
entityIn.fall(fallDistance, 0.0F);
}
}
public void onLanded(World worldIn, Entity entityIn)
{
if (entityIn.isSneaking())
{
super.onLanded(worldIn, entityIn);
}
else if (entityIn.motionY < 0.0D)
{
entityIn.motionY = -entityIn.motionY;
}
}
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, Entity entityIn)
{
if (Math.abs(entityIn.motionY) < 0.1D && !entityIn.isSneaking())
{
double d0 = 0.4D + Math.abs(entityIn.motionY) * 0.2D;
entityIn.motionX *= d0;
entityIn.motionZ *= d0;
}
super.onEntityCollidedWithBlock(worldIn, pos, entityIn);
}
Umm, try to ues the "When player touches this block" event, and add a jump boost effect which is really high, and also add crazy resistance effect for coming down...
I dunno if it will work sorry