This commit is contained in:
modmuss50 2017-08-15 19:00:37 +01:00
parent 3ea0d2541a
commit 11990301d3
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
5 changed files with 32 additions and 14 deletions

View file

@ -1,5 +1,5 @@
minecraftVersion="1.12" minecraftVersion="1.12.1"
name="TechReborn-1.12" name="TechReborn-1.12.1"
curseID="233564" curseID="233564"
child-project="reborncore" child-project="reborncore"
child-type="requiredLibrary" child-type="requiredLibrary"

View file

@ -87,7 +87,7 @@ if (ENV.BUILD_NUMBER) {
} }
minecraft { minecraft {
version = "1.12-14.21.1.2397" version = "1.12.1-14.22.0.2456"
mappings = "snapshot_20170624" mappings = "snapshot_20170624"
replace "@MODVERSION@", project.version replace "@MODVERSION@", project.version
useDepAts = true useDepAts = true

View file

@ -167,7 +167,7 @@ public class GuiAutoCrafting extends GuiBase {
for (int i = 0; i < 9; i++) { for (int i = 0; i < 9; i++) {
dummyInv.setInventorySlotContents(i, ItemStack.EMPTY); dummyInv.setInventorySlotContents(i, ItemStack.EMPTY);
} }
this.recipeSlector.init(this.width, this.height, this.mc, false, this.inventorySlots, dummyInv); this.recipeSlector.func_194303_a(this.width, this.height, this.mc, false, dummyInv);
this.guiLeft = this.recipeSlector.updateScreenPosition(false, this.width, this.xSize); this.guiLeft = this.recipeSlector.updateScreenPosition(false, this.width, this.xSize);
} }

View file

@ -2,6 +2,7 @@ package techreborn.client.gui.autocrafting;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButtonToggle; import net.minecraft.client.gui.GuiButtonToggle;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.recipebook.GuiRecipeBook; import net.minecraft.client.gui.recipebook.GuiRecipeBook;
import net.minecraft.client.gui.recipebook.RecipeList; import net.minecraft.client.gui.recipebook.RecipeList;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
@ -24,22 +25,35 @@ public class GuiAutoCraftingRecipeSlector extends GuiRecipeBook {
//recipeBook.setGuiOpen(true); //recipeBook.setGuiOpen(true);
} }
@Override
public void init(int p_191856_1_, int p_191856_2_, Minecraft mc, boolean p_191856_4_, Container p_191856_5_, InventoryCrafting p_191856_6_) {
super.init(p_191856_1_, p_191856_2_, mc, p_191856_4_, p_191856_5_, p_191856_6_);
}
@Override @Override
public boolean isVisible() { public boolean isVisible() {
return true; return true;
} }
@Override public void setContainerRecipe(IRecipe recipe) {
public void setContainerRecipe(IRecipe recipe, RecipeList recipes) {
guiAutoCrafting.setRecipe(recipe, false); guiAutoCrafting.setRecipe(recipe, false);
} }
@Override
public boolean mouseClicked(int p_191862_1_, int p_191862_2_, int p_191862_3_) {
if (this.isVisible()) {
if (this.recipeBookPage.mouseClicked(p_191862_1_, p_191862_2_, p_191862_3_, (this.width - 147) / 2 - this.xOffset, (this.height - 166) / 2, 147, 166)) {
IRecipe irecipe = this.recipeBookPage.getLastClickedRecipe();
RecipeList recipelist = this.recipeBookPage.getLastClickedRecipeList();
if (irecipe != null && recipelist != null) {
if (!recipelist.isCraftable(irecipe) && this.ghostRecipe.getRecipe() == irecipe) {
return false;
}
this.ghostRecipe.clear();
setContainerRecipe(irecipe);
}
return true;
}
}
return super.mouseClicked(p_191862_1_, p_191862_2_, p_191862_3_);
}
public void setGuiAutoCrafting(GuiAutoCrafting guiAutoCrafting) { public void setGuiAutoCrafting(GuiAutoCrafting guiAutoCrafting) {
this.guiAutoCrafting = guiAutoCrafting; this.guiAutoCrafting = guiAutoCrafting;
} }

View file

@ -1,3 +1,7 @@
public net.minecraft.client.gui.recipebook.GuiRecipeBook func_193945_a(Lnet/minecraft/item/crafting/IRecipe;Lnet/minecraft/client/gui/recipebook/RecipeList;)V # setContainerRecipe public net.minecraft.client.gui.recipebook.GuiRecipeBook field_193022_s # recipeBookPage
public net.minecraft.client.gui.recipebook.GuiRecipeBook field_191915_z # ghostRecipe
public net.minecraft.client.gui.recipebook.GuiRecipeBook field_193960_m # toggleRecipesBtn public net.minecraft.client.gui.recipebook.GuiRecipeBook field_193960_m # toggleRecipesBtn
public net.minecraft.client.gui.recipebook.GuiRecipeBook field_191904_o # width
public net.minecraft.client.gui.recipebook.GuiRecipeBook field_191905_p # height
public net.minecraft.client.gui.recipebook.GuiRecipeBook field_191903_n # xOffset