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

Assorted fixes #1348

Merged
merged 39 commits into from
Dec 26, 2015
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
d967c23
Update ItemArcaneCompendium.java
CraigParton Nov 7, 2015
d66ea48
Expanded ru_RU.lang
BiffiMaps Nov 8, 2015
a3d802b
Update zh_CN.lang
Nov 16, 2015
0a22d66
Update zh_CN.lang
Nov 16, 2015
beca3d8
Fix PR #1
Bogdan-G Nov 20, 2015
903ebd3
Update ItemArcaneCompendium.java
CraigParton Nov 20, 2015
120a867
Optimized random number generation
LemADEC Nov 27, 2015
a34bc5f
Fixed compile error with canTriggerWalking()
LemADEC Nov 27, 2015
3042704
Improved client network upload
LemADEC Nov 27, 2015
be49c3d
Integrated the random optimisation
LemADEC Nov 28, 2015
65f6c45
Updated forge to 1492
LemADEC Nov 28, 2015
dee8b38
Fixed arcane reconstructor animation in SMP
LemADEC Nov 28, 2015
9260abf
Fixed shrink effect transition
LemADEC Nov 28, 2015
50fe488
Fixed rounding with shink effect
LemADEC Nov 28, 2015
d9aec67
Code cleanup
LemADEC Nov 28, 2015
9892d89
Fixed network lag
LemADEC Nov 28, 2015
81079bb
Merge pull request #1 from Bogdan-G/master
LemADEC Nov 28, 2015
758bc99
Merge pull request #2 from CraigParton/master
LemADEC Nov 28, 2015
99548f5
Merge pull request #3 from BiffiMaps/patch-1
LemADEC Nov 28, 2015
e777058
Merge pull request #4 from claybiockiller/master
LemADEC Nov 28, 2015
135a3d8
Refactored shrink handling
LemADEC Nov 28, 2015
267d7d5
Code cleanup
LemADEC Nov 29, 2015
24b9f16
Merge remote-tracking branch 'refs/remotes/Mithion/master'
LemADEC Dec 3, 2015
f98b061
Improved CPU usage a bit
LemADEC Dec 6, 2015
00a71ea
Fixed flowers compatibility with modded world generation
LemADEC Dec 6, 2015
738be97
Added missing textures and name for creative spells
LemADEC Dec 6, 2015
65e83c6
Small server CPU improvement
LemADEC Dec 6, 2015
9ae497d
Fixed console error on missing loop sound
LemADEC Dec 6, 2015
f0d56b2
Fixed disarm crashing client on dedicated server
LemADEC Dec 6, 2015
b754ad3
Code cleanup
LemADEC Dec 6, 2015
2291fbc
Fixed server crash with appropriation spell
LemADEC Dec 11, 2015
f89407a
Improved entangle balance
LemADEC Dec 11, 2015
f462cdb
Added option to support server staff
LemADEC Dec 11, 2015
97764f0
Code cleanup
LemADEC Dec 11, 2015
1e0d00e
Fixed appropriation spell to respect spawn
LemADEC Dec 12, 2015
25dcf27
Fixed control menu translation
LemADEC Dec 12, 2015
96c86d5
Fixed crash with disabled mods
LemADEC Dec 14, 2015
c54f7af
Fixed stack overflow with Arcana guardian retaliation
LemADEC Dec 14, 2015
ea595d9
Code cleanup
LemADEC Dec 20, 2015
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
Prev Previous commit
Next Next commit
Improved CPU usage a bit
Code cleanup
LemADEC committed Dec 6, 2015
commit f98b061bd854c0528b064b45754f768f3e697fc3
15 changes: 9 additions & 6 deletions src/main/java/am2/AMEventHandler.java
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@
import am2.buffs.BuffList;
import am2.buffs.BuffStatModifiers;
import am2.damage.DamageSources;
import am2.enchantments.EnchantmentSoulbound;
import am2.entities.EntityFlicker;
import am2.items.ItemsCommonProxy;
import am2.network.AMNetHandler;
@@ -140,7 +139,6 @@ public void onEntityConstructing(EntityConstructing event){

@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onEntityDeath(LivingDeathEvent event){
String s = EnchantmentSoulbound.class.getName();
EntityLivingBase soonToBeDead = event.entityLiving;
if (soonToBeDead.isPotionActive(BuffList.temporalAnchor.id)){
event.setCanceled(true);
@@ -241,6 +239,8 @@ public void onEntityJump(LivingJumpEvent event){
xVelocity = velocityTarget.motionX * 1.75 * Math.abs(vec.xCoord);
zVelocity = velocityTarget.motionZ * 1.75 * Math.abs(vec.zCoord);
break;
default:
break;
}

float maxHorizontalVelocity = 1.45f;
@@ -320,8 +320,6 @@ public void onEntityLiving(LivingUpdateEvent event){

World world = ent.worldObj;

boolean isRemote = world.isRemote;

BuffStatModifiers.instance.applyStatModifiersBasedOnBuffs(ent);

ExtendedProperties extendedProperties;
@@ -473,6 +471,8 @@ public void onEntityLiving(LivingUpdateEvent event){
case BuffPowerLevel.High:
extendedProperties.setFallProtection(45);
break;
default:
break;
}
}

@@ -484,7 +484,10 @@ public void onEntityLiving(LivingUpdateEvent event){


//slowfall/shrink buff
if (event.entityLiving.isPotionActive(BuffList.slowfall) || event.entityLiving.isPotionActive(BuffList.shrink) || (!ent.isSneaking() && ent instanceof EntityPlayer && AffinityData.For(ent).getAffinityDepth(Affinity.NATURE) == 1.0f)){
// (isSneaking calls DataWatcher which are slow, so we test it late)
if ( event.entityLiving.isPotionActive(BuffList.slowfall)
|| event.entityLiving.isPotionActive(BuffList.shrink)
|| (ent instanceof EntityPlayer && AffinityData.For(ent).getAffinityDepth(Affinity.NATURE) == 1.0f && !ent.isSneaking())){
if (!event.entityLiving.onGround && event.entityLiving.motionY < 0.0D){
event.entityLiving.motionY *= 0.79999999999999998D;
}
@@ -668,7 +671,7 @@ public void onManaCost(ManaCostEvent event){

@SubscribeEvent
public void onPlayerPickupItem(EntityItemPickupEvent event){
if (!(event.entityPlayer instanceof EntityPlayer))
if (event.entityPlayer == null)
return;

if (!event.entityPlayer.worldObj.isRemote && ExtendedProperties.For(event.entityPlayer).getMagicLevel() <= 0 && event.item.getEntityItem().getItem() == ItemsCommonProxy.arcaneCompendium){