Skip to content

Commit

Permalink
Fixed an issue where one could hold W to drive carts without proper e…
Browse files Browse the repository at this point in the history
…ngines/fuel.
  • Loading branch information
Vswe authored and Philip Hansen committed Jun 22, 2014
1 parent 7de1527 commit 05c8b6c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/java/vswe/stevescarts/Carts/MinecartModular.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import net.minecraft.client.audio.MovingSoundMinecartRiding;
import net.minecraft.client.audio.PositionedSound;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityMinecart;
import net.minecraft.entity.player.EntityPlayer;
Expand Down Expand Up @@ -1265,7 +1266,15 @@ public int getSizeInventory()
@Override
protected void func_145821_a(int par1, int par2, int par3, double par4, double par6, Block par8, int par9)
{
super.func_145821_a(par1, par2, par3, par4, par6, par8, par9);
if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityLivingBase) {
float move = ((EntityLivingBase)this.riddenByEntity).moveForward;
((EntityLivingBase)this.riddenByEntity).moveForward = 0;
super.func_145821_a(par1, par2, par3, par4, par6, par8, par9);
((EntityLivingBase)this.riddenByEntity).moveForward = move;
}else{
super.func_145821_a(par1, par2, par3, par4, par6, par8, par9);
}

double d2 = this.pushX * this.pushX + this.pushZ * this.pushZ;

if (d2 > 1.0E-4D && this.motionX * this.motionX + this.motionZ * this.motionZ > 0.001D)
Expand Down
Binary file modified src/main/resources/assets/stevescarts/textures/blocks/Thumbs.db
Binary file not shown.
Binary file modified src/main/resources/assets/stevescarts/textures/items/Thumbs.db
Binary file not shown.

0 comments on commit 05c8b6c

Please sign in to comment.