Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Forge version #1231

Merged
merged 1 commit into from
Jul 17, 2023
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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ org.gradle.daemon=false
org.gradle.jvmargs=-Xmx3G
#29.07.14 17:00
minecraft_version=1.20.1
forge_version=47.1.0
forge_version=47.1.21
mcp_mappings=1.19.3-2022.12.18-1.20.1
mcp_channel=parchment
main_version=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ public void onEntityVisibilityCheck(LivingEvent.@NotNull LivingVisibilityEvent e
}

@SubscribeEvent
public void onEyeHeightSet(EntityEvent.@NotNull Size event) {
public void onEyeHeightSet(EntityEvent.@NotNull EyeHeight event) {
if (event.getEntity() instanceof VampireBaseEntity || event.getEntity() instanceof HunterBaseEntity) {
event.setNewEyeHeight(event.getOldEyeHeight() * 0.875f);
event.setNewEyeHeight(event.getOriginalEyeHeight() * 0.875f);
}
if (event.getEntity() instanceof LivingEntity) {
//(CoffinBlock.setSleepSize(event, ((LivingEntity) event.getEntity()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,25 @@ public void blockDestroyed(BlockEvent.@NotNull BreakEvent event) {
}

@SubscribeEvent
public void eyeHeight(EntityEvent.@NotNull Size event) {
public void size(EntityEvent.@NotNull Size event) {
if (event.getEntity() instanceof Player && ((Player) event.getEntity()).getInventory() != null /*make sure we are not in the player's contructor*/) {
if (event.getEntity().isAlive() && event.getEntity().position().lengthSqr() != 0 && event.getEntity().getVehicle() == null) { //Do not attempt to get capability while entity is being initialized
if (VampirismPlayerAttributes.get((Player) event.getEntity()).getVampSpecial().bat) {
event.setNewSize(BatVampireAction.BAT_SIZE);
event.setNewEyeHeight(BatVampireAction.BAT_EYE_HEIGHT);
} else if (VampirismPlayerAttributes.get((Player) event.getEntity()).getVampSpecial().isDBNO) {
event.setNewSize(EntityDimensions.fixed(0.6f, 0.95f));
}
}
}
}

@SubscribeEvent
public void eyeHeight(EntityEvent.@NotNull EyeHeight event) {
if (event.getEntity() instanceof Player && ((Player) event.getEntity()).getInventory() != null /*make sure we are not in the player's contructor*/) {
if (event.getEntity().isAlive() && event.getEntity().position().lengthSqr() != 0 && event.getEntity().getVehicle() == null) { //Do not attempt to get capability while entity is being initialized
if (VampirismPlayerAttributes.get((Player) event.getEntity()).getVampSpecial().bat) {
event.setNewEyeHeight(BatVampireAction.BAT_EYE_HEIGHT);
} else if (VampirismPlayerAttributes.get((Player) event.getEntity()).getVampSpecial().isDBNO) {
event.setNewEyeHeight(0.725f);
}
}
Expand Down