mirror of
https://github.com/TicTicBoooom-Mods/MasterfulMachinery.git
synced 2026-01-18 16:37:23 +01:00
(Old Version) Added mirroring to structures
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user