Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/matrix_includes.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@
},
{
"subproject_dir": "1.21.6"
},
{
"subproject_dir": "1.21.7"
}
]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

| 游戏版本 | 开发状态 | 最后支持版本 |
|:--------------------:| :------: | :----------------------------------------------------------: |
| 1.21.7 | ✔ | --- |
| 1.21.6 | ✔ | --- |
| 1.21.5 | ✔ | --- |
| 1.21.4 | ✔ | --- |
Expand Down
1 change: 1 addition & 0 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Access the website to view all the relevant information about carpet-ams-additio

| Game Version | Development Status | Last Supported Version |
|:-------------------------:| :----------------: | :----------------------------------------------------------: |
| 1.21.7 | ✔ | --- |
| 1.21.6 | ✔ | --- |
| 1.21.5 | ✔ | --- |
| 1.21.4 | ✔ | --- |
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ preprocess {
def mc1214 = createNode('1.21.4', 1_21_04, 'yarn')
def mc1215 = createNode('1.21.5', 1_21_05, 'yarn')
def mc1216 = createNode('1.21.6', 1_21_06, 'yarn')
def mc1217 = createNode('1.21.7', 1_21_07, 'yarn')

mc117.link(mc116, file('versions/mapping-1.17-1.16.txt'))
mc118.link(mc117, file('versions/mapping-1.18-1.17.txt'))
Expand All @@ -32,6 +33,7 @@ preprocess {
mc1213.link(mc1214, file('versions/mapping-1.21.3-1.21.4.txt'))
mc1214.link(mc1215, file('versions/mapping-1.21.4-1.21.5.txt'))
mc1215.link(mc1216, file('versions/mapping-1.21.5-1.21.6.txt'))
mc1216.link(mc1217, file('versions/mapping-1.21.6-1.21.7.txt'))
}

tasks.register('buildAndGather') {
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ org.gradle.jvmargs = -Xmx6G

# Fabric Properties
# check these on https://fabricmc.net/develop
loader_version = 0.16.13
loader_version = 0.16.14

# Mod Properties
mod_id = carpet-ams-addition
mod_name = Carpet AMS Addition
mod_version = 2.57.4
mod_version = 2.57.5
maven_group = carpetamsaddition
archives_base_name = Carpet-AMS-Addition

Expand All @@ -21,5 +21,5 @@ annotationtoolbox_version = 0.3
mixinextras_version = 0.4.1
# https://github.com/ReplayMod/preprocessor
preprocess_version = d82910859a
fabric_loom_version = 1.10-SNAPSHOT
fabric_loom_version = 1.11-SNAPSHOT
hierynomus_license_version = 0.16.1
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.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 2 additions & 1 deletion minecraftVersions.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"1.21.3",
"1.21.4",
"1.21.5",
"1.21.6"
"1.21.6",
"1.21.7"
]
}
2 changes: 1 addition & 1 deletion run/options.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version:4435
version:4438
ao:true
biomeBlendRadius:4
enableVsync:false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,32 +52,36 @@ public abstract class EntityMixin {
//#endif

@Unique
private boolean isFirstDrop = true;
private boolean hasDroppedNetherScrap = false;


@Unique
private boolean isDroppingNetherScrap = false;

@Inject(
//#if MC>=12102
//$$ method = "dropStack(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/ItemStack;)Lnet/minecraft/entity/ItemEntity;",
//#else
method = "dropStack(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/entity/ItemEntity;",
//#endif
at = @At("TAIL"),
cancellable = true
at = @At("TAIL")
)
private void dropNetheriteScrap(CallbackInfoReturnable<ItemEntity> cir) {
if (AmsServerSettings.renewableNetheriteScrap != 0.0D && isFirstDrop) {
if (AmsServerSettings.renewableNetheriteScrap != 0.0D && !this.isDroppingNetherScrap) {
Entity entity = (Entity) (Object) this;
if (entity instanceof ZombifiedPiglinEntity && !((ZombifiedPiglinEntity) entity).isBaby()) {
if (entity instanceof ZombifiedPiglinEntity && !((ZombifiedPiglinEntity) entity).isBaby() && !this.hasDroppedNetherScrap) {
this.hasDroppedNetherScrap = true;
double random = Math.random();
double rate = AmsServerSettings.renewableNetheriteScrap;
if (random < rate) {
this.isDroppingNetherScrap = true;
ItemStack netherScrapStack = new ItemStack(Items.NETHERITE_SCRAP);
//#if MC>=12102
//$$ ItemEntity netherScrapItemEntity = this.dropStack((ServerWorld) entity.getWorld(), netherScrapStack);
//$$ this.dropStack((ServerWorld) entity.getWorld(), netherScrapStack);
//#else
ItemEntity netherScrapItemEntity = this.dropStack(netherScrapStack, 1.1F);
this.dropStack(netherScrapStack, 1.1F);
//#endif
isFirstDrop = false;
cir.setReturnValue(netherScrapItemEntity);
this.isDroppingNetherScrap = false;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* This file is part of the Carpet AMS Addition project, licensed under the
* GNU Lesser General Public License v3.0
*
* Copyright (C) 2025 A Minecraft Server and contributors
*
* Carpet AMS Addition is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Carpet AMS Addition is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Carpet AMS Addition. If not, see <https://www.gnu.org/licenses/>.
*/

package club.mcams.carpet.mixin.rule.strongLeash;

import club.mcams.carpet.utils.compat.DummyClass;

import org.spongepowered.asm.mixin.Mixin;

import top.byteeeee.annotationtoolbox.annotation.GameVersion;

@GameVersion(version = "Minecraft >= 1.21.6")
@Mixin(DummyClass.class)
public abstract class HappyGhastEntityMixin {}
1 change: 1 addition & 0 deletions src/main/resources/amscarpet.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
"rule.strongLeash.PathAwareEntityMixin",
"rule.superBow.EnchantmentMixin",
"rule.superBow.InfinityEnchantmentMixin",
"rule.strongLeash.HappyGhastEntityMixin",
"rule.superLeash.MerchantEntityMixin",
"rule.superLeash.MobEntityMixin",
"rule.superZombieDoctor.ZombieVillagerEntityAccessor",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* This file is part of the Carpet AMS Addition project, licensed under the
* GNU Lesser General Public License v3.0
*
* Copyright (C) 2025 A Minecraft Server and contributors
*
* Carpet AMS Addition is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Carpet AMS Addition is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Carpet AMS Addition. If not, see <https://www.gnu.org/licenses/>.
*/

package club.mcams.carpet.mixin.rule.strongLeash;

import club.mcams.carpet.AmsServerSettings;

import com.llamalad7.mixinextras.injector.ModifyReturnValue;

import net.minecraft.entity.passive.HappyGhastEntity;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

import top.byteeeee.annotationtoolbox.annotation.GameVersion;

@GameVersion(version = "Minecraft >= 1.21.6")
@Mixin(HappyGhastEntity.class)
public abstract class HappyGhastEntityMixin {
@ModifyReturnValue(method = "getLeashSnappingDistance", at = @At("RETURN"))
private double modifyLeashSnappingDistance(double original) {
return AmsServerSettings.strongLeash ? Math.max(original, Double.MAX_VALUE) : original;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,12 @@

package club.mcams.carpet.mixin.rule.strongLeash;

import club.mcams.carpet.AmsServerSettings;

import com.llamalad7.mixinextras.injector.ModifyReturnValue;

import net.minecraft.entity.Leashable;
import club.mcams.carpet.utils.compat.DummyInterface;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

import top.byteeeee.annotationtoolbox.annotation.GameVersion;

@GameVersion(version = "Minecraft >= 1.21.6")
@Mixin(Leashable.class)
public interface LeashableMixin {
@ModifyReturnValue(method = "getLeashSnappingDistance", at = @At("RETURN"))
private double modifyMaxLeashDetachDistance(double original) {
return AmsServerSettings.strongLeash ? Math.max(original, Double.MAX_VALUE) : original;
}
}
@GameVersion(version = "Minecraft >= 1.21")
@Mixin(DummyInterface.class)
public interface LeashableMixin {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* This file is part of the Carpet AMS Addition project, licensed under the
* GNU Lesser General Public License v3.0
*
* Copyright (C) 2024 A Minecraft Server and contributors
*
* Carpet AMS Addition is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Carpet AMS Addition is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Carpet AMS Addition. If not, see <https://www.gnu.org/licenses/>.
*/

package club.mcams.carpet.mixin.rule.strongLeash;

import club.mcams.carpet.utils.compat.DummyClass;

import org.spongepowered.asm.mixin.Mixin;

import top.byteeeee.annotationtoolbox.annotation.GameVersion;

@GameVersion(version = "Minecraft < 1.21")
@Mixin(DummyClass.class)
public abstract class PathAwareEntityMixin {}
3 changes: 3 additions & 0 deletions versions/1.21.7/carpetamsaddition.accesswidener
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessWidener v1 named
accessible method net/minecraft/server/world/ChunkTicketType register (Ljava/lang/String;JZLnet/minecraft/server/world/ChunkTicketType$Use;)Lnet/minecraft/server/world/ChunkTicketType;
accessible field net/minecraft/server/network/ServerPlayerEntity server Lnet/minecraft/server/MinecraftServer;
19 changes: 19 additions & 0 deletions versions/1.21.7/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Fabric Properties
# check these on https://www.fabricmc.net/develop/
minecraft_version = 1.21.7
yarn_mappings = 1.21.7+build.2

# Fabric Mod Metadata
carpet_dependency = >=1.4.177
minecraft_dependency = >=1.21.7

# Build Infomation
game_versions = 1.21.7

# Mod Dependency
# check available versions on maven for the given minecraft version you are using
# https://masa.dy.fi/maven/carpet/fabric-carpet/
carpet_core_version = 1.21.7-1.4.177+v250630

# check these on https://fabricmc.net/develop
fabric_api_version = 0.128.2+1.21.7
Empty file.
1 change: 1 addition & 0 deletions website/source/Development/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

| 游戏版本 | 开发状态 | 最后支持版本 |
|:--------------------:| :------: | :----------------------------------------------------------: |
| 1.21.7 | ✔ | --- |
| 1.21.6 | ✔ | --- |
| 1.21.5 | ✔ | --- |
| 1.21.4 | ✔ | --- |
Expand Down
24 changes: 24 additions & 0 deletions website/source/_posts/v2.57.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Carpet AMS Addition v2.57.5
date: 2025-7-3 21:47:28
---


- 处理[#177](https://github.com/Minecraft-AMS/Carpet-AMS-Addition/issues/177)、[#176](https://github.com/Minecraft-AMS/Carpet-AMS-Addition/issues/176)。
- 支持Minecraft 1.21.7。



---


- Process [#177](https://github.com/Minecraft-AMS/Carpet-AMS-Addition/issues/177) [#176](https://github.com/Minecraft-AMS/Carpet-AMS-Addition/issues/176).
- Support Minecraft 1.21.7.


&emsp;

&emsp;

***Translate into English from DeepSeek***

1 change: 1 addition & 0 deletions website/source/en_us/Development_en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

| Game Version | Development Status | Last Supported Version |
|:-------------------------:| :----------------: | :----------------------------------------------------------: |
| 1.21.7 | ✔ | ---
| 1.21.6 | ✔ | ---
| 1.21.5 | ✔ | ---
| 1.21.4 | ✔ | --- |
Expand Down