mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-25 14:34:36 +00:00
Removed Railcraft support for the Mana Pool with Minecart.
As the Railcraft API for 1.12.2 is highly unstable, and crashes with the current version of Botania installed, I removed the implementation of IMinecartItem and all corresponding methods. The Mana Pool with Minecart still functions fine with railcraft, but now it doesn't crash anymore
This commit is contained in:
1 parent
8e2b09527a
commit
49638c0aa6
2 files changed
+1
-75
No files matched your search
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import mods.railcraft.api.core.items.IMinecartItem;
|
||||
import net.minecraft.block.BlockRailBase;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -21,14 +19,12 @@ import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.Optional;
|
||||
import vazkii.botania.common.entity.EntityPoolMinecart;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
@Optional.Interface(modid = "railcraft", iface = "mods.railcraft.api.core.items.IMinecartItem", striprefs = true)
|
||||
public class ItemPoolMinecart extends ItemMod implements IMinecartItem {
|
||||
public class ItemPoolMinecart extends ItemMod {
|
||||
|
||||
public ItemPoolMinecart() {
|
||||
super(LibItemNames.POOL_MINECART);
|
||||
@@ -57,25 +53,4 @@ public class ItemPoolMinecart extends ItemMod implements IMinecartItem {
|
||||
return EnumActionResult.PASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBePlacedByNonPlayer(ItemStack cart) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityMinecart placeCart(GameProfile owner, ItemStack cart, World world, int i, int j, int k) {
|
||||
if(BlockRailBase.isRailBlock(world.getBlockState(new BlockPos(i, j, k)))) {
|
||||
if(!world.isRemote) {
|
||||
EntityMinecart entityminecart = new EntityPoolMinecart(world, i + 0.5,j + 0.5, k + 0.5);
|
||||
|
||||
if(cart.hasDisplayName())
|
||||
entityminecart.setCustomNameTag(cart.getDisplayName());
|
||||
|
||||
if(world.spawnEntity(entityminecart))
|
||||
return entityminecart;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user