(Old Version) Added mirroring to structures

This commit is contained in:
Quarris
2022-07-08 20:36:58 +01:00
parent f3bf09faa0
commit 62b4b4097e
3 changed files with 16 additions and 3 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.62-B' + getVersionNumber()
version = '1.16.5-0.1.63-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

@@ -73,10 +73,23 @@ public class MachineStructureRecipe implements IRecipe<IInventory> {
this.models.add(rotated);
this.models.add(rotated1);
this.models.add(rotated2);
this.models.add(mirror(models));
this.models.add(mirror(rotated));
this.models.add(mirror(rotated1));
this.models.add(mirror(rotated2));
this.controllerId = controllerId;
this.id = id;
}
private List<MachineStructureRecipeKeyModel> mirror(List<MachineStructureRecipeKeyModel> models) {
List<MachineStructureRecipeKeyModel> mirrored = new ArrayList<>();
for (MachineStructureRecipeKeyModel model : models) {
BlockPos mirroredPos = new BlockPos(-model.getPos().getX(), model.getPos().getY(), model.getPos().getZ());
mirrored.add(new MachineStructureRecipeKeyModel(new MachineStructureBlockPos(mirroredPos.getX(), mirroredPos.getY(), mirroredPos.getZ()), model.getTag(), model.getBlock(), model.getProperties(), model.getPort()));
}
return mirrored;
}
@Override
public boolean matches(IInventory p_77569_1_, World p_77569_2_) {
return false;

View File

@@ -1,2 +1,2 @@
#Mon Jun 06 12:45:37 BST 2022
VERSION_CODE=953
#Fri Jul 08 20:36:32 BST 2022
VERSION_CODE=964