mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Major Flamethrower work - finished networking and implemented active state management. Active sound effects work, too.
This commit is contained in:
1 parent
c9f569fd4a
commit
2f4d545fb5
10 files changed
+131
-33
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package mekanism.common;
|
||||
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.common.item.ItemFlamethrower;
|
||||
import mekanism.common.item.ItemFreeRunners;
|
||||
import mekanism.common.item.ItemGasMask;
|
||||
import mekanism.common.item.ItemJetpack;
|
||||
@@ -95,6 +96,11 @@ public class CommonPlayerTickHandler
|
||||
player.stepHeight = 0.5F;
|
||||
}
|
||||
}
|
||||
|
||||
if(isFlamethrowerOn(player))
|
||||
{
|
||||
//TODO spawn flame entities
|
||||
}
|
||||
|
||||
if(isJetpackOn(player))
|
||||
{
|
||||
@@ -210,4 +216,17 @@ public class CommonPlayerTickHandler
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isFlamethrowerOn(EntityPlayer player)
|
||||
{
|
||||
if(Mekanism.flamethrowerActive.contains(player.getCommandSenderName()))
|
||||
{
|
||||
if(player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() instanceof ItemFlamethrower)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user