1.16 port
This commit is contained in:
@@ -38,7 +38,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
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.util.text.ITextComponent;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
@@ -402,7 +402,7 @@ public abstract class AEBasePart implements IPart, IGridProxyable, IActionHost,
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean onActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public final boolean onActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (this.useMemoryCard(player)) {
|
||||
return true;
|
||||
}
|
||||
@@ -411,7 +411,7 @@ public abstract class AEBasePart implements IPart, IGridProxyable, IActionHost,
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean onShiftActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public final boolean onShiftActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (this.useMemoryCard(player)) {
|
||||
return true;
|
||||
}
|
||||
@@ -419,11 +419,11 @@ public abstract class AEBasePart implements IPart, IGridProxyable, IActionHost,
|
||||
return this.onPartShiftActivate(player, hand, pos);
|
||||
}
|
||||
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean onPartShiftActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartShiftActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,9 +40,9 @@ import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.util.math.shapes.VoxelShapes;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
@@ -354,7 +354,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public SelectedPart selectPart(final Vec3d pos) {
|
||||
public SelectedPart selectPart(final Vector3d pos) {
|
||||
for (final AEPartLocation side : AEPartLocation.values()) {
|
||||
final IPart p = this.getPart(side);
|
||||
if (p != null) {
|
||||
@@ -651,7 +651,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean activate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean activate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
final SelectedPart p = this.selectPart(pos);
|
||||
if (p != null && p.part != null) {
|
||||
// forge sends activate even when sneaking in some cases (eg emtpy hand)
|
||||
@@ -665,7 +665,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean clicked(PlayerEntity player, Hand hand, Vec3d hitVec) {
|
||||
public boolean clicked(PlayerEntity player, Hand hand, Vector3d hitVec) {
|
||||
final SelectedPart p = this.selectPart(hitVec);
|
||||
if (p != null && p.part != null) {
|
||||
if (player.isCrouching()) {
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
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;
|
||||
@@ -46,15 +46,15 @@ public interface ICableBusContainer {
|
||||
|
||||
void onEntityCollision(Entity e);
|
||||
|
||||
boolean activate(PlayerEntity player, Hand hand, Vec3d vecFromPool);
|
||||
boolean activate(PlayerEntity player, Hand hand, Vector3d vecFromPool);
|
||||
|
||||
boolean clicked(PlayerEntity player, Hand hand, Vec3d hitVec);
|
||||
boolean clicked(PlayerEntity player, Hand hand, Vector3d hitVec);
|
||||
|
||||
void onNeighborChanged(IBlockReader w, BlockPos pos, BlockPos neighbor);
|
||||
|
||||
boolean isEmpty();
|
||||
|
||||
SelectedPart selectPart(Vec3d v3);
|
||||
SelectedPart selectPart(Vector3d v3);
|
||||
|
||||
boolean recolourBlock(Direction side, AEColor colour, PlayerEntity who);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
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;
|
||||
|
||||
@@ -57,7 +57,7 @@ public class NullCableBusContainer implements ICableBusContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean activate(final PlayerEntity player, final Hand hand, final Vec3d vecFromPool) {
|
||||
public boolean activate(final PlayerEntity player, final Hand hand, final Vector3d vecFromPool) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ public class NullCableBusContainer implements ICableBusContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public SelectedPart selectPart(final Vec3d v3) {
|
||||
public SelectedPart selectPart(final Vector3d v3) {
|
||||
return new SelectedPart();
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public class NullCableBusContainer implements ICableBusContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean clicked(PlayerEntity player, Hand hand, Vec3d hitVec) {
|
||||
public boolean clicked(PlayerEntity player, Hand hand, Vector3d hitVec) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.math.RayTraceContext;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.TickEvent;
|
||||
@@ -181,7 +181,7 @@ public class PartPlacement {
|
||||
if (held.isEmpty()) {
|
||||
if (host != null && player.isCrouching() && world.isAirBlock(pos)) {
|
||||
if (mop.getType() == RayTraceResult.Type.BLOCK) {
|
||||
Vec3d hitVec = mop.getHitVec().add(-mop.getPos().getX(), -mop.getPos().getY(),
|
||||
Vector3d hitVec = mop.getHitVec().add(-mop.getPos().getX(), -mop.getPos().getY(),
|
||||
-mop.getPos().getZ());
|
||||
final SelectedPart sPart = selectPart(player, host, hitVec);
|
||||
if (sPart != null && sPart.part != null) {
|
||||
@@ -329,7 +329,7 @@ public class PartPlacement {
|
||||
return getEyeHeight();
|
||||
}
|
||||
|
||||
private static SelectedPart selectPart(final PlayerEntity player, final IPartHost host, final Vec3d pos) {
|
||||
private static SelectedPart selectPart(final PlayerEntity player, final IPartHost host, final Vector3d pos) {
|
||||
AppEng.proxy.updateRenderMode(player);
|
||||
final SelectedPart sp = host.selectPart(pos);
|
||||
AppEng.proxy.updateRenderMode(null);
|
||||
@@ -365,7 +365,7 @@ public class PartPlacement {
|
||||
|
||||
final float f = 1.0F;
|
||||
final double d0 = mc.playerController.getBlockReachDistance();
|
||||
final Vec3d vec3 = mc.getRenderViewEntity().getEyePosition(f);
|
||||
final Vector3d vec3 = mc.getRenderViewEntity().getEyePosition(f);
|
||||
|
||||
if (mop instanceof BlockRayTraceResult && mop.getHitVec().distanceTo(vec3) < d0) {
|
||||
BlockRayTraceResult brtr = (BlockRayTraceResult) mop;
|
||||
|
||||
@@ -32,8 +32,8 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.tags.ITag;
|
||||
import net.minecraft.tags.ItemTags;
|
||||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -618,12 +618,12 @@ public class AnnihilationPlanePart extends BasicStatePart implements IGridTickab
|
||||
}
|
||||
|
||||
public static boolean isBlockBlacklisted(Block b) {
|
||||
Tag<Block> tag = BlockTags.getCollection().getOrCreate(TAG_BLACKLIST);
|
||||
ITag<Block> tag = BlockTags.getCollection().getOrCreate(TAG_BLACKLIST);
|
||||
return b.isIn(tag);
|
||||
}
|
||||
|
||||
public static boolean isItemBlacklisted(Item i) {
|
||||
Tag<Item> tag = ItemTags.getCollection().getOrCreate(TAG_BLACKLIST);
|
||||
ITag<Item> tag = ItemTags.getCollection().getOrCreate(TAG_BLACKLIST);
|
||||
return i.isIn(tag);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
@@ -196,7 +196,7 @@ public class ExportBusPart extends SharedItemBusPart implements ICraftingRequest
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(UpgradeableContainer.TYPE, player, ContainerLocator.forPart(this));
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
@@ -183,7 +183,7 @@ public class FormationPlanePart extends AbstractFormationPlanePart<IAEItemStack>
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(FormationPlaneContainer.TYPE, player, ContainerLocator.forPart(this));
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
@@ -119,7 +119,7 @@ public class ImportBusPart extends SharedItemBusPart implements IInventoryDestin
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(UpgradeableContainer.TYPE, player, ContainerLocator.forPart(this));
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
@@ -404,7 +404,7 @@ public class LevelEmitterPart extends UpgradeablePart implements IEnergyWatcherH
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(LevelEmitterContainer.TYPE, player, ContainerLocator.forPart(this));
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.model.RenderMaterial;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -42,19 +42,19 @@ import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
*/
|
||||
public class PlaneModel implements IModelGeometry<PlaneModel> {
|
||||
|
||||
private final Material frontTexture;
|
||||
private final Material sidesTexture;
|
||||
private final Material backTexture;
|
||||
private final RenderMaterial frontTexture;
|
||||
private final RenderMaterial sidesTexture;
|
||||
private final RenderMaterial backTexture;
|
||||
|
||||
public PlaneModel(ResourceLocation frontTexture, ResourceLocation sidesTexture, ResourceLocation backTexture) {
|
||||
this.frontTexture = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE, frontTexture);
|
||||
this.sidesTexture = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE, sidesTexture);
|
||||
this.backTexture = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE, backTexture);
|
||||
this.frontTexture = new RenderMaterial(AtlasTexture.LOCATION_BLOCKS_TEXTURE, frontTexture);
|
||||
this.sidesTexture = new RenderMaterial(AtlasTexture.LOCATION_BLOCKS_TEXTURE, sidesTexture);
|
||||
this.backTexture = new RenderMaterial(AtlasTexture.LOCATION_BLOCKS_TEXTURE, backTexture);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform,
|
||||
Function<RenderMaterial, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform,
|
||||
ItemOverrideList overrides, ResourceLocation modelLocation) {
|
||||
TextureAtlasSprite frontSprite = spriteGetter.apply(this.frontTexture);
|
||||
TextureAtlasSprite sidesSprite = spriteGetter.apply(this.sidesTexture);
|
||||
@@ -64,7 +64,7 @@ public class PlaneModel implements IModelGeometry<PlaneModel> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner,
|
||||
public Collection<RenderMaterial> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return Arrays.asList(frontTexture, sidesTexture, backTexture);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
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;
|
||||
|
||||
@@ -113,7 +113,7 @@ public class CableAnchorPart implements IPart {
|
||||
|
||||
@Override
|
||||
public boolean isLadder(final LivingEntity entity) {
|
||||
return this.mySide.yOffset == 0 && (entity.collidedHorizontally || !entity.onGround);
|
||||
return this.mySide.yOffset == 0 && (entity.collidedHorizontally || !entity.func_233570_aj_());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -173,12 +173,12 @@ public class CableAnchorPart implements IPart {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onShiftActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onShiftActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -164,7 +164,7 @@ public class InterfacePart extends BasicStatePart implements IGridTickable, ISto
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity p, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity p, final Hand hand, final Vector3d pos) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(InterfaceContainer.TYPE, p, ContainerLocator.forPart(this));
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
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.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
@@ -275,7 +275,7 @@ public class StorageBusPart extends UpgradeablePart
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(StorageBusContainer.TYPE, player, ContainerLocator.forPart(this));
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
@@ -157,7 +157,7 @@ public abstract class P2PTunnelPart<T extends P2PTunnelPart> extends BasicStateP
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (Platform.isClient()) {
|
||||
return true;
|
||||
}
|
||||
@@ -280,7 +280,7 @@ public abstract class P2PTunnelPart<T extends P2PTunnelPart> extends BasicStateP
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartShiftActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartShiftActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
final ItemStack is = player.inventory.getCurrentItem();
|
||||
if (!is.isEmpty() && is.getItem() instanceof IMemoryCard) {
|
||||
if (Platform.isClient()) {
|
||||
|
||||
@@ -30,7 +30,7 @@ import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
@@ -136,7 +136,7 @@ public abstract class AbstractMonitorPart extends AbstractDisplayPart
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (Platform.isClient()) {
|
||||
return true;
|
||||
}
|
||||
@@ -163,7 +163,7 @@ public abstract class AbstractMonitorPart extends AbstractDisplayPart
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartShiftActivate(PlayerEntity player, Hand hand, Vec3d pos) {
|
||||
public boolean onPartShiftActivate(PlayerEntity player, Hand hand, Vector3d pos) {
|
||||
if (Platform.isClient()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -171,7 +171,7 @@ public abstract class AbstractReportingPart extends AEBasePart implements IMonit
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
final TileEntity te = this.getTile();
|
||||
|
||||
if (Platform.isWrench(player, player.inventory.getCurrentItem(), te.getPos())) {
|
||||
|
||||
@@ -25,7 +25,7 @@ import net.minecraft.inventory.container.ContainerType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.config.Settings;
|
||||
@@ -104,7 +104,7 @@ public abstract class AbstractTerminalPart extends AbstractDisplayPart
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (!super.onPartActivate(player, hand, pos)) {
|
||||
if (!player.world.isRemote) {
|
||||
ContainerOpener.openContainer(getContainerType(player), player, ContainerLocator.forPart(this));
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.wrapper.PlayerMainInvWrapper;
|
||||
|
||||
@@ -73,7 +73,7 @@ public class ConversionMonitorPart extends AbstractMonitorPart {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(PlayerEntity player, Hand hand, Vec3d pos) {
|
||||
public boolean onPartActivate(PlayerEntity player, Hand hand, Vector3d pos) {
|
||||
if (Platform.isClient()) {
|
||||
return true;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ public class ConversionMonitorPart extends AbstractMonitorPart {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClicked(PlayerEntity player, Hand hand, Vec3d pos) {
|
||||
public boolean onClicked(PlayerEntity player, Hand hand, Vector3d pos) {
|
||||
if (Platform.isClient()) {
|
||||
return true;
|
||||
}
|
||||
@@ -128,7 +128,7 @@ public class ConversionMonitorPart extends AbstractMonitorPart {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onShiftClicked(PlayerEntity player, Hand hand, Vec3d pos) {
|
||||
public boolean onShiftClicked(PlayerEntity player, Hand hand, Vector3d pos) {
|
||||
if (Platform.isClient()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
|
||||
import appeng.api.parts.IPartModel;
|
||||
import appeng.container.ContainerLocator;
|
||||
@@ -49,7 +49,7 @@ public class InterfaceTerminalPart extends AbstractDisplayPart {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (!super.onPartActivate(player, hand, pos)) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(InterfaceTerminalContainer.TYPE, player, ContainerLocator.forPart(this));
|
||||
|
||||
Reference in New Issue
Block a user