1.12.1
This commit is contained in:
parent
3ea0d2541a
commit
11990301d3
5 changed files with 32 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
|||
minecraftVersion="1.12"
|
||||
name="TechReborn-1.12"
|
||||
minecraftVersion="1.12.1"
|
||||
name="TechReborn-1.12.1"
|
||||
curseID="233564"
|
||||
child-project="reborncore"
|
||||
child-type="requiredLibrary"
|
|
@ -87,7 +87,7 @@ if (ENV.BUILD_NUMBER) {
|
|||
}
|
||||
|
||||
minecraft {
|
||||
version = "1.12-14.21.1.2397"
|
||||
version = "1.12.1-14.22.0.2456"
|
||||
mappings = "snapshot_20170624"
|
||||
replace "@MODVERSION@", project.version
|
||||
useDepAts = true
|
||||
|
|
|
@ -167,7 +167,7 @@ public class GuiAutoCrafting extends GuiBase {
|
|||
for (int i = 0; i < 9; i++) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package techreborn.client.gui.autocrafting;
|
|||
|
||||
import net.minecraft.client.Minecraft;
|
||||
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.RecipeList;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
@ -24,22 +25,35 @@ public class GuiAutoCraftingRecipeSlector extends GuiRecipeBook {
|
|||
//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
|
||||
public boolean isVisible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContainerRecipe(IRecipe recipe, RecipeList recipes) {
|
||||
public void setContainerRecipe(IRecipe recipe) {
|
||||
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) {
|
||||
this.guiAutoCrafting = guiAutoCrafting;
|
||||
}
|
||||
|
|
|
@ -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_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
|
||||
|
|
Loading…
Reference in a new issue