mirror of
https://github.com/GTNewHorizons/WirelessCraftingTerminal.git
synced 2026-11-27 15:23:07 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b0ecf0e80 | ||
|
|
b2187bd961 | ||
|
|
ba9df5d3cd | ||
|
|
43ee6dab14 | ||
|
|
8eae5ade43 |
No files matched your search
+4
-4
@@ -1,11 +1,11 @@
|
|||||||
// Add your dependencies here
|
// Add your dependencies here
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-608-GTNH:dev")
|
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-658-GTNH:dev")
|
||||||
|
|
||||||
implementation("com.github.GTNewHorizons:Baubles-Expanded:2.1.7-GTNH:dev")
|
implementation("com.github.GTNewHorizons:Baubles-Expanded:2.1.9-GTNH:dev")
|
||||||
compileOnly("curse.maven:cofh-core-69162:2388751")
|
compileOnly("curse.maven:cofh-core-69162:2388751")
|
||||||
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.7.44-GTNH:dev")
|
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.7.64-GTNH:dev")
|
||||||
compileOnly("com.github.GTNewHorizons:MouseTweaks:2.4.20-GTNH:dev") { transitive = false }
|
compileOnly("com.github.GTNewHorizons:MouseTweaks:2.4.20-GTNH:dev") { transitive = false }
|
||||||
compileOnly("com.github.GTNewHorizons:EnderIO:2.9.12:dev") { transitive = false }
|
compileOnly("com.github.GTNewHorizons:EnderIO:2.9.18:dev") { transitive = false }
|
||||||
}
|
}
|
||||||
+1
-1
@@ -151,7 +151,7 @@ modrinthProjectId =
|
|||||||
# type can be one of [project, version],
|
# type can be one of [project, version],
|
||||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||||
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||||
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
|
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||||
modrinthRelations =
|
modrinthRelations =
|
||||||
|
|
||||||
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.38'
|
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.41'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
+2
-2
@@ -809,7 +809,7 @@ public class ContainerWirelessCraftingTerminal extends AEBaseContainer
|
|||||||
if (!isInRange()) {
|
if (!isInRange()) {
|
||||||
if (!isBoosterInstalled() || !Reference.WCT_BOOSTER_ENABLED) {
|
if (!isBoosterInstalled() || !Reference.WCT_BOOSTER_ENABLED) {
|
||||||
if (this.isValidContainer()) {
|
if (this.isValidContainer()) {
|
||||||
this.getPlayerInv().player.addChatMessage(PlayerMessages.OutOfRange.get());
|
this.getPlayerInv().player.addChatMessage(PlayerMessages.OutOfRange.toChat());
|
||||||
}
|
}
|
||||||
this.setValidContainer(false);
|
this.setValidContainer(false);
|
||||||
}
|
}
|
||||||
@@ -823,7 +823,7 @@ public class ContainerWirelessCraftingTerminal extends AEBaseContainer
|
|||||||
} else if (!hasAccess(SecurityPermissions.CRAFT, true) || !hasAccess(SecurityPermissions.EXTRACT, true)
|
} else if (!hasAccess(SecurityPermissions.CRAFT, true) || !hasAccess(SecurityPermissions.EXTRACT, true)
|
||||||
|| !hasAccess(SecurityPermissions.INJECT, true)) {
|
|| !hasAccess(SecurityPermissions.INJECT, true)) {
|
||||||
if (this.isValidContainer()) {
|
if (this.isValidContainer()) {
|
||||||
this.getPlayerInv().player.addChatMessage(PlayerMessages.CommunicationError.get());
|
this.getPlayerInv().player.addChatMessage(PlayerMessages.CommunicationError.toChat());
|
||||||
}
|
}
|
||||||
this.setValidContainer(false);
|
this.setValidContainer(false);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -10,11 +10,14 @@ import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTerminalItem;
|
|||||||
import net.p455w0rd.wirelesscraftingterminal.items.ItemMagnet;
|
import net.p455w0rd.wirelesscraftingterminal.items.ItemMagnet;
|
||||||
|
|
||||||
import baubles.api.BaublesApi;
|
import baubles.api.BaublesApi;
|
||||||
|
import cpw.mods.fml.common.Loader;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class RandomUtils {
|
public class RandomUtils {
|
||||||
|
|
||||||
|
public static boolean isBaublesLoaded = Loader.isModLoaded("Baubles");
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public static String color(String color) {
|
public static String color(String color) {
|
||||||
switch (color) {
|
switch (color) {
|
||||||
@@ -62,20 +65,24 @@ public class RandomUtils {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IInventory handler = BaublesApi.getBaubles(playerInv.player);
|
|
||||||
if (handler != null) {
|
if (isBaublesLoaded) {
|
||||||
invSize = handler.getSizeInventory();
|
IInventory handler = BaublesApi.getBaubles(playerInv.player);
|
||||||
for (int i = 0; i < invSize; ++i) {
|
if (handler != null) {
|
||||||
ItemStack item = handler.getStackInSlot(i);
|
invSize = handler.getSizeInventory();
|
||||||
if (item == null) {
|
for (int i = 0; i < invSize; ++i) {
|
||||||
continue;
|
ItemStack item = handler.getStackInSlot(i);
|
||||||
}
|
if (item == null) {
|
||||||
if (item.getItem() instanceof IWirelessCraftingTerminalItem) {
|
continue;
|
||||||
wirelessTerm = item;
|
}
|
||||||
break;
|
if (item.getItem() instanceof IWirelessCraftingTerminalItem) {
|
||||||
|
wirelessTerm = item;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return wirelessTerm;
|
return wirelessTerm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+19
-41
@@ -33,18 +33,20 @@ import appeng.api.config.SortOrder;
|
|||||||
import appeng.api.config.ViewItems;
|
import appeng.api.config.ViewItems;
|
||||||
import appeng.api.features.IWirelessTermHandler;
|
import appeng.api.features.IWirelessTermHandler;
|
||||||
import appeng.api.util.IConfigManager;
|
import appeng.api.util.IConfigManager;
|
||||||
|
import appeng.core.AppEng;
|
||||||
import appeng.items.tools.powered.powersink.AERootPoweredItem;
|
import appeng.items.tools.powered.powersink.AERootPoweredItem;
|
||||||
import appeng.util.ConfigManager;
|
import appeng.util.ConfigManager;
|
||||||
import appeng.util.IConfigManagerHost;
|
import appeng.util.IConfigManagerHost;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
import baubles.api.BaubleType;
|
import baubles.api.BaubleType;
|
||||||
import baubles.api.IBauble;
|
import baubles.api.expanded.IBaubleExpanded;
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@cpw.mods.fml.common.Optional.Interface(iface = "baubles.api.expanded.IBaubleExpanded", modid = "Baubles|Expanded")
|
||||||
public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
||||||
implements IWirelessCraftingTerminalItem, IWirelessTermHandler, IBauble {
|
implements IWirelessCraftingTerminalItem, IWirelessTermHandler, IBaubleExpanded {
|
||||||
|
|
||||||
public static final String LINK_KEY_STRING = "key";
|
public static final String LINK_KEY_STRING = "key";
|
||||||
public static double GLOBAL_POWER_MULTIPLIER = PowerMultiplier.CONFIG.multiplier;
|
public static double GLOBAL_POWER_MULTIPLIER = PowerMultiplier.CONFIG.multiplier;
|
||||||
@@ -89,61 +91,37 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method return the type of bauble this is. Type is used to determine the slots it can go into.
|
|
||||||
*
|
|
||||||
* @param itemstack
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public BaubleType getBaubleType(ItemStack itemstack) {
|
public String[] getBaubleTypes(ItemStack itemstack) {
|
||||||
|
return new String[] { AppEng.BAUBLESLOT };
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@cpw.mods.fml.common.Optional.Method(modid = "Baubles")
|
||||||
|
public BaubleType getBaubleType(ItemStack itemStack) {
|
||||||
return BaubleType.RING;
|
return BaubleType.RING;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method is called once per tick if the bauble is being worn by a player
|
|
||||||
*
|
|
||||||
* @param itemstack
|
|
||||||
* @param player
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void onWornTick(ItemStack itemstack, EntityLivingBase player) {}
|
@cpw.mods.fml.common.Optional.Method(modid = "Baubles")
|
||||||
|
public void onWornTick(ItemStack itemstack, EntityLivingBase player) { /**/ }
|
||||||
|
|
||||||
/**
|
|
||||||
* This method is called when the bauble is equipped by a player
|
|
||||||
*
|
|
||||||
* @param itemstack
|
|
||||||
* @param player
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void onEquipped(ItemStack itemstack, EntityLivingBase player) {}
|
@cpw.mods.fml.common.Optional.Method(modid = "Baubles")
|
||||||
|
public void onEquipped(ItemStack itemstack, EntityLivingBase player) { /**/ }
|
||||||
|
|
||||||
/**
|
|
||||||
* This method is called when the bauble is unequipped by a player
|
|
||||||
*
|
|
||||||
* @param itemstack
|
|
||||||
* @param player
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void onUnequipped(ItemStack itemstack, EntityLivingBase player) {}
|
@cpw.mods.fml.common.Optional.Method(modid = "Baubles")
|
||||||
|
public void onUnequipped(ItemStack itemstack, EntityLivingBase player) { /**/ }
|
||||||
|
|
||||||
/**
|
|
||||||
* can this bauble be placed in a bauble slot
|
|
||||||
*
|
|
||||||
* @param itemstack
|
|
||||||
* @param player
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
|
@cpw.mods.fml.common.Optional.Method(modid = "Baubles")
|
||||||
public boolean canEquip(ItemStack itemstack, EntityLivingBase player) {
|
public boolean canEquip(ItemStack itemstack, EntityLivingBase player) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Can this bauble be removed from a bauble slot
|
|
||||||
*
|
|
||||||
* @param itemstack
|
|
||||||
* @param player
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
|
@cpw.mods.fml.common.Optional.Method(modid = "Baubles")
|
||||||
public boolean canUnequip(ItemStack itemstack, EntityLivingBase player) {
|
public boolean canUnequip(ItemStack itemstack, EntityLivingBase player) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package net.p455w0rd.wirelesscraftingterminal.proxy;
|
package net.p455w0rd.wirelesscraftingterminal.proxy;
|
||||||
|
|
||||||
|
import static net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils.isBaublesLoaded;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
@@ -74,19 +76,23 @@ public class CommonProxy {
|
|||||||
} else {
|
} else {
|
||||||
playerInv = player.inventory;
|
playerInv = player.inventory;
|
||||||
}
|
}
|
||||||
IInventory handler = BaublesApi.getBaubles(player);
|
|
||||||
if (handler != null) {
|
if (isBaublesLoaded) {
|
||||||
for (int i = 0; i < handler.getSizeInventory(); ++i) {
|
IInventory handler = BaublesApi.getBaubles(player);
|
||||||
ItemStack item = handler.getStackInSlot(i);
|
if (handler != null) {
|
||||||
if (item == null) {
|
for (int i = 0; i < handler.getSizeInventory(); ++i) {
|
||||||
continue;
|
ItemStack item = handler.getStackInSlot(i);
|
||||||
}
|
if (item == null) {
|
||||||
if (item.getItem() instanceof IWirelessCraftingTerminalItem) {
|
continue;
|
||||||
wirelessTerm = item;
|
}
|
||||||
break;
|
if (item.getItem() instanceof IWirelessCraftingTerminalItem) {
|
||||||
|
wirelessTerm = item;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wirelessTerm == null) {
|
if (wirelessTerm == null) {
|
||||||
int invSize = playerInv.getSizeInventory();
|
int invSize = playerInv.getSizeInventory();
|
||||||
if (invSize <= 0) {
|
if (invSize <= 0) {
|
||||||
|
|||||||
Reference in new issue
Block a user