The Great Renamening of 2020
This commit is contained in:
+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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user