Utils ported
This commit is contained in:
@@ -19,12 +19,12 @@
|
||||
package appeng.helpers;
|
||||
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.block.material.MaterialColor;
|
||||
import net.minecraft.block.material.PushReaction;
|
||||
import net.minecraft.block.MaterialColor;
|
||||
import net.minecraft.block.piston.PistonBehavior;
|
||||
|
||||
public class AEGlassMaterial {
|
||||
|
||||
public static final Material INSTANCE = new Material(MaterialColor.AIR, false, false, true, false, true, false,
|
||||
false, PushReaction.NORMAL);
|
||||
public static final Material INSTANCE = new Material(MaterialColor.CLEAR, false, false, true, false, false,
|
||||
false, PistonBehavior.NORMAL);
|
||||
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.ListNBT;
|
||||
import net.minecraft.nbt.ListTag;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -209,7 +209,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
this.craftingTracker.writeToNBT(data);
|
||||
data.putInt("priority", this.priority);
|
||||
|
||||
final ListNBT waitingToSend = new ListNBT();
|
||||
final ListTag waitingToSend = new ListTag();
|
||||
if (this.waitingToSend != null) {
|
||||
for (final ItemStack is : this.waitingToSend) {
|
||||
final CompoundTag item = new CompoundTag();
|
||||
@@ -222,7 +222,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
|
||||
public void readFromNBT(final CompoundTag data) {
|
||||
this.waitingToSend = null;
|
||||
final ListNBT waitingList = data.getList("waitingToSend", 10);
|
||||
final ListTag waitingList = data.getList("waitingToSend", 10);
|
||||
if (waitingList != null) {
|
||||
for (int x = 0; x < waitingList.size(); x++) {
|
||||
final CompoundTag c = waitingList.getCompound(x);
|
||||
@@ -311,7 +311,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
boolean found = false;
|
||||
|
||||
for (int x = 0; x < accountedFor.length; x++) {
|
||||
final ItemStack is = this.patterns.getStackInSlot(x);
|
||||
final ItemStack is = this.patterns.getInvStack(x);
|
||||
if (details.getPattern() == is) {
|
||||
accountedFor[x] = found = true;
|
||||
}
|
||||
@@ -325,7 +325,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
|
||||
for (int x = 0; x < accountedFor.length; x++) {
|
||||
if (!accountedFor[x]) {
|
||||
this.addToCraftingList(this.patterns.getStackInSlot(x));
|
||||
this.addToCraftingList(this.patterns.getInvStack(x));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
req = null;
|
||||
}
|
||||
|
||||
final ItemStack stored = this.storage.getStackInSlot(slot);
|
||||
final ItemStack stored = this.storage.getInvStack(slot);
|
||||
|
||||
if (req == null && !stored.isEmpty()) {
|
||||
final IAEItemStack work = AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class)
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.ListNBT;
|
||||
import net.minecraft.nbt.ListTag;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
@@ -44,8 +44,8 @@ public class InvalidPatternHelper {
|
||||
throw new IllegalArgumentException("No pattern here!");
|
||||
}
|
||||
|
||||
final ListNBT inTag = encodedValue.getList("in", 10);
|
||||
final ListNBT outTag = encodedValue.getList("out", 10);
|
||||
final ListTag inTag = encodedValue.getList("in", 10);
|
||||
final ListTag outTag = encodedValue.getList("out", 10);
|
||||
this.isCrafting = encodedValue.getBoolean("crafting");
|
||||
|
||||
this.canSubstitute = this.isCrafting && encodedValue.getBoolean("substitute");
|
||||
|
||||
@@ -31,7 +31,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.ICraftingRecipe;
|
||||
import net.minecraft.recipe.RecipeType;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.ListNBT;
|
||||
import net.minecraft.nbt.ListTag;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -67,8 +67,8 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
|
||||
throw new IllegalArgumentException("No pattern here!");
|
||||
}
|
||||
|
||||
final ListNBT inTag = encodedValue.getList("in", 10);
|
||||
final ListNBT outTag = encodedValue.getList("out", 10);
|
||||
final ListTag inTag = encodedValue.getList("in", 10);
|
||||
final ListTag outTag = encodedValue.getList("out", 10);
|
||||
this.isCrafting = encodedValue.getBoolean("crafting");
|
||||
|
||||
this.canSubstitute = this.isCrafting && encodedValue.getBoolean("substitute");
|
||||
|
||||
Reference in New Issue
Block a user