Skip to content

Commit

Permalink
Merge branch 'master' into AgricarnationCompat
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master authored Dec 21, 2024
2 parents a8ee814 + 903619e commit 89f7020
Show file tree
Hide file tree
Showing 11 changed files with 128 additions and 22 deletions.
62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/000-report-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Report Bug
description: "Report a bug."
body:
- type: markdown
attributes:
value: "A bug/crash report with sufficient information and logs to reproduce and track down."
- type: input
id: discord
attributes:
label: Your GTNH Discord Username
description: Leave empty if you don't have one, but this will make it harder to contact you if we need additional info.
placeholder: "Example: Fake#1234"
- type: input
id: version
attributes:
label: Mod Version
description: "What version of the Mod are you using?"
placeholder: "Example: 1.0.0"
validations:
required: true
- type: textarea
id: report
attributes:
label: Bug Report
description: "Relevant information, as well as relevant logs attached such as `logs/fml-client-latest.log."
placeholder: "Example: https://mclo.gs/ OR submit the file to github by dragging it to this textbox."
validations:
required: true
- type: dropdown
id: java
attributes:
label: Java Version
description: What Java version are you using? It's worth mentioning that if you play on Java9+ you should try update to latest minor release (e.g. prefer Java 17.0.6 over 17.0.2) of that version.
options:
- Java 8
- Java 9
- Java 11
- Java 17
- Java 19
- Java 20
- Java 21
- Other (Please Specify)
validations:
required: true
- type: textarea
id: modlist
attributes:
label: Mod List or GTNH Pack Version
description: "List of mods, ideally a minimal reproducible set (can be retrieved from latest.log). If using GTNH please indicate pack version and any changed mods, not the entire modlist."
placeholder: "List of mods or GTNH Pack version goes here"
validations:
required: true
- type: checkboxes
id: final
attributes:
label: Final Checklist
description: Certify that you read things
options:
- label: "I have searched the issues and haven't found a similar issue."
required: true


28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/001-request-feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Feature Request
description: "Request a feature."
body:
- type: markdown
attributes:
value: "Please use this form to request features. We ask you check if it was already requested though"
- type: input
id: discord
attributes:
label: Your GTNH Discord Username
description: Leave empty if you don't have one, but this will make it harder to contact you if we need additional info.
placeholder: "Example: Wumpus#1234"
- type: textarea
id: request
attributes:
label: Feature Request
description: "Relevant information, as well as relevant images"
placeholder: "Example: https://mclo.gs/ OR submit the file to github by dragging it to this textbox."
validations:
required: true
- type: checkboxes
id: final
attributes:
label: Final Checklist
description: Certify that you read things
options:
- label: "I have searched the issues and haven't found a similar issue."
required: true
14 changes: 7 additions & 7 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// Add your dependencies here

dependencies {
compile('com.github.GTNewHorizons:Baubles:1.0.4:dev')
api('com.github.GTNewHorizons:Baubles:1.0.4:dev')

compile('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')

compileOnly('com.github.GTNewHorizons:Railcraft:9.15.11:api') {transitive=false}
compileOnly('com.github.GTNewHorizons:StorageDrawers:1.13.9-GTNH:api') {transitive=false}
compileOnly('com.github.GTNewHorizons:Railcraft:9.15.15:api') {transitive=false}
compileOnly('com.github.GTNewHorizons:StorageDrawers:2.0.5-GTNH:api') {transitive=false}
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.5.0:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.6.26-GTNH:dev')
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.6.51-GTNH:dev')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.39:api') {transitive=false}
compile('com.github.GTNewHorizons:GTNHLib:0.4.3:dev')
api('com.github.GTNewHorizons:GTNHLib:0.5.22:dev')

compileOnly('curse.maven:cofh-lib-220333:2388748')
compileOnly('curse.maven:minefactory-reloaded-66672:2366150')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.26-GTNH:dev')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.51-GTNH:dev')
}

6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ enableGenericInjection = false
# Generate a class with a String field for the mod version named as defined below.
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
generateGradleTokenClass =
generateGradleTokenClass = vazkii.botania.common.Tags

# Name of the token containing the project's current version to generate/replace.
gradleTokenVersion = GRADLETOKEN_VERSION
gradleTokenVersion = VERSION

