mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-26 06:43:01 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
c312069d28
commit
6bdb2c0b96
100 files changed
+3171
-3401
No files matched your search
@@ -1,5 +1,15 @@
|
||||
package emt.tile;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
import com.gtnewhorizons.modularui.api.ModularUITextures;
|
||||
import com.gtnewhorizons.modularui.api.forge.InvWrapper;
|
||||
import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
|
||||
@@ -8,26 +18,19 @@ import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
|
||||
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
|
||||
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
|
||||
import com.gtnewhorizons.modularui.common.widget.TextWidget;
|
||||
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import gregtech.api.gui.modularui.GT_UITextures;
|
||||
import ic2.api.tile.IWrenchable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class TileEntityEtherealMacerator extends TileEntityEMT
|
||||
implements ISidedInventory, IWrenchable, ITileWithModularUI {
|
||||
|
||||
private static final int[] slots_top = new int[] {0};
|
||||
private static final int[] slots_bottom = new int[] {2, 1};
|
||||
private static final int[] slots_sides = new int[] {1};
|
||||
private static final int[] slots_top = new int[] { 0 };
|
||||
private static final int[] slots_bottom = new int[] { 2, 1 };
|
||||
private static final int[] slots_sides = new int[] { 1 };
|
||||
public int maceratingSpeed = EMTConfigHandler.etherealProcessorBaseSpeed;
|
||||
public int cookTime;
|
||||
private ItemStack[] slots = new ItemStack[3];
|
||||
@@ -183,19 +186,19 @@ public class TileEntityEtherealMacerator extends TileEntityEMT
|
||||
} else if (this.slots[1].isItemEqual(new ItemStack(ConfigItems.itemNugget, 1, 6))
|
||||
&& this.isOverLimit(1) == false
|
||||
&& this.isOverLimit(2) == false) {
|
||||
slots[1] = new ItemStack(getStackInSlot(1).getItem(), slots[1].stackSize + 1, 2);
|
||||
}
|
||||
slots[1] = new ItemStack(getStackInSlot(1).getItem(), slots[1].stackSize + 1, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer) {
|
||||
return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this
|
||||
? false
|
||||
return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false
|
||||
: par1EntityPlayer.getDistanceSq(
|
||||
(double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D)
|
||||
<= 64.0D;
|
||||
(double) this.xCoord + 0.5D,
|
||||
(double) this.yCoord + 0.5D,
|
||||
(double) this.zCoord + 0.5D) <= 64.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -293,20 +296,19 @@ public class TileEntityEtherealMacerator extends TileEntityEMT
|
||||
builder.bindPlayerInventory(buildContext.getPlayer());
|
||||
InvWrapper invWrapper = new InvWrapper(this);
|
||||
|
||||
builder.widget(new SlotWidget(invWrapper, 0)
|
||||
.setFilter(stack ->
|
||||
isAllowed(stack) && FurnaceRecipes.smelting().getSmeltingResult(stack) != null)
|
||||
builder.widget(
|
||||
new SlotWidget(invWrapper, 0)
|
||||
.setFilter(
|
||||
stack -> isAllowed(stack) && FurnaceRecipes.smelting().getSmeltingResult(stack) != null)
|
||||
.setPos(55, 25))
|
||||
.widget(new SlotWidget(invWrapper, 2)
|
||||
.setAccess(true, false)
|
||||
.setBackground(ModularUITextures.ITEM_SLOT.withFixedSize(26, 26, -4, -4))
|
||||
.setPos(115, 25))
|
||||
.widget(
|
||||
new SlotWidget(invWrapper, 2).setAccess(true, false)
|
||||
.setBackground(ModularUITextures.ITEM_SLOT.withFixedSize(26, 26, -4, -4))
|
||||
.setPos(115, 25))
|
||||
.widget(new SlotWidget(invWrapper, 1).setAccess(true, false).setPos(115, 52))
|
||||
.widget(new ProgressBar()
|
||||
.setTexture(GT_UITextures.PROGRESSBAR_MACERATE, 20)
|
||||
.setProgress(() -> (float) cookTime / maceratingSpeed)
|
||||
.setPos(81, 36)
|
||||
.setSize(20, 18))
|
||||
.widget(
|
||||
new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_MACERATE, 20)
|
||||
.setProgress(() -> (float) cookTime / maceratingSpeed).setPos(81, 36).setSize(20, 18))
|
||||
.widget(new TextWidget(EMTTextHelper.localize("gui.EMT.etherealMacerator.title")).setPos(6, 6));
|
||||
|
||||
return builder.build();
|
||||
|
||||
Reference in new issue
Block a user