mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-26 05:08:34 +01:00
disabled the dimension rail, updated forge
This commit is contained in:
parent
932d4ed039
commit
61f966c071
2 changed files with 19 additions and 1 deletions
|
@ -89,7 +89,7 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
minecraft 'net.minecraftforge:forge:1.14.4-28.1.92'
|
||||
minecraft 'net.minecraftforge:forge:1.14.4-28.1.116'
|
||||
|
||||
compileOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.11:api")
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.11")
|
||||
|
|
|
@ -12,6 +12,7 @@ import net.minecraft.block.AbstractRailBlock;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.item.minecart.AbstractMinecartEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -27,12 +28,19 @@ import net.minecraft.util.SoundEvents;
|
|||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.util.text.Style;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.dimension.DimensionType;
|
||||
import net.minecraft.world.gen.Heightmap;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockDimensionRail extends AbstractRailBlock implements IModItem, IModelProvider {
|
||||
|
||||
public static final EnumProperty<RailShape> SHAPE = BlockStateProperties.RAIL_SHAPE;
|
||||
|
@ -85,6 +93,10 @@ public class BlockDimensionRail extends AbstractRailBlock implements IModItem, I
|
|||
|
||||
BlockPos goalCoords = this.getGoalCoords(world, pos);
|
||||
|
||||
// TODO wait for Forge to have re-implemented ITeleporter
|
||||
if (true)
|
||||
return;
|
||||
|
||||
cart.changeDimension(DimensionType.getById(this.goalDim));
|
||||
cart.moveToBlockPosAndAngles(goalCoords, cart.rotationYaw, cart.rotationPitch);
|
||||
|
||||
|
@ -92,6 +104,12 @@ public class BlockDimensionRail extends AbstractRailBlock implements IModItem, I
|
|||
IAuraChunk.getAuraChunk(world, spot).drainAura(spot, 50000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, @Nullable IBlockReader worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) {
|
||||
super.addInformation(stack, worldIn, tooltip, flagIn);
|
||||
tooltip.add(new StringTextComponent("CURRENTLY UNIMPLEMENTED - Waiting for a Forge change").setStyle(new Style().setColor(TextFormatting.RED)));
|
||||
}
|
||||
|
||||
private BlockPos getGoalCoords(World world, BlockPos pos) {
|
||||
MinecraftServer server = world.getServer();
|
||||
DimensionType goalDimType = DimensionType.getById(this.goalDim);
|
||||
|
|
Loading…
Reference in a new issue