Add recipe and Chinese.
No files matched your search
@@ -20,14 +20,17 @@ plugins {
|
||||
id "net.minecraftforge.gradle.forge" version "2.0.2"
|
||||
}
|
||||
*/
|
||||
version = "1.0"
|
||||
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "modid"
|
||||
version = "0.1.1"
|
||||
group= "pers.towdium.justEnoughcalculation" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "je_calculation"
|
||||
|
||||
sourceCompatibility = 1.7
|
||||
targetCompatibility = 1.7
|
||||
|
||||
minecraft {
|
||||
version = "1.8.9-11.15.1.1722"
|
||||
runDir = "run"
|
||||
|
||||
useDepAts = true
|
||||
// the mappings can be changed at any time, and must be in the following format.
|
||||
// snapshot_YYYYMMDD snapshot are built nightly.
|
||||
// stable_# stables are built at the discretion of the MCP team.
|
||||
@@ -38,6 +41,7 @@ minecraft {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
deobfCompile "mezz.jei:jei_1.8.9:2.28.2.166"
|
||||
// you may put jars on which you depend on in ./libs
|
||||
// or you may define them like so..
|
||||
//compile "some.group:artifact:version:classifier"
|
||||
@@ -80,3 +84,9 @@ processResources
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url "http://dvs1.progwml6.com/files/maven"
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,13 @@
|
||||
package pers.towdium.justEnoughCalculation;
|
||||
|
||||
import net.minecraft.block.BlockStone;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.SidedProxy;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
@@ -24,7 +29,8 @@ import pers.towdium.justEnoughCalculation.network.packets.PacketSyncRecord;
|
||||
* @author Towdium
|
||||
*/
|
||||
|
||||
@Mod(modid = JustEnoughCalculation.Reference.MODID, name = JustEnoughCalculation.Reference.MODNAME, version = JustEnoughCalculation.Reference.VERSION)
|
||||
@Mod(modid = JustEnoughCalculation.Reference.MODID, name = JustEnoughCalculation.Reference.MODNAME, version = JustEnoughCalculation.Reference.VERSION,
|
||||
dependencies = "required-after:JEI@[1.8.9-2.28.2.166,)")
|
||||
public class JustEnoughCalculation {
|
||||
public static Item itemCalculator = new ItemCalculator().setUnlocalizedName("itemCalculator");
|
||||
public static SimpleNetworkWrapper networkWrapper;
|
||||
@@ -38,8 +44,8 @@ public class JustEnoughCalculation {
|
||||
|
||||
public static class Reference {
|
||||
public static final String MODID = "je_calculation";
|
||||
public static final String MODNAME = "JustEnoughCalculation";
|
||||
public static final String VERSION = "0.0.1";
|
||||
public static final String MODNAME = "Just Enough Calculation";
|
||||
public static final String VERSION = "0.1.1";
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
@@ -59,6 +65,7 @@ public class JustEnoughCalculation {
|
||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().
|
||||
register(itemCalculator, 0, new ModelResourceLocation(Reference.MODID + ":" + itemCalculator.getUnlocalizedName().substring(5), "inventory"));
|
||||
}
|
||||
GameRegistry.addRecipe(new ItemStack(itemCalculator), "SIS", "SRS", "SRS", 'S', new ItemStack(Blocks.stone, 1, 0), 'I', new ItemStack(Items.dye, 1, EnumDyeColor.BLACK.getDyeDamage()), 'R', Items.redstone);
|
||||
proxy.init();
|
||||
}
|
||||
}
|
||||
@@ -60,11 +60,14 @@ public class GuiEventHandler {
|
||||
if (((GuiCalculator) event.gui).getActiveSlot() == 0){
|
||||
Slot slot = ((GuiCalculator) event.gui).inventorySlots.getSlot(0);
|
||||
ItemStack itemStack = JEIPlugin.runtime.getItemListOverlay().getStackUnderMouse();
|
||||
if(itemStack != null){
|
||||
itemStack = itemStack.copy();
|
||||
}
|
||||
if(itemStack != null){
|
||||
ItemStackWrapper.NBT.initNBT(itemStack);
|
||||
itemStack.getTagCompound().setBoolean("mark", true);
|
||||
}
|
||||
slot.putStack(itemStack == null ? null : itemStack.copy());
|
||||
slot.putStack(itemStack == null ? null : itemStack);
|
||||
if (Mouse.isButtonDown(0)){
|
||||
time = new Date().getTime();
|
||||
Slot slot1 = ((GuiCalculator) event.gui).getSlotUnderMouse();
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package pers.towdium.justEnoughCalculation.gui.commom;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* CODE IS DONE BY Zyin055
|
||||
@@ -46,6 +50,21 @@ public abstract class GuiTooltipScreen extends GuiContainer
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
DrawTooltipScreen(mouseX, mouseY);
|
||||
InventoryPlayer inventoryplayer = this.mc.thePlayer.inventory;
|
||||
Field field;
|
||||
Slot theSlot = null;
|
||||
try {
|
||||
field = GuiContainer.class.getDeclaredField("theSlot");
|
||||
field.setAccessible(true);
|
||||
theSlot = (Slot) field.get(this);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (inventoryplayer.getItemStack() == null && theSlot != null && theSlot.getHasStack())
|
||||
{
|
||||
ItemStack itemstack1 = theSlot.getStack();
|
||||
this.renderToolTip(itemstack1, mouseX, mouseY);
|
||||
}
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.client.resources.model.ModelManager;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import pers.towdium.justEnoughCalculation.JustEnoughCalculation;
|
||||
import pers.towdium.justEnoughCalculation.core.ItemStackWrapper;
|
||||
import pers.towdium.justEnoughCalculation.core.Recipe;
|
||||
@@ -188,7 +189,7 @@ public class GuiRecipe extends GuiTooltipScreen{
|
||||
@Override
|
||||
protected String GetButtonTooltip(int buttonId) {
|
||||
if(buttonId == 0){
|
||||
return "Switch between_pN: normal mode_pP: percentage mode";
|
||||
return StatCollector.translateToLocal("gui.calculator.tooltipUse");
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package pers.towdium.justEnoughCalculation.item;
|
||||
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -23,10 +24,4 @@ public class ItemCalculator extends Item {
|
||||
playerIn.openGui(JustEnoughCalculation.instance, GuiHandler.GuiId.CALCULATOR, worldIn, 0, 0, 0);
|
||||
return itemStackIn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced) {
|
||||
//super.addInformation(stack, playerIn, tooltip, advanced);
|
||||
tooltip.add("sdji");
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ import java.util.UUID;
|
||||
* @author Towdium
|
||||
*/
|
||||
public class PlayerHandlerClient implements IPlayerHandler {
|
||||
public List<Recipe> recipes;
|
||||
public List<Recipe> recipes = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void addRecipe(Recipe recipe, UUID uuid) {
|
||||
|
||||
@@ -5,12 +5,11 @@ gui.calculator.output=Output
|
||||
gui.calculator.input=Input
|
||||
gui.calculator.catalyst=Catalyst
|
||||
gui.calculator.view=View
|
||||
gui.calculator.editTooltip=Edit recorded recipes of selected item
|
||||
gui.calculator.editTooltip=Edit recorded recipes of current item
|
||||
gui.calculator.addTooltip=Add preferred recipe
|
||||
gui.calculator.viewTooltip=View all recorded recipes
|
||||
gui.itemPicker.confirm=Confirm
|
||||
gui.itemPicker.search=Search
|
||||
gui.recipePicker.delete=Delete
|
||||
gui.recipeEditor.save=Save
|
||||
gui.recipeEditor.clear=Clear
|
||||
gui.calculator.tooltipUse=Switch between_pN: normal mode_pP: percentage mode_pShift-click for quick change
|
||||
item.itemCalculator.name=Calculator
|
||||
@@ -0,0 +1,15 @@
|
||||
gui.calculator.calculate=开始计算吧!
|
||||
gui.calculator.edit=编辑
|
||||
gui.calculator.add=添加
|
||||
gui.calculator.output=产出
|
||||
gui.calculator.input=材料
|
||||
gui.calculator.catalyst=催化
|
||||
gui.calculator.view=浏览
|
||||
gui.calculator.editTooltip=编辑当前物品的合成表记录
|
||||
gui.calculator.addTooltip=添加合成表
|
||||
gui.calculator.viewTooltip=浏览所有合成表记录
|
||||
gui.recipePicker.delete=删除
|
||||
gui.recipeEditor.save=储存
|
||||
gui.recipeEditor.clear=清除
|
||||
gui.calculator.tooltipUse=在不同模式下切换_pN: 普通模式_pP: 百分率模式_p按下shift一次改变10
|
||||
item.itemCalculator.name=合成计算器
|
||||
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 241 B After Width: | Height: | Size: 17 KiB |
@@ -3,9 +3,8 @@
|
||||
"modid": "je_calculation",
|
||||
"name": "Just Enough Calculation",
|
||||
"description": "A simple mod to help you with recipe calculation.",
|
||||
"version": "${version}",
|
||||
"mcversion": "${mcversion}",
|
||||
"url": "",
|
||||
"version": "0.1.0",
|
||||
"mcversion": "1.8.9",
|
||||
"updateUrl": "",
|
||||
"authorList": ["Towdium"],
|
||||
"credits": "The MCP, Forge and FML guys",
|
||||
|
||||