1.18 update
This commit is contained in:
		
							parent
							
								
									a59ee7b9c4
								
							
						
					
					
						commit
						8df9cc4609
					
				
					 8 changed files with 25 additions and 44 deletions
				
			
		
							
								
								
									
										22
									
								
								build.gradle
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								build.gradle
									
									
									
									
									
								
							| 
						 | 
					@ -1,10 +1,10 @@
 | 
				
			||||||
plugins {
 | 
					plugins {
 | 
				
			||||||
	id 'fabric-loom' version '0.9-SNAPSHOT'
 | 
						id 'fabric-loom' version '0.10-SNAPSHOT'
 | 
				
			||||||
	id 'maven-publish'
 | 
						id 'maven-publish'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sourceCompatibility = JavaVersion.VERSION_16
 | 
					sourceCompatibility = JavaVersion.VERSION_17
 | 
				
			||||||
targetCompatibility = JavaVersion.VERSION_16
 | 
					targetCompatibility = JavaVersion.VERSION_17
 | 
				
			||||||
 | 
					
 | 
				
			||||||
archivesBaseName = project.archives_base_name
 | 
					archivesBaseName = project.archives_base_name
 | 
				
			||||||
version = project.mod_version
 | 
					version = project.mod_version
 | 
				
			||||||
| 
						 | 
					@ -50,8 +50,7 @@ tasks.withType(JavaCompile).configureEach {
 | 
				
			||||||
	// If Javadoc is generated, this must be specified in that task too.
 | 
						// If Javadoc is generated, this must be specified in that task too.
 | 
				
			||||||
	it.options.encoding = "UTF-8"
 | 
						it.options.encoding = "UTF-8"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Minecraft 1.17 (21w19a) upwards uses Java 16.
 | 
						it.options.release = 17
 | 
				
			||||||
	it.options.release = 16
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
java {
 | 
					java {
 | 
				
			||||||
| 
						 | 
					@ -71,13 +70,14 @@ jar {
 | 
				
			||||||
publishing {
 | 
					publishing {
 | 
				
			||||||
	publications {
 | 
						publications {
 | 
				
			||||||
		mavenJava(MavenPublication) {
 | 
							mavenJava(MavenPublication) {
 | 
				
			||||||
 | 
								from components.java
 | 
				
			||||||
			// add all the jars that should be included when publishing to maven
 | 
								// add all the jars that should be included when publishing to maven
 | 
				
			||||||
			artifact(remapJar) {
 | 
								// artifact(remapJar) {
 | 
				
			||||||
				builtBy remapJar
 | 
								// 	builtBy remapJar
 | 
				
			||||||
			}
 | 
								// }
 | 
				
			||||||
			artifact(sourcesJar) {
 | 
								// artifact(sourcesJar) {
 | 
				
			||||||
				builtBy remapSourcesJar
 | 
								// 	builtBy remapSourcesJar
 | 
				
			||||||
			}
 | 
								// }
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Fabric Properties
 | 
					# Fabric Properties
 | 
				
			||||||
	# check these on https://fabricmc.net/versions.html
 | 
						# check these on https://fabricmc.net/versions.html
 | 
				
			||||||
	minecraft_version=1.17.1
 | 
						minecraft_version=1.18.1
 | 
				
			||||||
	yarn_mappings=1.17.1+build.39
 | 
						yarn_mappings=1.18.1+build.5
 | 
				
			||||||
	loader_version=0.11.6
 | 
						loader_version=0.12.12
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Mod Properties
 | 
					# Mod Properties
 | 
				
			||||||
	mod_version = 1.0.1
 | 
						mod_version = 1.1.0
 | 
				
			||||||
	maven_group = dk.palmoe
 | 
						maven_group = dk.palmoe
 | 
				
			||||||
	archives_base_name = immersivetools
 | 
						archives_base_name = immersivetools
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Dependencies
 | 
					# Dependencies
 | 
				
			||||||
	fabric_version=0.39.2+1.17
 | 
						fabric_version=0.44.0+1.18
 | 
				
			||||||
	cloth_config_version=5.0.38
 | 
						cloth_config_version=6.1.48
 | 
				
			||||||
							
								
								
									
										2
									
								
								gradle/wrapper/gradle-wrapper.properties
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								gradle/wrapper/gradle-wrapper.properties
									
									
									
									
										vendored
									
									
								
							| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
distributionBase=GRADLE_USER_HOME
 | 
					distributionBase=GRADLE_USER_HOME
 | 
				
			||||||
distributionPath=wrapper/dists
 | 
					distributionPath=wrapper/dists
 | 
				
			||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
 | 
					distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
 | 
				
			||||||
zipStoreBase=GRADLE_USER_HOME
 | 
					zipStoreBase=GRADLE_USER_HOME
 | 
				
			||||||
zipStorePath=wrapper/dists
 | 
					zipStorePath=wrapper/dists
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,8 +18,5 @@ public class ImmersiveTools implements ModInitializer {
 | 
				
			||||||
        // Proceed with mild caution.
 | 
					        // Proceed with mild caution.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ItemInit.init();
 | 
					        ItemInit.init();
 | 
				
			||||||
 | 
					 | 
				
			||||||
        // TODO: remove when mod is done
 | 
					 | 
				
			||||||
        LOGGER.info("Initialized Immersive Tools");
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@ import net.minecraft.sound.SoundEvent;
 | 
				
			||||||
import net.minecraft.sound.SoundEvents;
 | 
					import net.minecraft.sound.SoundEvents;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class CopperArmorMaterial implements ArmorMaterial {
 | 
					public class CopperArmorMaterial implements ArmorMaterial {
 | 
				
			||||||
    private static final int[] BASE_DURABILITY = new int[] { 13, 15, 16, 11 };
 | 
					    private static final int[] BASE_DURABILITY = new int[] { 130, 150, 160, 110 };
 | 
				
			||||||
    private static final int[] PROTECTION_VALUES = new int[] { 2, 5, 4, 1 };
 | 
					    private static final int[] PROTECTION_VALUES = new int[] { 2, 5, 4, 1 };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private static CopperArmorMaterial INSTANCE = null;
 | 
					    private static CopperArmorMaterial INSTANCE = null;
 | 
				
			||||||
| 
						 | 
					@ -22,10 +22,9 @@ public class CopperArmorMaterial implements ArmorMaterial {
 | 
				
			||||||
        return INSTANCE;
 | 
					        return INSTANCE;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // TODO: Make copper armor properties configurable
 | 
					 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public int getDurability(EquipmentSlot slot) {
 | 
					    public int getDurability(EquipmentSlot slot) {
 | 
				
			||||||
        return BASE_DURABILITY[slot.getEntitySlotId()] * 10;
 | 
					        return BASE_DURABILITY[slot.getEntitySlotId()];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,15 +0,0 @@
 | 
				
			||||||
package dk.palmoe.immersivetools.mixin;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import net.minecraft.client.gui.screen.TitleScreen;
 | 
					 | 
				
			||||||
import org.spongepowered.asm.mixin.Mixin;
 | 
					 | 
				
			||||||
import org.spongepowered.asm.mixin.injection.At;
 | 
					 | 
				
			||||||
import org.spongepowered.asm.mixin.injection.Inject;
 | 
					 | 
				
			||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@Mixin(TitleScreen.class)
 | 
					 | 
				
			||||||
public class ImmersiveToolsMixin {
 | 
					 | 
				
			||||||
    @Inject(at = @At("HEAD"), method = "init()V")
 | 
					 | 
				
			||||||
    private void init(CallbackInfo info) {
 | 
					 | 
				
			||||||
        // TODO: Remove mixing if unused
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					@ -21,10 +21,10 @@
 | 
				
			||||||
	"mixins": ["immersivetools.mixins.json"],
 | 
						"mixins": ["immersivetools.mixins.json"],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"depends": {
 | 
						"depends": {
 | 
				
			||||||
		"fabricloader": ">=0.11.3",
 | 
							"fabricloader": ">=0.12.0",
 | 
				
			||||||
		"fabric": "*",
 | 
							"fabric": "*",
 | 
				
			||||||
		"minecraft": "1.17.x",
 | 
							"minecraft": "1.18.x",
 | 
				
			||||||
		"java": ">=16"
 | 
							"java": ">=17"
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	"suggests": {
 | 
						"suggests": {
 | 
				
			||||||
		"another-mod": "*"
 | 
							"another-mod": "*"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,9 +2,9 @@
 | 
				
			||||||
	"required": true,
 | 
						"required": true,
 | 
				
			||||||
	"minVersion": "0.8",
 | 
						"minVersion": "0.8",
 | 
				
			||||||
	"package": "dk.palmoe.immersivetools.mixin",
 | 
						"package": "dk.palmoe.immersivetools.mixin",
 | 
				
			||||||
	"compatibilityLevel": "JAVA_16",
 | 
						"compatibilityLevel": "JAVA_17",
 | 
				
			||||||
	"mixins": [],
 | 
						"mixins": [],
 | 
				
			||||||
	"client": ["ImmersiveToolsMixin"],
 | 
						"client": [],
 | 
				
			||||||
	"injectors": {
 | 
						"injectors": {
 | 
				
			||||||
		"defaultRequire": 1
 | 
							"defaultRequire": 1
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue