Skip to content

Commit 3767b61

Browse files
1.16.5
1 parent a2ee75a commit 3767b61

File tree

15 files changed

+38
-142
lines changed

15 files changed

+38
-142
lines changed

build.gradle

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212
id 'eclipse'
1313
id 'idea'
1414
id 'maven-publish'
15-
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
15+
id 'net.minecraftforge.gradle' version '5.1.+'
1616
}
1717

1818
version = mod_version
@@ -22,8 +22,7 @@ base {
2222
archivesName = mod_id
2323
}
2424

25-
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
26-
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
25+
sourceCompatibility = targetCompatibility = '1.8'
2726

2827
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
2928
minecraft {
@@ -47,11 +46,6 @@ minecraft {
4746
// enableEclipsePrepareRuns = true
4847
// enableIdeaPrepareRuns = true
4948

50-
// This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game.
51-
// It is REQUIRED to be set to true for this template to function.
52-
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
53-
copyIdeResources = true
54-
5549
// When true, this property will add the folder name of all declared run configurations to generated IDE run configurations.
5650
// The folder name can be set on a run configuration using the "folderName" property.
5751
// By default, the folder name of a run configuration is the name of the Gradle project containing it.
@@ -83,7 +77,6 @@ minecraft {
8377
// You can set various levels here.
8478
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
8579
property 'forge.logging.console.level', 'debug'
86-
8780
mods {
8881
"${mod_id}" {
8982
source sourceSets.main
@@ -92,22 +85,12 @@ minecraft {
9285
}
9386

9487
client {
95-
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
96-
property 'forge.enabledGameTestNamespaces', mod_id
9788
}
9889

9990
server {
100-
property 'forge.enabledGameTestNamespaces', mod_id
10191
args '--nogui'
10292
}
10393

104-
// This run config launches GameTestServer and runs all registered gametests, then exits.
105-
// By default, the server will crash when no gametests are provided.
106-
// The gametest system is also enabled by default for other run configs under the /test command.
107-
gameTestServer {
108-
property 'forge.enabledGameTestNamespaces', mod_id
109-
}
110-
11194
data {
11295
// example of overriding the workingDirectory set in configureEach above
11396
workingDirectory project.file('run-data')
@@ -134,8 +117,8 @@ dependencies {
134117
// then special handling is done to allow a setup of a vanilla dependency without the use of an external repository.
135118
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
136119

137-
implementation fg.deobf("curse.maven:jei-238222:5846864")
138-
implementation fg.deobf("curse.maven:applied-energistics-2-223794:4733112")
120+
runtimeOnly fg.deobf("curse.maven:jei-238222:5846870")
121+
implementation fg.deobf("curse.maven:applied-energistics-2-223794:3571836")
139122
// Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings
140123
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
141124
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}")

gradle.properties

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
22
org.gradle.jvmargs=-Xmx1G
3+
org.gradle.java.home=C:\\Program Files\\Java\\jdk-17
34
org.gradle.daemon=true
45
org.gradle.parallel=true
56
org.gradle.caching=true
67
org.gradle.configuration-cache=false
78

89
# Environment Properties
9-
minecraft_version=1.18.2
10+
minecraft_version=1.16.5
1011
# The Minecraft version range can use any release version of Minecraft as bounds.
1112
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
1213
# as they do not follow standard versioning conventions.
13-
minecraft_version_range=[1.18.2, 1.19)
14-
forge_version=40.3.12
15-
forge_version_range=[40,)
14+
minecraft_version_range=[1.16.5, 1.17)
15+
forge_version=36.2.39
16+
forge_version_range=[36,)
1617
# The loader version range can only use the major version of FML as bounds
17-
loader_version_range=[40,)
18+
loader_version_range=[36,)
1819
mapping_channel=official
1920
# The mapping version to query from the mapping channel.
2021
# This must match the format required by the mapping channel.
21-
mapping_version=1.18.2
22+
mapping_version=1.16.5
2223

2324
## Mod Properties
2425

@@ -30,7 +31,7 @@ mod_name=Applied Infinity Pattern
3031
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
3132
mod_license=All Rights Reserved
3233
# The mod version. See https://semver.org/
33-
mod_version=1.0-Forge-1.18.2
34+
mod_version=1.0-Forge-1.16.5
3435
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
3536
# This should match the base package used for the mod sources.
3637
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
#Wed Mar 04 18:50:46 CET 2026
12
distributionBase=GRADLE_USER_HOME
23
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
4-
networkTimeout=10000
5-
validateDistributionUrl=true
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
65
zipStoreBase=GRADLE_USER_HOME
76
zipStorePath=wrapper/dists

settings.gradle

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,5 @@ pluginManagement {
33
mavenLocal()
44
gradlePluginPortal()
55
maven { url = 'https://maven.minecraftforge.net' }
6-
maven { url = 'https://maven.parchmentmc.org' }
76
}
87
}
9-
10-
plugins {
11-
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
12-
}

src/main/java/com/neofastftl/infinitypattern/InfinityPattern.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.neofastftl.infinitypattern;
22

3-
import com.neofastftl.infinitypattern.guidebook.IFPATGuide;
43
import com.neofastftl.infinitypattern.registries.ModItems;
54
import net.minecraftforge.eventbus.api.IEventBus;
65
import net.minecraftforge.fml.common.Mod;
@@ -13,6 +12,5 @@ public class InfinityPattern {
1312
public InfinityPattern() {
1413
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
1514
ModItems.ITEMS.register(modEventBus);
16-
IFPATGuide.init();
1715
}
1816
}

src/main/java/com/neofastftl/infinitypattern/guidebook/IFPATGuide.java

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/main/java/com/neofastftl/infinitypattern/mixins/MixinPatternEncodingTermMenu.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
import org.spongepowered.asm.mixin.Mixin;
66
import org.spongepowered.asm.mixin.Shadow;
77

8-
import appeng.menu.me.items.PatternEncodingTermMenu;
9-
import appeng.menu.slot.RestrictedInputSlot;
8+
import appeng.container.me.items.PatternTermContainer;
9+
import appeng.container.slot.RestrictedInputSlot;
1010
import org.spongepowered.asm.mixin.injection.At;
1111
import org.spongepowered.asm.mixin.injection.Inject;
1212

13-
import net.minecraft.world.item.ItemStack;
13+
import net.minecraft.item.ItemStack;
1414
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
1515
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
1616

17-
@Mixin(value = PatternEncodingTermMenu.class, remap = false)
17+
@Mixin(value = PatternTermContainer.class, remap = false)
1818
public abstract class MixinPatternEncodingTermMenu {
1919

2020
@Final
@@ -28,24 +28,24 @@ public abstract class MixinPatternEncodingTermMenu {
2828

2929
@Inject(method = "encode", at = @At("HEAD"))
3030
private void onEncodePatternHead(CallbackInfo ci) {
31-
var blank = this.blankPatternSlot.getItem();
32-
wasInfinitePattern = blank.is(ModItems.ITEM_INFINITE_EMPTY_PATTERN.get());
31+
ItemStack blank = this.blankPatternSlot.getItem();
32+
wasInfinitePattern = blank.getItem() == ModItems.ITEM_INFINITE_EMPTY_PATTERN.get();
3333
}
3434

3535
@Inject(method = "isPattern", at = @At("HEAD"), cancellable = true)
3636
private void onIsPattern(ItemStack stack, CallbackInfoReturnable<Boolean> cir) {
37-
if (stack.is(ModItems.ITEM_INFINITE_EMPTY_PATTERN.get())) {
37+
if (stack.getItem() == ModItems.ITEM_INFINITE_EMPTY_PATTERN.get()) {
3838
cir.setReturnValue(true);
3939
}
4040
}
4141

4242
@Inject(method = "encode", at = @At("RETURN"))
4343
private void onEncodePatternReturn(CallbackInfo ci) {
4444
if (wasInfinitePattern) {
45-
var blank = this.blankPatternSlot.getItem();
45+
ItemStack blank = this.blankPatternSlot.getItem();
4646
if (blank.isEmpty()) {
4747
this.blankPatternSlot.set(ModItems.ITEM_INFINITE_EMPTY_PATTERN.get().getDefaultInstance());
48-
} else if (blank.is(ModItems.ITEM_INFINITE_EMPTY_PATTERN.get())) {
48+
} else if (blank.getItem() == ModItems.ITEM_INFINITE_EMPTY_PATTERN.get()) {
4949
blank.setCount(1);
5050
}
5151
wasInfinitePattern = false;

src/main/java/com/neofastftl/infinitypattern/mixins/MixinRestrictedInputSlot.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.neofastftl.infinitypattern.mixins;
22

3-
import appeng.menu.slot.RestrictedInputSlot;
3+
import appeng.container.slot.RestrictedInputSlot;
44
import com.neofastftl.infinitypattern.registries.ModItems;
5-
import net.minecraft.world.item.ItemStack;
5+
import net.minecraft.item.ItemStack;
66
import org.spongepowered.asm.mixin.Mixin;
77
import org.spongepowered.asm.mixin.injection.At;
88
import org.spongepowered.asm.mixin.injection.Inject;
@@ -13,7 +13,7 @@ public abstract class MixinRestrictedInputSlot {
1313

1414
@Inject(method = "mayPlace", at = @At("HEAD"), cancellable = true)
1515
private void mayPlace(ItemStack stack, CallbackInfoReturnable<Boolean> cir) {
16-
if (stack.is(ModItems.ITEM_INFINITE_EMPTY_PATTERN.get())) {
16+
if (stack.getItem() == ModItems.ITEM_INFINITE_EMPTY_PATTERN.get()) {
1717
cir.setReturnValue(true);
1818
}
1919
}

src/main/java/com/neofastftl/infinitypattern/registries/ModCreativeTabs.java

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
11
package com.neofastftl.infinitypattern.registries;
22

33
import com.neofastftl.infinitypattern.InfinityPattern;
4-
import com.neofastftl.infinitypattern.guidebook.IFPATGuide;
5-
import net.minecraft.core.NonNullList;
6-
import net.minecraft.world.item.CreativeModeTab;
7-
import net.minecraft.world.item.ItemStack;
4+
import net.minecraft.item.ItemGroup;
5+
import net.minecraft.item.ItemStack;
86

97
public class ModCreativeTabs {
10-
public static final CreativeModeTab INFINITY_PATTERN = new CreativeModeTab(InfinityPattern.MODID) {
8+
public static final ItemGroup INFINITY_PATTERN = new ItemGroup(InfinityPattern.MODID) {
119
@Override
1210
public ItemStack makeIcon() {
13-
return ModItems.ITEM_INFINITE_EMPTY_PATTERN.get().getDefaultInstance();
14-
}
15-
16-
@Override
17-
public void fillItemList(NonNullList<ItemStack> items) {
18-
super.fillItemList(items);
19-
var guideItem = IFPATGuide.createGuideItem();
20-
if (!guideItem.isEmpty()) {
21-
items.add(guideItem);
22-
}
11+
return new ItemStack(ModItems.ITEM_INFINITE_EMPTY_PATTERN.get());
2312
}
2413
};
2514

src/main/java/com/neofastftl/infinitypattern/registries/ModItems.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package com.neofastftl.infinitypattern.registries;
22

33
import com.neofastftl.infinitypattern.InfinityPattern;
4-
import net.minecraft.world.item.Item;
4+
import net.minecraft.item.Item;
5+
import net.minecraftforge.fml.RegistryObject;
56
import net.minecraftforge.registries.DeferredRegister;
67
import net.minecraftforge.registries.ForgeRegistries;
7-
import net.minecraftforge.registries.RegistryObject;
88

99
public class ModItems {
1010
public static final DeferredRegister<Item> ITEMS =

0 commit comments

Comments
 (0)