mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 17:04:24 +00:00
Exo-Armor start
This commit is contained in:
1 parent
6efd8a83fd
commit
6dd171c27a
14 files changed
+131
-12
No files matched your search
@@ -15,8 +15,10 @@ import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.attributes.AttributeInstance;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.potion.*;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.GuiIngameForge;
|
||||
import net.minecraftforge.client.event.*;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||
@@ -239,6 +241,35 @@ public class TClientEvents
|
||||
}
|
||||
|
||||
double zLevel = 0;
|
||||
|
||||
@ForgeSubscribe
|
||||
public void fovModifier(FOVUpdateEvent event)
|
||||
{
|
||||
float f = 1.0F;
|
||||
|
||||
if (event.entity.capabilities.isFlying)
|
||||
{
|
||||
f *= 1.1F;
|
||||
}
|
||||
|
||||
if (event.entity.isUsingItem() && event.entity.getItemInUse().itemID == Item.bow.itemID)
|
||||
{
|
||||
int i = event.entity.getItemInUseDuration();
|
||||
float f1 = (float) i / 20.0F;
|
||||
|
||||
if (f1 > 1.0F)
|
||||
{
|
||||
f1 = 1.0F;
|
||||
}
|
||||
else
|
||||
{
|
||||
f1 *= f1;
|
||||
}
|
||||
|
||||
f *= 1.0F - f1 * 0.15F;
|
||||
}
|
||||
event.newfov = f;
|
||||
}
|
||||
|
||||
/* Armor */
|
||||
ModelBiped model = new ModelBiped(5f);
|
||||
|
||||
Reference in new issue
Block a user