Fixed centering structure in JEI

This commit is contained in:
Quarris
2021-11-28 18:57:18 +00:00
parent 754fa9e234
commit 564ae1d5d4
5 changed files with 91 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'org.spongepowered.mixin'
version = '1.16.5-0.1.57-B' + getVersionNumber()
version = '1.16.5-0.1.58-B' + getVersionNumber()
group = 'com.ticticboooom.mods.mm' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'MasterfulMachinery'
java.toolchain.languageVersion = JavaLanguageVersion.of(8) // Mojang ships Java 8 to end users, so your mod should target Java 8.

View File

@@ -186,7 +186,10 @@ public class MachineStructureRecipeCategory implements IRecipeCategory<MachineSt
double relMoveY = mouseY - yLastMousePosition;
prePos.add((float)relMoveX * 0.08f, (float)-relMoveY * 0.08f, 0);
}
Vector3f offset = new Vector3f(-minX - 0.5f - centreX, -minY - 0.5f - centerY, minZ - 0.5f + centreZ);
Vector3f offset = new Vector3f(minX, -minY, minZ); // Align bottom back left corner block to be at the center
offset.add(centreX, -centerY, centreZ); // Center on structure
offset.add(-0.5f, -0.5f, -0.5f); // Center on block
Vector4f zero = new Vector4f(0, 0, 0, 1);
zero.transform(matrixStack.getLast().getMatrix().copy());

View File

@@ -13,8 +13,8 @@
[
"-----",
".///0",
"1 1",
"2333C"
"1 C1",
"2333)"
],
[
"4---4",

View File

@@ -0,0 +1,82 @@
{
"type": "masterfulmachinery:machine_structure",
"id": "botanist_furnace_structure_2",
"controllerId": "botanist_furnace",
"name": "Botanist's Furnace 2",
"layout": [
[
")))))",
")***)",
"+++++",
",))))"
],
[
"-----",
".///0",
"1 1",
"2333C"
],
[
"4---4",
"5 5",
"1 1",
"13331"
],
[
" 4-4 ",
" 676 ",
" 181 ",
" 111 "
]
],
"legend": {
")": {
"block": "botania:livingrock"
},
"*": {
"block": "minecraft:redstone_block"
},
"+": {
"block": "create:belt"
},
",": {
"block": "create:gearbox"
},
"-": {
"block": "minecraft:cobblestone"
},
".": {
"block": "masterfulmachinery:botanist_furnace_botanist_furnace_item_port_items_input"
},
"/": {
"block": "minecraft:campfire"
},
"0": {
"block": "masterfulmachinery:botanist_furnace_botanist_furnace_item_port_items_output"
},
"1": {
"block": "botania:livingrock_stairs"
},
"2": {
"block": "masterfulmachinery:botanist_furnace_botanist_furnace_rotation_port_create_rotation_input"
},
"3": {
"block": "create:framed_glass"
},
"4": {
"block": "minecraft:cobblestone"
},
"5": {
"block": "minecraft:jack_o_lantern"
},
"6": {
"block": "minecraft:cobblestone"
},
"7": {
"block": "botania:mana_spreader"
},
"8": {
"block": "masterfulmachinery:botanist_furnace_botanist_furnace_mana_port_botania_mana_input"
}
}
}

View File

@@ -1,2 +1,2 @@
#Fri Oct 29 13:28:32 BST 2021
VERSION_CODE=858
#Sun Nov 28 15:53:16 GMT 2021
VERSION_CODE=865