mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-27 15:23:16 +00:00
nutrition backport
This commit is contained in:
43 files changed
+2715
-46
No files matched your search
@@ -3,6 +3,7 @@ package mekanism.mekasuit.client;
|
||||
import mekanism.mekasuit.api.gear.ModuleData;
|
||||
import mekanism.mekasuit.common.MekanismMekaSuit;
|
||||
import mekanism.mekasuit.common.content.gear.MekaSuitVisionHelper;
|
||||
import mekanism.mekasuit.common.content.gear.MekaSuitNutritionalHelper;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
@@ -35,6 +36,8 @@ public final class MekaSuitVisionHandler {
|
||||
private static final int VISION_DURATION = 220;
|
||||
private static final ResourceLocation HUD_ICON = new ResourceLocation(
|
||||
MekanismMekaSuit.MODID, "gui/hud/vision_enhancement_unit.png");
|
||||
private static final ResourceLocation NUTRITION_ICON = new ResourceLocation(
|
||||
MekanismMekaSuit.MODID, "gui/hud/nutritional_injection_unit.png");
|
||||
|
||||
private boolean visionApplied;
|
||||
|
||||
@@ -130,21 +133,34 @@ public final class MekaSuitVisionHandler {
|
||||
}
|
||||
ModuleData module = MekaSuitVisionHelper.getModule(
|
||||
player.getItemStackFromSlot(EntityEquipmentSlot.HEAD));
|
||||
if (module == null) {
|
||||
ItemStack helmet = player.getItemStackFromSlot(EntityEquipmentSlot.HEAD);
|
||||
ModuleData nutrition = MekaSuitNutritionalHelper.getModule(helmet);
|
||||
if (module == null && (nutrition == null || !nutrition.isEnabled())) {
|
||||
return;
|
||||
}
|
||||
boolean enabled = module.isEnabled();
|
||||
String status = I18n.format(enabled ? "gui.mekasuit.on" : "gui.mekasuit.off");
|
||||
ScaledResolution resolution = new ScaledResolution(minecraft);
|
||||
int iconX = resolution.getScaledWidth() - 26;
|
||||
int y = resolution.getScaledHeight() - 28;
|
||||
int color = enabled ? 0x55FFBB : 0x777777;
|
||||
minecraft.fontRenderer.drawStringWithShadow(status,
|
||||
iconX - minecraft.fontRenderer.getStringWidth(status) - 2, y + 4, color);
|
||||
minecraft.getTextureManager().bindTexture(HUD_ICON);
|
||||
if (module != null) {
|
||||
boolean enabled = module.isEnabled();
|
||||
String status = I18n.format(enabled ? "gui.mekasuit.on" : "gui.mekasuit.off");
|
||||
drawHudElement(minecraft, HUD_ICON, iconX, y, status, enabled ? 0x55FFBB : 0x777777,
|
||||
enabled ? 1F : 0.5F);
|
||||
y -= 20;
|
||||
}
|
||||
if (nutrition != null && nutrition.isEnabled()) {
|
||||
String percent = Math.round(100 * MekaSuitNutritionalHelper.getRatio(helmet)) + "%";
|
||||
drawHudElement(minecraft, NUTRITION_ICON, iconX, y, percent, 0xEB6CA3, 1F);
|
||||
}
|
||||
}
|
||||
|
||||
private static void drawHudElement(Minecraft minecraft, ResourceLocation icon, int iconX, int y,
|
||||
String text, int color, float brightness) {
|
||||
minecraft.fontRenderer.drawStringWithShadow(text,
|
||||
iconX - minecraft.fontRenderer.getStringWidth(text) - 2, y + 4, color);
|
||||
minecraft.getTextureManager().bindTexture(icon);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.color(enabled ? 1F : 0.5F, enabled ? 1F : 0.5F,
|
||||
enabled ? 1F : 0.5F, 1F);
|
||||
GlStateManager.color(brightness, brightness, brightness, 1F);
|
||||
Gui.drawModalRectWithCustomSizedTexture(iconX, y, 0, 0, 16, 16, 16, 16);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.disableBlend();
|
||||
|
||||
@@ -66,12 +66,15 @@ public final class MekaSuitItems {
|
||||
public static final ItemMekaModule VisionEnhancementUnit = init(
|
||||
new ItemMekaModule(MekaSuitModules.VISION_ENHANCEMENT_UNIT, EnumRarity.RARE),
|
||||
"module_vision_enhancement_unit", "ModuleVisionEnhancementUnit");
|
||||
public static final ItemMekaModule NutritionalInjectionUnit = init(
|
||||
new ItemMekaModule(MekaSuitModules.NUTRITIONAL_INJECTION_UNIT, EnumRarity.RARE),
|
||||
"module_nutritional_injection_unit", "ModuleNutritionalInjectionUnit");
|
||||
|
||||
private static final List<Item> ITEMS = Collections.unmodifiableList(Arrays.asList(
|
||||
MekaTool, MekaSuitHelmet, MekaSuitBodyarmor, MekaSuitPants, MekaSuitBoots, ModuleBase, EnergyUnit,
|
||||
ExcavationEscalationUnit, AttackAmplificationUnit, FarmingUnit, ShearingUnit, SilkTouchUnit, FortuneUnit,
|
||||
BlastingUnit, VeinMiningUnit, TeleportationUnit, ElectrolyticBreathingUnit,
|
||||
InhalationPurificationUnit, VisionEnhancementUnit));
|
||||
InhalationPurificationUnit, VisionEnhancementUnit, NutritionalInjectionUnit));
|
||||
|
||||
private MekaSuitItems() {
|
||||
}
|
||||
|
||||
@@ -16,6 +16,9 @@ public final class MekaSuitConfig {
|
||||
public static final long DEFAULT_SUIT_MAGIC_REDUCE_USAGE = 1_000L;
|
||||
public static final float DEFAULT_SUIT_MAGIC_DAMAGE_REDUCTION_RATIO = 1F;
|
||||
public static final long DEFAULT_SUIT_VISION_ENHANCEMENT_USAGE = 500L;
|
||||
public static final long DEFAULT_SUIT_NUTRITIONAL_INJECTION_USAGE = 20_000L;
|
||||
public static final int DEFAULT_SUIT_NUTRITIONAL_STORAGE = 128_000;
|
||||
public static final int DEFAULT_SUIT_NUTRITIONAL_TRANSFER_RATE = 256;
|
||||
public static final long DEFAULT_TOOL_MINING_USAGE = 10L;
|
||||
public static final long DEFAULT_TOOL_SILK_MINING_USAGE = 100L;
|
||||
public static final long DEFAULT_TOOL_WEAPON_USAGE = 2_000L;
|
||||
@@ -40,6 +43,9 @@ public final class MekaSuitConfig {
|
||||
public static long suitMagicReduceUsage = DEFAULT_SUIT_MAGIC_REDUCE_USAGE;
|
||||
public static float suitMagicDamageReductionRatio = DEFAULT_SUIT_MAGIC_DAMAGE_REDUCTION_RATIO;
|
||||
public static long suitVisionEnhancementUsage = DEFAULT_SUIT_VISION_ENHANCEMENT_USAGE;
|
||||
public static long suitNutritionalInjectionUsage = DEFAULT_SUIT_NUTRITIONAL_INJECTION_USAGE;
|
||||
public static int suitNutritionalStorage = DEFAULT_SUIT_NUTRITIONAL_STORAGE;
|
||||
public static int suitNutritionalTransferRate = DEFAULT_SUIT_NUTRITIONAL_TRANSFER_RATE;
|
||||
public static long toolMiningUsage = DEFAULT_TOOL_MINING_USAGE;
|
||||
public static long toolSilkMiningUsage = DEFAULT_TOOL_SILK_MINING_USAGE;
|
||||
public static long toolWeaponUsage = DEFAULT_TOOL_WEAPON_USAGE;
|
||||
@@ -114,6 +120,15 @@ public final class MekaSuitConfig {
|
||||
suitVisionEnhancementUsage = getLong(config, "mekasuit", "visionEnhancement",
|
||||
DEFAULT_SUIT_VISION_ENHANCEMENT_USAGE, 0,
|
||||
"Energy used per tick while the Vision Enhancement Unit is active.");
|
||||
suitNutritionalInjectionUsage = getLong(config, "mekasuit", "nutritionalInjection",
|
||||
DEFAULT_SUIT_NUTRITIONAL_INJECTION_USAGE, 0,
|
||||
"Energy used for each half-drumstick restored by the Nutritional Injection Unit.");
|
||||
suitNutritionalStorage = config.getInt("nutritionalMaxStorage", "mekasuit",
|
||||
DEFAULT_SUIT_NUTRITIONAL_STORAGE, 1, Integer.MAX_VALUE,
|
||||
"Maximum Nutritional Paste stored by a MekaSuit Helmet in millibuckets.");
|
||||
suitNutritionalTransferRate = config.getInt("nutritionalTransferRate", "mekasuit",
|
||||
DEFAULT_SUIT_NUTRITIONAL_TRANSFER_RATE, 1, Integer.MAX_VALUE,
|
||||
"Maximum Nutritional Paste transferred into a MekaSuit Helmet per operation.");
|
||||
modificationStationCapacity = getLong(config, "modification_station", "energyCapacity",
|
||||
DEFAULT_MODIFICATION_STATION_CAPACITY, 1, "Modification Station energy capacity in Joules.");
|
||||
modificationStationUsage = getLong(config, "modification_station", "energyPerTick",
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
package mekanism.mekasuit.common.content.gear;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.common.capabilities.ItemCapabilityWrapper.ItemCapability;
|
||||
import mekanism.common.util.ItemDataUtils;
|
||||
import mekanism.mekasuit.api.gear.ModuleData;
|
||||
import mekanism.mekasuit.api.gear.ModuleTarget;
|
||||
import mekanism.mekasuit.common.config.MekaSuitConfig;
|
||||
import mekanism.mekasuit.common.item.ItemMekaSuitArmor;
|
||||
import mekanism.ultimate.common.UltimateFluids;
|
||||
import mekanism.ultimate.common.nutrition.UltimateNutrition;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.FluidTankProperties;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandlerItem;
|
||||
import net.minecraftforge.fluids.capability.IFluidTankProperties;
|
||||
|
||||
/** Storage, feeding, and fill-only item capability for the helmet nutrition unit. */
|
||||
public final class MekaSuitNutritionalHelper {
|
||||
|
||||
private static final String FLUID_KEY = "nutritionalPaste";
|
||||
private static final IFluidTankProperties[] NO_TANKS = new IFluidTankProperties[0];
|
||||
|
||||
private MekaSuitNutritionalHelper() {
|
||||
}
|
||||
|
||||
public static void tick(ItemStack helmet, EntityPlayer player) {
|
||||
ModuleData module = getModule(helmet);
|
||||
if (module == null || !module.isEnabled() || player == null || player.capabilities.isCreativeMode
|
||||
|| player.isSpectator() || !player.canEat(false)) {
|
||||
return;
|
||||
}
|
||||
int mbPerFood = UltimateNutrition.getPasteMBPerFood();
|
||||
int pasteLimited = getStored(helmet) / mbPerFood;
|
||||
int needed = Math.min(20 - player.getFoodStats().getFoodLevel(), pasteLimited);
|
||||
if (needed <= 0) {
|
||||
return;
|
||||
}
|
||||
ItemMekaSuitArmor armor = (ItemMekaSuitArmor) helmet.getItem();
|
||||
long usage = Math.max(0, MekaSuitConfig.suitNutritionalInjectionUsage);
|
||||
int energyLimited = usage == 0 ? needed : clampToInt(armor.getEnergy(helmet) / usage);
|
||||
int toFeed = Math.min(needed, energyLimited);
|
||||
if (toFeed <= 0) {
|
||||
return;
|
||||
}
|
||||
if (usage > 0) {
|
||||
armor.setEnergy(helmet, armor.getEnergy(helmet) - usage * (double) toFeed);
|
||||
}
|
||||
setStored(helmet, getStored(helmet) - toFeed * mbPerFood);
|
||||
// Stable currently passes 'needed' here even when energy is insufficient. Using the committed
|
||||
// amount prevents food restoration that was not paid for by both paste and energy.
|
||||
player.getFoodStats().addStats(toFeed, UltimateNutrition.getSaturation());
|
||||
}
|
||||
|
||||
public static ModuleData getModule(ItemStack helmet) {
|
||||
if (helmet == null || helmet.isEmpty() || !(helmet.getItem() instanceof ItemMekaSuitArmor)) {
|
||||
return null;
|
||||
}
|
||||
ItemMekaSuitArmor armor = (ItemMekaSuitArmor) helmet.getItem();
|
||||
if (armor.getModuleTarget() != ModuleTarget.HELMET) {
|
||||
return null;
|
||||
}
|
||||
return ModuleContainer.fromStack(helmet, ModuleTarget.HELMET)
|
||||
.get(MekaSuitModules.NUTRITIONAL_INJECTION_UNIT);
|
||||
}
|
||||
|
||||
public static boolean supportsStorage(ItemStack stack) {
|
||||
return getModule(stack) != null;
|
||||
}
|
||||
|
||||
public static int getStored(ItemStack stack) {
|
||||
if (!ItemDataUtils.hasData(stack, FLUID_KEY)) {
|
||||
return 0;
|
||||
}
|
||||
FluidStack stored = FluidStack.loadFluidStackFromNBT(ItemDataUtils.getCompound(stack, FLUID_KEY));
|
||||
return stored != null && stored.getFluid() == UltimateFluids.NutritionalPaste
|
||||
? Math.max(0, Math.min(stored.amount, getCapacity())) : 0;
|
||||
}
|
||||
|
||||
public static int getCapacity() {
|
||||
return Math.max(1, MekaSuitConfig.suitNutritionalStorage);
|
||||
}
|
||||
|
||||
public static double getRatio(ItemStack stack) {
|
||||
return (double) getStored(stack) / getCapacity();
|
||||
}
|
||||
|
||||
static void setStored(ItemStack stack, int amount) {
|
||||
int clamped = Math.max(0, Math.min(amount, getCapacity()));
|
||||
if (clamped == 0) {
|
||||
ItemDataUtils.removeData(stack, FLUID_KEY);
|
||||
} else {
|
||||
ItemDataUtils.setCompound(stack, FLUID_KEY,
|
||||
new FluidStack(UltimateFluids.NutritionalPaste, clamped).writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
}
|
||||
|
||||
static int clampToInt(double value) {
|
||||
if (Double.isNaN(value) || value <= 0) {
|
||||
return 0;
|
||||
}
|
||||
return value >= Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) value;
|
||||
}
|
||||
|
||||
public static final class NutritionalFluidCapability extends ItemCapability implements IFluidHandlerItem {
|
||||
|
||||
@Override
|
||||
public boolean canProcess(Capability<?> capability) {
|
||||
return capability == CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY && supportsStorage(getStack());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFluidTankProperties[] getTankProperties() {
|
||||
if (!supportsStorage(getStack())) {
|
||||
return NO_TANKS;
|
||||
}
|
||||
int stored = getStored(getStack());
|
||||
FluidStack contents = stored <= 0 ? null : new FluidStack(UltimateFluids.NutritionalPaste, stored);
|
||||
return new IFluidTankProperties[]{new FluidTankProperties(contents, getCapacity(), true, false)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(FluidStack resource, boolean doFill) {
|
||||
if (getStack().getCount() != 1 || !supportsStorage(getStack()) || resource == null
|
||||
|| resource.getFluid() != UltimateFluids.NutritionalPaste || resource.amount <= 0) {
|
||||
return 0;
|
||||
}
|
||||
int stored = getStored(getStack());
|
||||
int accepted = Math.min(resource.amount,
|
||||
Math.min(Math.max(1, MekaSuitConfig.suitNutritionalTransferRate), getCapacity() - stored));
|
||||
if (accepted > 0 && doFill) {
|
||||
setStored(getStack(), stored + accepted);
|
||||
}
|
||||
return Math.max(0, accepted);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public FluidStack drain(FluidStack resource, boolean doDrain) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public FluidStack drain(int maxDrain, boolean doDrain) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ItemStack getContainer() {
|
||||
return getStack();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@ import mekanism.mekasuit.common.content.gear.MekaSuitBreathingHelper;
|
||||
import mekanism.mekasuit.common.content.gear.MekaSuitEnergyHelper;
|
||||
import mekanism.mekasuit.common.content.gear.MekaSuitInhalationHelper;
|
||||
import mekanism.mekasuit.common.content.gear.MekaSuitVisionHelper;
|
||||
import mekanism.mekasuit.common.content.gear.MekaSuitNutritionalHelper;
|
||||
import mekanism.mekasuit.common.content.gear.ModuleContainer;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -143,7 +144,8 @@ public final class ItemMekaSuitArmor extends ItemArmor implements IEnergizedItem
|
||||
|
||||
@Override
|
||||
public ICapabilityProvider initCapabilities(ItemStack stack, NBTTagCompound nbt) {
|
||||
return new ItemCapabilityWrapper(stack, new TeslaItemWrapper(), new ForgeEnergyItemWrapper());
|
||||
return new ItemCapabilityWrapper(stack, new TeslaItemWrapper(), new ForgeEnergyItemWrapper(),
|
||||
new MekaSuitNutritionalHelper.NutritionalFluidCapability());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -186,6 +188,11 @@ public final class ItemMekaSuitArmor extends ItemArmor implements IEnergizedItem
|
||||
+ " x" + module.getInstalledCount());
|
||||
}
|
||||
}
|
||||
if (moduleTarget == ModuleTarget.HELMET && MekaSuitNutritionalHelper.supportsStorage(stack)) {
|
||||
tooltip.add(EnumColor.AQUA + LangUtils.localize("tooltip.nutritionalPaste") + ": " + EnumColor.GREY
|
||||
+ MekaSuitNutritionalHelper.getStored(stack) + " / "
|
||||
+ MekaSuitNutritionalHelper.getCapacity() + " mB");
|
||||
}
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@@ -216,6 +223,7 @@ public final class ItemMekaSuitArmor extends ItemArmor implements IEnergizedItem
|
||||
if (!world.isRemote) {
|
||||
MekaSuitBreathingHelper.tick(stack, player);
|
||||
MekaSuitVisionHelper.tickServer(stack, player);
|
||||
MekaSuitNutritionalHelper.tick(stack, player);
|
||||
}
|
||||
MekaSuitInhalationHelper.tick(stack, player, !world.isRemote);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,9 @@ import mekanism.ultimate.common.MekanismUltimate;
|
||||
import mekanism.ultimate.common.UltimateBlocks;
|
||||
import mekanism.ultimate.common.UltimateCommonProxy;
|
||||
import mekanism.ultimate.common.tile.TileEntityUltimateFactory;
|
||||
import mekanism.ultimate.common.tile.TileEntityNutritionalLiquifier;
|
||||
import mekanism.ultimate.client.gui.GuiNutritionalLiquifier;
|
||||
import mekanism.ultimate.common.UltimateItems;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
@@ -46,6 +49,12 @@ public class UltimateClientProxy extends UltimateCommonProxy {
|
||||
RecipeType type = ((IFactory) stack.getItem()).getRecipeTypeOrNull(stack);
|
||||
return itemModels.get(type == null ? RecipeType.SMELTING : type);
|
||||
});
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(UltimateBlocks.NutritionalLiquifier), 0,
|
||||
new ModelResourceLocation(UltimateBlocks.NutritionalLiquifier.getRegistryName(), "inventory"));
|
||||
for (Item ultimateItem : UltimateItems.allRegistered()) {
|
||||
ModelLoader.setCustomModelResourceLocation(ultimateItem, 0,
|
||||
new ModelResourceLocation(ultimateItem.getRegistryName(), "inventory"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -53,6 +62,8 @@ public class UltimateClientProxy extends UltimateCommonProxy {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (ID == 0 && tile instanceof TileEntityUltimateFactory) {
|
||||
return new GuiFactory(player.inventory, (TileEntityUltimateFactory) tile);
|
||||
} else if (ID == 1 && tile instanceof TileEntityNutritionalLiquifier) {
|
||||
return new GuiNutritionalLiquifier(player.inventory, (TileEntityNutritionalLiquifier) tile);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package mekanism.ultimate.client.gui;
|
||||
|
||||
import java.util.Arrays;
|
||||
import mekanism.client.gui.GuiMekanismTile;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo;
|
||||
import mekanism.client.gui.element.GuiProgress;
|
||||
import mekanism.client.gui.element.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.element.GuiRedstoneControl;
|
||||
import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotType;
|
||||
import mekanism.client.gui.element.gauge.GuiFluidGauge;
|
||||
import mekanism.client.gui.element.gauge.GuiGauge;
|
||||
import mekanism.client.gui.element.tab.GuiSecurityTab;
|
||||
import mekanism.client.gui.element.tab.GuiSideConfigurationTab;
|
||||
import mekanism.client.gui.element.tab.GuiUpgradeTab;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.ultimate.common.inventory.ContainerNutritionalLiquifier;
|
||||
import mekanism.ultimate.common.tile.TileEntityNutritionalLiquifier;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public final class GuiNutritionalLiquifier extends GuiMekanismTile<TileEntityNutritionalLiquifier> {
|
||||
|
||||
public GuiNutritionalLiquifier(InventoryPlayer inventory, TileEntityNutritionalLiquifier tile) {
|
||||
super(tile, new ContainerNutritionalLiquifier(inventory, tile));
|
||||
ResourceLocation resource = getGuiLocation();
|
||||
addGuiElement(new GuiSecurityTab(this, tileEntity, resource));
|
||||
addGuiElement(new GuiSideConfigurationTab(this, tileEntity, resource));
|
||||
addGuiElement(new GuiRedstoneControl(this, tileEntity, resource));
|
||||
addGuiElement(new GuiUpgradeTab(this, tileEntity, resource));
|
||||
addGuiElement(new GuiEnergyInfo(() -> Arrays.asList(
|
||||
LangUtils.localize("gui.using") + ": " + MekanismUtils.getEnergyDisplay(tileEntity.clientEnergyUsed) + "/t",
|
||||
LangUtils.localize("gui.needed") + ": "
|
||||
+ MekanismUtils.getEnergyDisplay(tileEntity.getMaxEnergy() - tileEntity.getEnergy())), this, resource));
|
||||
addGuiElement(new GuiFluidGauge(() -> tileEntity.fluidTank,
|
||||
GuiGauge.Type.STANDARD, this, resource, 78, 13));
|
||||
addGuiElement(new GuiSlot(SlotType.INPUT, this, resource, 26, 34));
|
||||
addGuiElement(new GuiSlot(SlotType.OUTPUT, this, resource, 107, 34));
|
||||
addGuiElement(new GuiSlot(SlotType.NORMAL, this, resource, 134, 23).with(SlotOverlay.PLUS));
|
||||
addGuiElement(new GuiSlot(SlotType.OUTPUT, this, resource, 134, 54));
|
||||
addGuiElement(new GuiSlot(SlotType.NORMAL, this, resource, 154, 54).with(SlotOverlay.POWER));
|
||||
addGuiElement(new GuiProgress(new GuiProgress.IProgressInfoHandler() {
|
||||
@Override
|
||||
public double getProgress() {
|
||||
return tileEntity.getScaledProgress();
|
||||
}
|
||||
}, ProgressBar.LARGE_RIGHT, this, resource, 50, 39));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||
fontRenderer.drawString(LangUtils.localize("gui.NutritionalLiquifier.short"), 45, 4, 0x404040);
|
||||
fontRenderer.drawString(LangUtils.localize("container.inventory"), 8, (ySize - 96) + 4, 0x404040);
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getGuiLocation() {
|
||||
return MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png");
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
package mekanism.ultimate.client.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.ultimate.common.MekanismUltimate;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraftforge.common.config.ConfigElement;
|
||||
import net.minecraftforge.fml.client.config.GuiConfig;
|
||||
import net.minecraftforge.fml.client.config.IConfigElement;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -12,7 +15,14 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
public class GuiUltimateConfig extends GuiConfig {
|
||||
|
||||
public GuiUltimateConfig(GuiScreen parent) {
|
||||
super(parent, new ConfigElement(Mekanism.configurationultimate.getCategory("ultimate")).getChildElements(),
|
||||
super(parent, getConfigElements(),
|
||||
MekanismUltimate.MODID, false, false, "Mekanism Ultimate");
|
||||
}
|
||||
|
||||
private static List<IConfigElement> getConfigElements() {
|
||||
List<IConfigElement> elements = new ArrayList<>();
|
||||
elements.addAll(new ConfigElement(Mekanism.configurationultimate.getCategory("ultimate")).getChildElements());
|
||||
elements.addAll(new ConfigElement(Mekanism.configurationultimate.getCategory("nutrition")).getChildElements());
|
||||
return elements;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package mekanism.ultimate.client.jei;
|
||||
|
||||
import mekanism.client.gui.element.GuiProgress;
|
||||
import mekanism.client.gui.element.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotType;
|
||||
import mekanism.client.gui.element.gauge.GuiFluidGauge;
|
||||
import mekanism.client.gui.element.gauge.GuiGauge;
|
||||
import mekanism.client.jei.BaseRecipeCategory;
|
||||
import mekanism.ultimate.common.MekanismUltimate;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.gui.IGuiFluidStackGroup;
|
||||
import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public final class NutritionalLiquifierRecipeCategory
|
||||
extends BaseRecipeCategory<NutritionalLiquifierRecipeWrapper> {
|
||||
|
||||
public NutritionalLiquifierRecipeCategory(IGuiHelper helper) {
|
||||
super(helper, "mekanism:gui/GuiBlank.png", UltimateJEI.UID,
|
||||
"tile.NutritionalLiquifier.name", null, 3, 12, 170, 70);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addGuiElements() {
|
||||
guiElements.add(new GuiSlot(SlotType.INPUT, this, guiLocation, 26, 34));
|
||||
guiElements.add(new GuiSlot(SlotType.OUTPUT, this, guiLocation, 107, 34));
|
||||
guiElements.add(GuiFluidGauge.getDummy(GuiGauge.Type.STANDARD, this, guiLocation, 78, 13));
|
||||
guiElements.add(new GuiProgress(new IProgressInfoHandler() {
|
||||
@Override
|
||||
public double getProgress() {
|
||||
return (double) timer.getValue() / 20F;
|
||||
}
|
||||
}, ProgressBar.LARGE_RIGHT, this, guiLocation, 50, 39));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(IRecipeLayout layout, NutritionalLiquifierRecipeWrapper wrapper,
|
||||
IIngredients ingredients) {
|
||||
IGuiItemStackGroup items = layout.getItemStacks();
|
||||
items.init(0, true, 27 - xOffset, 35 - yOffset);
|
||||
items.init(1, false, 108 - xOffset, 35 - yOffset);
|
||||
items.set(0, wrapper.getInput());
|
||||
if (!wrapper.getContainerOutput().isEmpty()) {
|
||||
items.set(1, wrapper.getContainerOutput());
|
||||
}
|
||||
|
||||
IGuiFluidStackGroup fluids = layout.getFluidStacks();
|
||||
FluidStack output = wrapper.getPasteOutput();
|
||||
fluids.init(0, false, 79 - xOffset, 14 - yOffset, 16, 58,
|
||||
output.amount, false, fluidOverlayLarge);
|
||||
fluids.set(0, output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModName() {
|
||||
return MekanismUltimate.MODID;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package mekanism.ultimate.client.jei;
|
||||
|
||||
import mekanism.ultimate.common.UltimateFluids;
|
||||
import mekanism.ultimate.common.nutrition.UltimateNutrition;
|
||||
import mekanism.ultimate.common.tile.TileEntityNutritionalLiquifier;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public final class NutritionalLiquifierRecipeWrapper implements IRecipeWrapper {
|
||||
|
||||
private final ItemStack input;
|
||||
private final ItemStack containerOutput;
|
||||
private final FluidStack pasteOutput;
|
||||
|
||||
public NutritionalLiquifierRecipeWrapper(ItemStack input) {
|
||||
this.input = input.copy();
|
||||
this.input.setCount(1);
|
||||
containerOutput = UltimateNutrition.getContainerItem(this.input);
|
||||
pasteOutput = new FluidStack(UltimateFluids.NutritionalPaste,
|
||||
TileEntityNutritionalLiquifier.getPasteOutput(this.input));
|
||||
}
|
||||
|
||||
public ItemStack getInput() {
|
||||
return input;
|
||||
}
|
||||
|
||||
public ItemStack getContainerOutput() {
|
||||
return containerOutput;
|
||||
}
|
||||
|
||||
public FluidStack getPasteOutput() {
|
||||
return pasteOutput;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getIngredients(IIngredients ingredients) {
|
||||
ingredients.setInput(VanillaTypes.ITEM, input);
|
||||
ingredients.setOutput(VanillaTypes.FLUID, pasteOutput);
|
||||
if (!containerOutput.isEmpty()) {
|
||||
ingredients.setOutput(VanillaTypes.ITEM, containerOutput);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package mekanism.ultimate.client.jei;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import mekanism.ultimate.client.gui.GuiNutritionalLiquifier;
|
||||
import mekanism.ultimate.common.MekanismUltimate;
|
||||
import mekanism.ultimate.common.UltimateBlocks;
|
||||
import mekanism.ultimate.common.tile.TileEntityNutritionalLiquifier;
|
||||
import mezz.jei.api.IGuiHelper;
|
||||
import mezz.jei.api.IModPlugin;
|
||||
import mezz.jei.api.IModRegistry;
|
||||
import mezz.jei.api.JEIPlugin;
|
||||
import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeCategoryRegistration;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@JEIPlugin
|
||||
public final class UltimateJEI implements IModPlugin {
|
||||
|
||||
public static final String UID = MekanismUltimate.MODID + ".nutritional_liquification";
|
||||
|
||||
@Override
|
||||
public void registerCategories(IRecipeCategoryRegistration registry) {
|
||||
IGuiHelper helper = registry.getJeiHelpers().getGuiHelper();
|
||||
registry.addRecipeCategories(new NutritionalLiquifierRecipeCategory(helper));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(IModRegistry registry) {
|
||||
List<NutritionalLiquifierRecipeWrapper> recipes = new ArrayList<>();
|
||||
for (ItemStack stack : registry.getIngredientRegistry().getAllIngredients(VanillaTypes.ITEM)) {
|
||||
if (TileEntityNutritionalLiquifier.getPasteOutput(stack) > 0) {
|
||||
recipes.add(new NutritionalLiquifierRecipeWrapper(stack));
|
||||
}
|
||||
}
|
||||
registry.addRecipes(recipes, UID);
|
||||
registry.addRecipeCatalyst(new ItemStack(UltimateBlocks.NutritionalLiquifier), UID);
|
||||
registry.addRecipeClickArea(GuiNutritionalLiquifier.class, 50, 39, 52, 10, UID);
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,9 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
|
||||
@Mod(modid = MekanismUltimate.MODID, useMetadata = true, guiFactory = "mekanism.ultimate.client.gui.UltimateGuiFactory")
|
||||
@Mod(modid = MekanismUltimate.MODID, useMetadata = true,
|
||||
dependencies = "required-after:mekanism",
|
||||
guiFactory = "mekanism.ultimate.client.gui.UltimateGuiFactory")
|
||||
@Mod.EventBusSubscriber
|
||||
public class MekanismUltimate implements IModule {
|
||||
|
||||
@@ -42,6 +44,7 @@ public class MekanismUltimate implements IModule {
|
||||
@SubscribeEvent
|
||||
public static void registerItems(RegistryEvent.Register<Item> event) {
|
||||
UltimateBlocks.registerItemBlocks(event.getRegistry());
|
||||
UltimateItems.registerItems(event.getRegistry());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@@ -51,6 +54,7 @@ public class MekanismUltimate implements IModule {
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
UltimateFluids.register();
|
||||
proxy.preInit();
|
||||
proxy.loadConfiguration();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package mekanism.ultimate.common;
|
||||
|
||||
import mekanism.ultimate.common.block.BlockUltimateFactory;
|
||||
import mekanism.ultimate.common.block.BlockNutritionalLiquifier;
|
||||
import mekanism.ultimate.common.item.ItemBlockUltimateFactory;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -12,6 +13,7 @@ import net.minecraftforge.registries.IForgeRegistry;
|
||||
public final class UltimateBlocks {
|
||||
|
||||
public static final Block UltimateFactory = new BlockUltimateFactory();
|
||||
public static final Block NutritionalLiquifier = new BlockNutritionalLiquifier();
|
||||
|
||||
private UltimateBlocks() {
|
||||
}
|
||||
@@ -19,10 +21,14 @@ public final class UltimateBlocks {
|
||||
public static void registerBlocks(IForgeRegistry<Block> registry) {
|
||||
registry.register(UltimateFactory.setTranslationKey("UltimateFactory")
|
||||
.setRegistryName(new ResourceLocation(MekanismUltimate.MODID, "ultimate_factory")));
|
||||
registry.register(NutritionalLiquifier.setTranslationKey("NutritionalLiquifier")
|
||||
.setRegistryName(new ResourceLocation(MekanismUltimate.MODID, "nutritional_liquifier")));
|
||||
}
|
||||
|
||||
public static void registerItemBlocks(IForgeRegistry<Item> registry) {
|
||||
registry.register(new ItemBlockUltimateFactory(UltimateFactory)
|
||||
.setRegistryName(UltimateFactory.getRegistryName()));
|
||||
registry.register(new net.minecraft.item.ItemBlock(NutritionalLiquifier)
|
||||
.setRegistryName(NutritionalLiquifier.getRegistryName()));
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,9 @@ import mekanism.common.base.IGuiProvider;
|
||||
import mekanism.common.config.MekanismConfig;
|
||||
import mekanism.common.inventory.container.ContainerFactory;
|
||||
import mekanism.ultimate.common.tile.TileEntityUltimateFactory;
|
||||
import mekanism.ultimate.common.tile.TileEntityNutritionalLiquifier;
|
||||
import mekanism.ultimate.common.inventory.ContainerNutritionalLiquifier;
|
||||
import mekanism.ultimate.common.config.UltimateNutritionConfig;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -23,11 +26,14 @@ public class UltimateCommonProxy implements IGuiProvider {
|
||||
|
||||
public void registerTileEntities() {
|
||||
GameRegistry.registerTileEntity(TileEntityUltimateFactory.class, new ResourceLocation(MekanismUltimate.MODID, "ultimate_factory"));
|
||||
GameRegistry.registerTileEntity(TileEntityNutritionalLiquifier.class,
|
||||
new ResourceLocation(MekanismUltimate.MODID, "nutritional_liquifier"));
|
||||
}
|
||||
|
||||
public void loadConfiguration() {
|
||||
if (MekanismConfig.local().ultimate != null) {
|
||||
MekanismConfig.local().ultimate.load(Mekanism.configurationultimate);
|
||||
UltimateNutritionConfig.load(Mekanism.configurationultimate);
|
||||
if (Mekanism.configurationultimate.hasChanged()) {
|
||||
Mekanism.configurationultimate.save();
|
||||
}
|
||||
@@ -44,6 +50,8 @@ public class UltimateCommonProxy implements IGuiProvider {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (ID == 0 && tile instanceof TileEntityUltimateFactory) {
|
||||
return new ContainerFactory(player.inventory, (TileEntityUltimateFactory) tile);
|
||||
} else if (ID == 1 && tile instanceof TileEntityNutritionalLiquifier) {
|
||||
return new ContainerNutritionalLiquifier(player.inventory, (TileEntityNutritionalLiquifier) tile);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package mekanism.ultimate.common;
|
||||
|
||||
import mekanism.common.Mekanism;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
/** Fluid identities owned by the Ultimate module. */
|
||||
public final class UltimateFluids {
|
||||
|
||||
private static final ResourceLocation LIQUID_TEXTURE =
|
||||
new ResourceLocation(Mekanism.MODID, "blocks/liquid/LiquidSteam");
|
||||
|
||||
public static Fluid NutritionalPaste = new Fluid("nutritional_paste", LIQUID_TEXTURE, LIQUID_TEXTURE)
|
||||
.setColor(0xFFEB6CA3)
|
||||
.setDensity(1_250)
|
||||
.setViscosity(1_500);
|
||||
|
||||
private static boolean registered;
|
||||
|
||||
private UltimateFluids() {
|
||||
}
|
||||
|
||||
public static synchronized void register() {
|
||||
if (registered) {
|
||||
return;
|
||||
}
|
||||
if (!FluidRegistry.registerFluid(NutritionalPaste)) {
|
||||
Fluid existing = FluidRegistry.getFluid("nutritional_paste");
|
||||
if (existing == null) {
|
||||
throw new IllegalStateException("Nutritional Paste fluid registration failed without an existing identity");
|
||||
}
|
||||
NutritionalPaste = existing;
|
||||
}
|
||||
FluidRegistry.addBucketForFluid(NutritionalPaste);
|
||||
registered = true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package mekanism.ultimate.common;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import mekanism.ultimate.common.item.ItemCanteen;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
|
||||
/** Items owned and packaged by the Ultimate module. */
|
||||
public final class UltimateItems {
|
||||
|
||||
public static final ItemCanteen Canteen = init(new ItemCanteen(), "canteen", "Canteen");
|
||||
|
||||
private static final List<Item> ITEMS = Collections.singletonList(Canteen);
|
||||
|
||||
private UltimateItems() {
|
||||
}
|
||||
|
||||
public static void registerItems(IForgeRegistry<Item> registry) {
|
||||
for (Item item : ITEMS) {
|
||||
registry.register(item);
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Item> allRegistered() {
|
||||
return ITEMS;
|
||||
}
|
||||
|
||||
private static <ITEM extends Item> ITEM init(ITEM item, String registryName, String translationKey) {
|
||||
item.setRegistryName(new ResourceLocation(MekanismUltimate.MODID, registryName));
|
||||
item.setTranslationKey(translationKey);
|
||||
return item;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
package mekanism.ultimate.common.block;
|
||||
|
||||
import java.util.List;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.api.IMekWrench;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.block.BlockMekanismContainer;
|
||||
import mekanism.common.block.states.BlockStateFacing;
|
||||
import mekanism.common.block.states.BlockStateMachine;
|
||||
import mekanism.common.integration.wrenches.Wrenches;
|
||||
import mekanism.common.tile.prefab.TileEntityBasicBlock;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.SecurityUtils;
|
||||
import mekanism.ultimate.common.MekanismUltimate;
|
||||
import mekanism.ultimate.common.UltimateBlocks;
|
||||
import mekanism.ultimate.common.tile.TileEntityNutritionalLiquifier;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.InventoryHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/** 1.12 block shell for the stable Nutritional Liquifier. */
|
||||
public final class BlockNutritionalLiquifier extends BlockMekanismContainer {
|
||||
|
||||
public BlockNutritionalLiquifier() {
|
||||
super(Material.IRON);
|
||||
setHardness(3.5F);
|
||||
setResistance(8F);
|
||||
setSoundType(SoundType.METAL);
|
||||
setCreativeTab(Mekanism.tabMekanism);
|
||||
setDefaultState(blockState.getBaseState()
|
||||
.withProperty(BlockStateFacing.facingProperty, EnumFacing.NORTH)
|
||||
.withProperty(BlockStateMachine.activeProperty, false));
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
return new BlockStateContainer(this, BlockStateFacing.facingProperty, BlockStateMachine.activeProperty);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
@Deprecated
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return getDefaultState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
@Deprecated
|
||||
public IBlockState getActualState(@Nonnull IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileEntityNutritionalLiquifier) {
|
||||
TileEntityNutritionalLiquifier liquifier = (TileEntityNutritionalLiquifier) tile;
|
||||
return state.withProperty(BlockStateFacing.facingProperty, liquifier.facing)
|
||||
.withProperty(BlockStateMachine.activeProperty, liquifier.getActive());
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileEntityBasicBlock) {
|
||||
((TileEntityBasicBlock) tile).setFacing(placer.getHorizontalFacing().getOpposite());
|
||||
((TileEntityBasicBlock) tile).redstone = world.getRedstonePowerFromNeighbors(pos) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block neighborBlock, BlockPos neighborPos) {
|
||||
if (!world.isRemote) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileEntityBasicBlock) {
|
||||
((TileEntityBasicBlock) tile).onNeighborChange(neighborBlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player,
|
||||
EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
if (world.isRemote) {
|
||||
return true;
|
||||
}
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (!(tile instanceof TileEntityNutritionalLiquifier)) {
|
||||
return false;
|
||||
}
|
||||
TileEntityNutritionalLiquifier liquifier = (TileEntityNutritionalLiquifier) tile;
|
||||
ItemStack held = player.getHeldItem(hand);
|
||||
if (!held.isEmpty()) {
|
||||
IMekWrench wrench = Wrenches.getHandler(held);
|
||||
if (wrench != null) {
|
||||
RayTraceResult ray = new RayTraceResult(new Vec3d(hitX, hitY, hitZ), side, pos);
|
||||
if (wrench.canUseWrench(player, hand, held, ray)) {
|
||||
if (!SecurityUtils.canAccess(player, liquifier)) {
|
||||
SecurityUtils.displayNoAccess(player);
|
||||
return true;
|
||||
}
|
||||
wrench.wrenchUsed(player, hand, held, ray);
|
||||
if (player.isSneaking()) {
|
||||
MekanismUtils.dismantleBlock(this, state, world, pos);
|
||||
} else {
|
||||
liquifier.setFacing(liquifier.facing.rotateY());
|
||||
world.notifyNeighborsOfStateChange(pos, this, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!player.isSneaking()) {
|
||||
if (SecurityUtils.canAccess(player, liquifier)) {
|
||||
player.openGui(MekanismUltimate.instance, 1, world, pos.getX(), pos.getY(), pos.getZ());
|
||||
} else {
|
||||
SecurityUtils.displayNoAccess(player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(@Nonnull World world, int meta) {
|
||||
return new TileEntityNutritionalLiquifier();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
protected ItemStack getDropItem(@Nonnull IBlockState state, @Nonnull IBlockAccess world, @Nonnull BlockPos pos) {
|
||||
return new ItemStack(UltimateBlocks.NutritionalLiquifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, @Nonnull BlockPos pos, @Nonnull IBlockState state) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileEntityNutritionalLiquifier) {
|
||||
InventoryHelper.dropInventoryItems(world, pos, (TileEntityNutritionalLiquifier) tile);
|
||||
}
|
||||
super.breakBlock(world, pos, state);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
@Deprecated
|
||||
public EnumBlockRenderType getRenderType(IBlockState state) {
|
||||
return EnumBlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, @Nullable World world, List<String> tooltip, ITooltipFlag flag) {
|
||||
tooltip.add(new TextComponentTranslation("tooltip.NutritionalLiquifier").getFormattedText());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean hasComparatorInputOverride(IBlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
return tile instanceof TileEntityNutritionalLiquifier
|
||||
? ((TileEntityNutritionalLiquifier) tile).getRedstoneLevel() : 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package mekanism.ultimate.common.config;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
/** Ultimate-owned stable defaults for the nutrition vertical slice. */
|
||||
public final class UltimateNutritionConfig {
|
||||
|
||||
public static final int DEFAULT_LIQUIFIER_ENERGY_STORAGE = 40_000;
|
||||
public static final int DEFAULT_LIQUIFIER_ENERGY_USAGE = 200;
|
||||
public static final int DEFAULT_MB_PER_FOOD = 50;
|
||||
public static final float DEFAULT_SATURATION = 0.8F;
|
||||
public static final int DEFAULT_CANTEEN_CAPACITY = 64_000;
|
||||
public static final int DEFAULT_CANTEEN_TRANSFER_RATE = 128;
|
||||
|
||||
public static boolean nutritionalLiquifierEnabled = true;
|
||||
public static int nutritionalLiquifierEnergyStorage = DEFAULT_LIQUIFIER_ENERGY_STORAGE;
|
||||
public static int nutritionalLiquifierEnergyUsage = DEFAULT_LIQUIFIER_ENERGY_USAGE;
|
||||
public static int nutritionalPasteMBPerFood = DEFAULT_MB_PER_FOOD;
|
||||
public static float nutritionalPasteSaturation = DEFAULT_SATURATION;
|
||||
public static int canteenMaxStorage = DEFAULT_CANTEEN_CAPACITY;
|
||||
public static int canteenTransferRate = DEFAULT_CANTEEN_TRANSFER_RATE;
|
||||
|
||||
private UltimateNutritionConfig() {
|
||||
}
|
||||
|
||||
public static void load(Configuration config) {
|
||||
String category = "nutrition";
|
||||
nutritionalLiquifierEnabled = config.getBoolean("NutritionalLiquifierEnabled", category, true,
|
||||
"Whether crafting recipes for the Nutritional Liquifier and Canteen are enabled.");
|
||||
nutritionalLiquifierEnergyStorage = config.getInt("NutritionalLiquifierEnergyStorage", category,
|
||||
DEFAULT_LIQUIFIER_ENERGY_STORAGE, 1, Integer.MAX_VALUE,
|
||||
"Nutritional Liquifier energy capacity in Joules.");
|
||||
nutritionalLiquifierEnergyUsage = config.getInt("NutritionalLiquifierEnergyUsage", category,
|
||||
DEFAULT_LIQUIFIER_ENERGY_USAGE, 0, Integer.MAX_VALUE,
|
||||
"Nutritional Liquifier energy usage in Joules per tick.");
|
||||
nutritionalPasteMBPerFood = config.getInt("NutritionalPasteMBPerFood", category,
|
||||
DEFAULT_MB_PER_FOOD, 1, Integer.MAX_VALUE,
|
||||
"Millibuckets of Nutritional Paste produced and consumed per half-drumstick.");
|
||||
nutritionalPasteSaturation = config.getFloat("NutritionalPasteSaturation", category,
|
||||
DEFAULT_SATURATION, 0F, 100F,
|
||||
"Saturation modifier applied when Nutritional Paste restores hunger.");
|
||||
canteenMaxStorage = config.getInt("CanteenMaxStorage", category,
|
||||
DEFAULT_CANTEEN_CAPACITY, 1, Integer.MAX_VALUE,
|
||||
"Maximum Nutritional Paste stored by a Canteen in millibuckets.");
|
||||
canteenTransferRate = config.getInt("CanteenTransferRate", category,
|
||||
DEFAULT_CANTEEN_TRANSFER_RATE, 1, Integer.MAX_VALUE,
|
||||
"Maximum Nutritional Paste transferred to or from a Canteen per operation.");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package mekanism.ultimate.common.inventory;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import mekanism.common.inventory.container.ContainerMekanism;
|
||||
import mekanism.common.inventory.slot.SlotEnergy.SlotDischarge;
|
||||
import mekanism.common.inventory.slot.SlotOutput;
|
||||
import mekanism.common.util.ChargeUtils;
|
||||
import mekanism.ultimate.common.tile.TileEntityNutritionalLiquifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public final class ContainerNutritionalLiquifier
|
||||
extends ContainerMekanism<TileEntityNutritionalLiquifier> {
|
||||
|
||||
public ContainerNutritionalLiquifier(InventoryPlayer inventory, TileEntityNutritionalLiquifier tile) {
|
||||
super(tile, inventory);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addSlots() {
|
||||
addSlotToContainer(new Slot(tileEntity, TileEntityNutritionalLiquifier.INPUT_SLOT, 27, 35));
|
||||
addSlotToContainer(new SlotOutput(tileEntity, TileEntityNutritionalLiquifier.OUTPUT_SLOT, 108, 35));
|
||||
addSlotToContainer(new Slot(tileEntity, TileEntityNutritionalLiquifier.CONTAINER_SLOT, 135, 24));
|
||||
addSlotToContainer(new SlotOutput(tileEntity, TileEntityNutritionalLiquifier.CONTAINER_OUTPUT_SLOT, 135, 55));
|
||||
addSlotToContainer(new SlotDischarge(tileEntity, TileEntityNutritionalLiquifier.ENERGY_SLOT, 155, 55));
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slotID) {
|
||||
ItemStack original = ItemStack.EMPTY;
|
||||
Slot slot = inventorySlots.get(slotID);
|
||||
if (slot == null || !slot.getHasStack()) {
|
||||
return original;
|
||||
}
|
||||
ItemStack stack = slot.getStack();
|
||||
original = stack.copy();
|
||||
if (slotID < 5) {
|
||||
if (!mergeItemStack(stack, 5, inventorySlots.size(), true)) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
} else if (ChargeUtils.canBeDischarged(stack)) {
|
||||
if (!mergeItemStack(stack, 4, 5, false)) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
} else if (tileEntity.isItemValidForSlot(TileEntityNutritionalLiquifier.CONTAINER_SLOT, stack)) {
|
||||
if (!mergeItemStack(stack, 2, 3, false)) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
} else if (tileEntity.isItemValidForSlot(TileEntityNutritionalLiquifier.INPUT_SLOT, stack)) {
|
||||
if (!mergeItemStack(stack, 0, 1, false)) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
} else if (slotID < 32) {
|
||||
if (!mergeItemStack(stack, 32, inventorySlots.size(), false)) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
} else if (!mergeItemStack(stack, 5, 32, false)) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
if (stack.isEmpty()) {
|
||||
slot.putStack(ItemStack.EMPTY);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
if (stack.getCount() == original.getCount()) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
slot.onTake(player, stack);
|
||||
return original;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
package mekanism.ultimate.common.item;
|
||||
|
||||
import java.util.List;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.base.FluidItemWrapper;
|
||||
import mekanism.common.base.IFluidItemWrapper;
|
||||
import mekanism.common.capabilities.ItemCapabilityWrapper;
|
||||
import mekanism.common.item.ItemMekanism;
|
||||
import mekanism.common.util.ItemDataUtils;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.ultimate.common.UltimateFluids;
|
||||
import mekanism.ultimate.common.nutrition.UltimateNutrition;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.capabilities.ICapabilityProvider;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
/** Portable stable-style Nutritional Paste storage and drinking item. */
|
||||
public final class ItemCanteen extends ItemMekanism implements IFluidItemWrapper {
|
||||
|
||||
private static final String FLUID_KEY = "nutritionalPaste";
|
||||
|
||||
public ItemCanteen() {
|
||||
setMaxStackSize(1);
|
||||
setCreativeTab(Mekanism.tabMekanism);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack) {
|
||||
return EnumRarity.UNCOMMON;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICapabilityProvider initCapabilities(ItemStack stack, @Nullable NBTTagCompound nbt) {
|
||||
return new ItemCapabilityWrapper(stack, new FluidItemWrapper());
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack getFluid(ItemStack container) {
|
||||
if (!ItemDataUtils.hasData(container, FLUID_KEY)) {
|
||||
return null;
|
||||
}
|
||||
FluidStack stored = FluidStack.loadFluidStackFromNBT(ItemDataUtils.getCompound(container, FLUID_KEY));
|
||||
if (stored == null || stored.getFluid() != UltimateFluids.NutritionalPaste || stored.amount <= 0) {
|
||||
return null;
|
||||
}
|
||||
stored.amount = Math.min(stored.amount, getCapacity(container));
|
||||
return stored;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCapacity(ItemStack container) {
|
||||
return UltimateNutrition.getCanteenCapacity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(ItemStack container, FluidStack resource, boolean doFill) {
|
||||
if (resource == null || resource.getFluid() != UltimateFluids.NutritionalPaste || resource.amount <= 0) {
|
||||
return 0;
|
||||
}
|
||||
FluidStack stored = getFluid(container);
|
||||
int amount = stored == null ? 0 : stored.amount;
|
||||
int accepted = Math.min(resource.amount, Math.min(UltimateNutrition.getCanteenTransferRate(), getCapacity(container) - amount));
|
||||
if (accepted > 0 && doFill) {
|
||||
setFluid(container, amount + accepted);
|
||||
}
|
||||
return Math.max(0, accepted);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ItemStack container, int maxDrain, boolean doDrain) {
|
||||
FluidStack stored = getFluid(container);
|
||||
if (stored == null || maxDrain <= 0) {
|
||||
return null;
|
||||
}
|
||||
int drained = Math.min(stored.amount, Math.min(maxDrain, UltimateNutrition.getCanteenTransferRate()));
|
||||
if (doDrain) {
|
||||
setFluid(container, stored.amount - drained);
|
||||
}
|
||||
return new FluidStack(UltimateFluids.NutritionalPaste, drained);
|
||||
}
|
||||
|
||||
public void setFluid(ItemStack container, int amount) {
|
||||
int clamped = Math.max(0, Math.min(amount, getCapacity(container)));
|
||||
if (clamped == 0) {
|
||||
ItemDataUtils.removeData(container, FLUID_KEY);
|
||||
} else {
|
||||
ItemDataUtils.setCompound(container, FLUID_KEY,
|
||||
new FluidStack(UltimateFluids.NutritionalPaste, clamped).writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, @Nonnull EnumHand hand) {
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
FluidStack stored = getFluid(stack);
|
||||
if (!player.capabilities.isCreativeMode && !player.isSpectator() && player.canEat(false)
|
||||
&& stored != null && stored.amount >= UltimateNutrition.getPasteMBPerFood()) {
|
||||
player.setActiveHand(hand);
|
||||
return new ActionResult<>(EnumActionResult.SUCCESS, stack);
|
||||
}
|
||||
return new ActionResult<>(EnumActionResult.FAIL, stack);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ItemStack onItemUseFinish(@Nonnull ItemStack stack, World world, EntityLivingBase entity) {
|
||||
if (!world.isRemote && entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
if (player.capabilities.isCreativeMode || player.isSpectator()) {
|
||||
return stack;
|
||||
}
|
||||
FluidStack stored = getFluid(stack);
|
||||
int mbPerFood = UltimateNutrition.getPasteMBPerFood();
|
||||
int needed = Math.min(20 - player.getFoodStats().getFoodLevel(),
|
||||
stored == null ? 0 : stored.amount / mbPerFood);
|
||||
if (needed > 0) {
|
||||
player.getFoodStats().addStats(needed, UltimateNutrition.getSaturation());
|
||||
setFluid(stack, stored.amount - needed * mbPerFood);
|
||||
}
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack stack) {
|
||||
return 32;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack stack) {
|
||||
return EnumAction.DRINK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showDurabilityBar(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDurabilityForDisplay(ItemStack stack) {
|
||||
FluidStack stored = getFluid(stack);
|
||||
return 1D - (stored == null ? 0D : (double) stored.amount / getCapacity(stack));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRGBDurabilityForDisplay(@Nonnull ItemStack stack) {
|
||||
return MathHelper.hsvToRGB(0.93F, 0.54F, 0.92F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(@Nonnull CreativeTabs tab, @Nonnull NonNullList<ItemStack> items) {
|
||||
if (!isInCreativeTab(tab)) {
|
||||
return;
|
||||
}
|
||||
items.add(new ItemStack(this));
|
||||
ItemStack full = new ItemStack(this);
|
||||
setFluid(full, getCapacity(full));
|
||||
items.add(full);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) {
|
||||
FluidStack stored = getFluid(stack);
|
||||
int amount = stored == null ? 0 : stored.amount;
|
||||
tooltip.add(EnumColor.AQUA + LangUtils.localize("tooltip.nutritionalPaste") + ": " + EnumColor.GREY
|
||||
+ amount + " / " + getCapacity(stack) + " mB");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package mekanism.ultimate.common.nutrition;
|
||||
|
||||
import mekanism.ultimate.common.config.UltimateNutritionConfig;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemSoup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/** Centralized stable nutrition defaults with safe startup fallbacks. */
|
||||
public final class UltimateNutrition {
|
||||
|
||||
public static final int DEFAULT_MB_PER_FOOD = UltimateNutritionConfig.DEFAULT_MB_PER_FOOD;
|
||||
public static final float DEFAULT_SATURATION = UltimateNutritionConfig.DEFAULT_SATURATION;
|
||||
public static final int DEFAULT_CANTEEN_CAPACITY = UltimateNutritionConfig.DEFAULT_CANTEEN_CAPACITY;
|
||||
public static final int DEFAULT_CANTEEN_TRANSFER_RATE = UltimateNutritionConfig.DEFAULT_CANTEEN_TRANSFER_RATE;
|
||||
|
||||
private UltimateNutrition() {
|
||||
}
|
||||
|
||||
public static int getPasteMBPerFood() {
|
||||
return Math.max(1, UltimateNutritionConfig.nutritionalPasteMBPerFood);
|
||||
}
|
||||
|
||||
public static float getSaturation() {
|
||||
return Math.max(0, UltimateNutritionConfig.nutritionalPasteSaturation);
|
||||
}
|
||||
|
||||
public static int getCanteenCapacity() {
|
||||
return Math.max(1, UltimateNutritionConfig.canteenMaxStorage);
|
||||
}
|
||||
|
||||
public static int getCanteenTransferRate() {
|
||||
return Math.max(1, UltimateNutritionConfig.canteenTransferRate);
|
||||
}
|
||||
|
||||
public static int getPasteOutput(ItemStack stack) {
|
||||
if (stack == null || stack.isEmpty() || !(stack.getItem() instanceof ItemFood)) {
|
||||
return 0;
|
||||
}
|
||||
int nutrition = ((ItemFood) stack.getItem()).getHealAmount(stack);
|
||||
if (nutrition <= 0) {
|
||||
return 0;
|
||||
}
|
||||
long amount = (long) nutrition * getPasteMBPerFood();
|
||||
return (int) Math.min(Integer.MAX_VALUE, amount);
|
||||
}
|
||||
|
||||
public static ItemStack getContainerItem(ItemStack input) {
|
||||
if (input == null || input.isEmpty()) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
// Vanilla soups return their bowl from onItemUseFinish rather than the crafting-container API.
|
||||
if (input.getItem() instanceof ItemSoup) {
|
||||
return new ItemStack(Items.BOWL);
|
||||
}
|
||||
if (!input.getItem().hasContainerItem(input)) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
ItemStack remainder = input.getItem().getContainerItem(input);
|
||||
return remainder == null ? ItemStack.EMPTY : remainder.copy();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package mekanism.ultimate.common.recipe;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import java.util.function.BooleanSupplier;
|
||||
import mekanism.ultimate.common.config.UltimateNutritionConfig;
|
||||
import net.minecraftforge.common.crafting.IConditionFactory;
|
||||
import net.minecraftforge.common.crafting.JsonContext;
|
||||
|
||||
public final class NutritionRecipeEnabledCondition implements IConditionFactory {
|
||||
|
||||
@Override
|
||||
public BooleanSupplier parse(JsonContext context, JsonObject json) {
|
||||
return () -> UltimateNutritionConfig.nutritionalLiquifierEnabled;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,415 @@
|
||||
package mekanism.ultimate.common.tile;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import java.util.List;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.IConfigCardAccess;
|
||||
import mekanism.api.TileNetworkList;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.common.SideData;
|
||||
import mekanism.common.Upgrade;
|
||||
import mekanism.common.Upgrade.IUpgradeInfoHandler;
|
||||
import mekanism.common.base.FluidHandlerWrapper;
|
||||
import mekanism.common.base.IComparatorSupport;
|
||||
import mekanism.common.base.IFluidHandlerWrapper;
|
||||
import mekanism.common.base.ISideConfiguration;
|
||||
import mekanism.common.base.ITankManager;
|
||||
import mekanism.common.capabilities.Capabilities;
|
||||
import mekanism.common.tile.component.TileComponentConfig;
|
||||
import mekanism.common.tile.component.TileComponentEjector;
|
||||
import mekanism.common.tile.prefab.TileEntityMachine;
|
||||
import mekanism.common.util.ChargeUtils;
|
||||
import mekanism.common.util.FluidContainerUtils;
|
||||
import mekanism.common.util.InventoryUtils;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.TileUtils;
|
||||
import mekanism.ultimate.common.UltimateFluids;
|
||||
import mekanism.ultimate.common.config.UltimateNutritionConfig;
|
||||
import mekanism.ultimate.common.nutrition.UltimateNutrition;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.FluidUtil;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandlerItem;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
|
||||
/** Converts one food item into fifty millibuckets of paste per hunger point. */
|
||||
public final class TileEntityNutritionalLiquifier extends TileEntityMachine implements IFluidHandlerWrapper,
|
||||
ISideConfiguration, IConfigCardAccess, ITankManager, IUpgradeInfoHandler, IComparatorSupport {
|
||||
|
||||
public static final int MAX_FLUID = 10_000;
|
||||
public static final int BASE_TICKS_REQUIRED = 100;
|
||||
|
||||
public static final int INPUT_SLOT = 0;
|
||||
public static final int OUTPUT_SLOT = 1;
|
||||
public static final int CONTAINER_SLOT = 2;
|
||||
public static final int CONTAINER_OUTPUT_SLOT = 3;
|
||||
public static final int ENERGY_SLOT = 4;
|
||||
public static final int UPGRADE_SLOT = 5;
|
||||
|
||||
public final FluidTank fluidTank = new FluidTank(MAX_FLUID);
|
||||
public final TileComponentConfig configComponent;
|
||||
public final TileComponentEjector ejectorComponent;
|
||||
|
||||
public int operatingTicks;
|
||||
public int ticksRequired = BASE_TICKS_REQUIRED;
|
||||
public double clientEnergyUsed;
|
||||
|
||||
private int currentRedstoneLevel;
|
||||
|
||||
public TileEntityNutritionalLiquifier() {
|
||||
super("null", "NutritionalLiquifier", getConfiguredStorage(), getConfiguredUsage(), UPGRADE_SLOT);
|
||||
inventory = NonNullList.withSize(6, ItemStack.EMPTY);
|
||||
|
||||
configComponent = new TileComponentConfig(this, TransmissionType.ITEM, TransmissionType.ENERGY,
|
||||
TransmissionType.FLUID);
|
||||
configComponent.addOutput(TransmissionType.ITEM,
|
||||
new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
|
||||
configComponent.addOutput(TransmissionType.ITEM,
|
||||
new SideData("Input", EnumColor.DARK_GREEN, new int[]{INPUT_SLOT, CONTAINER_SLOT}));
|
||||
configComponent.addOutput(TransmissionType.ITEM,
|
||||
new SideData("Output", EnumColor.DARK_RED, new int[]{OUTPUT_SLOT, CONTAINER_OUTPUT_SLOT}));
|
||||
configComponent.addOutput(TransmissionType.ITEM,
|
||||
new SideData("Energy", EnumColor.DARK_BLUE, new int[]{ENERGY_SLOT}));
|
||||
configComponent.setConfig(TransmissionType.ITEM, new byte[]{0, 3, 0, 2, 1, 0});
|
||||
|
||||
configComponent.addOutput(TransmissionType.FLUID,
|
||||
new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
|
||||
configComponent.addOutput(TransmissionType.FLUID,
|
||||
new SideData("Output", EnumColor.DARK_RED, new int[]{0}));
|
||||
configComponent.setConfig(TransmissionType.FLUID, new byte[]{0, 0, 0, 1, 0, 0});
|
||||
configComponent.setInputConfig(TransmissionType.ENERGY);
|
||||
|
||||
ejectorComponent = new TileComponentEjector(this);
|
||||
ejectorComponent.setOutputData(TransmissionType.ITEM,
|
||||
configComponent.getOutputs(TransmissionType.ITEM).get(2));
|
||||
ejectorComponent.setOutputData(TransmissionType.FLUID,
|
||||
configComponent.getOutputs(TransmissionType.FLUID).get(1));
|
||||
}
|
||||
|
||||
private static double getConfiguredStorage() {
|
||||
return Math.max(1, UltimateNutritionConfig.nutritionalLiquifierEnergyStorage);
|
||||
}
|
||||
|
||||
private static double getConfiguredUsage() {
|
||||
return Math.max(0, UltimateNutritionConfig.nutritionalLiquifierEnergyUsage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
if (world.isRemote) {
|
||||
return;
|
||||
}
|
||||
|
||||
ChargeUtils.discharge(ENERGY_SLOT, this);
|
||||
fillContainer();
|
||||
|
||||
boolean canOperate = canOperate();
|
||||
boolean running = canOperate && MekanismUtils.canFunction(this) && getEnergy() >= energyPerTick;
|
||||
if (running) {
|
||||
setEnergy(getEnergy() - energyPerTick);
|
||||
clientEnergyUsed = energyPerTick;
|
||||
setActive(true);
|
||||
if (++operatingTicks >= ticksRequired) {
|
||||
operate();
|
||||
operatingTicks = 0;
|
||||
}
|
||||
} else {
|
||||
clientEnergyUsed = 0;
|
||||
setActive(false);
|
||||
if (!canOperate) {
|
||||
operatingTicks = 0;
|
||||
}
|
||||
}
|
||||
prevEnergy = getEnergy();
|
||||
|
||||
int redstoneLevel = getRedstoneLevel();
|
||||
if (redstoneLevel != currentRedstoneLevel) {
|
||||
currentRedstoneLevel = redstoneLevel;
|
||||
world.updateComparatorOutputLevel(pos, getBlockType());
|
||||
}
|
||||
}
|
||||
|
||||
private void fillContainer() {
|
||||
ItemStack input = inventory.get(CONTAINER_SLOT);
|
||||
FluidStack stored = fluidTank.getFluid();
|
||||
if (input.isEmpty() || input.getCount() != 1 || stored == null || stored.amount <= 0) {
|
||||
return;
|
||||
}
|
||||
IFluidHandlerItem handler = FluidUtil.getFluidHandler(input);
|
||||
if (handler == null) {
|
||||
return;
|
||||
}
|
||||
FluidStack offered = stored.copy();
|
||||
int filled = handler.fill(offered, true);
|
||||
if (filled > 0) {
|
||||
fluidTank.drain(filled, true);
|
||||
inventory.set(CONTAINER_SLOT, handler.getContainer());
|
||||
markDirty();
|
||||
}
|
||||
|
||||
ItemStack filledContainer = inventory.get(CONTAINER_SLOT);
|
||||
if (filled <= 0 && FluidUtil.getFluidContained(filledContainer) == null) {
|
||||
return;
|
||||
}
|
||||
FluidStack remaining = fluidTank.getFluid();
|
||||
boolean cannotFillMore = remaining == null || remaining.amount <= 0;
|
||||
if (!cannotFillMore) {
|
||||
IFluidHandlerItem remainingHandler = FluidUtil.getFluidHandler(filledContainer);
|
||||
cannotFillMore = remainingHandler == null || remainingHandler.fill(remaining.copy(), false) <= 0;
|
||||
}
|
||||
if (!cannotFillMore || filledContainer.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
ItemStack output = inventory.get(CONTAINER_OUTPUT_SLOT);
|
||||
if (output.isEmpty()) {
|
||||
inventory.set(CONTAINER_OUTPUT_SLOT, filledContainer);
|
||||
inventory.set(CONTAINER_SLOT, ItemStack.EMPTY);
|
||||
markDirty();
|
||||
} else if (ItemHandlerHelper.canItemStacksStack(output, filledContainer)
|
||||
&& output.getCount() < output.getMaxStackSize()) {
|
||||
output.grow(1);
|
||||
inventory.set(CONTAINER_SLOT, ItemStack.EMPTY);
|
||||
markDirty();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean canOperate() {
|
||||
ItemStack input = inventory.get(INPUT_SLOT);
|
||||
int paste = getPasteOutput(input);
|
||||
if (paste <= 0 || paste > fluidTank.getCapacity() - fluidTank.getFluidAmount()) {
|
||||
return false;
|
||||
}
|
||||
ItemStack remainder = UltimateNutrition.getContainerItem(input);
|
||||
if (remainder.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
ItemStack output = inventory.get(OUTPUT_SLOT);
|
||||
return output.isEmpty() || ItemStack.areItemsEqual(output, remainder)
|
||||
&& ItemStack.areItemStackTagsEqual(output, remainder)
|
||||
&& output.getCount() + remainder.getCount() <= Math.min(output.getMaxStackSize(), getInventoryStackLimit());
|
||||
}
|
||||
|
||||
private void operate() {
|
||||
if (!canOperate()) {
|
||||
return;
|
||||
}
|
||||
ItemStack input = inventory.get(INPUT_SLOT);
|
||||
int paste = getPasteOutput(input);
|
||||
ItemStack remainder = UltimateNutrition.getContainerItem(input);
|
||||
input.shrink(1);
|
||||
if (input.isEmpty()) {
|
||||
inventory.set(INPUT_SLOT, ItemStack.EMPTY);
|
||||
}
|
||||
if (!remainder.isEmpty()) {
|
||||
ItemStack output = inventory.get(OUTPUT_SLOT);
|
||||
if (output.isEmpty()) {
|
||||
inventory.set(OUTPUT_SLOT, remainder);
|
||||
} else {
|
||||
output.grow(remainder.getCount());
|
||||
}
|
||||
}
|
||||
fluidTank.fill(new FluidStack(UltimateFluids.NutritionalPaste, paste), true);
|
||||
markDirty();
|
||||
}
|
||||
|
||||
public static int getPasteOutput(ItemStack stack) {
|
||||
return UltimateNutrition.getPasteOutput(stack);
|
||||
}
|
||||
|
||||
public double getScaledProgress() {
|
||||
return ticksRequired <= 0 ? 0 : (double) operatingTicks / ticksRequired;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recalculateUpgradables(Upgrade upgrade) {
|
||||
super.recalculateUpgradables(upgrade);
|
||||
if (upgrade == Upgrade.SPEED) {
|
||||
ticksRequired = MekanismUtils.getTicks(this, BASE_TICKS_REQUIRED);
|
||||
energyPerTick = MekanismUtils.getEnergyPerTick(this, BASE_ENERGY_PER_TICK);
|
||||
} else if (upgrade == Upgrade.ENERGY) {
|
||||
energyPerTick = MekanismUtils.getEnergyPerTick(this, BASE_ENERGY_PER_TICK);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(EnumFacing from, @Nonnull FluidStack resource, boolean doFill) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canFill(EnumFacing from, @Nonnull FluidStack fluid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain) {
|
||||
return canDrain(from, null) ? fluidTank.drain(maxDrain, doDrain) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(EnumFacing from, @Nullable FluidStack fluid) {
|
||||
if (from == null || !configComponent.getOutput(TransmissionType.FLUID, from, facing).hasSlot(0)) {
|
||||
return false;
|
||||
}
|
||||
FluidStack stored = fluidTank.getFluid();
|
||||
return stored != null && (fluid == null || stored.isFluidEqual(fluid));
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTankInfo[] getTankInfo(EnumFacing from) {
|
||||
return configComponent.getOutput(TransmissionType.FLUID, from, facing).getFluidTankInfo(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTankInfo[] getAllTanks() {
|
||||
return new FluidTankInfo[]{fluidTank.getInfo()};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getTanks() {
|
||||
return new Object[]{fluidTank};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sideIsConsumer(EnumFacing side) {
|
||||
return side == null || configComponent.hasSideForData(TransmissionType.ENERGY, facing, 1, side);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public int[] getSlotsForFace(@Nonnull EnumFacing side) {
|
||||
return configComponent.getOutput(TransmissionType.ITEM, side, facing).availableSlots;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slot, @Nonnull ItemStack stack) {
|
||||
if (slot == INPUT_SLOT) {
|
||||
return getPasteOutput(stack) > 0;
|
||||
} else if (slot == CONTAINER_SLOT) {
|
||||
return FluidContainerUtils.isFluidContainer(stack);
|
||||
} else if (slot == ENERGY_SLOT) {
|
||||
return ChargeUtils.canBeDischarged(stack);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slot, @Nonnull ItemStack stack, @Nonnull EnumFacing side) {
|
||||
if (slot == OUTPUT_SLOT || slot == CONTAINER_OUTPUT_SLOT) {
|
||||
return true;
|
||||
} else if (slot == ENERGY_SLOT) {
|
||||
return ChargeUtils.canBeOutputted(stack, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound data) {
|
||||
super.readFromNBT(data);
|
||||
operatingTicks = Math.max(0, data.getInteger("operatingTicks"));
|
||||
fluidTank.readFromNBT(data.getCompoundTag("NutritionalPasteTank"));
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound data) {
|
||||
super.writeToNBT(data);
|
||||
data.setInteger("operatingTicks", operatingTicks);
|
||||
data.setTag("NutritionalPasteTank", fluidTank.writeToNBT(new NBTTagCompound()));
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlePacketData(ByteBuf data) {
|
||||
super.handlePacketData(data);
|
||||
if (FMLCommonHandler.instance().getEffectiveSide().isClient()) {
|
||||
operatingTicks = data.readInt();
|
||||
ticksRequired = data.readInt();
|
||||
clientEnergyUsed = data.readDouble();
|
||||
TileUtils.readTankData(data, fluidTank);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileNetworkList getNetworkedData(TileNetworkList data) {
|
||||
super.getNetworkedData(data);
|
||||
data.add(operatingTicks);
|
||||
data.add(ticksRequired);
|
||||
data.add(clientEnergyUsed);
|
||||
TileUtils.addTankData(data, fluidTank);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCapability(@Nonnull Capability<?> capability, EnumFacing side) {
|
||||
if (isCapabilityDisabled(capability, side)) {
|
||||
return false;
|
||||
}
|
||||
return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY
|
||||
|| capability == Capabilities.CONFIG_CARD_CAPABILITY || super.hasCapability(capability, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getCapability(@Nonnull Capability<T> capability, EnumFacing side) {
|
||||
if (isCapabilityDisabled(capability, side)) {
|
||||
return null;
|
||||
}
|
||||
if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) {
|
||||
return CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY.cast(new FluidHandlerWrapper(this, side));
|
||||
} else if (capability == Capabilities.CONFIG_CARD_CAPABILITY) {
|
||||
return Capabilities.CONFIG_CARD_CAPABILITY.cast(this);
|
||||
}
|
||||
return super.getCapability(capability, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCapabilityDisabled(@Nonnull Capability<?> capability, EnumFacing side) {
|
||||
return configComponent.isCapabilityDisabled(capability, side, facing)
|
||||
|| super.isCapabilityDisabled(capability, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileComponentConfig getConfig() {
|
||||
return configComponent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumFacing getOrientation() {
|
||||
return facing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileComponentEjector getEjector() {
|
||||
return ejectorComponent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getInfo(Upgrade upgrade) {
|
||||
return upgrade == Upgrade.SPEED ? upgrade.getExpScaledInfo(this) : upgrade.getMultScaledInfo(this);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getName() {
|
||||
return LangUtils.localize("tile.NutritionalLiquifier.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRedstoneLevel() {
|
||||
return MekanismUtils.redstoneLevelFromContents(fluidTank.getFluidAmount(), fluidTank.getCapacity());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"forge_marker": 1,
|
||||
"variants": {
|
||||
"inventory": {
|
||||
"model": "mekanismmekasuit:mekatool_right.obj",
|
||||
"custom": {
|
||||
"flip-v": true
|
||||
},
|
||||
"transform": {
|
||||
"firstperson_righthand": {
|
||||
"rotation": [90, 0, -10],
|
||||
"translation": [0, -0.1875, 0]
|
||||
},
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [90, 0, 0],
|
||||
"translation": [0.0625, -0.625, -0.25]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [90, 40, 90],
|
||||
"translation": [0.40625, -0.21875, 0]
|
||||
},
|
||||
"ground": {
|
||||
"translation": [0.0625, 0.125, 0.4375]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [270, 220, 90],
|
||||
"translation": [0, 0.125, 0]
|
||||
},
|
||||
"fixed": {
|
||||
"rotation": [270, 220, 90],
|
||||
"translation": [-0.375, -0.25, -0.0625]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 325 B |
@@ -17,6 +17,7 @@ item.ModuleTeleportationUnit.name=Teleportation Unit
|
||||
item.ModuleElectrolyticBreathingUnit.name=Electrolytic Breathing Unit
|
||||
item.ModuleInhalationPurificationUnit.name=Inhalation Purification Unit
|
||||
item.ModuleVisionEnhancementUnit.name=Vision Enhancement Unit
|
||||
item.ModuleNutritionalInjectionUnit.name=Nutritional Injection Unit
|
||||
tile.ModificationStation.name=Modification Station
|
||||
tooltip.ModificationStation=Installs and configures modules for the Meka-Tool and MekaSuit.
|
||||
gui.mekasuit.remove=Remove
|
||||
@@ -67,7 +68,7 @@ module.mekanismmekasuit.inhalation_purification_unit.description=Applies a minia
|
||||
module.mekanismmekasuit.vision_enhancement_unit=Vision Enhancement Unit
|
||||
module.mekanismmekasuit.vision_enhancement_unit.description=Brightens the surrounding environment, allowing the user to see through darkness. Install multiple for more effective night vision.
|
||||
module.mekanismmekasuit.nutritional_injection_unit=Nutritional Injection Unit
|
||||
module.mekanismmekasuit.nutritional_injection_unit.description=Consumes Nutritional Paste to restore hunger.
|
||||
module.mekanismmekasuit.nutritional_injection_unit.description=Automatically feeds the player Nutritional Paste when hungry.
|
||||
module.mekanismmekasuit.dosimeter_unit=Dosimeter Unit
|
||||
module.mekanismmekasuit.dosimeter_unit.description=Displays accumulated radiation dose when Nuclear is installed.
|
||||
module.mekanismmekasuit.geiger_unit=Geiger Unit
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Made in Blockbench 4.0.5
|
||||
newmtl 3
|
||||
map_Kd mekanismmekasuit:entity/armor/mekasuit_armor_body
|
||||
newmtl 4
|
||||
map_Kd mekanismmekasuit:blocks/models/leds
|
||||
newmtl 5
|
||||
map_Kd mekanismmekasuit:entity/armor/mekasuit_armor_exoskeleton
|
||||
newmtl 6
|
||||
map_Kd mekanismmekasuit:entity/armor/mekatool
|
||||
newmtl none
|
||||
@@ -0,0 +1,835 @@
|
||||
# Made in Blockbench 4.0.5
|
||||
mtllib mekatool_right.mtl
|
||||
|
||||
o override_mekatool_chest_right_arm_lower_plate
|
||||
v 0.5465569866571572 0.9684375 0.09375000000000008
|
||||
v 0.5465569866571572 0.9684375 -0.15624999999999983
|
||||
v 0.5465569866571572 0.7184375 0.09375000000000008
|
||||
v 0.5465569866571572 0.7184375 -0.15624999999999983
|
||||
v 0.35905698665715724 0.9684375 -0.15624999999999983
|
||||
v 0.35905698665715724 0.9684375 0.09375000000000008
|
||||
v 0.35905698665715724 0.7184375 -0.15624999999999983
|
||||
v 0.35905698665715724 0.7184375 0.09375000000000008
|
||||
vt 0.15625 0.125
|
||||
vt 0.25 0.125
|
||||
vt 0.25 0
|
||||
vt 0.15625 0
|
||||
vt 0 0.125
|
||||
vt 0.125 0.125
|
||||
vt 0.125 0
|
||||
vt 0 0
|
||||
vt 0.09375 1
|
||||
vt 0.0625 1
|
||||
vt 0.0625 0.9375
|
||||
vt 0.09375 0.9375
|
||||
vt 0.25 0.125
|
||||
vt 0.125 0.125
|
||||
vt 0.125 0
|
||||
vt 0.25 0
|
||||
vt 0.3125 0.125
|
||||
vt 0.40625 0.125
|
||||
vt 0.40625 0
|
||||
vt 0.3125 0
|
||||
vt 0.25 0.09375
|
||||
vt 0.15625 0.09375
|
||||
vt 0.15625 0
|
||||
vt 0.25 0
|
||||
vn 0 0 -1
|
||||
vn 1 0 0
|
||||
vn 0 0 1
|
||||
vn -1 0 0
|
||||
vn 0 1 0
|
||||
vn 0 -1 0
|
||||
usemtl 6
|
||||
f 4/4/1 7/3/1 5/2/1 2/1/1
|
||||
f 3/8/2 4/7/2 2/6/2 1/5/2
|
||||
f 8/12/3 3/11/3 1/10/3 6/9/3
|
||||
f 7/16/4 8/15/4 6/14/4 5/13/4
|
||||
f 6/20/5 1/19/5 2/18/5 5/17/5
|
||||
f 7/24/6 4/23/6 3/22/6 8/21/6
|
||||
o mekatool_right_arm_cartridge1
|
||||
v 0.46562499999999996 0.6329598013296693 0.3129694349839006
|
||||
v 0.46562499999999996 0.7936567037513041 0.1214583242041561
|
||||
v 0.46562499999999996 0.5372042459397971 0.23262098377308318
|
||||
v 0.46562499999999996 0.6979011483614319 0.041109872993338674
|
||||
v 0.34062499999999996 0.7936567037513041 0.1214583242041561
|
||||
v 0.34062499999999996 0.6329598013296693 0.3129694349839006
|
||||
v 0.34062499999999996 0.6979011483614319 0.041109872993338674
|
||||
v 0.34062499999999996 0.5372042459397971 0.23262098377308318
|
||||
vt 0.25 1
|
||||
vt 0.21875 1
|
||||
vt 0.21875 0.96875
|
||||
vt 0.25 0.96875
|
||||
vt 0.25 1
|
||||
vt 0.21875 1
|
||||
vt 0.21875 0.96875
|
||||
vt 0.25 0.96875
|
||||
vt 0.25 1
|
||||
vt 0.21875 1
|
||||
vt 0.21875 0.96875
|
||||
vt 0.25 0.96875
|
||||
vt 0.25 1
|
||||
vt 0.21875 1
|
||||
vt 0.21875 0.96875
|
||||
vt 0.25 0.96875
|
||||
vt 0.25 1
|
||||
vt 0.1875 1
|
||||
vt 0.1875 0.9375
|
||||
vt 0.25 0.9375
|
||||
vt 0.25 1
|
||||
vt 0.21875 1
|
||||
vt 0.21875 0.96875
|
||||
vt 0.25 0.96875
|
||||
vn 0 0.6427876096865394 -0.7660444431189781
|
||||
vn 1 0 0
|
||||
vn 0 -0.6427876096865394 0.7660444431189781
|
||||
vn -1 0 0
|
||||
vn 0 0.7660444431189781 0.6427876096865394
|
||||
vn 0 -0.7660444431189781 -0.6427876096865394
|
||||
usemtl 6
|
||||
f 12/28/7 15/27/7 13/26/7 10/25/7
|
||||
f 11/32/8 12/31/8 10/30/8 9/29/8
|
||||
f 16/36/9 11/35/9 9/34/9 14/33/9
|
||||
f 15/40/10 16/39/10 14/38/10 13/37/10
|
||||
f 14/44/11 9/43/11 10/42/11 13/41/11
|
||||
f 15/48/12 12/47/12 11/46/12 16/45/12
|
||||
o mekatool_right_arm_barrel1
|
||||
v 0.5465569866571572 0.71875 0.15625
|
||||
v 0.5465569866571572 0.71875 -0.09375
|
||||
v 0.5465569866571572 0.59375 0.15625
|
||||
v 0.5465569866571572 0.59375 -0.09375
|
||||
v 0.29655698665715724 0.71875 -0.09375
|
||||
v 0.29655698665715724 0.71875 0.15625
|
||||
v 0.29655698665715724 0.59375 -0.09375
|
||||
v 0.29655698665715724 0.59375 0.15625
|
||||
vt 0.8125 0.15625
|
||||
vt 0.84375 0.15625
|
||||
vt 0.84375 0.09375
|
||||
vt 0.8125 0.09375
|
||||
vt 0.3125 0
|
||||
vt 0.3125 0.125
|
||||
vt 0.25 0.125
|
||||
vt 0.25 0
|
||||
vt 0.125 1
|
||||
vt 0.09375 1
|
||||
vt 0.09375 0.9375
|
||||
vt 0.125 0.9375
|
||||
vt 0.78125 0.09375
|
||||
vt 0.90625 0.09375
|
||||
vt 0.90625 0.03125
|
||||
vt 0.78125 0.03125
|
||||
vt 0.9375 0.3125
|
||||
vt 0.8125 0.3125
|
||||
vt 0.8125 0.1875
|
||||
vt 0.9375 0.1875
|
||||
vt 0.9375 0.3125
|
||||
vt 0.8125 0.3125
|
||||
vt 0.8125 0.1875
|
||||
vt 0.9375 0.1875
|
||||
vn 0 0 -1
|
||||
vn 1 0 0
|
||||
vn 0 0 1
|
||||
vn -1 0 0
|
||||
vn 0 1 0
|
||||
vn 0 -1 0
|
||||
usemtl 6
|
||||
f 20/52/13 23/51/13 21/50/13 18/49/13
|
||||
f 19/56/14 20/55/14 18/54/14 17/53/14
|
||||
f 24/60/15 19/59/15 17/58/15 22/57/15
|
||||
f 23/64/16 24/63/16 22/62/16 21/61/16
|
||||
f 22/68/17 17/67/17 18/66/17 21/65/17
|
||||
f 23/72/18 20/71/18 19/70/18 24/69/18
|
||||
o mekatool_right_arm_chamber
|
||||
v 0.6090569866571572 1.03125 0.03125000000000036
|
||||
v 0.6090569866571572 1.03125 -0.09374999999999964
|
||||
v 0.6090569866571572 0.78125 0.03125000000000036
|
||||
v 0.6090569866571572 0.78125 -0.09374999999999964
|
||||
v 0.42155698665715724 1.03125 -0.09374999999999964
|
||||
v 0.42155698665715724 1.03125 0.03125000000000036
|
||||
v 0.42155698665715724 0.78125 -0.09374999999999964
|
||||
v 0.42155698665715724 0.78125 0.03125000000000036
|
||||
vt 0.09375 1
|
||||
vt 0.0625 1
|
||||
vt 0.0625 0.9375
|
||||
vt 0.09375 0.9375
|
||||
vt 0.0625 0.34375
|
||||
vt 0 0.34375
|
||||
vt 0 0.21875
|
||||
vt 0.0625 0.21875
|
||||
vt 0.34375 0.125
|
||||
vt 0.4375 0.125
|
||||
vt 0.4375 0
|
||||
vt 0.34375 0
|
||||
vt 0.09375 1
|
||||
vt 0.0625 1
|
||||
vt 0.0625 0.9375
|
||||
vt 0.09375 0.9375
|
||||
vt 0.09375 0.125
|
||||
vt 0 0.125
|
||||
vt 0 0.0625
|
||||
vt 0.09375 0.0625
|
||||
vt 0.09375 1
|
||||
vt 0.0625 1
|
||||
vt 0.0625 0.9375
|
||||
vt 0.09375 0.9375
|
||||
vn 0 0 -1
|
||||
vn 1 0 0
|
||||
vn 0 0 1
|
||||
vn -1 0 0
|
||||
vn 0 1 0
|
||||
vn 0 -1 0
|
||||
usemtl 6
|
||||
f 28/76/19 31/75/19 29/74/19 26/73/19
|
||||
f 27/80/20 28/79/20 26/78/20 25/77/20
|
||||
f 32/84/21 27/83/21 25/82/21 30/81/21
|
||||
f 31/88/22 32/87/22 30/86/22 29/85/22
|
||||
f 30/92/23 25/91/23 26/90/23 29/89/23
|
||||
f 31/96/24 28/95/24 27/94/24 32/93/24
|
||||
o mekatool_right_arm_rod
|
||||
v 0.453125 0.59375 0.0625
|
||||
v 0.453125 0.59375 0
|
||||
v 0.453125 0.28125 0.0625
|
||||
v 0.453125 0.28125 0
|
||||
v 0.390625 0.59375 0
|
||||
v 0.390625 0.59375 0.0625
|
||||
v 0.390625 0.28125 0
|
||||
v 0.390625 0.28125 0.0625
|
||||
vt 0 1
|
||||
vt 0.125 1
|
||||
vt 0.125 0.875
|
||||
vt 0 0.875
|
||||
vt 0 1
|
||||
vt 0.125 1
|
||||
vt 0.125 0.875
|
||||
vt 0 0.875
|
||||
vt 0 1
|
||||
vt 0.125 1
|
||||
vt 0.125 0.875
|
||||
vt 0 0.875
|
||||
vt 0 1
|
||||
vt 0.125 1
|
||||
vt 0.125 0.875
|
||||
vt 0 0.875
|
||||
vt 0 1
|
||||
vt 0.125 1
|
||||
vt 0.125 0.875
|
||||
vt 0 0.875
|
||||
vt 0 1
|
||||
vt 0.125 1
|
||||
vt 0.125 0.875
|
||||
vt 0 0.875
|
||||
vn 0 0 -1
|
||||
vn 1 0 0
|
||||
vn 0 0 1
|
||||
vn -1 0 0
|
||||
vn 0 1 0
|
||||
vn 0 -1 0
|
||||
usemtl 4
|
||||
f 36/100/25 39/99/25 37/98/25 34/97/25
|
||||
f 35/104/26 36/103/26 34/102/26 33/101/26
|
||||
f 40/108/27 35/107/27 33/106/27 38/105/27
|
||||
f 39/112/28 40/111/28 38/110/28 37/109/28
|
||||
f 38/116/29 33/115/29 34/114/29 37/113/29
|
||||
f 39/120/30 36/119/30 35/118/30 40/117/30
|
||||
o override_mekatool_chest_right_arm_finger1
|
||||
v 0.59375 0.90625 0.15624999999999956
|
||||
v 0.59375 0.90625 0.09374999999999956
|
||||
v 0.59375 0.84375 0.15624999999999956
|
||||
v 0.59375 0.84375 0.09374999999999956
|
||||
v 0.46875 0.90625 0.09374999999999956
|
||||
v 0.46875 0.90625 0.15624999999999956
|
||||
v 0.46875 0.84375 0.09374999999999956
|
||||
v 0.46875 0.84375 0.15624999999999956
|
||||
vt 0.40625 0.125
|
||||
vt 0.46875 0.125
|
||||
vt 0.46875 0.1875
|
||||
vt 0.40625 0.1875
|
||||
vt 0.40625 0.125
|
||||
vt 0.46875 0.125
|
||||
vt 0.46875 0.1875
|
||||
vt 0.40625 0.1875
|
||||
vt 0.40625 0.125
|
||||
vt 0.46875 0.125
|
||||
vt 0.46875 0.1875
|
||||
vt 0.40625 0.1875
|
||||
vt 0.40625 0.125
|
||||
vt 0.46875 0.125
|
||||
vt 0.46875 0.1875
|
||||
vt 0.40625 0.1875
|
||||
vt 0.40625 0.125
|
||||
vt 0.46875 0.125
|
||||
vt 0.46875 0.1875
|
||||
vt 0.40625 0.1875
|
||||
vt 0.40625 0.125
|
||||
vt 0.46875 0.125
|
||||
vt 0.46875 0.1875
|
||||
vt 0.40625 0.1875
|
||||
vn 0 0 -1
|
||||
vn 1 0 0
|
||||
vn 0 0 1
|
||||
vn -1 0 0
|
||||
vn 0 1 0
|
||||
vn 0 -1 0
|
||||
usemtl 3
|
||||
f 44/124/31 47/123/31 45/122/31 42/121/31
|
||||
f 43/128/32 44/127/32 42/126/32 41/125/32
|
||||
f 48/132/33 43/131/33 41/130/33 46/129/33
|
||||
f 47/136/34 48/135/34 46/134/34 45/133/34
|
||||
f 46/140/35 41/139/35 42/138/35 45/137/35
|
||||
f 47/144/36 44/143/36 43/142/36 48/141/36
|
||||
o override_mekatool_chest_right_arm_finger2
|
||||
v 0.59375 0.78125 0.21875
|
||||
v 0.59375 0.78125 0.09374999999999994
|
||||
v 0.59375 0.71875 0.21875
|
||||
v 0.59375 0.71875 0.09374999999999994
|
||||
v 0.46875 0.78125 0.09374999999999994
|
||||
v 0.46875 0.78125 0.21875
|
||||
v 0.46875 0.71875 0.09374999999999994
|
||||
v 0.46875 0.71875 0.21875
|
||||
vt 0.40625 0.125
|
||||
vt 0.46875 0.125
|
||||
vt 0.46875 0.1875
|
||||
vt 0.40625 0.1875
|
||||
vt 0.40625 0.125
|
||||
vt 0.46875 0.125
|
||||
vt 0.46875 0.1875
|
||||
vt 0.40625 0.1875
|
||||
vt 0.40625 0.125
|
||||
vt 0.46875 0.125
|
||||
vt 0.46875 0.1875
|
||||
vt 0.40625 0.1875
|
||||
vt 0.40625 0.125
|
||||
vt 0.46875 0.125
|
||||
vt 0.46875 0.1875
|
||||
vt 0.40625 0.1875
|
||||
vt 0.40625 0.125
|
||||
vt 0.46875 0.125
|
||||
vt 0.46875 0.1875
|
||||
vt 0.40625 0.1875
|
||||
vt 0.40625 0.125
|
||||
vt 0.46875 0.125
|
||||
vt 0.46875 0.1875
|
||||
vt 0.40625 0.1875
|
||||
vn 0 0 -1
|
||||
vn 1 0 0
|
||||
vn 0 0 1
|
||||
vn -1 0 0
|
||||
vn 0 1 0
|
||||
vn 0 -1 0
|
||||
usemtl 3
|
||||
f 52/148/37 55/147/37 53/146/37 50/145/37
|
||||
f 51/152/38 52/151/38 50/150/38 49/149/38
|
||||
f 56/156/39 51/155/39 49/154/39 54/153/39
|
||||
f 55/160/40 56/159/40 54/158/40 53/157/40
|
||||
f 54/164/41 49/163/41 50/162/41 53/161/41
|
||||
f 55/168/42 52/167/42 51/166/42 56/165/42
|
||||
o override_mekatool_chest_right_arm_finger3
|
||||
v 0.59375 0.84375 0.15624999999999978
|
||||
v 0.59375 0.84375 0.09374999999999978
|
||||
v 0.59375 0.78125 0.15624999999999978
|
||||
v 0.59375 0.78125 0.09374999999999978
|
||||
v 0.46875 0.84375 0.09374999999999978
|
||||
v 0.46875 0.84375 0.15624999999999978
|
||||
v 0.46875 0.78125 0.09374999999999978
|
||||
v 0.46875 0.78125 0.15624999999999978
|
||||
vt 0.40625 0.1875
|
||||
vt 0.46875 0.1875
|
||||
vt 0.46875 0.25
|
||||
vt 0.40625 0.25
|
||||
vt 0.40625 0.1875
|
||||
vt 0.46875 0.1875
|
||||
vt 0.46875 0.25
|
||||
vt 0.40625 0.25
|
||||
vt 0.40625 0.1875
|
||||
vt 0.46875 0.1875
|
||||
vt 0.46875 0.25
|
||||
vt 0.40625 0.25
|
||||
vt 0.40625 0.1875
|
||||
vt 0.46875 0.1875
|
||||
vt 0.46875 0.25
|
||||
vt 0.40625 0.25
|
||||
vt 0.40625 0.1875
|
||||
vt 0.46875 0.1875
|
||||
vt 0.46875 0.25
|
||||
vt 0.40625 0.25
|
||||
vt 0.40625 0.1875
|
||||
vt 0.46875 0.1875
|
||||
vt 0.46875 0.25
|
||||
vt 0.40625 0.25
|
||||
vn 0 0 -1
|
||||
vn 1 0 0
|
||||
vn 0 0 1
|
||||
vn -1 0 0
|
||||
vn 0 1 0
|
||||
vn 0 -1 0
|
||||
usemtl 3
|
||||
f 60/172/43 63/171/43 61/170/43 58/169/43
|
||||
f 59/176/44 60/175/44 58/174/44 57/173/44
|
||||
f 64/180/45 59/179/45 57/178/45 62/177/45
|
||||
f 63/184/46 64/183/46 62/182/46 61/181/46
|
||||
f 62/188/47 57/187/47 58/186/47 61/185/47
|
||||
f 63/192/48 60/191/48 59/190/48 64/189/48
|
||||
o mekatool_right_arm_barrel2
|
||||
v 0.496875 0.5991972339217286 -0.03148783136926582
|
||||
v 0.496875 0.59375 -0.09374999999999992
|
||||
v 0.496875 0.22562422213732403 0.0011955721611059955
|
||||
v 0.496875 0.2201769882155954 -0.0610665964696281
|
||||
v 0.340625 0.59375 -0.09374999999999992
|
||||
v 0.340625 0.5991972339217286 -0.03148783136926582
|
||||
v 0.340625 0.2201769882155954 -0.0610665964696281
|
||||
v 0.340625 0.22562422213732403 0.0011955721611059955
|
||||
vt 1 0.4375
|
||||
vt 0.96875 0.4375
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vt 1 0.4375
|
||||
vt 0.96875 0.4375
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vt 1 0.4375
|
||||
vt 0.96875 0.4375
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vt 1 0.4375
|
||||
vt 0.96875 0.4375
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vt 0.9375 0.09375
|
||||
vt 0.84375 0.09375
|
||||
vt 0.84375 0.0625
|
||||
vt 0.9375 0.0625
|
||||
vn 0 -0.08715574274765818 -0.9961946980917455
|
||||
vn 1 0 0
|
||||
vn 0 0.08715574274765818 0.9961946980917455
|
||||
vn -1 0 0
|
||||
vn 0 -0.9961946980917455 0.08715574274765818
|
||||
usemtl 6
|
||||
f 68/196/49 71/195/49 69/194/49 66/193/49
|
||||
f 67/200/50 68/199/50 66/198/50 65/197/50
|
||||
f 72/204/51 67/203/51 65/202/51 70/201/51
|
||||
f 71/208/52 72/207/52 70/206/52 69/205/52
|
||||
f 71/212/53 68/211/53 67/210/53 72/209/53
|
||||
o mekatool_right_arm_barrel3
|
||||
v 0.5465569866571572 0.59375 0.15624999999999992
|
||||
v 0.5448670946370461 0.5993658878647129 0.09402575980012817
|
||||
v 0.507245771604167 0.15968928566656632 0.11814259070197994
|
||||
v 0.5055558795840558 0.16530517353127921 0.055918350502108194
|
||||
v 0.4826428544371744 0.6048098034787157 0.09620697834403448
|
||||
v 0.4843327464572856 0.5991939156140028 0.15843121854390624
|
||||
v 0.4433316393841842 0.17074908914528208 0.05809956904601449
|
||||
v 0.4450215314042953 0.1651332012805692 0.12032380924588626
|
||||
vt 1 0.4375
|
||||
vt 0.96875 0.4375
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vt 1 0.4375
|
||||
vt 0.96875 0.4375
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vt 1 0.4375
|
||||
vt 0.96875 0.4375
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vt 1 0.4375
|
||||
vt 0.96875 0.4375
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vt 1 0.25
|
||||
vt 0.96875 0.25
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vn -0.02703827232177799 0.08985420583540635 -0.9955878431979479
|
||||
vn 0.9955878431979481 -0.08710264982404567 -0.03489949670250098
|
||||
vn 0.02703827232177799 -0.08985420583540635 0.9955878431979479
|
||||
vn -0.9955878431979481 0.08710264982404567 0.03489949670250098
|
||||
vn -0.08985420583540636 -0.9921387756192771 -0.08710264982404567
|
||||
usemtl 6
|
||||
f 76/216/54 79/215/54 77/214/54 74/213/54
|
||||
f 75/220/55 76/219/55 74/218/55 73/217/55
|
||||
f 80/224/56 75/223/56 73/222/56 78/221/56
|
||||
f 79/228/57 80/227/57 78/226/57 77/225/57
|
||||
f 79/232/58 76/231/58 75/230/58 80/229/58
|
||||
o mekatool_right_arm_barrel4
|
||||
v 0.3587812268570289 0.5991939156140028 0.15843121854390632
|
||||
v 0.36047111887714006 0.6048098034787157 0.09620697834403459
|
||||
v 0.3980924419100192 0.1651332012805692 0.12032380924588634
|
||||
v 0.3997823339301303 0.17074908914528208 0.0580995690460146
|
||||
v 0.29824687867726835 0.5993658878647129 0.09402575980012828
|
||||
v 0.29655698665715724 0.59375 0.15625
|
||||
v 0.33755809373025863 0.16530517353127921 0.055918350502108305
|
||||
v 0.33586820171014753 0.15968928566656632 0.11814259070198002
|
||||
vt 1 0.4375
|
||||
vt 0.96875 0.4375
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vt 1 0.4375
|
||||
vt 0.96875 0.4375
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vt 1 0.4375
|
||||
vt 0.96875 0.4375
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vt 1 0.4375
|
||||
vt 0.96875 0.4375
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vt 1 0.25
|
||||
vt 0.96875 0.25
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vn 0.02703827232177799 0.08985420583540635 -0.9955878431979479
|
||||
vn 0.9955878431979481 0.08710264982404567 0.03489949670250098
|
||||
vn -0.02703827232177799 -0.08985420583540635 0.9955878431979479
|
||||
vn -0.9955878431979481 -0.08710264982404567 -0.03489949670250098
|
||||
vn 0.08985420583540636 -0.9921387756192771 -0.08710264982404567
|
||||
usemtl 6
|
||||
f 84/236/59 87/235/59 85/234/59 82/233/59
|
||||
f 83/240/60 84/239/60 82/238/60 81/237/60
|
||||
f 88/244/61 83/243/61 81/242/61 86/241/61
|
||||
f 87/248/62 88/247/62 86/246/62 85/245/62
|
||||
f 87/252/63 84/251/63 83/250/63 88/249/63
|
||||
o mekatool_right_arm_rod_ring1
|
||||
v 0.46875 0.59375 0.078125
|
||||
v 0.46875 0.59375 -0.015625
|
||||
v 0.46875 0.46875 0.078125
|
||||
v 0.46875 0.46875 -0.015625
|
||||
v 0.375 0.59375 -0.015625
|
||||
v 0.375 0.59375 0.078125
|
||||
v 0.375 0.46875 -0.015625
|
||||
v 0.375 0.46875 0.078125
|
||||
vt 0.0625 0.53125
|
||||
vt 0.03125 0.53125
|
||||
vt 0.03125 0.46875
|
||||
vt 0.0625 0.46875
|
||||
vt 0.0625 0.53125
|
||||
vt 0.03125 0.53125
|
||||
vt 0.03125 0.46875
|
||||
vt 0.0625 0.46875
|
||||
vt 0.0625 0.53125
|
||||
vt 0.03125 0.53125
|
||||
vt 0.03125 0.46875
|
||||
vt 0.0625 0.46875
|
||||
vt 0.0625 0.53125
|
||||
vt 0.03125 0.53125
|
||||
vt 0.03125 0.46875
|
||||
vt 0.0625 0.46875
|
||||
vt 0.0625 0.53125
|
||||
vt 0.03125 0.53125
|
||||
vt 0.03125 0.5
|
||||
vt 0.0625 0.5
|
||||
vn 0 0 -1
|
||||
vn 1 0 0
|
||||
vn 0 0 1
|
||||
vn -1 0 0
|
||||
vn 0 -1 0
|
||||
usemtl 6
|
||||
f 92/256/64 95/255/64 93/254/64 90/253/64
|
||||
f 91/260/65 92/259/65 90/258/65 89/257/65
|
||||
f 96/264/66 91/263/66 89/262/66 94/261/66
|
||||
f 95/268/67 96/267/67 94/266/67 93/265/67
|
||||
f 95/272/68 92/271/68 91/270/68 96/269/68
|
||||
o mekatool_right_arm_barrel_heatsink
|
||||
v 0.45 0.7328094408964919 -0.09535187095092251
|
||||
v 0.45 0.7187500000000003 -0.15624999999999972
|
||||
v 0.45 0.3674206666020287 -0.01099522557197316
|
||||
v 0.45 0.35336122570553713 -0.07189335462105036
|
||||
v 0.3875 0.7187500000000003 -0.15624999999999972
|
||||
v 0.3875 0.7328094408964919 -0.09535187095092251
|
||||
v 0.3875 0.35336122570553713 -0.07189335462105036
|
||||
v 0.3875 0.3674206666020287 -0.01099522557197316
|
||||
vt 0.96875 0.21875
|
||||
vt 1 0.21875
|
||||
vt 1 0.03125
|
||||
vt 0.96875 0.03125
|
||||
vt 1 0.21875
|
||||
vt 0.96875 0.21875
|
||||
vt 0.96875 0.03125
|
||||
vt 1 0.03125
|
||||
vt 1 0.21875
|
||||
vt 0.96875 0.21875
|
||||
vt 0.96875 0.03125
|
||||
vt 1 0.03125
|
||||
vn 0 -0.22495105434386498 -0.9743700647852352
|
||||
vn 1 0 0
|
||||
vn -1 0 0
|
||||
usemtl 6
|
||||
f 100/276/69 103/275/69 101/274/69 98/273/69
|
||||
f 99/280/70 100/279/70 98/278/70 97/277/70
|
||||
f 103/284/71 104/283/71 102/282/71 101/281/71
|
||||
o mekatool_right_arm_barrel_scope
|
||||
v 0.465625 0.3677338458144021 -0.03474595342500836
|
||||
v 0.465625 0.3514543291581274 -0.12707168026990284
|
||||
v 0.465625 0.3061833612511391 -0.0238929423208252
|
||||
v 0.465625 0.2899038445948644 -0.11621866916571971
|
||||
v 0.371875 0.3514543291581274 -0.12707168026990284
|
||||
v 0.371875 0.3677338458144021 -0.03474595342500836
|
||||
v 0.371875 0.2899038445948644 -0.11621866916571971
|
||||
v 0.371875 0.3061833612511391 -0.0238929423208252
|
||||
vt 0.21875 1
|
||||
vt 0.1875 1
|
||||
vt 0.1875 0.96875
|
||||
vt 0.21875 0.96875
|
||||
vt 0.21875 1
|
||||
vt 0.1875 1
|
||||
vt 0.1875 0.96875
|
||||
vt 0.21875 0.96875
|
||||
vt 0.21875 1
|
||||
vt 0.1875 1
|
||||
vt 0.1875 0.96875
|
||||
vt 0.21875 0.96875
|
||||
vt 0.21875 1
|
||||
vt 0.1875 1
|
||||
vt 0.1875 0.96875
|
||||
vt 0.21875 0.96875
|
||||
vt 1 1
|
||||
vt 0.90625 1
|
||||
vt 0.90625 0.90625
|
||||
vt 1 0.90625
|
||||
vt 0.90625 0.90625
|
||||
vt 1 0.90625
|
||||
vt 1 1
|
||||
vt 0.90625 1
|
||||
vn 0 -0.17364817766693033 -0.984807753012208
|
||||
vn 1 0 0
|
||||
vn 0 0.17364817766693033 0.984807753012208
|
||||
vn -1 0 0
|
||||
vn 0 0.984807753012208 -0.17364817766693033
|
||||
vn 0 -0.984807753012208 0.17364817766693033
|
||||
usemtl 6
|
||||
f 108/288/72 111/287/72 109/286/72 106/285/72
|
||||
f 107/292/73 108/291/73 106/290/73 105/289/73
|
||||
f 112/296/74 107/295/74 105/294/74 110/293/74
|
||||
f 111/300/75 112/299/75 110/298/75 109/297/75
|
||||
f 110/304/76 105/303/76 106/302/76 109/301/76
|
||||
f 111/308/77 108/307/77 107/306/77 112/305/77
|
||||
o mekatool_right_arm_rod_ring2
|
||||
v 0.46875 0.40625 0.078125
|
||||
v 0.46875 0.40625 -0.015625
|
||||
v 0.46875 0.34375 0.078125
|
||||
v 0.46875 0.34375 -0.015625
|
||||
v 0.375 0.40625 -0.015625
|
||||
v 0.375 0.40625 0.078125
|
||||
v 0.375 0.34375 -0.015625
|
||||
v 0.375 0.34375 0.078125
|
||||
vt 0.0625 0.5
|
||||
vt 0.03125 0.5
|
||||
vt 0.03125 0.46875
|
||||
vt 0.0625 0.46875
|
||||
vt 0.0625 0.5
|
||||
vt 0.03125 0.5
|
||||
vt 0.03125 0.46875
|
||||
vt 0.0625 0.46875
|
||||
vt 0.0625 0.5
|
||||
vt 0.03125 0.5
|
||||
vt 0.03125 0.46875
|
||||
vt 0.0625 0.46875
|
||||
vt 0.0625 0.5
|
||||
vt 0.03125 0.5
|
||||
vt 0.03125 0.46875
|
||||
vt 0.0625 0.46875
|
||||
vt 0.0625 0.5
|
||||
vt 0.03125 0.5
|
||||
vt 0.03125 0.46875
|
||||
vt 0.0625 0.46875
|
||||
vt 0.0625 0.5
|
||||
vt 0.03125 0.5
|
||||
vt 0.03125 0.46875
|
||||
vt 0.0625 0.46875
|
||||
vn 0 0 -1
|
||||
vn 1 0 0
|
||||
vn 0 0 1
|
||||
vn -1 0 0
|
||||
vn 0 1 0
|
||||
vn 0 -1 0
|
||||
usemtl 6
|
||||
f 116/312/78 119/311/78 117/310/78 114/309/78
|
||||
f 115/316/79 116/315/79 114/314/79 113/313/79
|
||||
f 120/320/80 115/319/80 113/318/80 118/317/80
|
||||
f 119/324/81 120/323/81 118/322/81 117/321/81
|
||||
f 118/328/82 113/327/82 114/326/82 117/325/82
|
||||
f 119/332/83 116/331/83 115/330/83 120/329/83
|
||||
o mekatool_right_arm_cartridge2
|
||||
v 0.528125 0.6119168393959975 0.3976529179638278
|
||||
v 0.528125 0.6922652906068149 0.3018973625739556
|
||||
v 0.528125 0.4682835063111891 0.27713024114760165
|
||||
v 0.528125 0.5486319575220064 0.18137468575772944
|
||||
v 0.27812499999999996 0.6922652906068149 0.3018973625739556
|
||||
v 0.27812499999999996 0.6119168393959975 0.3976529179638278
|
||||
v 0.27812499999999996 0.5486319575220064 0.18137468575772944
|
||||
v 0.27812499999999996 0.4682835063111891 0.27713024114760165
|
||||
vt 0.9375 0.03125
|
||||
vt 0.8125 0.03125
|
||||
vt 0.8125 0.125
|
||||
vt 0.9375 0.125
|
||||
vt 0.875 0
|
||||
vt 0.875 0.0625
|
||||
vt 0.78125 0.0625
|
||||
vt 0.78125 0
|
||||
vt 0.8125 0.1875
|
||||
vt 0.6875 0.1875
|
||||
vt 0.6875 0.09375
|
||||
vt 0.8125 0.09375
|
||||
vt 0.75 0.0625
|
||||
vt 0.75 0
|
||||
vt 0.875 0
|
||||
vt 0.875 0.0625
|
||||
vt 0.8125 0.0625
|
||||
vt 0.9375 0.0625
|
||||
vt 0.9375 0
|
||||
vt 0.8125 0
|
||||
vt 0.71875 0
|
||||
vt 0.84375 0
|
||||
vt 0.84375 0.0625
|
||||
vt 0.71875 0.0625
|
||||
vn 0 0.6427876096865394 -0.7660444431189781
|
||||
vn 1 0 0
|
||||
vn 0 -0.6427876096865394 0.7660444431189781
|
||||
vn -1 0 0
|
||||
vn 0 0.7660444431189781 0.6427876096865394
|
||||
vn 0 -0.7660444431189781 -0.6427876096865394
|
||||
usemtl 6
|
||||
f 124/336/84 127/335/84 125/334/84 122/333/84
|
||||
f 123/340/85 124/339/85 122/338/85 121/337/85
|
||||
f 128/344/86 123/343/86 121/342/86 126/341/86
|
||||
f 127/348/87 128/347/87 126/346/87 125/345/87
|
||||
f 126/352/88 121/351/88 122/350/88 125/349/88
|
||||
f 127/356/89 124/355/89 123/354/89 128/353/89
|
||||
o override_mekatool_chest_right_arm_exo_brace3
|
||||
v 0.5275000000000001 0.997334477502699 0.23454529812915428
|
||||
v 0.5275000000000001 1.029686858140514 0.11380456984302068
|
||||
v 0.5275000000000001 0.695482656787365 0.15366434653461652
|
||||
v 0.5275000000000001 0.7278350374251801 0.032923618248482917
|
||||
v 0.4025 1.029686858140514 0.11380456984302068
|
||||
v 0.4025 0.997334477502699 0.23454529812915428
|
||||
v 0.4025 0.7278350374251801 0.032923618248482917
|
||||
v 0.4025 0.695482656787365 0.15366434653461652
|
||||
vt 0.78125 0.875
|
||||
vt 0.84375 0.875
|
||||
vt 0.84375 0.71875
|
||||
vt 0.78125 0.71875
|
||||
vt 0.8125 0.875
|
||||
vt 0.75 0.875
|
||||
vt 0.75 0.71875
|
||||
vt 0.8125 0.71875
|
||||
vt 0.8125 0.875
|
||||
vt 0.78125 0.875
|
||||
vt 0.78125 0.71875
|
||||
vt 0.8125 0.71875
|
||||
vt 0.8125 0.875
|
||||
vt 0.875 0.875
|
||||
vt 0.875 0.71875
|
||||
vt 0.8125 0.71875
|
||||
vt 0.84375 0.71875
|
||||
vt 0.78125 0.71875
|
||||
vt 0.78125 0.65625
|
||||
vt 0.84375 0.65625
|
||||
vt 0.84375 0.78125
|
||||
vt 0.78125 0.78125
|
||||
vt 0.78125 0.71875
|
||||
vt 0.84375 0.71875
|
||||
vn 0 0.25881904510252074 -0.9659258262890683
|
||||
vn 1 0 0
|
||||
vn 0 -0.25881904510252074 0.9659258262890683
|
||||
vn -1 0 0
|
||||
vn 0 0.9659258262890683 0.25881904510252074
|
||||
vn 0 -0.9659258262890683 -0.25881904510252074
|
||||
usemtl 5
|
||||
f 132/360/90 135/359/90 133/358/90 130/357/90
|
||||
f 131/364/91 132/363/91 130/362/91 129/361/91
|
||||
f 136/368/92 131/367/92 129/366/92 134/365/92
|
||||
f 135/372/93 136/371/93 134/370/93 133/369/93
|
||||
f 134/376/94 129/375/94 130/374/94 133/373/94
|
||||
f 135/380/95 132/379/95 131/378/95 136/377/95
|
||||
o mekatool_right_arm_barrel_sight_led
|
||||
v 0.434375 0.3619745115090092 -0.06795519002645223
|
||||
v 0.434375 0.3565480059569176 -0.09873043230808373
|
||||
v 0.434375 0.2998085221001136 -0.05699364881122726
|
||||
v 0.434375 0.294382016548022 -0.08776889109285876
|
||||
v 0.403125 0.3565480059569176 -0.09873043230808373
|
||||
v 0.403125 0.3619745115090092 -0.06795519002645223
|
||||
v 0.403125 0.294382016548022 -0.08776889109285876
|
||||
v 0.403125 0.2998085221001136 -0.05699364881122726
|
||||
vt 0 1
|
||||
vt 0.125 1
|
||||
vt 0.125 0.875
|
||||
vt 0 0.875
|
||||
vt 0 1
|
||||
vt 0.125 1
|
||||
vt 0.125 0.875
|
||||
vt 0 0.875
|
||||
vt 0 1
|
||||
vt 0.125 1
|
||||
vt 0.125 0.875
|
||||
vt 0 0.875
|
||||
vt 0 1
|
||||
vt 0.125 1
|
||||
vt 0.125 0.875
|
||||
vt 0 0.875
|
||||
vt 0 1
|
||||
vt 0.125 1
|
||||
vt 0.125 0.875
|
||||
vt 0 0.875
|
||||
vt 0 1
|
||||
vt 0.125 1
|
||||
vt 0.125 0.875
|
||||
vt 0 0.875
|
||||
vn 0 -0.17364817766693033 -0.984807753012208
|
||||
vn 1 0 0
|
||||
vn 0 0.17364817766693033 0.984807753012208
|
||||
vn -1 0 0
|
||||
vn 0 0.984807753012208 -0.17364817766693033
|
||||
vn 0 -0.984807753012208 0.17364817766693033
|
||||
usemtl 4
|
||||
f 140/384/96 143/383/96 141/382/96 138/381/96
|
||||
f 139/388/97 140/387/97 138/386/97 137/385/97
|
||||
f 144/392/98 139/391/98 137/390/98 142/389/98
|
||||
f 143/396/99 144/395/99 142/394/99 141/393/99
|
||||
f 142/400/100 137/399/100 138/398/100 141/397/100
|
||||
f 143/404/101 140/403/101 139/402/101 144/401/101
|
||||
o override_mekatool_chest_right_arm_finger4
|
||||
v 0.59375 0.71875 0.21875
|
||||
v 0.59375 0.71875 0.031249999999999986
|
||||
v 0.59375 0.65625 0.21875
|
||||
v 0.59375 0.65625 0.031249999999999986
|
||||
v 0.46875 0.71875 0.031249999999999986
|
||||
v 0.46875 0.71875 0.21875
|
||||
v 0.46875 0.65625 0.031249999999999986
|
||||
v 0.46875 0.65625 0.21875
|
||||
vt 0.40625 0.1875
|
||||
vt 0.46875 0.1875
|
||||
vt 0.46875 0.25
|
||||
vt 0.40625 0.25
|
||||
vt 0.40625 0.1875
|
||||
vt 0.46875 0.1875
|
||||
vt 0.46875 0.25
|
||||
vt 0.40625 0.25
|
||||
vt 0.40625 0.1875
|
||||
vt 0.46875 0.1875
|
||||
vt 0.46875 0.25
|
||||
vt 0.40625 0.25
|
||||
vt 0.40625 0.1875
|
||||
vt 0.46875 0.1875
|
||||
vt 0.46875 0.25
|
||||
vt 0.40625 0.25
|
||||
vt 0.40625 0.1875
|
||||
vt 0.46875 0.1875
|
||||
vt 0.46875 0.25
|
||||
vt 0.40625 0.25
|
||||
vt 0.40625 0.1875
|
||||
vt 0.46875 0.1875
|
||||
vt 0.46875 0.25
|
||||
vt 0.40625 0.25
|
||||
vn 0 0 -1
|
||||
vn 1 0 0
|
||||
vn 0 0 1
|
||||
vn -1 0 0
|
||||
vn 0 1 0
|
||||
vn 0 -1 0
|
||||
usemtl 3
|
||||
f 148/408/102 151/407/102 149/406/102 146/405/102
|
||||
f 147/412/103 148/411/103 146/410/103 145/409/103
|
||||
f 152/416/104 147/415/104 145/414/104 150/413/104
|
||||
f 151/420/105 152/419/105 150/418/105 149/417/105
|
||||
f 150/424/106 145/423/106 146/422/106 149/421/106
|
||||
f 151/428/107 148/427/107 147/426/107 152/425/107
|
||||
@@ -832,4 +832,4 @@ f 147/412/103 148/411/103 146/410/103 145/409/103
|
||||
f 152/416/104 147/415/104 145/414/104 150/413/104
|
||||
f 151/420/105 152/419/105 150/418/105 149/417/105
|
||||
f 150/424/106 145/423/106 146/422/106 149/421/106
|
||||
f 151/428/107 148/427/107 147/426/107 152/425/107
|
||||
f 151/428/107 148/427/107 147/426/107 152/425/107
|
||||
@@ -1,30 +0,0 @@
|
||||
{
|
||||
"loader": "forge:obj",
|
||||
"model": "mekanismmekasuit:models/entity/mekatool_right.obj",
|
||||
"flip-v": "true",
|
||||
"display": {
|
||||
"firstperson_righthand": {
|
||||
"rotation": [90, 0, -10],
|
||||
"translation": [0, -3, 0]
|
||||
},
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [90, 0, 0],
|
||||
"translation": [1, -10, -4]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [90, 40, 90],
|
||||
"translation": [6.5, -3.5, 0]
|
||||
},
|
||||
"ground": {
|
||||
"translation": [1, 2, 7]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [270, 220, 90],
|
||||
"translation": [0, 2, 0]
|
||||
},
|
||||
"fixed": {
|
||||
"rotation": [270, 220, 90],
|
||||
"translation": [-6, -4, -1]
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "mekanismmekasuit:items/module_nutritional_injection_unit"
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "mekanism:ore_shaped",
|
||||
"result": {
|
||||
"item": "mekanismmekasuit:module_nutritional_injection_unit"
|
||||
},
|
||||
"pattern": [
|
||||
"A#A",
|
||||
"APA",
|
||||
"HHH"
|
||||
],
|
||||
"key": {
|
||||
"A": {"type": "forge:ore_dict", "ore": "alloyElite"},
|
||||
"#": {"item": "mekanismultimate:canteen"},
|
||||
"P": {"item": "mekanismmekasuit:module_base"},
|
||||
"H": {"item": "mekanism:atomicalloy"}
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 427 B |
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "mekanismultimate:nutritional_liquifier"
|
||||
},
|
||||
"variants": {
|
||||
"normal": [{}],
|
||||
"facing": {
|
||||
"down": {},
|
||||
"up": {},
|
||||
"north": {},
|
||||
"south": {"y": 180},
|
||||
"east": {"y": 90},
|
||||
"west": {"y": -90}
|
||||
},
|
||||
"active": {
|
||||
"true": {},
|
||||
"false": {}
|
||||
},
|
||||
"inventory": [{}]
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,8 @@
|
||||
tile.UltimateFactory.name=Ultimate Factory
|
||||
mekanism.configgui.ctgy.ultimate=Ultimate Factories
|
||||
tile.NutritionalLiquifier.name=Nutritional Liquifier
|
||||
item.Canteen.name=Canteen
|
||||
fluid.nutritional_paste=Nutritional Paste
|
||||
tooltip.NutritionalLiquifier=A machine that processes foods into non-dangerous, easily-digestible Nutritional Paste.
|
||||
tooltip.nutritionalPaste=Nutritional Paste
|
||||
gui.NutritionalLiquifier.short=Nutritional Liquifier
|
||||
@@ -0,0 +1,193 @@
|
||||
{
|
||||
"parent": "block/block",
|
||||
"textures": {
|
||||
"0": "mekanismultimate:blocks/nutritional_liquifier",
|
||||
"particle": "mekanismultimate:blocks/nutritional_liquifier"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [16, 5, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 13.5, 8, 16], "texture": "#0", "cullface": "north"},
|
||||
"east": {"uv": [8, 13.5, 16, 16], "texture": "#0", "cullface": "east"},
|
||||
"south": {"uv": [0, 13.5, 8, 16], "texture": "#0", "cullface": "south"},
|
||||
"west": {"uv": [8, 13.5, 16, 16], "texture": "#0", "cullface": "west"},
|
||||
"up": {"uv": [8, 0, 16, 8], "texture": "#0"},
|
||||
"down": {"uv": [8, 8, 16, 16], "texture": "#0", "cullface": "down"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 15, 0],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 8, 8, 8.5], "texture": "#0", "cullface": "north"},
|
||||
"east": {"uv": [0, 8, 8, 8.5], "texture": "#0", "cullface": "east"},
|
||||
"south": {"uv": [0, 8, 8, 8.5], "texture": "#0", "cullface": "south"},
|
||||
"west": {"uv": [0, 8, 8, 8.5], "texture": "#0", "cullface": "west"},
|
||||
"up": {"uv": [0, 0, 8, 8], "texture": "#0", "cullface": "up"},
|
||||
"down": {"uv": [0, 0, 8, 8], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15.9, 5, 0],
|
||||
"to": [16, 15, 1],
|
||||
"faces": {
|
||||
"east": {"uv": [0, 8.5, 0.5, 13.5], "texture": "#0", "cullface": "east"},
|
||||
"west": {"uv": [8, 8.5, 7.5, 13.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15.9, 5, 15],
|
||||
"to": [16, 15, 16],
|
||||
"faces": {
|
||||
"east": {"uv": [7.5, 8.5, 8, 13.5], "texture": "#0", "cullface": "east"},
|
||||
"west": {"uv": [0.5, 8.5, 0, 13.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15.9, 5, 0],
|
||||
"to": [16, 6, 16],
|
||||
"faces": {
|
||||
"east": {"uv": [0, 8.5, 8, 9], "texture": "#0", "cullface": "east"},
|
||||
"west": {"uv": [8, 8.5, 0, 9], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15.9, 14, 0],
|
||||
"to": [16, 15, 16],
|
||||
"faces": {
|
||||
"east": {"uv": [0, 13, 8, 13.5], "texture": "#0", "cullface": "east"},
|
||||
"west": {"uv": [8, 13, 0, 13.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 5, 15.9],
|
||||
"to": [1, 15, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 8.5, 0.5, 13.5], "texture": "#0"},
|
||||
"south": {"uv": [8, 8.5, 7.5, 13.5], "texture": "#0", "cullface": "south"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15, 5, 15.9],
|
||||
"to": [16, 15, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [7.5, 8.5, 8, 13.5], "texture": "#0"},
|
||||
"south": {"uv": [0.5, 8.5, 0, 13.5], "texture": "#0", "cullface": "south"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 5, 15.9],
|
||||
"to": [16, 6, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [8, 8.5, 0, 9], "texture": "#0"},
|
||||
"south": {"uv": [0, 8.5, 8, 9], "texture": "#0", "cullface": "south"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 14, 15.9],
|
||||
"to": [16, 15, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [8, 13, 0, 13.5], "texture": "#0"},
|
||||
"south": {"uv": [0, 13, 8, 13.5], "texture": "#0", "cullface": "south"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 5, 0],
|
||||
"to": [1, 15, 0.1],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 8.5, 0.5, 13.5], "texture": "#0", "cullface": "north"},
|
||||
"south": {"uv": [8, 8.5, 7.5, 13.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15, 5, 0],
|
||||
"to": [16, 15, 0.1],
|
||||
"faces": {
|
||||
"north": {"uv": [8, 8.5, 7.5, 13.5], "texture": "#0", "cullface": "north"},
|
||||
"south": {"uv": [0, 8.5, 0.5, 13.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 5, 0],
|
||||
"to": [16, 6, 0.1],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 8.5, 8, 9], "texture": "#0", "cullface": "north"},
|
||||
"south": {"uv": [8, 8.5, 0, 9], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 14, 0],
|
||||
"to": [16, 15, 0.1],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 13, 8, 13.5], "texture": "#0", "cullface": "north"},
|
||||
"south": {"uv": [8, 13, 0, 13.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 5, 0],
|
||||
"to": [0.1, 15, 1],
|
||||
"faces": {
|
||||
"east": {"uv": [8, 8.5, 7.5, 13.5], "texture": "#0"},
|
||||
"west": {"uv": [0, 8.5, 0.5, 13.5], "texture": "#0", "cullface": "west"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 5, 15],
|
||||
"to": [0.1, 15, 16],
|
||||
"faces": {
|
||||
"east": {"uv": [0, 8.5, 0.5, 13.5], "texture": "#0"},
|
||||
"west": {"uv": [8, 8.5, 7.5, 13.5], "texture": "#0", "cullface": "west"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 5, 0],
|
||||
"to": [0.1, 6, 16],
|
||||
"faces": {
|
||||
"east": {"uv": [8, 8.5, 0, 9], "texture": "#0"},
|
||||
"west": {"uv": [0, 8.5, 8, 9], "texture": "#0", "cullface": "west"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 14, 0],
|
||||
"to": [0.1, 15, 16],
|
||||
"faces": {
|
||||
"east": {"uv": [8, 13, 0, 13.5], "texture": "#0"},
|
||||
"west": {"uv": [0, 13, 8, 13.5], "texture": "#0", "cullface": "west"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15.9, 6, 1],
|
||||
"to": [16, 14, 15],
|
||||
"faces": {
|
||||
"east": {"uv": [0.5, 9, 7.5, 13], "texture": "#0", "cullface": "east"},
|
||||
"west": {"uv": [7.5, 9, 0.5, 13], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [1, 6, 15.9],
|
||||
"to": [15, 14, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [7.5, 9, 0.5, 13], "texture": "#0"},
|
||||
"south": {"uv": [0.5, 9, 7.5, 13], "texture": "#0", "cullface": "south"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [1, 6, 0],
|
||||
"to": [15, 14, 0.1],
|
||||
"faces": {
|
||||
"north": {"uv": [0.5, 9, 7.5, 13], "texture": "#0", "cullface": "north"},
|
||||
"south": {"uv": [7.5, 9, 0.5, 13], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 6, 1],
|
||||
"to": [0.1, 14, 15],
|
||||
"faces": {
|
||||
"east": {"uv": [7.5, 9, 0.5, 13], "texture": "#0"},
|
||||
"west": {"uv": [0.5, 9, 7.5, 13], "texture": "#0", "cullface": "west"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "mekanismultimate:items/canteen"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "mekanismultimate:block/nutritional_liquifier"
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"conditions": {
|
||||
"factory_enabled": "mekanism.ultimate.common.recipe.UltimateRecipeEnabledCondition"
|
||||
"factory_enabled": "mekanism.ultimate.common.recipe.UltimateRecipeEnabledCondition",
|
||||
"nutrition_enabled": "mekanism.ultimate.common.recipe.NutritionRecipeEnabledCondition"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"type": "mekanism:ore_shaped",
|
||||
"conditions": [{"type": "mekanismultimate:nutrition_enabled"}],
|
||||
"pattern": [" I ", "I#I", " I "],
|
||||
"key": {
|
||||
"I": {"type": "forge:ore_dict", "ore": "ingotTin"},
|
||||
"#": {"item": "minecraft:bowl"}
|
||||
},
|
||||
"result": {"item": "mekanismultimate:canteen"}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"type": "mekanism:ore_shaped",
|
||||
"conditions": [{"type": "mekanismultimate:nutrition_enabled"}],
|
||||
"pattern": ["RCR", "#X#", "RCR"],
|
||||
"key": {
|
||||
"R": {"type": "forge:ore_dict", "ore": "dustRedstone"},
|
||||
"C": {"type": "forge:ore_dict", "ore": "circuitBasic"},
|
||||
"#": {"item": "minecraft:bowl"},
|
||||
"X": {"item": "mekanism:basicblock", "data": 8}
|
||||
},
|
||||
"result": {"item": "mekanismultimate:nutritional_liquifier"}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 339 B |
Reference in new issue
Block a user