Add FOV update event to MCreator

Started by cdc1234 on

Topic category: Feature requests and ideas for MCreator

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Add FOV update event to MCreator

Hello,Klemen.

I noticed that mcreator can create remote items, but currently it does not support zoom when in use.

ComputeFovModifiedEvent.java

Can I open a pull request? It is  a simple feature. May be easy to maintain?

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
net.minecraft.client.player…
Thu, 04/17/2025 - 08:12

net.minecraft.client.player.AbstractClientPlayer#getFieldOfViewModifier

 

public float getFieldOfViewModifier() {
float f = 1.0F;
if (this.getAbilities().flying) {
f *= 1.1F;
}

f *= ((float)this.getAttributeValue(Attributes.MOVEMENT_SPEED) / this.getAbilities().getWalkingSpeed() + 1.0F) / 2.0F;
if (this.getAbilities().getWalkingSpeed() == 0.0F || Float.isNaN(f) || Float.isInfinite(f)) {
f = 1.0F;
}

ItemStack itemstack = this.getUseItem();
if (this.isUsingItem()) {
if (itemstack.is(Items.BOW)) {
int i = this.getTicksUsingItem();
float f1 = (float)i / 20.0F;
if (f1 > 1.0F) {
f1 = 1.0F;
} else {
f1 *= f1;
}

f *= 1.0F - f1 * 0.15F;
} else if (Minecraft.getInstance().options.getCameraType().isFirstPerson() && this.isScoping()) {
return 0.1F;
}
}

return net.neoforged.neoforge.client.ClientHooks.getFieldOfViewModifier(this, f);
}
Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if (itemstack.is(Items.BOW))…
Thu, 04/17/2025 - 08:12
        if (itemstack.is(Items.BOW)) {
int i = this.getTicksUsingItem();
float f1 = (float)i / 20.0F;
if (f1 > 1.0F) {
f1 = 1.0F;
} else {
f1 *= f1;
}

f *= 1.0F - f1 * 0.15F;
Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can I also help make the…
Thu, 04/17/2025 - 08:13

Can I also help make the procedure template after event parameter modifier merged?