Skip to content

Commit 8b67ecb

Browse files
committed
Start adding forge
1 parent 17c0e08 commit 8b67ecb

File tree

20 files changed

+244
-27
lines changed

20 files changed

+244
-27
lines changed

common/src/main/java/io/github/discusser/toomanyentities/TooManyEntities.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import java.util.HashMap;
77

88
public final class TooManyEntities {
9-
public static final Logger LOGGER = LoggerFactory.getLogger("too-many-entities");
10-
public static final String MODID = "too-many-entities";
9+
public static final Logger LOGGER = LoggerFactory.getLogger("too_many_entities");
10+
public static final String MODID = "too_many_entities";
1111
public static final HashMap<String, Integer> entityCounts = new HashMap<>();
1212

1313
public static void init() {

common/src/main/java/io/github/discusser/toomanyentities/mixin/TooManyEntitiesMixinPlugin.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.github.discusser.toomanyentities.mixin;
22

33
import com.google.common.collect.ImmutableMap;
4+
import dev.architectury.injectables.targets.ArchitecturyTarget;
45
import dev.architectury.platform.Platform;
56
import org.objectweb.asm.tree.ClassNode;
67
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
@@ -13,16 +14,16 @@
1314

1415
public class TooManyEntitiesMixinPlugin implements IMixinConfigPlugin {
1516
private static final Supplier<Boolean> entityCullingLoaded = () -> Platform.isModLoaded("entityculling");
17+
private static final boolean isFabric = Platform.isFabric();
1618

1719
private static final Map<String, Supplier<Boolean>> CONDITIONS = ImmutableMap.of(
1820
"io.github.discusser.toomanyentities.mixin.client.DebugHudMixin", entityCullingLoaded,
19-
"io.github.discusser.toomanyentities.fabric.mixin.client.EntityCullingWorldRendererMixin", entityCullingLoaded,
21+
"io.github.discusser.toomanyentities." + (isFabric ? "fabric" : "forge") + ".mixin.client.EntityCullingWorldRendererMixin", entityCullingLoaded,
2022
"io.github.discusser.toomanyentities.mixin.client.WorldRendererMixin", () -> !entityCullingLoaded.get()
2123
);
2224

2325
@Override
2426
public void onLoad(String mixinPackage) {
25-
2627
}
2728

2829
@Override

common/src/main/resources/assets/too-many-entities/icon.png renamed to common/src/main/resources/assets/too_many_entities/icon.png

File renamed without changes.

common/src/main/resources/assets/too-many-entities/icon_400x400.png renamed to common/src/main/resources/assets/too_many_entities/icon_400x400.png

File renamed without changes.

common/src/main/resources/assets/too-many-entities/lang/en_us.json renamed to common/src/main/resources/assets/too_many_entities/lang/en_us.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"text.autoconfig.too-many-entities.title": "Too Many Entities",
3-
"text.autoconfig.too-many-entities.category.general": "General",
4-
"text.autoconfig.too-many-entities.category.entities": "Entities",
5-
"text.autoconfig.too-many-entities.option.enabled": "Enabled",
6-
"text.autoconfig.too-many-entities.option.enabled.@Tooltip": "Whether or not the mod is enabled",
7-
"text.autoconfig.too-many-entities.option.maxEntityCount": "Max Entity Count",
8-
"text.autoconfig.too-many-entities.option.maxEntityCount.@Tooltip": "The maximum number of entities of a specific type to render. If this is set to 0, the limit is removed",
9-
"text.autoconfig.too-many-entities.option.applyMaxEntityCountGlobally": "Apply Max Entity Count Globally",
10-
"text.autoconfig.too-many-entities.option.applyMaxEntityCountGlobally.@Tooltip": "If this option is enabled, the maximum entity count defined above will be used for every single entity type. If this option is disabled, each entity type will use its own maximum entity count",
11-
"text.autoconfig.too-many-entities.option.useEntityCulling": "Use Entity Culling",
12-
"text.autoconfig.too-many-entities.option.useEntityCulling.@Tooltip": "If this option is enabled, and the mod Entity Culling is installed, the number of entities rendered will be taken from the entity culling mod. This allows you to have more visible entities without necessarily reducing performance. There can be flickering when using this option, so only enable it if you want to."
2+
"text.autoconfig.too_many_entities.title": "Too Many Entities",
3+
"text.autoconfig.too_many_entities.category.general": "General",
4+
"text.autoconfig.too_many_entities.category.entities": "Entities",
5+
"text.autoconfig.too_many_entities.option.enabled": "Enabled",
6+
"text.autoconfig.too_many_entities.option.enabled.@Tooltip": "Whether or not the mod is enabled",
7+
"text.autoconfig.too_many_entities.option.maxEntityCount": "Max Entity Count",
8+
"text.autoconfig.too_many_entities.option.maxEntityCount.@Tooltip": "The maximum number of entities of a specific type to render. If this is set to 0, the limit is removed",
9+
"text.autoconfig.too_many_entities.option.applyMaxEntityCountGlobally": "Apply Max Entity Count Globally",
10+
"text.autoconfig.too_many_entities.option.applyMaxEntityCountGlobally.@Tooltip": "If this option is enabled, the maximum entity count defined above will be used for every single entity type. If this option is disabled, each entity type will use its own maximum entity count",
11+
"text.autoconfig.too_many_entities.option.useEntityCulling": "Use Entity Culling",
12+
"text.autoconfig.too_many_entities.option.useEntityCulling.@Tooltip": "If this option is enabled, and the mod Entity Culling is installed, the number of entities rendered will be taken from the entity culling mod. This allows you to have more visible entities without necessarily reducing performance. There can be flickering when using this option, so only enable it if you want to."
1313
}

common/src/main/resources/too-many-entities.mixins.json renamed to common/src/main/resources/too_many_entities.mixins.json

File renamed without changes.

fabric/src/main/resources/assets/too-many-entities/icon.png renamed to fabric/src/main/resources/assets/too_many_entities/icon.png

File renamed without changes.

fabric/src/main/resources/assets/too-many-entities/icon_400x400.png renamed to fabric/src/main/resources/assets/too_many_entities/icon_400x400.png

File renamed without changes.

fabric/src/main/resources/fabric.mod.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schemaVersion": 1,
3-
"id": "too-many-entities",
3+
"id": "too_many_entities",
44
"version": "${version}",
55
"name": "Too Many Entities",
66
"description": "This mod allows you to hide extra entities in order to reduce lag, especially with mob farms. The mobs still exist in the world, they are just not visible.",
@@ -11,7 +11,7 @@
1111
"sources": "https://github.com/Discusser/TooManyEntities"
1212
},
1313
"license": "MIT",
14-
"icon": "assets/too-many-entities/icon.png",
14+
"icon": "assets/too_many_entities/icon.png",
1515
"environment": "client",
1616
"entrypoints": {
1717
"client": [
@@ -22,8 +22,8 @@
2222
]
2323
},
2424
"mixins": [
25-
"too-many-entities.mixins.json",
26-
"too-many-entities-fabric.mixins.json"
25+
"too_many_entities.mixins.json",
26+
"too_many_entities-fabric.mixins.json"
2727
],
2828
"depends": {
2929
"fabricloader": ">=0.16.0",

fabric/src/main/resources/too-many-entities-fabric.mixins.json renamed to fabric/src/main/resources/too_many_entities-fabric.mixins.json

File renamed without changes.

0 commit comments

Comments
 (0)