mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-27 23:45:57 +00:00
More work, pretty close to being back to 1.13 level
This commit is contained in:
1 parent
828d952a86
commit
bd5b395ee8
51 files changed
+336
-235
No files matched your search
@@ -26,6 +26,8 @@ import net.minecraft.particles.ItemParticleData;
|
||||
import net.minecraft.state.BooleanProperty;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.math.EntityRayTraceResult;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
@@ -75,13 +77,13 @@ public class EntityVineBall extends ThrowableEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onImpact(@Nonnull RayTraceResult var1) {
|
||||
protected void onImpact(@Nonnull RayTraceResult rtr) {
|
||||
if(!world.isRemote) {
|
||||
if(var1 != null) {
|
||||
Direction dir = var1.sideHit;
|
||||
if(rtr.getType() == RayTraceResult.Type.BLOCK) {
|
||||
Direction dir = ((BlockRayTraceResult) rtr).getFace();
|
||||
|
||||
if(dir != null && dir.getAxis() != Direction.Axis.Y) {
|
||||
BlockPos pos = var1.getBlockPos().offset(dir);
|
||||
if(dir.getAxis() != Direction.Axis.Y) {
|
||||
BlockPos pos = ((BlockRayTraceResult) rtr).getPos().offset(dir);
|
||||
boolean first = true;
|
||||
while(pos.getY() > 0) {
|
||||
BlockState state = world.getBlockState(pos);
|
||||
|
||||
Reference in new issue
Block a user