forked from WildBamaBoy/minecraft-comes-alive
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8fb958f
commit 8ef7cc3
Showing
4 changed files
with
83 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# 7.5.5 | ||
|
||
* Fixed server crash | ||
|
||
# 7.5.4 | ||
|
||
* Removed size requirements of blueprint buildings | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
common/src/main/java/net/mca/mixin/client/MixinPlayerEntityClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package net.mca.mixin.client; | ||
|
||
import net.mca.Config; | ||
import net.mca.MCAClient; | ||
import net.minecraft.entity.EntityDimensions; | ||
import net.minecraft.entity.EntityPose; | ||
import net.minecraft.entity.EntityType; | ||
import net.minecraft.entity.LivingEntity; | ||
import net.minecraft.entity.player.PlayerEntity; | ||
import net.minecraft.world.World; | ||
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.CallbackInfoReturnable; | ||
|
||
@Mixin(PlayerEntity.class) | ||
abstract class MixinPlayerEntityClient extends LivingEntity { | ||
protected MixinPlayerEntityClient(EntityType<? extends LivingEntity> entityType, World world) { | ||
super(entityType, world); | ||
} | ||
|
||
@Inject(method = "getActiveEyeHeight(Lnet/minecraft/entity/EntityPose;Lnet/minecraft/entity/EntityDimensions;)F", at = @At("HEAD"), cancellable = true) | ||
public void mca$getActiveEyeHeight(EntityPose pose, EntityDimensions dimensions, CallbackInfoReturnable<Float> cir) { | ||
if (Config.getInstance().adjustPlayerEyesToHeight) { | ||
MCAClient.getPlayerData(getUuid()).ifPresent(data -> { | ||
switch (pose) { | ||
case SWIMMING, FALL_FLYING, SPIN_ATTACK -> { | ||
cir.setReturnValue(0.4f * data.getRawScaleFactor()); | ||
} | ||
case CROUCHING -> { | ||
cir.setReturnValue(1.27f * data.getRawScaleFactor()); | ||
} | ||
default -> { | ||
cir.setReturnValue(1.62f * data.getRawScaleFactor()); | ||
} | ||
} | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,41 @@ | ||
{ | ||
"required": true, | ||
"minVersion": "0.7", | ||
"package": "net.mca.mixin", | ||
"compatibilityLevel": "JAVA_17", | ||
"mixins": [ | ||
"MixinAbstractFurnaceBlockEntity", | ||
"MixinActivity", | ||
"MixinCriteria", | ||
"MixinDefaultParticleType", | ||
"MixinEntityType", | ||
"MixinGoatEntity", | ||
"MixinHorseBaseEntity", | ||
"MixinMemoryModuleType", | ||
"MixinMilkBucketItem", | ||
"MixinPlayerEntity", | ||
"MixinPlayerInventory", | ||
"MixinProtoChunk", | ||
"MixinSensorType", | ||
"MixinServerPlayNetworkHandler", | ||
"MixinServerWorld", | ||
"MixinTranslatableText", | ||
"MixinVillagerEntity", | ||
"MixinVillagerEntityInvoker", | ||
"MixinVillagerProfession", | ||
"MixinZombieVillagerEntity" | ||
], | ||
"client": [ | ||
"client.MixinArmorFeatureRenderer", | ||
"client.MixinGameRenderer", | ||
"client.MixinHeldItemFeatureRenderer", | ||
"client.MixinMessageHandler", | ||
"client.MixinLivingEntityRenderer", | ||
"client.MixinPlayerEntityRenderer", | ||
"client.MixinTranslationStorage" | ||
], | ||
"injectors": { | ||
"defaultRequire": 1 | ||
} | ||
"required": true, | ||
"minVersion": "0.7", | ||
"package": "net.mca.mixin", | ||
"compatibilityLevel": "JAVA_17", | ||
"mixins": [ | ||
"MixinAbstractFurnaceBlockEntity", | ||
"MixinActivity", | ||
"MixinCriteria", | ||
"MixinDefaultParticleType", | ||
"MixinEntityType", | ||
"MixinGoatEntity", | ||
"MixinHorseBaseEntity", | ||
"MixinMemoryModuleType", | ||
"MixinMilkBucketItem", | ||
"MixinPlayerEntity", | ||
"MixinPlayerInventory", | ||
"MixinProtoChunk", | ||
"MixinSensorType", | ||
"MixinServerPlayNetworkHandler", | ||
"MixinServerWorld", | ||
"MixinTranslatableText", | ||
"MixinVillagerEntity", | ||
"MixinVillagerEntityInvoker", | ||
"MixinVillagerProfession", | ||
"MixinZombieVillagerEntity" | ||
], | ||
"client": [ | ||
"client.MixinArmorFeatureRenderer", | ||
"client.MixinGameRenderer", | ||
"client.MixinHeldItemFeatureRenderer", | ||
"client.MixinLivingEntityRenderer", | ||
"client.MixinMessageHandler", | ||
"client.MixinPlayerEntityRenderer", | ||
"client.MixinTranslationStorage", | ||
"client.MixinPlayerEntityClient" | ||
], | ||
"injectors": { | ||
"defaultRequire": 1 | ||
} | ||
} |