Skip to content

Commit

Permalink
Added and fixed tons of clientside fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphiMC committed Nov 26, 2023
1 parent a50dc89 commit be8c365
Show file tree
Hide file tree
Showing 53 changed files with 2,330 additions and 645 deletions.
11 changes: 8 additions & 3 deletions src/main/java/de/florianmichael/viafabricplus/ViaFabricPlus.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import de.florianmichael.viafabricplus.event.PostGameLoadCallback;
import de.florianmichael.viafabricplus.event.PreLoadCallback;
import de.florianmichael.viafabricplus.fixes.ClientsideFixes;
import de.florianmichael.viafabricplus.fixes.account.BedrockAccountHandler;
import de.florianmichael.viafabricplus.fixes.account.ClassiCubeAccountHandler;
import de.florianmichael.viafabricplus.fixes.classic.CustomClassicProtocolExtensions;
import de.florianmichael.viafabricplus.fixes.classic.screen.ClassicItemSelectionScreen;
import de.florianmichael.viafabricplus.event.PostGameLoadCallback;
import de.florianmichael.viafabricplus.event.PreLoadCallback;
import de.florianmichael.viafabricplus.mappings.CharacterMappings;
import de.florianmichael.viafabricplus.mappings.ItemReleaseVersionMappings;
import de.florianmichael.viafabricplus.mappings.PackFormatsMappings;
Expand All @@ -53,7 +53,6 @@
* - Bedrock scaffolding should be added as soon as ViaBedrock supports block placement (see https://github.com/ViaVersion/ViaFabricPlus/issues/204)
*
* TODO | Movement
* - Cobwebs in <= b1.7.3 are broken (movement has been changed)
* - X/Z Face based jump movement in <= 1.13.2 is broken (https://github.com/ViaVersion/ViaFabricPlus/issues/189)
* - Collision hit boxes has been changed (https://github.com/ViaVersion/ViaFabricPlus/issues/195)
* - Blit-jump is not supported in <= 1.8.9 (https://github.com/ViaVersion/ViaFabricPlus/issues/225)
Expand All @@ -66,6 +65,12 @@
* - Recode config save base to support singleton Jsons
* - Rebase fixes package / change all packages
* - Fix auto detect to not be a huge mess
* - Fix MixinAbstractDonkeyEntity
* - Boats are probably broken. Check entity height offset fix
* - Check TO DO in MixinEntity
* - Sort injection methods in fixes package by version
* - Add setting for revertOnlyPlayerCramming
* - Add setting for MixinLockableContainerBlockEntity
*/
public class ViaFabricPlus {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RotationAxis;

public class BoatRenderer_1_8 extends EntityRenderer<BoatEntity> {
public class BoatRenderer1_8 extends EntityRenderer<BoatEntity> {
private static final Identifier TEXTURE = new Identifier("viafabricplus", "textures/boat_1_8.png");
private final BoatModel_1_8 model;

public BoatRenderer_1_8(EntityRendererFactory.Context ctx) {
public BoatRenderer1_8(EntityRendererFactory.Context ctx) {
super(ctx);
shadowRadius = 0.5F;
model = new BoatModel_1_8(ctx.getPart(BoatModel_1_8.MODEL_LAYER));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
package de.florianmichael.viafabricplus.fixes;

import de.florianmichael.viafabricplus.protocolhack.ProtocolHack;
import net.minecraft.entity.*;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityDimensions;
import net.minecraft.entity.EntityPose;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.boss.dragon.EnderDragonEntity;
import net.minecraft.entity.decoration.ArmorStandEntity;
import net.minecraft.entity.mob.*;
Expand Down Expand Up @@ -141,9 +144,7 @@ public static Vector3f getMountedHeightOffset(final Entity entity, final Entity
}

public static double getHeightOffset(final Entity entity) {
if (entity instanceof AllayEntity) {
return ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_19_4) ? 0 : 0.4;
} else if (entity instanceof ArmorStandEntity armorStandEntity && !armorStandEntity.isMarker()) {
if (entity instanceof ArmorStandEntity armorStandEntity && !armorStandEntity.isMarker()) {
return 0.1;
} else if (entity instanceof EndermiteEntity) {
return 0.1;
Expand All @@ -153,7 +154,11 @@ public static double getHeightOffset(final Entity entity) {
return !(shulkerEntity.getVehicle() instanceof BoatEntity) && vehicleType != EntityType.MINECART ? 0 : 0.1875 - getMountedHeightOffset(shulkerEntity.getVehicle(), null).y;
} else if (entity instanceof SilverfishEntity) {
return 0.1;
} else if (entity instanceof VexEntity) {
} else if (entity instanceof AllayEntity || entity instanceof VexEntity) {
if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_19_1tor1_19_2)) {
return 0D;
}

return 0.4;
} else if (entity instanceof ZombifiedPiglinEntity zombifiedPiglinEntity) {
return zombifiedPiglinEntity.isBaby() ? -0.05 : -0.45;
Expand Down
Loading

0 comments on commit be8c365

Please sign in to comment.