Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
Faboslav committed Sep 2, 2024
1 parent 4692107 commit 341fd12
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void create() {
}

public void load() {
if(this.isLoading) {
if (this.isLoading) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.faboslav.structurify.common.config.data;

import com.faboslav.structurify.common.Structurify;
import com.faboslav.structurify.common.api.StructurifyRandomSpreadStructurePlacement;
import com.faboslav.structurify.common.registry.StructurifyRegistryManagerProvider;
import net.minecraft.core.registries.Registries;
Expand All @@ -10,7 +9,6 @@
import net.minecraft.world.level.levelgen.structure.StructureSet;
import net.minecraft.world.level.levelgen.structure.placement.RandomSpreadStructurePlacement;
import net.minecraft.world.level.levelgen.structure.structures.JigsawStructure;

import java.lang.reflect.Field;
import java.util.*;

Expand Down Expand Up @@ -103,11 +101,11 @@ public static Map<String, StructureData> loadStructures() {

boolean hasMaxDistanceFromCenter = false;

if(structure instanceof JigsawStructure) {
if (structure instanceof JigsawStructure) {
hasMaxDistanceFromCenter = true;
}

if(!hasMaxDistanceFromCenter) {
if (!hasMaxDistanceFromCenter) {
Class<?> clazz = structure.getClass();
Field[] fields = clazz.getDeclaredFields();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public String getRefMapperConfig() {
@Override
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
if (mixinClassName.equals("com.faboslav.structurify.common.mixin.compat.RepurposedStructuresAdvancedRandomSpreadMixin")) {
if(this.isClassAvailable("com.faboslav.structurify.forge.StructurifyForge")) {
if (this.isClassAvailable("com.faboslav.structurify.forge.StructurifyForge")) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public final class StructurifyRegistryManagerProvider

@Nullable
public static RegistryAccess getRegistryManager() {
if(registryManager == null) {
if (registryManager == null) {
loadRegistryManager();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/*? if >=1.21 {*/
/*import com.faboslav.structurify.common.mixin.ResourcePackManagerAccessor;
*//*?}*/
*//*?}*/

public final class StructurifyResourcePackProvider
{
Expand Down
38 changes: 19 additions & 19 deletions common/src/main/resources/structurify-common.mixins.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"required": true,
"package": "com.faboslav.structurify.common.mixin",
"compatibilityLevel": "JAVA_${modJavaVersion}",
"minVersion": "0.8",
"plugin": "com.faboslav.structurify.common.mixin.plugin.StructurifyMixinPlugin",
"injectors": {
"defaultRequire": 1
},
"mixins": [
"ChunkGeneratorMixin",
"JigsawStructureMixin",
"LocateCommandMixin",
"RandomSpreadStructurePlacementMixin",
"ResourcePackManagerAccessor",
"StructureMixin"
],
"client": [
"AnimatedDynamicTextureImageAccessor",
"ClickableWidgetAccessor"
"required": true,
"package": "com.faboslav.structurify.common.mixin",
"compatibilityLevel": "JAVA_${modJavaVersion}",
"minVersion": "0.8",
"plugin": "com.faboslav.structurify.common.mixin.plugin.StructurifyMixinPlugin",
"injectors": {
"defaultRequire": 1
},
"mixins": [
"ChunkGeneratorMixin",
"JigsawStructureMixin",
"LocateCommandMixin",
"RandomSpreadStructurePlacementMixin",
"ResourcePackManagerAccessor",
"StructureMixin"
],
"client": [
"AnimatedDynamicTextureImageAccessor",
"ClickableWidgetAccessor"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import net.fabricmc.loader.api.FabricLoader;

public final class PlatformImpl {
public static boolean isModLoaded(String modId) {
return FabricLoader.getInstance().isModLoaded(modId);
}
public final class PlatformImpl
{
public static boolean isModLoaded(String modId) {
return FabricLoader.getInstance().isModLoaded(modId);
}

private PlatformImpl() {
}
private PlatformImpl() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void onInitialize() {
}

private void onDatapackReload(RegistryAccess registryAccess, boolean isClient) {
if(isClient) {
if (isClient) {
return;
}

Expand Down

0 comments on commit 341fd12

Please sign in to comment.