mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 11:59:14 +00:00
Fix JABBA-related issues with crafting station slots (#54)
* Fix shift-merging tools voiding items fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11392> * Change 0-sized ItemStacks into null stacks in crafting station attached slots Fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/10425> * Update buildscript * spotlessApply
This commit is contained in:
1 parent
18bfeaff32
commit
39be06c23b
571 files changed
+25959
-28223
No files matched your search
@@ -1,41 +1,36 @@
|
||||
package tconstruct.weaponry.client;
|
||||
|
||||
import tconstruct.weaponry.TinkerWeaponry;
|
||||
import tconstruct.library.weaponry.BowBaseAmmo;
|
||||
import tconstruct.library.weaponry.IWindup;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.event.FOVUpdateEvent;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import tconstruct.library.weaponry.BowBaseAmmo;
|
||||
import tconstruct.library.weaponry.IWindup;
|
||||
import tconstruct.weaponry.TinkerWeaponry;
|
||||
|
||||
public class RenderEventHandler {
|
||||
@SubscribeEvent
|
||||
public void onAimZoom(FOVUpdateEvent event)
|
||||
{
|
||||
if(!event.entity.isUsingItem())
|
||||
return;
|
||||
public void onAimZoom(FOVUpdateEvent event) {
|
||||
if (!event.entity.isUsingItem()) return;
|
||||
|
||||
if(!(event.entity.getItemInUse().getItem() instanceof IWindup))
|
||||
return;
|
||||
if (!(event.entity.getItemInUse().getItem() instanceof IWindup)) return;
|
||||
|
||||
ItemStack weapon = event.entity.getItemInUse();
|
||||
IWindup item = (IWindup) weapon.getItem();
|
||||
|
||||
if(item.zoomOnWindup(weapon))
|
||||
event.newfov = event.fov / (event.fov + (item.getZoom(weapon)-1.0f) * item.getWindupProgress(weapon, event.entity));
|
||||
if (item.zoomOnWindup(weapon))
|
||||
event.newfov = event.fov
|
||||
/ (event.fov + (item.getZoom(weapon) - 1.0f) * item.getWindupProgress(weapon, event.entity));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRenderPlayer(RenderPlayerEvent.Pre event)
|
||||
{
|
||||
if(event.entityPlayer.getCurrentEquippedItem() != null && event.entityPlayer.getCurrentEquippedItem().getItem() == TinkerWeaponry.javelin) {
|
||||
public void onRenderPlayer(RenderPlayerEvent.Pre event) {
|
||||
if (event.entityPlayer.getCurrentEquippedItem() != null
|
||||
&& event.entityPlayer.getCurrentEquippedItem().getItem() == TinkerWeaponry.javelin) {}
|
||||
|
||||
}
|
||||
if (event.entityPlayer.getItemInUse() == null) return;
|
||||
|
||||
if(event.entityPlayer.getItemInUse() == null)
|
||||
return;
|
||||
|
||||
if(event.entityPlayer.getItemInUse().getItem() instanceof BowBaseAmmo) {
|
||||
if (event.entityPlayer.getItemInUse().getItem() instanceof BowBaseAmmo) {
|
||||
event.renderer.modelBipedMain.aimedBow = true;
|
||||
event.renderer.modelArmor.aimedBow = true;
|
||||
event.renderer.modelArmorChestplate.aimedBow = true;
|
||||
|
||||
Reference in new issue
Block a user