Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -1092,13 +1092,17 @@ boolean performBuildScriptUpdate() {
boolean isNewBuildScriptVersionAvailable() {
Map parameters = ["connectTimeout": 10000, "readTimeout": 10000]

String currentBuildScript = getFile("build.gradle").getText()
String currentBuildScriptHash = getVersionHash(currentBuildScript)
String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText()
String availableBuildScriptHash = getVersionHash(availableBuildScript)
try {
String currentBuildScript = getFile("build.gradle").getText()
String currentBuildScriptHash = getVersionHash(currentBuildScript)
String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText()
String availableBuildScriptHash = getVersionHash(availableBuildScript)

boolean isUpToDate = currentBuildScriptHash.empty || availableBuildScriptHash.empty || currentBuildScriptHash == availableBuildScriptHash
return !isUpToDate
boolean isUpToDate = currentBuildScriptHash.empty || availableBuildScriptHash.empty || currentBuildScriptHash == availableBuildScriptHash
return !isUpToDate
} catch (Exception ignored) {
return false
}
}

static String getVersionHash(String buildScriptContent) {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ modId=crazyae
modGroup=dev.beecube31.crazyae2
# Version of your mod.
# This field can be left empty if you want your mod's version to be determined by the latest git tag instead.
modVersion=v0.6.0.2
modVersion=v0.6.0.3
# The name of your jar when you produce builds, not including any versioning info
modArchivesBaseName=CrazyAE-1.12.2
# Will update your build.gradle automatically whenever an update is available
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ public List<Target<?>> getPhantomTargets(Object ingredient) {
List<IJEITargetSlot> slots = new ArrayList<>();
if (!this.inventorySlots.inventorySlots.isEmpty()) {
for (Slot slot : this.inventorySlots.inventorySlots) {
if (slot instanceof SlotFake && !itemStack.isEmpty()) {
if (slot instanceof SlotFake fakeSlot && fakeSlot.isDraggable() && !itemStack.isEmpty()) {
slots.add((IJEITargetSlot) slot);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import appeng.api.networking.IGridNode;
import dev.beecube31.crazyae2.client.gui.sprites.StateSprite;
import dev.beecube31.crazyae2.common.containers.base.slot.BotaniaSlotFake;
import dev.beecube31.crazyae2.common.containers.base.slot.RestrictedSlot;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotFake;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotOutput;
import dev.beecube31.crazyae2.common.enums.BotaniaMechanicalDeviceType;
import dev.beecube31.crazyae2.common.tile.botania.TileMechanicalBrewery;
Expand All @@ -26,11 +26,11 @@ protected void initSlots() {

for (int y = 0; y < 2; y++) {
for (int x = 0; x < 3; x++) {
this.addSlotToContainer(new SlotFake(input, x + y * 3, 62 + x * 18, 16 + y * 18, true));
this.addSlotToContainer(new BotaniaSlotFake(input, x + y * 3, 62 + x * 18, 16 + y * 18, true));
}
}

this.addSlotToContainer(new SlotFake(bottle, 0, 80, 53, true).setIIcon(StateSprite.BREW));
this.addSlotToContainer(new BotaniaSlotFake(bottle, 0, 80, 53, true).setIIcon(StateSprite.BREW));
this.addSlotToContainer(new SlotOutput(output, 0, 80, 87, null));

this.addSlotToContainer(new RestrictedSlot(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import appeng.api.networking.IGridNode;
import dev.beecube31.crazyae2.client.gui.sprites.StateSprite;
import dev.beecube31.crazyae2.common.containers.base.slot.BotaniaSlotFake;
import dev.beecube31.crazyae2.common.containers.base.slot.RestrictedSlot;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotFake;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotOutput;
import dev.beecube31.crazyae2.common.enums.BotaniaMechanicalDeviceType;
import dev.beecube31.crazyae2.common.tile.botania.TileMechanicalElventrade;
Expand All @@ -26,7 +26,7 @@ protected void initSlots() {

for (int y = 0; y < 2; y++) {
for (int x = 0; x < 8; x++) {
this.addSlotToContainer(new SlotFake(input, x + y * 8, 17 + 18 * x, 14 + 18 * y, true));
this.addSlotToContainer(new BotaniaSlotFake(input, x + y * 8, 17 + 18 * x, 14 + 18 * y, true));
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package dev.beecube31.crazyae2.common.containers;

import appeng.api.networking.IGridNode;
import dev.beecube31.crazyae2.common.containers.base.slot.BotaniaSlotFake;
import dev.beecube31.crazyae2.client.gui.sprites.StateSprite;
import dev.beecube31.crazyae2.common.containers.base.slot.RestrictedSlot;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotFake;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotOutput;
import dev.beecube31.crazyae2.common.enums.BotaniaMechanicalDeviceType;
import dev.beecube31.crazyae2.common.tile.botania.TileMechanicalManapool;
Expand All @@ -23,8 +23,8 @@ protected void initSlots() {
final IItemHandler input = this.getUpgradeable().getInventoryByName("input");
final IItemHandler output = this.getUpgradeable().getInventoryByName("output");

this.addSlotToContainer(new SlotFake(input, 0, 70, 30, true));
this.addSlotToContainer((new SlotFake(input, 1, 89, 30, true)).setIIcon(StateSprite.BOTANIA_CATALYSTS_SLOT));
this.addSlotToContainer(new BotaniaSlotFake(input, 0, 70, 30, true));
this.addSlotToContainer((new BotaniaSlotFake(input, 1, 89, 30, true)).setIIcon(StateSprite.BOTANIA_CATALYSTS_SLOT));

this.addSlotToContainer(new SlotOutput(output, 0, 80, 68, null));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package dev.beecube31.crazyae2.common.containers;

import appeng.api.networking.IGridNode;
import dev.beecube31.crazyae2.common.containers.base.slot.BotaniaSlotFake;
import dev.beecube31.crazyae2.client.gui.sprites.StateSprite;
import dev.beecube31.crazyae2.common.containers.base.slot.RestrictedSlot;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotFake;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotOutput;
import dev.beecube31.crazyae2.common.enums.BotaniaMechanicalDeviceType;
import dev.beecube31.crazyae2.common.tile.botania.TileMechanicalPetal;
Expand All @@ -25,7 +25,7 @@ protected void initSlots() {

for (int y = 0; y < 2; y++) {
for (int x = 0; x < 8; x++) {
this.addSlotToContainer(new SlotFake(input, x + y * 8, 17 + 18 * x, 14 + 18 * y, true));
this.addSlotToContainer(new BotaniaSlotFake(input, x + y * 8, 17 + 18 * x, 14 + 18 * y, true));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import appeng.api.networking.IGridNode;
import dev.beecube31.crazyae2.client.gui.sprites.StateSprite;
import dev.beecube31.crazyae2.common.containers.base.slot.BotaniaSlotFake;
import dev.beecube31.crazyae2.common.containers.base.slot.RestrictedSlot;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotFake;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotOutput;
import dev.beecube31.crazyae2.common.enums.BotaniaMechanicalDeviceType;
import dev.beecube31.crazyae2.common.tile.botania.TileMechanicalPuredaisy;
Expand All @@ -23,7 +23,7 @@ protected void initSlots() {
final IItemHandler input = this.getUpgradeable().getInventoryByName("input");
final IItemHandler output = this.getUpgradeable().getInventoryByName("output");

this.addSlotToContainer(new SlotFake(input, 0, 80, 30, true));
this.addSlotToContainer(new BotaniaSlotFake(input, 0, 80, 30, true));

this.addSlotToContainer(new SlotOutput(output, 0, 80, 68, null));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dev.beecube31.crazyae2.common.containers;

import appeng.api.networking.IGridNode;
import dev.beecube31.crazyae2.common.containers.base.slot.BotaniaSlotFake;
import dev.beecube31.crazyae2.common.containers.base.slot.RestrictedSlot;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotFake;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotOutput;
import dev.beecube31.crazyae2.common.enums.BotaniaMechanicalDeviceType;
import dev.beecube31.crazyae2.common.tile.botania.TileMechanicalRunealtar;
Expand All @@ -24,7 +24,7 @@ protected void initSlots() {

for (int y = 0; y < 2; y++) {
for (int x = 0; x < 8; x++) {
this.addSlotToContainer(new SlotFake(input, x + y * 8, 17 + 18 * x, 14 + 18 * y, true));
this.addSlotToContainer(new BotaniaSlotFake(input, x + y * 8, 17 + 18 * x, 14 + 18 * y, true));
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dev.beecube31.crazyae2.common.containers;

import appeng.api.networking.IGridNode;
import dev.beecube31.crazyae2.common.containers.base.slot.BotaniaSlotFake;
import dev.beecube31.crazyae2.common.containers.base.slot.RestrictedSlot;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotFake;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotOutput;
import dev.beecube31.crazyae2.common.enums.BotaniaMechanicalDeviceType;
import dev.beecube31.crazyae2.common.tile.botania.TileMechanicalTerraplate;
Expand All @@ -21,12 +21,17 @@ protected void initSlots() {
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName("upgrades");
final IItemHandler input = this.getUpgradeable().getInventoryByName("input");
final IItemHandler output = this.getUpgradeable().getInventoryByName("output");
final IItemHandler marker = this.getUpgradeable().getInventoryByName("findSlot");

this.addSlotToContainer(new SlotFake(input, 0, 61, 30, true));
this.addSlotToContainer(new SlotFake(input, 1, 80, 30, true));
this.addSlotToContainer(new SlotFake(input, 2, 99, 30, true));
for (int y = 0; y < 2; y++) {
for (int x = 0; x < 7; x++) {
this.addSlotToContainer(new BotaniaSlotFake(input, x + y * 7, 26 + 18 * x, 16 + 18 * y, true));
}
}

this.addSlotToContainer(new BotaniaSlotFake(marker, 0, 80, 52, true).setNotDraggable());

this.addSlotToContainer(new SlotOutput(output, 0, 80, 68, null));
this.addSlotToContainer(new SlotOutput(output, 0, 80, 86, null));

this.addSlotToContainer(new RestrictedSlot(
this.type == BotaniaMechanicalDeviceType.ELVENTRADE ? RestrictedSlot.PlaceableItemType.ELVENTRADE_BLANK_PATTERN
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package dev.beecube31.crazyae2.common.containers.base.slot;

import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandler;

public class BotaniaSlotFake extends SlotFake {

public BotaniaSlotFake(final IItemHandler inv, final int idx, final int x, final int y) {
super(inv, idx, x, y);
}

public BotaniaSlotFake(final IItemHandler inv, final int idx, final int x, final int y, final boolean oneStack) {
super(inv, idx, x, y, oneStack);
}

@Override
public void putStack(ItemStack is) {
if (!is.isEmpty()) {
is = is.copy();
is.setCount(1);
}

super.putStack(is);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ public enum Features implements IFeature {
QUANTUM_CHANNELS_MULTIPLIER(
new FeatureSet().add("mixin:qcm")
),
PATTERNS_INTERFACE(
new FeatureSet().add("mixin:patterns.interface")
),
PATTERNS_INTERFACE,

DENSE_CPU_COPROCESSORS(
new FeatureSet().add("mixin:dense.coprocessor")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import appeng.helpers.InventoryAction;
import appeng.util.Platform;
import appeng.util.item.AEItemStack;
import dev.beecube31.crazyae2.client.gui.CrazyAESlot;
import dev.beecube31.crazyae2.common.containers.base.CrazyAEBaseContainer;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotDisconnected;
import dev.beecube31.crazyae2.common.containers.base.slot.SlotFake;
Expand Down Expand Up @@ -130,7 +131,7 @@ public void serverPacketData(final INetworkInfo manager, final CrazyAEPacket pac
if (this.action == InventoryAction.PLACE_JEI_GHOST_ITEM) {
if (this.slot < sender.openContainer.inventorySlots.size()) {
Slot senderSlot = sender.openContainer.inventorySlots.get(this.slot);
if (senderSlot instanceof SlotFake) {
if (senderSlot instanceof SlotFake && (!(senderSlot instanceof CrazyAESlot) || ((CrazyAESlot) senderSlot).isDraggable())) {
if (this.slotItem != null) {
senderSlot.putStack(this.slotItem.createItemStack());
if (senderSlot.getStack().isEmpty()) {
Expand Down
Loading