Add Wireless Interface Terminal (#500)
This commit is contained in:
@@ -67,6 +67,8 @@ public interface IItems {
|
||||
|
||||
IItemDefinition wirelessPatternTerminal();
|
||||
|
||||
IItemDefinition wirelessInterfaceTerminal();
|
||||
|
||||
IItemDefinition wirelessFluidTerminal();
|
||||
|
||||
IItemDefinition biometricCard();
|
||||
|
||||
@@ -46,7 +46,6 @@ import appeng.helpers.IMouseWheelItem;
|
||||
import appeng.hooks.TickHandler;
|
||||
import appeng.hooks.TickHandler.PlayerColor;
|
||||
import appeng.items.tools.powered.Terminal;
|
||||
import appeng.items.tools.powered.ToolWirelessTerminal;
|
||||
import appeng.server.ServerHelper;
|
||||
import appeng.util.Platform;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -54,7 +53,6 @@ import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumHand;
|
||||
@@ -63,8 +61,6 @@ import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.*;
|
||||
import net.minecraftforge.client.model.ModelLoaderRegistry;
|
||||
import net.minecraftforge.client.settings.KeyConflictContext;
|
||||
import net.minecraftforge.client.settings.KeyModifier;
|
||||
import net.minecraftforge.common.ForgeModContainer;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
@@ -73,22 +69,12 @@ import net.minecraftforge.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.InputEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
|
||||
import static appeng.client.KeyBindings.WCT;
|
||||
import static appeng.client.KeyBindings.WFT;
|
||||
import static appeng.client.KeyBindings.WPT;
|
||||
import static appeng.client.KeyBindings.WT;
|
||||
import static appeng.client.KeyBindings.*;
|
||||
|
||||
|
||||
public class ClientHelper extends ServerHelper {
|
||||
@@ -354,6 +340,8 @@ public class ClientHelper extends ServerHelper {
|
||||
NetworkHandler.instance().sendToServer(new PacketTerminalUse(Terminal.WIRELESS_PATTERN_TERMINAL));
|
||||
} else if (k == WFT.getKeyBinding()) {
|
||||
NetworkHandler.instance().sendToServer(new PacketTerminalUse(Terminal.WIRELESS_FLUID_TERMINAL));
|
||||
} else if (k == WIT.getKeyBinding()) {
|
||||
NetworkHandler.instance().sendToServer(new PacketTerminalUse(Terminal.WIRELESS_INTERFACE_TERMINAL));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ public enum KeyBindings {
|
||||
WT(new KeyBinding("key.open_wireless_terminal.desc", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_T, KEY_CATEGORY)),
|
||||
WCT(new KeyBinding("key.open_wireless_crafting_terminal.desc", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_E, KEY_CATEGORY)),
|
||||
WPT(new KeyBinding("key.open_wireless_pattern_terminal.desc", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_R, KEY_CATEGORY)),
|
||||
WFT(new KeyBinding("key.open_wireless_fluid_terminal.desc", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_F, KEY_CATEGORY));
|
||||
WFT(new KeyBinding("key.open_wireless_fluid_terminal.desc", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_F, KEY_CATEGORY)),
|
||||
WIT(new KeyBinding("key.open_wireless_interface_terminal.desc",KeyConflictContext.UNIVERSAL,KeyModifier.SHIFT,Keyboard.KEY_I,KEY_CATEGORY));
|
||||
|
||||
private KeyBinding keyBinding;
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import appeng.client.gui.widgets.MEGuiTooltipTextField;
|
||||
import appeng.client.me.ClientDCInternalInv;
|
||||
import appeng.client.me.SlotDisconnected;
|
||||
import appeng.container.implementations.ContainerInterfaceTerminal;
|
||||
import appeng.container.implementations.ContainerWirelessInterfaceTerminal;
|
||||
import appeng.container.slot.AppEngSlot;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.AppEng;
|
||||
@@ -39,6 +40,7 @@ import appeng.core.localization.GuiText;
|
||||
import appeng.core.localization.PlayerMessages;
|
||||
import appeng.helpers.DualityInterface;
|
||||
import appeng.helpers.PatternHelper;
|
||||
import appeng.helpers.WirelessTerminalGuiObject;
|
||||
import appeng.parts.reporting.PartInterfaceTerminal;
|
||||
import appeng.util.BlockPosUtils;
|
||||
import appeng.util.Platform;
|
||||
@@ -67,7 +69,8 @@ import static appeng.helpers.ItemStackHelper.stackFromNBT;
|
||||
|
||||
public class GuiInterfaceTerminal extends AEBaseGui {
|
||||
|
||||
private static final int OFFSET_X = 21;
|
||||
protected static final int OFFSET_X = 21;
|
||||
protected final GuiText guiTitle;
|
||||
private static final int MAGIC_HEIGHT_NUMBER = 52 + 99;
|
||||
private static final String MOLECULAR_ASSEMBLER = "tile.appliedenergistics2.molecular_assembler";
|
||||
|
||||
@@ -121,6 +124,29 @@ public class GuiInterfaceTerminal extends AEBaseGui {
|
||||
guiButtonHideFull = new GuiImgButton(0, 0, Settings.ACTIONS, null);
|
||||
guiButtonBrokenRecipes = new GuiImgButton(0, 0, Settings.ACTIONS, null);
|
||||
terminalStyleBox = new GuiImgButton(0, 0, Settings.TERMINAL_STYLE, null);
|
||||
guiTitle = GuiText.InterfaceTerminal;
|
||||
}
|
||||
|
||||
public GuiInterfaceTerminal(final InventoryPlayer inventoryPlayer, final WirelessTerminalGuiObject guiObject) {
|
||||
super(new ContainerWirelessInterfaceTerminal(inventoryPlayer, guiObject));
|
||||
|
||||
final GuiScrollbar scrollbar = new GuiScrollbar();
|
||||
this.setScrollBar(scrollbar);
|
||||
this.xSize = 208;
|
||||
this.ySize = 255;
|
||||
this.jeiEnabled = Platform.isModLoaded("jei");
|
||||
this.jeiButtonPadding = jeiEnabled ? 22 : 0;
|
||||
|
||||
searchFieldInputs = createTextField(86, 12, ButtonToolTips.SearchFieldInputs.getLocal());
|
||||
searchFieldOutputs = createTextField(86, 12, ButtonToolTips.SearchFieldOutputs.getLocal());
|
||||
searchFieldNames = createTextField(71, 12, ButtonToolTips.SearchFieldNames.getLocal());
|
||||
searchFieldNames.setFocused(true);
|
||||
|
||||
guiButtonAssemblersOnly = new GuiImgButton(0, 0, Settings.ACTIONS, null);
|
||||
guiButtonHideFull = new GuiImgButton(0, 0, Settings.ACTIONS, null);
|
||||
guiButtonBrokenRecipes = new GuiImgButton(0, 0, Settings.ACTIONS, null);
|
||||
terminalStyleBox = new GuiImgButton(0, 0, Settings.TERMINAL_STYLE, null);
|
||||
guiTitle = GuiText.WirelessTerminal;
|
||||
}
|
||||
|
||||
private MEGuiTooltipTextField createTextField(final int width, final int height, final String tooltip) {
|
||||
@@ -199,7 +225,7 @@ public class GuiInterfaceTerminal extends AEBaseGui {
|
||||
|
||||
@Override
|
||||
public void drawFG(final int offsetX, final int offsetY, final int mouseX, final int mouseY) {
|
||||
this.fontRenderer.drawString(this.getGuiDisplayName(GuiText.InterfaceTerminal.getLocal()), OFFSET_X + 2, 6, 4210752);
|
||||
this.fontRenderer.drawString(this.getGuiDisplayName(guiTitle.getLocal()), OFFSET_X + 2, 6, 4210752);
|
||||
this.fontRenderer.drawString(GuiText.inventory.getLocal(), OFFSET_X + 2, this.ySize - 96, 4210752);
|
||||
|
||||
final int currentScroll = this.getScrollBar().getCurrentScroll();
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import appeng.helpers.WirelessTerminalGuiObject;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
public class GuiWirelessInterfaceTerminal extends GuiInterfaceTerminal {
|
||||
public GuiWirelessInterfaceTerminal(InventoryPlayer inventoryPlayer, final WirelessTerminalGuiObject te) {
|
||||
super(inventoryPlayer, te);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
this.bindTexture("guis/wirelessupgrades.png");
|
||||
Gui.drawModalRectWithCustomSizedTexture(offsetX + 189, offsetY + 165, 0, 0, 32, 32, 32, 32);
|
||||
super.drawBG(offsetX, offsetY, mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,7 @@ import appeng.core.sync.packets.PacketInventoryAction;
|
||||
import appeng.helpers.DualityInterface;
|
||||
import appeng.helpers.IInterfaceHost;
|
||||
import appeng.helpers.InventoryAction;
|
||||
import appeng.helpers.WirelessTerminalGuiObject;
|
||||
import appeng.items.misc.ItemEncodedPattern;
|
||||
import appeng.parts.misc.PartInterface;
|
||||
import appeng.parts.reporting.PartInterfaceTerminal;
|
||||
@@ -65,7 +66,7 @@ import java.util.Map.Entry;
|
||||
import static appeng.helpers.ItemStackHelper.stackWriteToNBT;
|
||||
|
||||
|
||||
public final class ContainerInterfaceTerminal extends AEBaseContainer {
|
||||
public class ContainerInterfaceTerminal extends AEBaseContainer {
|
||||
|
||||
/**
|
||||
* this stuff is all server side..
|
||||
@@ -87,6 +88,21 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer {
|
||||
this.bindPlayerInventory(ip, 0, 0);
|
||||
}
|
||||
|
||||
public ContainerInterfaceTerminal(final InventoryPlayer ip, final WirelessTerminalGuiObject guiObject, boolean bindInventory) {
|
||||
super(ip, guiObject);
|
||||
|
||||
if (Platform.isServer()) {
|
||||
IGridNode node = guiObject.getActionableNode();
|
||||
if (node != null && node.isActive()) {
|
||||
this.grid = node.getGrid();
|
||||
}
|
||||
}
|
||||
|
||||
if (bindInventory) {
|
||||
this.bindPlayerInventory(ip, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
if (Platform.isClient()) {
|
||||
@@ -185,7 +201,9 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer {
|
||||
final AppEngSlot playerSlot;
|
||||
try {
|
||||
playerSlot = (AppEngSlot) this.inventorySlots.get(slot);
|
||||
} catch (IndexOutOfBoundsException ignored) { return; }
|
||||
} catch (IndexOutOfBoundsException ignored) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!playerSlot.isPlayerSide() || !playerSlot.getHasStack()) return;
|
||||
|
||||
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
import appeng.api.implementations.IUpgradeableCellContainer;
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
import appeng.container.interfaces.IInventorySlotAware;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.PlayerMessages;
|
||||
import appeng.helpers.WirelessTerminalGuiObject;
|
||||
import appeng.parts.automation.StackUpgradeInventory;
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.inv.IAEAppEngInventory;
|
||||
import appeng.util.inv.InvOperation;
|
||||
import baubles.api.BaublesApi;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ClickType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ContainerWirelessInterfaceTerminal extends ContainerInterfaceTerminal implements IInventorySlotAware, IUpgradeableCellContainer, IAEAppEngInventory {
|
||||
private final WirelessTerminalGuiObject wirelessTerminalGUIObject;
|
||||
private final int slot;
|
||||
private double powerMultiplier = 0.5;
|
||||
private int ticks = 0;
|
||||
protected AppEngInternalInventory upgrades;
|
||||
protected SlotRestrictedInput magnetSlot;
|
||||
|
||||
public ContainerWirelessInterfaceTerminal(InventoryPlayer ip, WirelessTerminalGuiObject guiObject) {
|
||||
super(ip, guiObject,false);
|
||||
|
||||
if (guiObject != null) {
|
||||
final int slotIndex = guiObject.getInventorySlot();
|
||||
if (!guiObject.isBaubleSlot()) {
|
||||
this.lockPlayerInventorySlot(slotIndex);
|
||||
}
|
||||
this.slot = slotIndex;
|
||||
} else {
|
||||
this.lockPlayerInventorySlot(ip.currentItem);
|
||||
this.slot = -1;
|
||||
}
|
||||
|
||||
this.bindPlayerInventory(ip,0,0);
|
||||
|
||||
this.wirelessTerminalGUIObject = guiObject;
|
||||
|
||||
upgrades = new StackUpgradeInventory(wirelessTerminalGUIObject.getItemStack(), this, 2);
|
||||
this.loadFromNBT();
|
||||
setupUpgrades();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
if (Platform.isServer()) {
|
||||
final ItemStack currentItem;
|
||||
if (wirelessTerminalGUIObject.isBaubleSlot()) {
|
||||
currentItem = BaublesApi.getBaublesHandler(this.getPlayerInv().player).getStackInSlot(this.slot);
|
||||
} else {
|
||||
currentItem = this.slot < 0 ? this.getPlayerInv().getCurrentItem() : this.getPlayerInv().getStackInSlot(this.slot);
|
||||
}
|
||||
|
||||
if (currentItem.isEmpty()) {
|
||||
this.setValidContainer(false);
|
||||
} else if (!this.wirelessTerminalGUIObject.getItemStack().isEmpty() && currentItem != this.wirelessTerminalGUIObject.getItemStack()) {
|
||||
if (ItemStack.areItemsEqual(this.wirelessTerminalGUIObject.getItemStack(), currentItem)) {
|
||||
if (wirelessTerminalGUIObject.isBaubleSlot()) {
|
||||
BaublesApi.getBaublesHandler(this.getPlayerInv().player).setStackInSlot(this.slot, this.wirelessTerminalGUIObject.getItemStack());
|
||||
} else {
|
||||
this.getPlayerInv().setInventorySlotContents(this.slot, this.wirelessTerminalGUIObject.getItemStack());
|
||||
}
|
||||
} else {
|
||||
this.setValidContainer(false);
|
||||
}
|
||||
}
|
||||
|
||||
// drain 1 ae t
|
||||
this.ticks++;
|
||||
if (this.ticks > 10) {
|
||||
double ext = this.wirelessTerminalGUIObject.extractAEPower(this.getPowerMultiplier() * this.ticks, Actionable.MODULATE, PowerMultiplier.CONFIG);
|
||||
if (ext < this.getPowerMultiplier() * this.ticks) {
|
||||
if (Platform.isServer() && this.isValidContainer()) {
|
||||
this.getPlayerInv().player.sendMessage(PlayerMessages.DeviceNotPowered.get());
|
||||
}
|
||||
|
||||
this.setValidContainer(false);
|
||||
}
|
||||
this.ticks = 0;
|
||||
}
|
||||
|
||||
if (!this.wirelessTerminalGUIObject.rangeCheck()) {
|
||||
if (Platform.isServer() && this.isValidContainer()) {
|
||||
this.getPlayerInv().player.sendMessage(PlayerMessages.OutOfRange.get());
|
||||
}
|
||||
|
||||
this.setValidContainer(false);
|
||||
} else {
|
||||
this.setPowerMultiplier(AEConfig.instance().wireless_getDrainRate(this.wirelessTerminalGUIObject.getRange()));
|
||||
}
|
||||
|
||||
super.detectAndSendChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, @NotNull EntityPlayer player) {
|
||||
if (slotId >= 0 && slotId < this.inventorySlots.size()) {
|
||||
if (clickTypeIn == ClickType.PICKUP && dragType == 1) {
|
||||
if (this.inventorySlots.get(slotId) == magnetSlot) {
|
||||
ItemStack itemStack = magnetSlot.getStack();
|
||||
if (!magnetSlot.getStack().isEmpty()) {
|
||||
NBTTagCompound tag = itemStack.getTagCompound();
|
||||
if (tag == null) {
|
||||
tag = new NBTTagCompound();
|
||||
}
|
||||
if (tag.hasKey("enabled")) {
|
||||
boolean e = tag.getBoolean("enabled");
|
||||
tag.setBoolean("enabled", !e);
|
||||
} else {
|
||||
tag.setBoolean("enabled", false);
|
||||
}
|
||||
magnetSlot.getStack().setTagCompound(tag);
|
||||
magnetSlot.onSlotChanged();
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.slotClick(slotId, dragType, clickTypeIn, player);
|
||||
}
|
||||
|
||||
private double getPowerMultiplier() {
|
||||
return this.powerMultiplier;
|
||||
}
|
||||
|
||||
void setPowerMultiplier(final double powerMultiplier) {
|
||||
this.powerMultiplier = powerMultiplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IActionHost getActionHost() {
|
||||
return wirelessTerminalGUIObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventorySlot() {
|
||||
return wirelessTerminalGUIObject.getInventorySlot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBaubleSlot() {
|
||||
return wirelessTerminalGUIObject.isBaubleSlot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int availableUpgrades() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupUpgrades() {
|
||||
if (wirelessTerminalGUIObject != null) {
|
||||
for (int upgradeSlot = 0; upgradeSlot < availableUpgrades(); upgradeSlot++) {
|
||||
this.magnetSlot = new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, upgradeSlot, 183, -1 + upgradeSlot * 18, this.getInventoryPlayer());
|
||||
this.magnetSlot.setNotDraggable();
|
||||
this.addSlotToContainer(magnetSlot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void loadFromNBT() {
|
||||
NBTTagCompound data = wirelessTerminalGUIObject.getItemStack().getTagCompound();
|
||||
if (data != null) {
|
||||
upgrades.readFromNBT(wirelessTerminalGUIObject.getItemStack().getTagCompound().getCompoundTag("upgrades"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChanges() {
|
||||
if (Platform.isServer()) {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
|
||||
this.upgrades.writeToNBT(tag, "upgrades");
|
||||
|
||||
this.wirelessTerminalGUIObject.saveChanges(tag);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChangeInventory(IItemHandler inv, int slot, InvOperation mc, ItemStack removedStack, ItemStack newStack) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -445,6 +445,7 @@ final class Registration {
|
||||
});
|
||||
}
|
||||
items.wirelessFluidTerminal().maybeItem().ifPresent(terminal -> registries.wireless().registerWirelessHandler((IWirelessTermHandler) terminal));
|
||||
items.wirelessInterfaceTerminal().maybeItem().ifPresent(terminal -> registries.wireless().registerWirelessHandler((IWirelessTermHandler) terminal));
|
||||
|
||||
// Charge Rates
|
||||
items.chargedStaff().maybeItem().ifPresent(chargedStaff -> registries.charger().addChargeRate(chargedStaff, 320d));
|
||||
|
||||
@@ -80,6 +80,7 @@ public final class ApiItems implements IItems {
|
||||
private final IItemDefinition wirelessTerminal;
|
||||
private final IItemDefinition wirelessCraftingTerminal;
|
||||
private final IItemDefinition wirelessPatternTerminal;
|
||||
private final IItemDefinition wirelessInterfaceTerminal;
|
||||
private final IItemDefinition wirelessFluidTerminal;
|
||||
private final IItemDefinition biometricCard;
|
||||
private final IItemDefinition chargedStaff;
|
||||
@@ -184,6 +185,7 @@ public final class ApiItems implements IItems {
|
||||
this.wirelessCraftingTerminal = powerTools.item("wireless_crafting_terminal", ToolWirelessCraftingTerminal::new).addFeatures(AEFeature.WIRELESS_CRAFTING_TERMINAL).build();
|
||||
this.wirelessPatternTerminal = powerTools.item("wireless_pattern_terminal", ToolWirelessPatternTerminal::new).addFeatures(AEFeature.WIRELESS_PATTERN_TERMINAL).build();
|
||||
this.wirelessFluidTerminal = powerTools.item("wireless_fluid_terminal", ToolWirelessFluidTerminal::new).addFeatures(AEFeature.WIRELESS_FLUID_TERMINAL).build();
|
||||
this.wirelessInterfaceTerminal = powerTools.item("wireless_interface_terminal",ToolWirelessInterfaceTerminal::new).addFeatures(AEFeature.WIRELESS_INTERFACE_TERMINAL).build();
|
||||
|
||||
this.chargedStaff = powerTools.item("charged_staff", ToolChargedStaff::new).addFeatures(AEFeature.CHARGED_STAFF).build();
|
||||
this.massCannon = powerTools.item("matter_cannon", ToolMatterCannon::new)
|
||||
@@ -365,6 +367,11 @@ public final class ApiItems implements IItems {
|
||||
return wirelessPatternTerminal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemDefinition wirelessInterfaceTerminal() {
|
||||
return wirelessInterfaceTerminal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemDefinition biometricCard() {
|
||||
return this.biometricCard;
|
||||
|
||||
@@ -67,6 +67,7 @@ public enum AEFeature {
|
||||
WIRELESS_CRAFTING_TERMINAL("WirelessCraftingTerminal", Constants.CATEGORY_TOOLS),
|
||||
WIRELESS_PATTERN_TERMINAL("WirelessPatternTerminal", Constants.CATEGORY_TOOLS),
|
||||
WIRELESS_FLUID_TERMINAL("WirelessFluidTerminal", Constants.CATEGORY_TOOLS),
|
||||
WIRELESS_INTERFACE_TERMINAL("WirelessInterfaceTerminal", Constants.CATEGORY_TOOLS),
|
||||
|
||||
COLOR_APPLICATOR("ColorApplicator", Constants.CATEGORY_TOOLS),
|
||||
METEORITE_COMPASS("MeteoriteCompass", Constants.CATEGORY_TOOLS),
|
||||
|
||||
@@ -58,20 +58,11 @@ import appeng.parts.automation.PartFormationPlane;
|
||||
import appeng.parts.automation.PartLevelEmitter;
|
||||
import appeng.parts.misc.PartOreDicStorageBus;
|
||||
import appeng.parts.misc.PartStorageBus;
|
||||
import appeng.parts.reporting.PartCraftingTerminal;
|
||||
import appeng.parts.reporting.PartExpandedProcessingPatternTerminal;
|
||||
import appeng.parts.reporting.PartFluidInterfaceConfigurationTerminal;
|
||||
import appeng.parts.reporting.PartInterfaceConfigurationTerminal;
|
||||
import appeng.parts.reporting.PartInterfaceTerminal;
|
||||
import appeng.parts.reporting.PartPatternTerminal;
|
||||
import appeng.parts.reporting.*;
|
||||
import appeng.tile.crafting.TileCraftingTile;
|
||||
import appeng.tile.crafting.TileMolecularAssembler;
|
||||
import appeng.tile.grindstone.TileGrinder;
|
||||
import appeng.tile.misc.TileCellWorkbench;
|
||||
import appeng.tile.misc.TileCondenser;
|
||||
import appeng.tile.misc.TileInscriber;
|
||||
import appeng.tile.misc.TileSecurityStation;
|
||||
import appeng.tile.misc.TileVibrationChamber;
|
||||
import appeng.tile.misc.*;
|
||||
import appeng.tile.networking.TileWireless;
|
||||
import appeng.tile.qnb.TileQuantumBridge;
|
||||
import appeng.tile.spatial.TileSpatialIOPort;
|
||||
@@ -114,7 +105,7 @@ public enum GuiBridge implements IGuiHandler {
|
||||
GUI_WIRELESS_CRAFTING_TERMINAL(ContainerWirelessCraftingTerminal.class, WirelessTerminalGuiObject.class, GuiHostType.ITEM, null),
|
||||
GUI_WIRELESS_PATTERN_TERMINAL(ContainerWirelessPatternTerminal.class, WirelessTerminalGuiObject.class, GuiHostType.ITEM, null),
|
||||
GUI_WIRELESS_FLUID_TERMINAL(ContainerWirelessFluidTerminal.class, WirelessTerminalGuiObject.class, GuiHostType.ITEM, null),
|
||||
|
||||
GUI_WIRELESS_INTERFACE_TERMINAL(ContainerWirelessInterfaceTerminal.class, WirelessTerminalGuiObject.class, GuiHostType.ITEM, null),
|
||||
|
||||
GUI_NETWORK_STATUS(ContainerNetworkStatus.class, INetworkTool.class, GuiHostType.ITEM, null),
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@ public enum Terminal {
|
||||
WIRELESS_TERMINAL(AEApi.instance().definitions().items().wirelessTerminal(), GuiBridge.GUI_WIRELESS_TERM),
|
||||
WIRELESS_CRAFTING_TERMINAL(AEApi.instance().definitions().items().wirelessCraftingTerminal(), GuiBridge.GUI_WIRELESS_CRAFTING_TERMINAL),
|
||||
WIRELESS_PATTERN_TERMINAL(AEApi.instance().definitions().items().wirelessPatternTerminal(), GuiBridge.GUI_WIRELESS_PATTERN_TERMINAL),
|
||||
WIRELESS_FLUID_TERMINAL(AEApi.instance().definitions().items().wirelessFluidTerminal(), GuiBridge.GUI_WIRELESS_FLUID_TERMINAL);
|
||||
WIRELESS_FLUID_TERMINAL(AEApi.instance().definitions().items().wirelessFluidTerminal(), GuiBridge.GUI_WIRELESS_FLUID_TERMINAL),
|
||||
WIRELESS_INTERFACE_TERMINAL(AEApi.instance().definitions().items().wirelessInterfaceTerminal(),GuiBridge.GUI_INTERFACE_TERMINAL);
|
||||
|
||||
final GuiBridge bridge;
|
||||
final IItemDefinition itemDefinition;
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package appeng.items.tools.powered;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.network.IGuiHandler;
|
||||
|
||||
public class ToolWirelessInterfaceTerminal extends ToolWirelessTerminal {
|
||||
@Override
|
||||
public boolean canHandle(ItemStack is) {
|
||||
return AEApi.instance().definitions().items().wirelessInterfaceTerminal().isSameAs(is);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGuiHandler getGuiHandler(ItemStack is) {
|
||||
return GuiBridge.GUI_WIRELESS_INTERFACE_TERMINAL;
|
||||
}
|
||||
}
|
||||
@@ -620,6 +620,7 @@ item.appliedenergistics2.matter_cannon.name=Matter Cannon
|
||||
item.appliedenergistics2.memory_card.name=Memory Card
|
||||
item.appliedenergistics2.color_applicator.name=Color Applicator
|
||||
item.appliedenergistics2.wireless_terminal.name=Wireless Terminal
|
||||
item.appliedenergistics2.wireless_interface_terminal.name=Wireless Interface Terminal
|
||||
item.appliedenergistics2.wireless_crafting_terminal.name=Wireless Crafting Terminal
|
||||
item.appliedenergistics2.wireless_pattern_terminal.name=Wireless Pattern Terminal
|
||||
item.appliedenergistics2.wireless_fluid_terminal.name=Wireless Fluid Terminal
|
||||
@@ -702,3 +703,4 @@ key.open_wireless_terminal.desc=Open Wireless Terminal
|
||||
key.open_wireless_crafting_terminal.desc=Open Wireless Crafting Terminal
|
||||
key.open_wireless_pattern_terminal.desc=Open Wireless Pattern Terminal
|
||||
key.open_wireless_fluid_terminal.desc=Open Wireless Fluid Terminal
|
||||
key.open_wireless_interface_terminal.desc=Open Wireless Interface Terminal
|
||||
|
||||
@@ -621,6 +621,7 @@ item.appliedenergistics2.matter_cannon.name=物质炮
|
||||
item.appliedenergistics2.memory_card.name=内存卡
|
||||
item.appliedenergistics2.color_applicator.name=染色器
|
||||
item.appliedenergistics2.wireless_terminal.name=无线终端
|
||||
item.appliedenergistics2.wireless_interface_terminal.name=无线接口终端
|
||||
item.appliedenergistics2.wireless_crafting_terminal.name=无线合成终端
|
||||
item.appliedenergistics2.wireless_pattern_terminal.name=无线样板终端
|
||||
item.appliedenergistics2.wireless_fluid_terminal.name=无线流体终端
|
||||
@@ -703,3 +704,4 @@ key.open_wireless_terminal.desc=打开无线终端
|
||||
key.open_wireless_crafting_terminal.desc=打开无线合成终端
|
||||
key.open_wireless_pattern_terminal.desc=打开无线样板终端
|
||||
key.open_wireless_fluid_terminal.desc=打开无线流体终端
|
||||
key.open_wireless_interface_terminal.desc=打开无线接口终端
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "appliedenergistics2:items/wireless_interface_terminal"
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "forge:and",
|
||||
"values": [
|
||||
{
|
||||
"type": "minecraft:item_exists",
|
||||
"item": "appliedenergistics2:wireless_interface_terminal"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item_exists",
|
||||
"item": "appliedenergistics2:dense_energy_cell"
|
||||
},
|
||||
{
|
||||
"type": "appliedenergistics2:part_exists",
|
||||
"part": "part.interface_terminal"
|
||||
},
|
||||
{
|
||||
"type": "appliedenergistics2:material_exists",
|
||||
"material": "material.wireless"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "appliedenergistics2:wireless_interface_terminal"
|
||||
},
|
||||
"type": "forge:ore_shaped",
|
||||
"pattern": [
|
||||
"a",
|
||||
"b",
|
||||
"c"
|
||||
],
|
||||
"key": {
|
||||
"b": {
|
||||
"type": "appliedenergistics2:part",
|
||||
"part": "part.interface_terminal"
|
||||
},
|
||||
"c": {
|
||||
"item": "appliedenergistics2:dense_energy_cell"
|
||||
},
|
||||
"a": {
|
||||
"type": "appliedenergistics2:part",
|
||||
"part": "material.wireless"
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Reference in New Issue
Block a user