The Great Renamening of 2020
This commit is contained in:
+2
-2
@@ -44,8 +44,8 @@ import appeng.api.networking.security.ISecurityRegistry;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.items.AEBaseItem;
|
||||
|
||||
public class ToolBiometricCard extends AEBaseItem implements IBiometricCard {
|
||||
public ToolBiometricCard(Properties properties) {
|
||||
public class BiometricCardItem extends AEBaseItem implements IBiometricCard {
|
||||
public BiometricCardItem(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
+2
-2
@@ -46,13 +46,13 @@ import appeng.core.localization.PlayerMessages;
|
||||
import appeng.items.AEBaseItem;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ToolMemoryCard extends AEBaseItem implements IMemoryCard {
|
||||
public class MemoryCardItem extends AEBaseItem implements IMemoryCard {
|
||||
|
||||
private static final AEColor[] DEFAULT_COLOR_CODE = new AEColor[] { AEColor.TRANSPARENT, AEColor.TRANSPARENT,
|
||||
AEColor.TRANSPARENT, AEColor.TRANSPARENT, AEColor.TRANSPARENT, AEColor.TRANSPARENT, AEColor.TRANSPARENT,
|
||||
AEColor.TRANSPARENT, };
|
||||
|
||||
public ToolMemoryCard(Properties properties) {
|
||||
public MemoryCardItem(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
+9
-9
@@ -46,18 +46,18 @@ import appeng.api.util.INetworkToolAgent;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerNetworkStatus;
|
||||
import appeng.container.implementations.ContainerNetworkTool;
|
||||
import appeng.container.implementations.NetworkStatusContainer;
|
||||
import appeng.container.implementations.NetworkToolContainer;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketClick;
|
||||
import appeng.core.sync.packets.ClickPacket;
|
||||
import appeng.items.AEBaseItem;
|
||||
import appeng.items.contents.NetworkToolViewer;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench {
|
||||
public class NetworkToolItem extends AEBaseItem implements IGuiItem, IAEWrench {
|
||||
|
||||
public ToolNetworkTool(Properties properties) {
|
||||
public NetworkToolItem(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench {
|
||||
final RayTraceResult mop = AppEng.proxy.getRTR();
|
||||
|
||||
if (mop == null || mop.getType() == RayTraceResult.Type.MISS) {
|
||||
NetworkHandler.instance().sendToServer(new PacketClick(hand));
|
||||
NetworkHandler.instance().sendToServer(new ClickPacket(hand));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench {
|
||||
}
|
||||
|
||||
if (Platform.isClient()) {
|
||||
NetworkHandler.instance().sendToServer(new PacketClick(context));
|
||||
NetworkHandler.instance().sendToServer(new ClickPacket(context));
|
||||
}
|
||||
|
||||
return ActionResultType.SUCCESS;
|
||||
@@ -147,10 +147,10 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench {
|
||||
final TileEntity te = w.getTileEntity(pos);
|
||||
|
||||
if (te instanceof IGridHost) {
|
||||
ContainerOpener.openContainer(ContainerNetworkStatus.TYPE, p,
|
||||
ContainerOpener.openContainer(NetworkStatusContainer.TYPE, p,
|
||||
ContainerLocator.forItemUseContext(useContext));
|
||||
} else {
|
||||
ContainerOpener.openContainer(ContainerNetworkTool.TYPE, p, ContainerLocator.forHand(p, hand));
|
||||
ContainerOpener.openContainer(NetworkToolContainer.TYPE, p, ContainerLocator.forHand(p, hand));
|
||||
}
|
||||
|
||||
return true;
|
||||
+4
-4
@@ -27,13 +27,13 @@ import net.minecraft.util.math.AxisAlignedBB;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.sync.packets.PacketLightning;
|
||||
import appeng.core.sync.packets.LightningPacket;
|
||||
import appeng.items.tools.powered.powersink.AEBasePoweredItem;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ToolChargedStaff extends AEBasePoweredItem {
|
||||
public class ChargedStaffItem extends AEBasePoweredItem {
|
||||
|
||||
public ToolChargedStaff(Item.Properties props) {
|
||||
public ChargedStaffItem(Item.Properties props) {
|
||||
super(AEConfig.instance().getChargedStaffBattery(), props);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class ToolChargedStaff extends AEBasePoweredItem {
|
||||
final float dy = (float) (Platform.getRandomFloat() * target.getHeight() + entityBoundingBox.minY);
|
||||
final float dz = (float) (Platform.getRandomFloat() * target.getWidth() + entityBoundingBox.minZ);
|
||||
AppEng.proxy.sendToAllNearExcept(null, dx, dy, dz, 32.0, target.world,
|
||||
new PacketLightning(dx, dy, dz));
|
||||
new LightningPacket(dx, dy, dz));
|
||||
}
|
||||
}
|
||||
target.attackEntityFrom(DamageSource.MAGIC, 6);
|
||||
+13
-13
@@ -63,8 +63,8 @@ import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.block.networking.BlockCableBus;
|
||||
import appeng.block.paint.BlockPaint;
|
||||
import appeng.block.networking.CableBusBlock;
|
||||
import appeng.block.paint.PaintSplotchesBlock;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.localization.GuiText;
|
||||
@@ -72,14 +72,14 @@ import appeng.helpers.IMouseWheelItem;
|
||||
import appeng.hooks.IBlockTool;
|
||||
import appeng.items.contents.CellConfig;
|
||||
import appeng.items.contents.CellUpgrades;
|
||||
import appeng.items.misc.ItemPaintBall;
|
||||
import appeng.items.misc.PaintBallItem;
|
||||
import appeng.items.tools.powered.powersink.AEBasePoweredItem;
|
||||
import appeng.me.helpers.BaseActionSource;
|
||||
import appeng.tile.misc.TilePaint;
|
||||
import appeng.tile.misc.PaintSplotchesTileEntity;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.item.AEItemStack;
|
||||
|
||||
public class ToolColorApplicator extends AEBasePoweredItem
|
||||
public class ColorApplicatorItem extends AEBasePoweredItem
|
||||
implements IStorageCell<IAEItemStack>, IItemGroup, IBlockTool, IMouseWheelItem {
|
||||
|
||||
private static final Map<ResourceLocation, AEColor> TAG_TO_COLOR = ImmutableMap.<ResourceLocation, AEColor>builder()
|
||||
@@ -102,7 +102,7 @@ public class ToolColorApplicator extends AEBasePoweredItem
|
||||
|
||||
private static final String TAG_COLOR = "color";
|
||||
|
||||
public ToolColorApplicator(Item.Properties props) {
|
||||
public ColorApplicatorItem(Item.Properties props) {
|
||||
super(AEConfig.instance().getColorApplicatorBattery(), props);
|
||||
addPropertyOverride(new ResourceLocation(AppEng.MOD_ID, "colored"), (itemStack, world, entity) -> {
|
||||
// If the stack has no color, don't use the colored model since the impact of
|
||||
@@ -165,11 +165,11 @@ public class ToolColorApplicator extends AEBasePoweredItem
|
||||
// clean paint balls..
|
||||
final Block testBlk = w.getBlockState(pos.offset(side)).getBlock();
|
||||
final TileEntity painted = w.getTileEntity(pos.offset(side));
|
||||
if (this.getAECurrentPower(is) > powerPerUse && testBlk instanceof BlockPaint
|
||||
&& painted instanceof TilePaint) {
|
||||
if (this.getAECurrentPower(is) > powerPerUse && testBlk instanceof PaintSplotchesBlock
|
||||
&& painted instanceof PaintSplotchesTileEntity) {
|
||||
inv.extractItems(AEItemStack.fromItemStack(paintBall), Actionable.MODULATE, new BaseActionSource());
|
||||
this.extractAEPower(is, powerPerUse, Actionable.MODULATE);
|
||||
((TilePaint) painted).cleanSide(side.getOpposite());
|
||||
((PaintSplotchesTileEntity) painted).cleanSide(side.getOpposite());
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
} else if (!paintBall.isEmpty()) {
|
||||
@@ -219,8 +219,8 @@ public class ToolColorApplicator extends AEBasePoweredItem
|
||||
return AEColor.TRANSPARENT;
|
||||
}
|
||||
|
||||
if (paintBall.getItem() instanceof ItemPaintBall) {
|
||||
final ItemPaintBall ipb = (ItemPaintBall) paintBall.getItem();
|
||||
if (paintBall.getItem() instanceof PaintBallItem) {
|
||||
final PaintBallItem ipb = (PaintBallItem) paintBall.getItem();
|
||||
return ipb.getColor();
|
||||
} else {
|
||||
for (Map.Entry<ResourceLocation, AEColor> entry : TAG_TO_COLOR.entrySet()) {
|
||||
@@ -331,8 +331,8 @@ public class ToolColorApplicator extends AEBasePoweredItem
|
||||
return w.setBlockState(pos, newState);
|
||||
}
|
||||
|
||||
if (blk instanceof BlockCableBus && p != null) {
|
||||
return ((BlockCableBus) blk).recolorBlock(w, pos, side, newColor.dye, p);
|
||||
if (blk instanceof CableBusBlock && p != null) {
|
||||
return ((CableBusBlock) blk).recolorBlock(w, pos, side, newColor.dye, p);
|
||||
}
|
||||
|
||||
return blk.recolorBlock(state, w, pos, side, newColor.dye);
|
||||
+2
-5
@@ -1,17 +1,14 @@
|
||||
package appeng.items.tools.powered;
|
||||
|
||||
import net.minecraft.client.renderer.model.ModelResourceLocation;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.bootstrap.IItemRendering;
|
||||
import appeng.bootstrap.ItemRenderingCustomizer;
|
||||
import appeng.core.AppEng;
|
||||
|
||||
public class ToolColorApplicatorRendering extends ItemRenderingCustomizer {
|
||||
public class ColorApplicatorItemRendering extends ItemRenderingCustomizer {
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -24,7 +21,7 @@ public class ToolColorApplicatorRendering extends ItemRenderingCustomizer {
|
||||
return -1;
|
||||
}
|
||||
|
||||
final AEColor col = ((ToolColorApplicator) itemStack.getItem()).getActiveColor(itemStack);
|
||||
final AEColor col = ((ColorApplicatorItem) itemStack.getItem()).getActiveColor(itemStack);
|
||||
|
||||
if (col == null) {
|
||||
return -1;
|
||||
+5
-5
@@ -45,7 +45,7 @@ import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.block.misc.BlockTinyTNT;
|
||||
import appeng.block.misc.TinyTNTBlock;
|
||||
import appeng.container.ContainerNull;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.hooks.IBlockTool;
|
||||
@@ -53,11 +53,11 @@ import appeng.items.tools.powered.powersink.AEBasePoweredItem;
|
||||
import appeng.util.InWorldToolOperationResult;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockTool {
|
||||
public class EntropyManipulatorItem extends AEBasePoweredItem implements IBlockTool {
|
||||
private final Map<InWorldToolOperationIngredient, InWorldToolOperationResult> heatUp;
|
||||
private final Map<InWorldToolOperationIngredient, InWorldToolOperationResult> coolDown;
|
||||
|
||||
public ToolEntropyManipulator(Item.Properties props) {
|
||||
public EntropyManipulatorItem(Item.Properties props) {
|
||||
super(AEConfig.instance().getEntropyManipulatorBattery(), props);
|
||||
|
||||
this.heatUp = new HashMap<>();
|
||||
@@ -261,9 +261,9 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
|
||||
if (block instanceof BlockTinyTNT) {
|
||||
if (block instanceof TinyTNTBlock) {
|
||||
w.removeBlock(pos, false);
|
||||
((BlockTinyTNT) block).startFuse(w, pos, p);
|
||||
((TinyTNTBlock) block).startFuse(w, pos, p);
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
|
||||
+13
-13
@@ -69,26 +69,26 @@ import appeng.core.AELog;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.localization.PlayerMessages;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketMatterCannon;
|
||||
import appeng.core.sync.packets.MatterCannonPacket;
|
||||
import appeng.hooks.TickHandler;
|
||||
import appeng.hooks.TickHandler.PlayerColor;
|
||||
import appeng.items.contents.CellConfig;
|
||||
import appeng.items.contents.CellUpgrades;
|
||||
import appeng.items.misc.ItemPaintBall;
|
||||
import appeng.items.misc.PaintBallItem;
|
||||
import appeng.items.tools.powered.powersink.AEBasePoweredItem;
|
||||
import appeng.me.helpers.PlayerSource;
|
||||
import appeng.tile.misc.TilePaint;
|
||||
import appeng.tile.misc.PaintSplotchesTileEntity;
|
||||
import appeng.util.LookDirection;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell<IAEItemStack> {
|
||||
public class MatterCannonItem extends AEBasePoweredItem implements IStorageCell<IAEItemStack> {
|
||||
|
||||
/**
|
||||
* AE energy units consumer per shot fired.
|
||||
*/
|
||||
private static final int ENERGY_PER_SHOT = 1600;
|
||||
|
||||
public ToolMatterCannon(Item.Properties props) {
|
||||
public MatterCannonItem(Item.Properties props) {
|
||||
super(AEConfig.instance().getMatterCannonBattery(), props);
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell<
|
||||
final float penetration = AEApi.instance().registries().matterCannon().getPenetration(ammo); // 196.96655f;
|
||||
if (penetration <= 0) {
|
||||
final ItemStack type = aeAmmo.asItemStackRepresentation();
|
||||
if (type.getItem() instanceof ItemPaintBall) {
|
||||
if (type.getItem() instanceof PaintBallItem) {
|
||||
this.shootPaintBalls(type, w, p, rayFrom, rayTo, direction, d0, d1, d2);
|
||||
}
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, p.getHeldItem(hand));
|
||||
@@ -227,15 +227,15 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell<
|
||||
|
||||
try {
|
||||
AppEng.proxy.sendToAllNearExcept(null, d0, d1, d2, 128, w,
|
||||
new PacketMatterCannon(d0, d1, d2, (float) direction.x, (float) direction.y, (float) direction.z,
|
||||
new MatterCannonPacket(d0, d1, d2, (float) direction.x, (float) direction.y, (float) direction.z,
|
||||
(byte) (pos.getType() == RayTraceResult.Type.MISS ? 32
|
||||
: pos.getHitVec().squareDistanceTo(vec) + 1)));
|
||||
} catch (final Exception err) {
|
||||
AELog.debug(err);
|
||||
}
|
||||
|
||||
if (pos.getType() != RayTraceResult.Type.MISS && type != null && type.getItem() instanceof ItemPaintBall) {
|
||||
final ItemPaintBall ipb = (ItemPaintBall) type.getItem();
|
||||
if (pos.getType() != RayTraceResult.Type.MISS && type != null && type.getItem() instanceof PaintBallItem) {
|
||||
final PaintBallItem ipb = (PaintBallItem) type.getItem();
|
||||
|
||||
final AEColor col = ipb.getColor();
|
||||
// boolean lit = ipb.isLumen( type );
|
||||
@@ -272,9 +272,9 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell<
|
||||
}
|
||||
|
||||
final TileEntity te = w.getTileEntity(hitPos);
|
||||
if (te instanceof TilePaint) {
|
||||
if (te instanceof PaintSplotchesTileEntity) {
|
||||
final Vec3d hp = pos.getHitVec().subtract(hitPos.getX(), hitPos.getY(), hitPos.getZ());
|
||||
((TilePaint) te).addBlot(type, side.getOpposite(), hp);
|
||||
((PaintSplotchesTileEntity) te).addBlot(type, side.getOpposite(), hp);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -336,7 +336,7 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell<
|
||||
|
||||
try {
|
||||
AppEng.proxy.sendToAllNearExcept(null, d0, d1, d2, 128, w,
|
||||
new PacketMatterCannon(d0, d1, d2, (float) direction.x, (float) direction.y,
|
||||
new MatterCannonPacket(d0, d1, d2, (float) direction.x, (float) direction.y,
|
||||
(float) direction.z, (byte) (pos.getType() == RayTraceResult.Type.MISS ? 32
|
||||
: pos.getHitVec().squareDistanceTo(vec) + 1)));
|
||||
} catch (final Exception err) {
|
||||
@@ -445,7 +445,7 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell<
|
||||
return false;
|
||||
}
|
||||
|
||||
if (requestedAddition.getItem() instanceof ItemPaintBall) {
|
||||
if (requestedAddition.getItem() instanceof PaintBallItem) {
|
||||
return false;
|
||||
}
|
||||
|
||||
+4
-4
@@ -47,7 +47,7 @@ import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerMEPortableCell;
|
||||
import appeng.container.implementations.MEPortableCellContainer;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.items.contents.CellConfig;
|
||||
@@ -55,14 +55,14 @@ import appeng.items.contents.CellUpgrades;
|
||||
import appeng.items.contents.PortableCellViewer;
|
||||
import appeng.items.tools.powered.powersink.AEBasePoweredItem;
|
||||
|
||||
public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell<IAEItemStack>, IGuiItem, IItemGroup {
|
||||
public ToolPortableCell(Item.Properties props) {
|
||||
public class PortableCellItem extends AEBasePoweredItem implements IStorageCell<IAEItemStack>, IGuiItem, IItemGroup {
|
||||
public PortableCellItem(Item.Properties props) {
|
||||
super(AEConfig.instance().getPortableCellBattery(), props);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(final World w, final PlayerEntity player, final Hand hand) {
|
||||
ContainerOpener.openContainer(ContainerMEPortableCell.TYPE, player, ContainerLocator.forHand(player, hand));
|
||||
ContainerOpener.openContainer(MEPortableCellContainer.TYPE, player, ContainerLocator.forHand(player, hand));
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, player.getHeldItem(hand));
|
||||
}
|
||||
|
||||
+2
-2
@@ -47,9 +47,9 @@ import appeng.core.localization.GuiText;
|
||||
import appeng.items.tools.powered.powersink.AEBasePoweredItem;
|
||||
import appeng.util.ConfigManager;
|
||||
|
||||
public class ToolWirelessTerminal extends AEBasePoweredItem implements IWirelessTermHandler {
|
||||
public class WirelessTerminalItem extends AEBasePoweredItem implements IWirelessTermHandler {
|
||||
|
||||
public ToolWirelessTerminal(Item.Properties props) {
|
||||
public WirelessTerminalItem(Item.Properties props) {
|
||||
super(AEConfig.instance().getWirelessTerminalBattery(), props);
|
||||
}
|
||||
|
||||
+2
-2
@@ -26,10 +26,10 @@ import net.minecraft.item.ItemTier;
|
||||
import appeng.api.features.AEFeature;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ToolQuartzAxe extends AxeItem {
|
||||
public class QuartzAxeItem extends AxeItem {
|
||||
private final AEFeature type;
|
||||
|
||||
public ToolQuartzAxe(Item.Properties props, final AEFeature type) {
|
||||
public QuartzAxeItem(Item.Properties props, final AEFeature type) {
|
||||
super(ItemTier.IRON, 6.0F, -3.1F, props);
|
||||
this.type = type;
|
||||
}
|
||||
+5
-5
@@ -33,15 +33,15 @@ import appeng.api.implementations.guiobjects.IGuiItem;
|
||||
import appeng.api.implementations.guiobjects.IGuiItemObject;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.ContainerQuartzKnife;
|
||||
import appeng.container.implementations.QuartzKnifeContainer;
|
||||
import appeng.items.AEBaseItem;
|
||||
import appeng.items.contents.QuartzKnifeObj;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ToolQuartzCuttingKnife extends AEBaseItem implements IGuiItem {
|
||||
public class QuartzCuttingKnifeItem extends AEBaseItem implements IGuiItem {
|
||||
private final AEFeature type;
|
||||
|
||||
public ToolQuartzCuttingKnife(Item.Properties props, final AEFeature type) {
|
||||
public QuartzCuttingKnifeItem(Item.Properties props, final AEFeature type) {
|
||||
super(props);
|
||||
this.type = type;
|
||||
}
|
||||
@@ -50,7 +50,7 @@ public class ToolQuartzCuttingKnife extends AEBaseItem implements IGuiItem {
|
||||
public ActionResultType onItemUse(ItemUseContext context) {
|
||||
PlayerEntity player = context.getPlayer();
|
||||
if (Platform.isServer() && player != null) {
|
||||
ContainerOpener.openContainer(ContainerQuartzKnife.TYPE, context.getPlayer(),
|
||||
ContainerOpener.openContainer(QuartzKnifeContainer.TYPE, context.getPlayer(),
|
||||
ContainerLocator.forItemUseContext(context));
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
@@ -59,7 +59,7 @@ public class ToolQuartzCuttingKnife extends AEBaseItem implements IGuiItem {
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(final World w, final PlayerEntity p, final Hand hand) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(ContainerQuartzKnife.TYPE, p, ContainerLocator.forHand(p, hand));
|
||||
ContainerOpener.openContainer(QuartzKnifeContainer.TYPE, p, ContainerLocator.forHand(p, hand));
|
||||
}
|
||||
p.swingArm(hand);
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, p.getHeldItem(hand));
|
||||
+2
-2
@@ -26,10 +26,10 @@ import net.minecraft.item.ItemTier;
|
||||
import appeng.api.features.AEFeature;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ToolQuartzHoe extends HoeItem {
|
||||
public class QuartzHoeItem extends HoeItem {
|
||||
private final AEFeature type;
|
||||
|
||||
public ToolQuartzHoe(Item.Properties props, final AEFeature type) {
|
||||
public QuartzHoeItem(Item.Properties props, final AEFeature type) {
|
||||
super(ItemTier.IRON, -1.0F, props);
|
||||
this.type = type;
|
||||
}
|
||||
+2
-2
@@ -26,10 +26,10 @@ import net.minecraft.item.PickaxeItem;
|
||||
import appeng.api.features.AEFeature;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ToolQuartzPickaxe extends PickaxeItem {
|
||||
public class QuartzPickaxeItem extends PickaxeItem {
|
||||
private final AEFeature type;
|
||||
|
||||
public ToolQuartzPickaxe(Item.Properties props, final AEFeature type) {
|
||||
public QuartzPickaxeItem(Item.Properties props, final AEFeature type) {
|
||||
super(ItemTier.IRON, 1, -2.8F, props);
|
||||
this.type = type;
|
||||
}
|
||||
+2
-2
@@ -26,10 +26,10 @@ import net.minecraft.item.ShovelItem;
|
||||
import appeng.api.features.AEFeature;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ToolQuartzSpade extends ShovelItem {
|
||||
public class QuartzSpadeItem extends ShovelItem {
|
||||
private final AEFeature type;
|
||||
|
||||
public ToolQuartzSpade(Item.Properties props, final AEFeature type) {
|
||||
public QuartzSpadeItem(Item.Properties props, final AEFeature type) {
|
||||
super(ItemTier.IRON, 1.5F, -3.0F, props);
|
||||
this.type = type;
|
||||
}
|
||||
+2
-2
@@ -26,10 +26,10 @@ import net.minecraft.item.SwordItem;
|
||||
import appeng.api.features.AEFeature;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ToolQuartzSword extends SwordItem {
|
||||
public class QuartzSwordItem extends SwordItem {
|
||||
private final AEFeature type;
|
||||
|
||||
public ToolQuartzSword(Item.Properties props, AEFeature type) {
|
||||
public QuartzSwordItem(Item.Properties props, AEFeature type) {
|
||||
super(ItemTier.IRON, 3, -2.4F, props);
|
||||
this.type = type;
|
||||
}
|
||||
+2
-2
@@ -32,9 +32,9 @@ import appeng.block.AEBaseBlock;
|
||||
import appeng.items.AEBaseItem;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ToolQuartzWrench extends AEBaseItem implements IAEWrench {
|
||||
public class QuartzWrenchItem extends AEBaseItem implements IAEWrench {
|
||||
|
||||
public ToolQuartzWrench(Item.Properties props) {
|
||||
public QuartzWrenchItem(Item.Properties props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user