mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-13 05:54:01 +01:00
Fix minecart coupling item dupe
This commit is contained in:
parent
5975a3cbac
commit
0aaa09260b
@ -4,6 +4,8 @@ import com.simibubi.create.AllItems;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.train.capability.CapabilityMinecartController;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.train.capability.MinecartController;
|
||||
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.minecart.AbstractMinecartEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
@ -78,6 +80,11 @@ public class MinecartCouplingItem extends Item {
|
||||
if (event.getWorld().isRemote)
|
||||
return true;
|
||||
|
||||
for (boolean forward : Iterate.trueAndFalse) {
|
||||
if (controller.hasContraptionCoupling(forward))
|
||||
couplings--;
|
||||
}
|
||||
|
||||
CouplingHandler.status(player, "removed");
|
||||
controller.decouple();
|
||||
if (!player.isCreative())
|
||||
|
Loading…
Reference in New Issue
Block a user