1.16 port

This commit is contained in:
yueh
2020-07-22 16:44:42 +02:00
parent 662dbca3e1
commit 56ecda5173
225 changed files with 1214 additions and 969 deletions
@@ -24,8 +24,8 @@
package appeng.api.features;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.Dimension;
import net.minecraft.world.IWorld;
import net.minecraft.world.dimension.Dimension;
public interface IWorldGen {
@@ -25,8 +25,8 @@ package appeng.api.implementations.items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.DimensionType;
import net.minecraft.world.World;
import net.minecraft.world.dimension.DimensionType;
import appeng.api.implementations.TransitionResult;
import appeng.api.util.WorldCoord;
+5 -5
View File
@@ -42,7 +42,7 @@ import net.minecraft.network.PacketBuffer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@@ -221,7 +221,7 @@ public interface IPart extends ICustomCableConnection {
*
* @return if your activate method performed something.
*/
boolean onActivate(PlayerEntity player, Hand hand, Vec3d pos);
boolean onActivate(PlayerEntity player, Hand hand, Vector3d pos);
/**
* Called when you right click the part, very similar to Block.onActivateBlock
@@ -233,7 +233,7 @@ public interface IPart extends ICustomCableConnection {
* @return if your activate method performed something, you should use false
* unless you really need it.
*/
boolean onShiftActivate(PlayerEntity player, Hand hand, Vec3d pos);
boolean onShiftActivate(PlayerEntity player, Hand hand, Vector3d pos);
/**
* Called when you left click the part, very similar to Block.onBlockClicked
@@ -245,7 +245,7 @@ public interface IPart extends ICustomCableConnection {
* @return if your activate method performed something, you should use false
* unless you really need it.
*/
default boolean onClicked(PlayerEntity player, Hand hand, Vec3d pos) {
default boolean onClicked(PlayerEntity player, Hand hand, Vector3d pos) {
return false;
}
@@ -260,7 +260,7 @@ public interface IPart extends ICustomCableConnection {
* @return if your activate method performed something, you should use false
* unless you really need it.
*/
default boolean onShiftClicked(PlayerEntity player, Hand hand, Vec3d pos) {
default boolean onShiftClicked(PlayerEntity player, Hand hand, Vector3d pos) {
return false;
}
+2 -2
View File
@@ -30,7 +30,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.vector.Vector3d;
import appeng.api.util.AEColor;
import appeng.api.util.AEPartLocation;
@@ -146,7 +146,7 @@ public interface IPartHost extends ICustomCableConnection {
*
* @return a new SelectedPart, this is never null.
*/
SelectedPart selectPart(Vec3d pos);
SelectedPart selectPart(Vector3d pos);
/**
* can be used by parts to trigger the tile or part to save.
@@ -24,7 +24,7 @@ import javax.annotation.Nullable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.dimension.DimensionType;
import net.minecraft.world.DimensionType;
import net.minecraft.world.server.ServerWorld;
public interface ISpatialDimension {
@@ -25,8 +25,9 @@ package appeng.api.util;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.Dimension;
import net.minecraft.world.DimensionType;
import net.minecraft.world.IWorld;
import net.minecraft.world.dimension.Dimension;
/**
* Represents a location in the Minecraft Universe
@@ -34,7 +35,7 @@ import net.minecraft.world.dimension.Dimension;
public class DimensionalCoord extends WorldCoord {
private final IWorld world;
private final Dimension dimension;
private final DimensionType dimension;
public DimensionalCoord(final DimensionalCoord coordinate) {
super(coordinate.x, coordinate.y, coordinate.z);
@@ -45,19 +46,19 @@ public class DimensionalCoord extends WorldCoord {
public DimensionalCoord(final TileEntity tileEntity) {
super(tileEntity);
this.world = tileEntity.getWorld();
this.dimension = this.world.getDimension();
this.dimension = this.world.func_230315_m_();
}
public DimensionalCoord(final IWorld world, final int x, final int y, final int z) {
super(x, y, z);
this.world = world;
this.dimension = world.getDimension();
this.dimension = world.func_230315_m_();
}
public DimensionalCoord(final IWorld world, final BlockPos pos) {
super(pos);
this.world = world;
this.dimension = world.getDimension();
this.dimension = world.func_230315_m_();
}
@Override