Hello there,
so I tried making a falling block that falls up. So I made a new entity that extends FallingBlockEntity and I overwrited a method in the constructor to change the motion of the entity. I tried changing values to their negative equivalent and multipliying them by -1 but none worked.
package com.maxandcarl.inan.entities;
import net.minecraft.block.BlockState;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.item.FallingBlockEntity;
import net.minecraft.world.World;
public class EndGravelBlockEntity extends FallingBlockEntity{
public EndGravelBlockEntity(World worldIn, double x, double y, double z, BlockState fallingBlockState) {
super(worldIn, x, y, z, fallingBlockState);
this.setPosition(x, y + (double)((1.0F - this.getHeight()) /2.0F) * -1, z);
}
public EndGravelBlockEntity(EntityType<? extends FallingBlockEntity> type, World worldIn)
{
super(type, worldIn);
}
}
Help please. Is gravity linked directly to this function for falling blocks or is it something else that applies to every entity that I have to change?