Skip to content

Commit e642fc9

Browse files
committed
1.20.1
1 parent 602083d commit e642fc9

File tree

15 files changed

+24
-51
lines changed

15 files changed

+24
-51
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ dependencies {
4343
include "com.github.Fallen-Breath:conditional-mixin:v0.3.2"
4444

4545
// mods
46-
modImplementation "carpet:fabric-carpet:${project.minecraft_version}-${project.carpet_core_version}"
46+
modImplementation "carpet:fabric-carpet:1.20-${project.carpet_core_version}"
4747

4848
// runtime mods
4949
modRuntimeOnly "com.github.Fallen-Breath:lazydfu:a7cfc44c0c" // faster startup

gradle.properties

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ org.gradle.jvmargs=-Xmx1G
33

44
# Fabric Properties
55
# check these on https://fabricmc.net/develop
6-
minecraft_version=1.19.4
7-
yarn_mappings=1.19.4+build.2
6+
minecraft_version=1.20.1
7+
yarn_mappings=1.20.1+build.2
88
loader_version=0.14.9
99
# check available versions on maven for the given minecraft version you are using
1010
# https://masa.dy.fi/maven/carpet/fabric-carpet/
11-
carpet_core_version=1.4.100+v230314
11+
carpet_core_version=1.4.112+v230608
1212

1313
# Mod Properties
1414
mod_version = 2.2.2

src/main/java/me/ivan/ivancarpetaddition/IvanCarpetAdditionSettings.java

-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ public class IvanCarpetAdditionSettings {
2626
@Rule(categories = {ICA, CREATIVE, SURVIVAL})
2727
public static boolean flippinCactusSound = false;
2828

29-
@Rule(categories = {ICA, EXPERIMENTAL, SURVIVAL})
30-
public static boolean editableSign = false;
31-
3229
@Rule(options = {"_", "zombie", "skeleton", "zombie,skeleton"}, strict = false, categories = {ICA, CREATIVE})
3330
public static String mobBlackList = "_";
3431

src/main/java/me/ivan/ivancarpetaddition/mixins/command/xpcounter/spawning/breeding/AnimalEntityMixin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
@Mixin(AnimalEntity.class)
1212
public class AnimalEntityMixin {
13-
@ModifyArg(method = "breed", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/world/ServerWorld;spawnEntity(Lnet/minecraft/entity/Entity;)Z"))
13+
@ModifyArg(method = "breed(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/AnimalEntity;Lnet/minecraft/entity/passive/PassiveEntity;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/world/ServerWorld;spawnEntity(Lnet/minecraft/entity/Entity;)Z"))
1414
private Entity onAnimalBreedingDropExperience(Entity experienceOrbEntity) {
1515
((IExperienceOrbEntity) experienceOrbEntity).setSpawnReason(SpawnReason.BREEDING);
1616
return experienceOrbEntity;

src/main/java/me/ivan/ivancarpetaddition/mixins/rule/creeperDropCompletely/CreeperEntityMixin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ protected CreeperEntityMixin(EntityType<? extends HostileEntity> type, World wor
1818

1919
@ModifyArg(method = "explode", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;createExplosion(Lnet/minecraft/entity/Entity;DDDFLnet/minecraft/world/World$ExplosionSourceType;)Lnet/minecraft/world/explosion/Explosion;"))
2020
private World.ExplosionSourceType setDestructionType(World.ExplosionSourceType explosionSourceType) {
21-
return this.world.getGameRules().getBoolean(GameRules.DO_MOB_GRIEFING) ? IvanCarpetAdditionSettings.creeperDropCompletely ? World.ExplosionSourceType.TNT : World.ExplosionSourceType.MOB : World.ExplosionSourceType.NONE;
21+
return this.getWorld().getGameRules().getBoolean(GameRules.DO_MOB_GRIEFING) ? IvanCarpetAdditionSettings.creeperDropCompletely ? World.ExplosionSourceType.TNT : World.ExplosionSourceType.MOB : World.ExplosionSourceType.NONE;
2222
}
2323
}

src/main/java/me/ivan/ivancarpetaddition/mixins/rule/editableSign/SignBlockEntityMixin.java

-24
This file was deleted.

src/main/java/me/ivan/ivancarpetaddition/mixins/rule/fakePlayerNameSuggestions/PlayerCommandMixin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
@Mixin(PlayerCommand.class)
1717
public class PlayerCommandMixin {
18-
@Inject(method = "getPlayers", at = @At("HEAD"), remap = false, cancellable = true)
18+
@Inject(method = "getPlayerSuggestions", at = @At("HEAD"), remap = false, cancellable = true)
1919
private static void overwriteSuggestsPlayerList(ServerCommandSource source, CallbackInfoReturnable<Collection<String>> cir) {
2020
Set<String> players = Sets.newLinkedHashSet(Arrays.asList(IvanCarpetAdditionSettings.fakePlayerNameSuggestions.split(",")));
2121
players.addAll(source.getPlayerNames());

src/main/java/me/ivan/ivancarpetaddition/mixins/rule/functionalSpongeItem/ItemEntityMixin.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ private void tick(CallbackInfo ci) {
2121

2222
ItemEntity self = (ItemEntity)(Object) this;
2323
if (self.getStack().getItem() == Items.SPONGE) {
24-
if (((SpongeBlockInvoker) Blocks.SPONGE).invokeAbsorbWater(self.world, BlockPos.ofFloored(self.getPos()))) {
25-
ItemEntity wetSponge = new ItemEntity(self.world, self.getX(), self.getY(), self.getZ(), new ItemStack(Items.WET_SPONGE, self.getStack().getCount()));
24+
if (((SpongeBlockInvoker) Blocks.SPONGE).invokeAbsorbWater(self.getWorld(), BlockPos.ofFloored(self.getPos()))) {
25+
ItemEntity wetSponge = new ItemEntity(self.getWorld(), self.getX(), self.getY(), self.getZ(), new ItemStack(Items.WET_SPONGE, self.getStack().getCount()));
2626
wetSponge.setVelocity(self.getVelocity());
27-
self.world.spawnEntity(wetSponge);
27+
self.getWorld().spawnEntity(wetSponge);
2828
self.discard();
2929
}
3030
}
3131

32-
if (self.getStack().getItem() == Items.WET_SPONGE && self.world.getDimension().ultrawarm() && ((ItemEntityAccessor) self).getAge() > 60) {
33-
ItemEntity sponge = new ItemEntity(self.world, self.getX(), self.getY(), self.getZ(), new ItemStack(Items.SPONGE, self.getStack().getCount()));
32+
if (self.getStack().getItem() == Items.WET_SPONGE && self.getWorld().getDimension().ultrawarm() && ((ItemEntityAccessor) self).getAge() > 60) {
33+
ItemEntity sponge = new ItemEntity(self.getWorld(), self.getX(), self.getY(), self.getZ(), new ItemStack(Items.SPONGE, self.getStack().getCount()));
3434
sponge.setVelocity(self.getVelocity());
35-
self.world.spawnEntity(sponge);
36-
self.world.playSound(null, BlockPos.ofFloored(self.getPos()), SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 1.0F, (1.0F + self.world.getRandom().nextFloat() * 0.2F) * 0.7F);
35+
self.getWorld().spawnEntity(sponge);
36+
self.getWorld().playSound(null, BlockPos.ofFloored(self.getPos()), SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 1.0F, (1.0F + self.getWorld().getRandom().nextFloat() * 0.2F) * 0.7F);
3737
self.discard();
3838
}
3939
}

src/main/java/me/ivan/ivancarpetaddition/mixins/rule/mendableSnowGolem/SnowGolemEntityMixin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ private void mendSnowGolem(PlayerEntity player, Hand hand, CallbackInfoReturnabl
3333
SoundEvents.BLOCK_SNOW_PLACE,
3434
player,
3535
itemStack
36-
) ? ActionResult.success(this.world.isClient) : ActionResult.PASS);
36+
) ? ActionResult.success(this.getWorld().isClient) : ActionResult.PASS);
3737
}
3838
}
3939
}

src/main/java/me/ivan/ivancarpetaddition/mixins/rule/mendableSnowGolem/SnowballEntityMixin.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ private void onCollision(EntityHitResult hitResult, CallbackInfo ci) {
2525
1.0F,
2626
SoundEvents.BLOCK_SNOW_PLACE
2727
);
28-
if (!snowball.world.isClient) {
29-
snowball.world.sendEntityStatus(snowball, (byte) 3);
28+
if (!snowball.getWorld().isClient) {
29+
snowball.getWorld().sendEntityStatus(snowball, (byte) 3);
3030
snowball.discard();
3131
}
3232
ci.cancel();

src/main/java/me/ivan/ivancarpetaddition/mixins/rule/playerCommandNoControlSelf/PlayerCommandMixin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class PlayerCommandMixin {
2727
remap = false,
2828
locals = LocalCapture.CAPTURE_FAILHARD
2929
)
30-
private static void stopControllingSelf(CommandContext<ServerCommandSource> context, CallbackInfoReturnable<Boolean> cir, PlayerEntity player, PlayerEntity sendingPlayer) {
30+
private static void stopControllingSelf(CommandContext<ServerCommandSource> context, CallbackInfoReturnable<Boolean> cir, PlayerEntity player, ServerCommandSource source, PlayerEntity sendingPlayer) {
3131
Translator translator = new Translator("rule.playerCommandNoControlSelf");
3232
if (IvanCarpetAdditionSettings.playerCommandNoControlSelf && sendingPlayer == player) {
3333
Messenger.tell(context.getSource(), Messenger.formatting(translator.tr("warning"), "r"));

src/main/java/me/ivan/ivancarpetaddition/mixins/rule/renewableSoulSand/LivingEntityMixin.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ public class LivingEntityMixin {
1515
private void convertSandToSoulSand(DamageSource source, CallbackInfo ci) {
1616
if (!IvanCarpetAdditionSettings.renewableSoulSand) return;
1717
LivingEntity livingEntity = (LivingEntity)(Object) this;
18-
if (source == livingEntity.world.getDamageSources().inWall()) {
19-
if (livingEntity.world.getBlockState(livingEntity.getBlockPos()).getBlock() == Blocks.SAND) {
20-
livingEntity.world.setBlockState(livingEntity.getBlockPos(), Blocks.SOUL_SAND.getDefaultState());
18+
if (source == livingEntity.getWorld().getDamageSources().inWall()) {
19+
if (livingEntity.getWorld().getBlockState(livingEntity.getBlockPos()).getBlock() == Blocks.SAND) {
20+
livingEntity.getWorld().setBlockState(livingEntity.getBlockPos(), Blocks.SOUL_SAND.getDefaultState());
2121
}
2222
}
2323
}

src/main/java/me/ivan/ivancarpetaddition/utils/Messenger.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ public static void tell(ServerCommandSource source, MutableText text) {
7676
text = entity instanceof ServerPlayerEntity ?
7777
ICATranslations.translate(text, (ServerPlayerEntity) entity) :
7878
ICATranslations.translate(text);
79-
source.sendFeedback(text, false);
79+
MutableText finalText = text;
80+
source.sendFeedback(() -> finalText, false);
8081
}
8182

8283
public static MutableText formatting(MutableText text, Formatting... formattings) {

src/main/resources/fabric.mod.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"depends": {
3030
"fabricloader": ">=0.7.4",
3131
"carpet": ">=1.4.16",
32-
"minecraft": "1.19.x"
32+
"minecraft": "1.20.x"
3333
},
3434
"suggests": {
3535
"another-mod": "*"

src/main/resources/ivan-carpet-addition.mixins.json

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"rule.customVersion.ServerMetadataAccessor",
2727
"rule.customVersion.ServerMetadataMixin",
2828
"rule.dispensersNotAffectPlayers.ArmorItemMixin",
29-
"rule.editableSign.SignBlockEntityMixin",
3029
"rule.endLightningRod.EndRodBlockMixin",
3130
"rule.endLightningRod.TridentEntityAccessor",
3231
"rule.fakePlayerNameRestriction.PlayerCommandMixin",

0 commit comments

Comments
 (0)