2016-07-01 23:07:43 +00:00
|
|
|
package WayofTime.bloodmagic.alchemyArray;
|
|
|
|
|
2018-02-16 02:49:01 +00:00
|
|
|
import WayofTime.bloodmagic.iface.IAlchemyArray;
|
2019-02-01 00:22:00 +00:00
|
|
|
import WayofTime.bloodmagic.tile.TileAlchemyArray;
|
2019-09-22 19:55:43 +00:00
|
|
|
import net.minecraft.block.BlockState;
|
2016-07-01 23:07:43 +00:00
|
|
|
import net.minecraft.entity.Entity;
|
2019-09-22 19:55:43 +00:00
|
|
|
import net.minecraft.nbt.CompoundNBT;
|
2016-07-01 23:07:43 +00:00
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
import net.minecraft.util.math.BlockPos;
|
|
|
|
import net.minecraft.world.World;
|
|
|
|
|
2017-08-16 04:30:48 +00:00
|
|
|
public class AlchemyArrayEffectUpdraft extends AlchemyArrayEffect {
|
|
|
|
public AlchemyArrayEffectUpdraft(String key) {
|
2016-07-01 23:07:43 +00:00
|
|
|
super(key);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2017-08-16 04:30:48 +00:00
|
|
|
public boolean update(TileEntity tile, int ticksActive) {
|
2016-07-01 23:07:43 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-09-22 19:55:43 +00:00
|
|
|
public void onEntityCollidedWithBlock(IAlchemyArray array, World world, BlockPos pos, BlockState state, Entity entity) {
|
2019-02-01 00:22:00 +00:00
|
|
|
double motionY = 1;
|
|
|
|
double motionYGlowstoneMod = 0.1;
|
|
|
|
double motionYFeatherMod = 0.05;
|
2016-07-01 23:07:43 +00:00
|
|
|
|
|
|
|
entity.fallDistance = 0;
|
2019-02-01 00:22:00 +00:00
|
|
|
TileAlchemyArray tileArray = (TileAlchemyArray) array;
|
|
|
|
motionY += motionYGlowstoneMod * (tileArray.getStackInSlot(0).getCount() - 1); // Glowstone Dust
|
|
|
|
motionY += motionYFeatherMod * (tileArray.getStackInSlot(1).getCount() - 1); // Feathers
|
2016-07-01 23:07:43 +00:00
|
|
|
|
|
|
|
entity.motionY = motionY;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-09-22 19:55:43 +00:00
|
|
|
public void writeToNBT(CompoundNBT tag) {
|
2016-07-01 23:07:43 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-09-22 19:55:43 +00:00
|
|
|
public void readFromNBT(CompoundNBT tag) {
|
2016-07-01 23:07:43 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2017-08-16 04:30:48 +00:00
|
|
|
public AlchemyArrayEffect getNewCopy() {
|
2016-07-01 23:07:43 +00:00
|
|
|
return new AlchemyArrayEffectUpdraft(key);
|
|
|
|
}
|
|
|
|
}
|