UU-matter is now part of parts enum
This commit is contained in:
parent
8f7cc291bd
commit
db4dbdc956
14 changed files with 23 additions and 54 deletions
|
@ -29,6 +29,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import techreborn.init.ModItems;
|
||||
import techreborn.init.ModParts;
|
||||
import techreborn.tiles.multiblock.TileFluidReplicator;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
@ -98,7 +99,7 @@ public class FluidReplicatorRecipe implements Cloneable {
|
|||
|
||||
public List<Object> getInputs() {
|
||||
ArrayList<Object> inputs = new ArrayList<>();
|
||||
inputs.add(new ItemStack(ModItems.UU_MATTER, input));
|
||||
inputs.add(ModParts.UU_MATTER.getStack(input));
|
||||
return inputs;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import reborncore.common.util.Inventory;
|
|||
import reborncore.common.util.Tank;
|
||||
import techreborn.api.Reference;
|
||||
import techreborn.init.ModItems;
|
||||
import techreborn.init.ModParts;
|
||||
import techreborn.tiles.multiblock.TileFluidReplicator;
|
||||
|
||||
/**
|
||||
|
@ -64,7 +65,7 @@ public class FluidReplicatorRecipeCrafter extends RecipeCrafter {
|
|||
return false;
|
||||
}
|
||||
ItemStack inputStack = inventory.getStackInSlot(inputSlots[0]);
|
||||
if (!inputStack.isItemEqual(new ItemStack(ModItems.UU_MATTER))) {
|
||||
if (!inputStack.isItemEqual(ModParts.UU_MATTER.getStack())) {
|
||||
return false;
|
||||
}
|
||||
if (inputStack.getCount() < recipe.getInput()) {
|
||||
|
|
|
@ -64,7 +64,6 @@ public class RegisterItemJsons {
|
|||
register(ModItems.LAPOTRONIC_ORB, "battery/lapotronic_orb");
|
||||
|
||||
register(ModItems.FREQUENCY_TRANSMITTER, "misc/frequency_transmitter");
|
||||
register(ModItems.UU_MATTER, "misc/uu_matter");
|
||||
register(ModItems.SCRAP_BOX, "misc/scrapbox");
|
||||
register(ModItems.MANUAL, "misc/manual");
|
||||
register(ModItems.DEBUG, "misc/debug");
|
||||
|
|
|
@ -31,6 +31,7 @@ import reborncore.client.gui.slots.SlotFilteredVoid;
|
|||
import reborncore.common.container.RebornContainer;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.init.ModItems;
|
||||
import techreborn.init.ModParts;
|
||||
|
||||
public class ContainerDestructoPack extends RebornContainer {
|
||||
|
||||
|
@ -51,7 +52,7 @@ public class ContainerDestructoPack extends RebornContainer {
|
|||
|
||||
private void buildContainer() {
|
||||
this.addSlotToContainer(
|
||||
new SlotFilteredVoid(inv, 0, 80, 36, new ItemStack[] { new ItemStack(ModItems.PARTS, 1, 37) }));
|
||||
new SlotFilteredVoid(inv, 0, 80, 36, new ItemStack[] { ModParts.MACHINE_PARTS.getStack() }));
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 3; ++i) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|||
import net.minecraftforge.registries.IForgeRegistryEntry;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.init.ModItems;
|
||||
import techreborn.init.ModParts;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -91,7 +92,7 @@ public class TRRecipeHandler {
|
|||
}
|
||||
//Hide uu recipes
|
||||
for (Ingredient ingredient : recipe.getIngredients()) {
|
||||
if (ingredient.apply(new ItemStack(ModItems.UU_MATTER))) {
|
||||
if (ingredient.apply(ModParts.UU_MATTER.getStack())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,6 @@ import javax.annotation.Nullable;
|
|||
|
||||
public class ModItems {
|
||||
|
||||
public static Item PARTS;
|
||||
public static Item ROCK_CUTTER;
|
||||
public static Item LITHIUM_BATTERY_PACK;
|
||||
public static Item LAPOTRONIC_ORB_PACK;
|
||||
|
@ -53,8 +52,6 @@ public class ModItems {
|
|||
public static Item OMNI_TOOL;
|
||||
public static Item LAPOTRONIC_ORB;
|
||||
public static Item MANUAL;
|
||||
public static Item UU_MATTER;
|
||||
|
||||
public static Item CLOAKING_DEVICE;
|
||||
public static Item RE_BATTERY;
|
||||
public static Item TREE_TAP;
|
||||
|
@ -180,8 +177,6 @@ public class ModItems {
|
|||
|
||||
MANUAL = new ItemTechManual();
|
||||
registerItem(MANUAL, "techmanuel");
|
||||
UU_MATTER = new ItemUUmatter();
|
||||
registerItem(UU_MATTER, "uumatter");
|
||||
RE_BATTERY = new ItemReBattery();
|
||||
registerItem(RE_BATTERY, "rebattery");
|
||||
TREE_TAP = new ItemTreeTap();
|
||||
|
|
|
@ -51,7 +51,7 @@ public enum ModParts implements IStringSerializable {
|
|||
HELIUM_COOLANT_TRIPLE, IRIDIUM_NEUTRON_REFLECTOR, KANTHAL_HEATING_COIL, MACHINE_PARTS, NAK_COOLANT_SIMPLE,
|
||||
NAK_COOLANT_SIX, NAK_COOLANT_TRIPLE, NEUTRON_REFLECTOR, NICHROME_HEATING_COIL, PLUTONIUM_CELL, QUAD_DEPLETED_CELL,
|
||||
QUAD_PLUTONIUM_CELL, QUAD_THORIUM_CELL, QUAD_URANIUM_CELL, RUBBER, SAP, SCRAP, SUPER_CONDUCTOR,
|
||||
THICK_NEUTRON_REFLECTOR, THORIUM_CELL, TUNGSTEN_GRINDING_HEAD, URANIUM_CELL;
|
||||
THICK_NEUTRON_REFLECTOR, THORIUM_CELL, TUNGSTEN_GRINDING_HEAD, URANIUM_CELL, UU_MATTER;
|
||||
|
||||
public final String name;
|
||||
public final Item item;
|
||||
|
|
|
@ -243,7 +243,7 @@ public class CraftingTableRecipes extends RecipeMethods {
|
|||
|
||||
|
||||
//UU-Matter
|
||||
ItemStack uuStack = new ItemStack(ModItems.UU_MATTER);
|
||||
ItemStack uuStack = ModParts.UU_MATTER.getStack();
|
||||
registerShaped(getStack(Blocks.LOG, 8), " U ", " ", " ", 'U', uuStack);
|
||||
registerShaped(getStack(Blocks.STONE, 16), " ", " U ", " ", 'U', uuStack);
|
||||
registerShaped(getStack(Blocks.SNOW, 16), "U U", " ", " ", 'U', uuStack);
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
* This file is part of TechReborn, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) 2018 TechReborn
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.items;
|
||||
|
||||
import techreborn.utils.TechRebornCreativeTab;
|
||||
|
||||
public class ItemUUmatter extends ItemTR {
|
||||
|
||||
public ItemUUmatter() {
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setTranslationKey("techreborn.uuMatter");
|
||||
}
|
||||
}
|
|
@ -73,7 +73,7 @@ public class TileMatterFabricator extends TilePowerAcceptor
|
|||
|
||||
private boolean spaceForOutput(int slot) {
|
||||
return inventory.getStackInSlot(slot).isEmpty()
|
||||
|| ItemUtils.isItemEqual(inventory.getStackInSlot(slot), new ItemStack(ModItems.UU_MATTER), true, true)
|
||||
|| ItemUtils.isItemEqual(inventory.getStackInSlot(slot), ModParts.UU_MATTER.getStack(), true, true)
|
||||
&& inventory.getStackInSlot(slot).getCount() < 64;
|
||||
}
|
||||
|
||||
|
@ -88,9 +88,9 @@ public class TileMatterFabricator extends TilePowerAcceptor
|
|||
|
||||
private void addOutputProducts(int slot) {
|
||||
if (inventory.getStackInSlot(slot).isEmpty()) {
|
||||
inventory.setInventorySlotContents(slot, new ItemStack(ModItems.UU_MATTER));
|
||||
inventory.setInventorySlotContents(slot, ModParts.UU_MATTER.getStack());
|
||||
}
|
||||
else if (ItemUtils.isItemEqual(this.inventory.getStackInSlot(slot), new ItemStack(ModItems.UU_MATTER), true, true)) {
|
||||
else if (ItemUtils.isItemEqual(this.inventory.getStackInSlot(slot), ModParts.UU_MATTER.getStack(), true, true)) {
|
||||
inventory.getStackInSlot(slot).setCount((Math.min(64, 1 + inventory.getStackInSlot(slot).getCount())));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ import techreborn.client.container.builder.BuiltContainer;
|
|||
import techreborn.client.container.builder.ContainerBuilder;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.init.ModItems;
|
||||
import techreborn.init.ModParts;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.tiles.TileGenericMachine;
|
||||
|
||||
|
@ -144,7 +145,7 @@ public class TileFluidReplicator extends TileGenericMachine implements IContaine
|
|||
@Override
|
||||
public boolean isItemValidForSlot(int slotIndex, ItemStack itemStack) {
|
||||
if (slotIndex == 0) {
|
||||
if (itemStack.isItemEqual(new ItemStack(ModItems.UU_MATTER))) {
|
||||
if (itemStack.isItemEqual(ModParts.UU_MATTER.getStack())) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -157,7 +158,7 @@ public class TileFluidReplicator extends TileGenericMachine implements IContaine
|
|||
@Override
|
||||
public BuiltContainer createContainer(EntityPlayer player) {
|
||||
return new ContainerBuilder("fluidreplicator").player(player.inventory).inventory().hotbar().addInventory()
|
||||
.tile(this).fluidSlot(1, 124, 35).filterSlot(0, 55, 45, stack -> stack.getItem() == ModItems.UU_MATTER)
|
||||
.tile(this).fluidSlot(1, 124, 35).filterSlot(0, 55, 45, stack -> stack.isItemEqual(ModParts.UU_MATTER.getStack()))
|
||||
.outputSlot(2, 124, 55).energySlot(3, 8, 72).syncEnergyValue().syncCrafterValue().addInventory()
|
||||
.create(this);
|
||||
}
|
||||
|
|
|
@ -225,7 +225,12 @@
|
|||
"textures": {
|
||||
"layer0": "techreborn:items/part/uranium_cell"
|
||||
}
|
||||
}
|
||||
},
|
||||
"uumatter": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/uu_matter"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -484,6 +484,7 @@ item.techreborn.thickneutronreflector.name=Thick Neutron Reflector
|
|||
item.techreborn.thoriumcell.name=Fuel Rod (Thorium)
|
||||
item.techreborn.tungstengrindinghead.name=Tungsten Grinding Head
|
||||
item.techreborn.uraniumcell.name=Fuel Rod (Uranium)
|
||||
item.techreborn.uumatter.name=UU-Matter
|
||||
|
||||
#Tools
|
||||
item.techreborn.rockcutter.name=Rockcutter
|
||||
|
@ -582,7 +583,6 @@ fluid.fluidtritium=Tritium
|
|||
fluid.fluidwolframium=Wolframium
|
||||
|
||||
#Items
|
||||
item.techreborn.uuMatter.name=UU-Matter
|
||||
item.techreborn.manual.name=Tech Manual
|
||||
item.techreborn.debug.name=Debug Tool
|
||||
item.techreborn.frequencyTransmitter.name=Frequency Transmitter
|
||||
|
|
Before Width: | Height: | Size: 724 B After Width: | Height: | Size: 724 B |
Loading…
Reference in a new issue