mirror of
https://github.com/GTNewHorizons/WirelessCraftingTerminal.git
synced 2026-11-26 06:42:55 +00:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0240d9010 | ||
|
|
e2932b1ada | ||
|
|
5c8768cc42 | ||
|
|
fdbc1579f3 | ||
|
|
7487e85bc1 | ||
|
|
18bf0fa5a2 | ||
|
|
9e251bddbb | ||
|
|
69068cecab |
No files matched your search
@@ -6,6 +6,7 @@ run
|
||||
.classpath
|
||||
build
|
||||
.project
|
||||
.idea
|
||||
*.launch
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
@@ -17,3 +18,8 @@ build
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
WirelessCraftingTerminal.iml
|
||||
WirelessCraftingTerminal.ipr
|
||||
WirelessCraftingTerminal.iws
|
||||
*.bat
|
||||
out/
|
||||
+8
-19
@@ -1,10 +1,10 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
}
|
||||
maven {
|
||||
name = "gt"
|
||||
url = "https://gregtech.overminddl1.com/"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
@@ -66,22 +66,14 @@ repositories {
|
||||
name 'tterrag Repo'
|
||||
url "http://maven.tterrag.com"
|
||||
}
|
||||
ivy {
|
||||
name 'CoFHCore'
|
||||
artifactPattern "http://addons-origin.cursecdn.com/files/2388/751/[module]-[revision].[ext]"
|
||||
}
|
||||
ivy {
|
||||
name 'p455w0rdslib'
|
||||
artifactPattern "https://addons-origin.cursecdn.com/files/2359/471/[module]-[revision].[ext]"
|
||||
}
|
||||
ivy {
|
||||
name 'logisticspipes'
|
||||
artifactPattern "https://addons-origin.cursecdn.com/files/2312/257/[module]-[revision].[ext]"
|
||||
maven { // AE2
|
||||
name 'ae2 repo'
|
||||
url "http://downloads.gtnewhorizons.com/Mods_for_Jenkins/"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile("appeng:appliedenergistics2:rv3-beta-5:dev") {
|
||||
compile("appeng:appliedenergistics2:rv3-beta-31:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compile("com.enderio:EnderIO:1.7.10-2.3.0.417_beta:dev") {
|
||||
@@ -90,9 +82,6 @@ dependencies {
|
||||
compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
|
||||
compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
|
||||
compile "com.enderio.core:EnderCore:1.7.10-0.1.0.25_beta:dev"
|
||||
compile name: 'CoFHCore', version: '[1.7.10]3.1.4-329-dev', ext: 'jar'
|
||||
compile name: 'p455w0rdslib', version: '1.7.10-1.0.4', ext: 'jar'
|
||||
compile name: 'logisticspipes', version: '0.9.3.126', ext: 'jar'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
aeversion=rv3
|
||||
wctchannel=
|
||||
wctbuild=1.8.7.4-bigbass-1
|
||||
wctbuild=1.8.7.5
|
||||
wctgroup=net.p455w0rd.wirelesscraftingterminal
|
||||
wctbasename=WirelessCraftingTerminal
|
||||
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+2
-2
@@ -1,6 +1,6 @@
|
||||
#Sat Apr 30 08:13:30 EDT 2016
|
||||
#Sat Jan 04 01:52:14 CET 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
|
||||
Binary file not shown.
Binary file not shown.
+27
-6
@@ -66,6 +66,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
@@ -109,6 +110,7 @@ import net.p455w0rd.wirelesscraftingterminal.core.sync.packets.PacketValueConfig
|
||||
import net.p455w0rd.wirelesscraftingterminal.handlers.LocaleHandler;
|
||||
import net.p455w0rd.wirelesscraftingterminal.helpers.WirelessTerminalGuiObject;
|
||||
|
||||
|
||||
public class ContainerWirelessCraftingTerminal extends Container implements IConfigManagerHost, IConfigurableObject, IMEMonitorHandlerReceiver<IAEItemStack>, IAEAppEngInventory, IContainerCraftingPacket {
|
||||
|
||||
private final ItemStack containerstack;
|
||||
@@ -163,6 +165,7 @@ public class ContainerWirelessCraftingTerminal extends Container implements ICon
|
||||
private IWirelessCraftingTerminalItem thisItem;
|
||||
private IGridNode networkNode;
|
||||
private IMEInventoryHandler<IAEItemStack> cellInv;
|
||||
private IRecipe currentRecipe;
|
||||
|
||||
/**
|
||||
* Constructor for our custom container
|
||||
@@ -305,16 +308,34 @@ public class ContainerWirelessCraftingTerminal extends Container implements ICon
|
||||
return ((AppEngSlot) s).isDraggable();
|
||||
}
|
||||
|
||||
@Override
|
||||
private IRecipe findMatchingRecipe(InventoryCrafting craftMatrix, World worldIn) {
|
||||
for (Object recipe : CraftingManager.getInstance().getRecipeList()) {
|
||||
if (((IRecipe)recipe).matches(craftMatrix, worldIn)) {
|
||||
return (IRecipe)recipe;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCraftMatrixChanged(final IInventory iinv) {
|
||||
|
||||
final ContainerNull cn = new ContainerNull();
|
||||
final InventoryCrafting ic = new InventoryCrafting(cn, 3, 3);
|
||||
final InventoryCrafting craftingInv = new InventoryCrafting(cn, 3, 3);
|
||||
|
||||
for (int x = 0; x < 9; x++) {
|
||||
ic.setInventorySlotContents(x, this.craftMatrixSlot[x].getStack());
|
||||
}
|
||||
this.craftingSlot.putStack(CraftingManager.getInstance().findMatchingRecipe(ic, this.worldObj));
|
||||
for (int x = 0; x < 9; x++) {
|
||||
craftingInv.setInventorySlotContents(x, craftMatrixSlot[x].getStack());
|
||||
}
|
||||
if (currentRecipe == null || !currentRecipe.matches(craftingInv, getPlayerInv().player.worldObj)) {
|
||||
currentRecipe = findMatchingRecipe(craftingInv, getPlayerInv().player.worldObj);
|
||||
}
|
||||
if (currentRecipe == null) {
|
||||
craftingSlot.putStack(null);
|
||||
}
|
||||
else {
|
||||
final ItemStack craftingResult = currentRecipe.getCraftingResult(craftingInv);
|
||||
craftingSlot.putStack(craftingResult);
|
||||
}
|
||||
writeToNBT("crafting");
|
||||
}
|
||||
|
||||
|
||||
@@ -281,11 +281,11 @@ public class CommonProxy {
|
||||
if (event.player == null || event.player.isDead || event.player instanceof FakePlayer || event.crafting == null) {
|
||||
return;
|
||||
}
|
||||
if (Loader.isModLoaded("LogisticsPipes")) {
|
||||
if (event.player instanceof logisticspipes.blocks.crafting.FakePlayer) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//if (Loader.isModLoaded("LogisticsPipes")) {
|
||||
//if (event.player instanceof logisticspipes.blocks.crafting.FakePlayer) {
|
||||
//return;
|
||||
//}
|
||||
//}
|
||||
if (event.crafting.getItem() == ItemEnum.WIRELESS_CRAFTING_TERMINAL.getItem()) {
|
||||
AchievementHandler.triggerAch(wctAch, event.player);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user