# [DEPRECATED] Mod ID replacement token.
gradleTokenModId =
Expand All @@ -70,7 +70,7 @@ gradleTokenGroupName =
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
# version in @Mod([...], version = VERSION, [...]).
# Leave these properties empty to skip individual token replacements.
replaceGradleTokenInFile = LibMisc.java
replaceGradleTokenInFile =

# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
# leave this property empty.
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.26'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30'
}


Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAttachable, IPhantomInkable, IRunicArmor {

private static final String TAG_HASHCODE = "playerHashcode";
private static final String TAG_HASHCODE_CLIENT = "playerHashcodeClient";
private static final String TAG_BAUBLE_UUID_MOST = "baubleUUIDMost";
private static final String TAG_BAUBLE_UUID_LEAST = "baubleUUIDLeast";
private static final String TAG_COSMETIC_ITEM = "cosmeticItem";
Expand Down Expand Up @@ -122,9 +123,9 @@ public boolean canUnequip(ItemStack stack, EntityLivingBase player) {

@Override
public void onWornTick(ItemStack stack, EntityLivingBase player) {
if(getLastPlayerHashcode(stack) != player.hashCode()) {
if(getLastPlayerHashcode(stack, player.worldObj.isRemote) != player.hashCode()) {
onEquippedOrLoadedIntoWorld(stack, player);
setLastPlayerHashcode(stack, player.hashCode());
setLastPlayerHashcode(stack, player.hashCode(), player.worldObj.isRemote);
}
}

Expand All @@ -138,7 +139,7 @@ public void onEquipped(ItemStack stack, EntityLivingBase player) {
((EntityPlayer) player).addStat(ModAchievements.baubleWear, 1);

onEquippedOrLoadedIntoWorld(stack, player);
setLastPlayerHashcode(stack, player.hashCode());
setLastPlayerHashcode(stack, player.hashCode(), player.worldObj.isRemote);
}
}

Expand Down Expand Up @@ -195,12 +196,12 @@ public static UUID getBaubleUUID(ItemStack stack) {
return new UUID(most, least);
}

public static int getLastPlayerHashcode(ItemStack stack) {
return ItemNBTHelper.getInt(stack, TAG_HASHCODE, 0);
public static int getLastPlayerHashcode(ItemStack stack, boolean remote) {
return ItemNBTHelper.getInt(stack, remote ? TAG_HASHCODE_CLIENT : TAG_HASHCODE, 0);
}

public static void setLastPlayerHashcode(ItemStack stack, int hash) {
ItemNBTHelper.setInt(stack, TAG_HASHCODE, hash);
public static void setLastPlayerHashcode(ItemStack stack, int hash, boolean remote) {
ItemNBTHelper.setInt(stack, remote ? TAG_HASHCODE_CLIENT : TAG_HASHCODE, hash);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import com.gtnewhorizon.gtnhlib.api.MusicRecordMetadataProvider;

public class ItemModRecord extends ItemRecord {
public class ItemModRecord extends ItemRecord implements MusicRecordMetadataProvider {

private final String file;

Expand Down Expand Up @@ -55,4 +56,11 @@ public ResourceLocation getRecordResource(String name) {
return new ResourceLocation(file);
}

@Override
public ResourceLocation getMusicRecordResource(ItemStack stack) {
if (stack == null || !(stack.getItem() instanceof ItemModRecord)) {
return null;
}
return new ResourceLocation(file);
}
}
5 changes: 3 additions & 2 deletions src/main/java/vazkii/botania/common/lib/LibMisc.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
package vazkii.botania.common.lib;

import net.minecraftforge.common.util.ForgeDirection;
import vazkii.botania.common.Tags;

public final class LibMisc {

// Mod Constants
public static final String MOD_ID = "Botania";
public static final String MOD_NAME = MOD_ID;
public static final String VERSION = "GRADLETOKEN_VERSION";
public static final String DEPENDENCIES = "required-after:Baubles;after:Thaumcraft";
public static final String VERSION = Tags.VERSION;
public static final String DEPENDENCIES = "required-after:Baubles;after:Thaumcraft;required-after:gtnhlib@[0.5.22,)";

// Network Contants
public static final String NETWORK_CHANNEL = MOD_ID;
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/soundmeta/durations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"soundDurationsMs": {
"botania:music.gaia1": 202498,
"botania:music.gaia2": 226995
}
}

0 comments on commit 89f7020

Please sign in to comment.