mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 11:49:37 +00:00
Comment out a ton of bauble stuff
This commit is contained in:
1 parent
d55bc624fc
commit
884280f987
43 files changed
+117
-115
No files matched your search
@@ -163,11 +163,6 @@ public class DummyMethodHandler implements IInternalMethodHandler {
|
||||
@Override
|
||||
public void sparkleFX(World world, double x, double y, double z, float r, float g, float b, float size, int m) {}
|
||||
|
||||
@Override
|
||||
public IInventory getBaublesInventory(EntityPlayer player) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemHandlerModifiable getBaublesInventoryWrapped(EntityPlayer player) {
|
||||
return null;
|
||||
|
||||
@@ -94,8 +94,6 @@ public interface IInternalMethodHandler {
|
||||
|
||||
public int getPassiveFlowerDecay();
|
||||
|
||||
public IInventory getBaublesInventory(EntityPlayer player);
|
||||
|
||||
public IItemHandlerModifiable getBaublesInventoryWrapped(EntityPlayer player);
|
||||
|
||||
public void breakOnAllCursors(EntityPlayer player, Item item, ItemStack stack, BlockPos pos, EnumFacing side);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.client.core.handler;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
@@ -42,7 +41,10 @@ public final class BaubleRenderHandler implements LayerRenderer<EntityPlayer> {
|
||||
if(!ConfigHandler.renderBaubles || player.getActivePotionEffect(MobEffects.INVISIBILITY) != null)
|
||||
return;
|
||||
|
||||
IItemHandler inv = BaublesApi.getBaublesHandler(player);
|
||||
// todo 1.13
|
||||
if (1 == 1)
|
||||
return;
|
||||
IItemHandler inv = null;
|
||||
|
||||
dispatchRenders(inv, player, RenderType.BODY, partialTicks);
|
||||
if(!inv.getStackInSlot(3).isEmpty())
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.client.core.handler;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -80,6 +79,7 @@ public final class HUDHandler {
|
||||
|
||||
public static final ResourceLocation manaBar = new ResourceLocation(LibResources.GUI_MANA_HUD);
|
||||
|
||||
/* todo 1.13
|
||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public static void onDrawScreenPre(RenderGameOverlayEvent.Pre event) {
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
@@ -111,6 +111,7 @@ public final class HUDHandler {
|
||||
profiler.endSection();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onDrawScreenPost(RenderGameOverlayEvent.Post event) {
|
||||
@@ -203,8 +204,8 @@ public final class HUDHandler {
|
||||
boolean anyRequest = false;
|
||||
boolean creative = false;
|
||||
|
||||
IItemHandler mainInv = player.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
|
||||
IItemHandler baublesInv = BaublesApi.getBaublesHandler(player);
|
||||
IItemHandler mainInv = player.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).orElseThrow(NullPointerException::new);
|
||||
IItemHandler baublesInv = null; // todo 1.13
|
||||
|
||||
int invSize = mainInv.getSlots();
|
||||
int size = invSize;
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.client.gui.box;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import baubles.api.IBauble;
|
||||
import baubles.api.cap.IBaublesItemHandler;
|
||||
import baubles.common.container.SlotBauble;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -21,6 +17,7 @@ import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||
import net.minecraftforge.items.SlotItemHandler;
|
||||
import vazkii.botania.api.mana.IManaItem;
|
||||
import vazkii.botania.client.gui.SlotLocked;
|
||||
@@ -31,7 +28,7 @@ import java.util.List;
|
||||
public class ContainerBaubleBox extends Container {
|
||||
|
||||
private final InventoryBaubleBox baubleBoxInv;
|
||||
public IBaublesItemHandler baubles;
|
||||
public IItemHandlerModifiable baubles;
|
||||
|
||||
public ContainerBaubleBox(EntityPlayer player, InventoryBaubleBox boxInv) {
|
||||
int i;
|
||||
@@ -40,6 +37,7 @@ public class ContainerBaubleBox extends Container {
|
||||
IInventory playerInv = player.inventory;
|
||||
baubleBoxInv = boxInv;
|
||||
|
||||
/* todo 1.13
|
||||
baubles = BaublesApi.getBaublesHandler(player);
|
||||
|
||||
addSlotToContainer(new SlotBauble(player, baubles, 0, 8, 8 + 0 * 18));
|
||||
@@ -66,6 +64,7 @@ public class ContainerBaubleBox extends Container {
|
||||
addSlotToContainer(new SlotLocked(playerInv, i, 8 + i * 18, 142));
|
||||
else addSlotToContainer(new Slot(playerInv, i, 8 + i * 18, 142));
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
@@ -78,7 +77,7 @@ public class ContainerBaubleBox extends Container {
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Override
|
||||
public void setAll(List<ItemStack> l) {
|
||||
baubles.setEventBlock(true);
|
||||
// todo 1.13 baubles.setEventBlock(true);
|
||||
super.setAll(l);
|
||||
}
|
||||
|
||||
@@ -100,7 +99,7 @@ public class ContainerBaubleBox extends Container {
|
||||
if(!mergeItemStack(itemstack1, boxEnd, invEnd, true))
|
||||
return ItemStack.EMPTY;
|
||||
} else {
|
||||
if(!itemstack1.isEmpty() && (itemstack1.getItem() instanceof IBauble || itemstack1.getItem() instanceof IManaItem) && !mergeItemStack(itemstack1, boxStart, boxEnd, false))
|
||||
// todo 1.13 if(!itemstack1.isEmpty() && (itemstack1.getItem() instanceof IBauble || itemstack1.getItem() instanceof IManaItem) && !mergeItemStack(itemstack1, boxStart, boxEnd, false))
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ import com.google.common.base.Predicates;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
@@ -10,9 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.core.handler;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import baubles.common.network.PacketHandler;
|
||||
import baubles.common.network.PacketSync;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -178,14 +175,9 @@ public class InternalMethodHandler extends DummyMethodHandler {
|
||||
return ManaNetworkHandler.instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getBaublesInventory(EntityPlayer player) {
|
||||
return BaublesApi.getBaubles(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemHandlerModifiable getBaublesInventoryWrapped(EntityPlayer player) {
|
||||
return BaublesApi.getBaublesHandler(player);
|
||||
return null; // todo 1.13 BaublesApi.getBaublesHandler(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -229,7 +221,6 @@ public class InternalMethodHandler extends DummyMethodHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "BuildCraft|Transport")
|
||||
public boolean isBuildcraftPipe(TileEntity tile) {
|
||||
return false; // tile instanceof IPipeTile; todo buildcraft
|
||||
}
|
||||
@@ -255,12 +246,10 @@ public class InternalMethodHandler extends DummyMethodHandler {
|
||||
return block instanceof BlockModFlower || block instanceof BlockFloatingFlower || block instanceof ISpecialFlower;
|
||||
}
|
||||
|
||||
// todo use our own sync packet or use the autosync system
|
||||
// todo 1.13
|
||||
@Override
|
||||
public void sendBaubleUpdatePacket(EntityPlayer player, int slot) {
|
||||
if(player instanceof EntityPlayerMP) {
|
||||
PacketHandler.INSTANCE.sendTo(new PacketSync(player, slot, BaublesApi.getBaublesHandler(player).getStackInSlot(slot)), (EntityPlayerMP) player);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package vazkii.botania.common.core.handler;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.MobEffects;
|
||||
@@ -41,6 +40,8 @@ public final class PixieHandler {
|
||||
for (ItemStack element : player.inventory.armorInventory)
|
||||
chance += getChance(element);
|
||||
|
||||
// todo 1.13
|
||||
/*
|
||||
IItemHandler baubles = BaublesApi.getBaublesHandler(player);
|
||||
for(int i = 0; i < baubles.getSlots(); i++)
|
||||
chance += getChance(baubles.getStackInSlot(i));
|
||||
@@ -61,6 +62,7 @@ public final class PixieHandler {
|
||||
pixie.onInitialSpawn(player.world.getDifficultyForLocation(new BlockPos(pixie)), null, null);
|
||||
player.world.spawnEntity(pixie);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.entity;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import gnu.trove.map.hash.TObjectIntHashMap;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -113,9 +111,11 @@ public class EntitySpark extends Entity implements ISparkEntity {
|
||||
stacks.addAll(player.inventory.mainInventory);
|
||||
stacks.addAll(player.inventory.armorInventory);
|
||||
|
||||
/* todo 1.13
|
||||
IItemHandler baubles = BaublesApi.getBaublesHandler(player);
|
||||
for (int i = 0; i < baubles.getSlots(); i++)
|
||||
stacks.add(baubles.getStackInSlot(i));
|
||||
*/
|
||||
|
||||
for(ItemStack stack : stacks) {
|
||||
if(stack.isEmpty() || !(stack.getItem() instanceof IManaItem))
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import baubles.api.IBauble;
|
||||
import baubles.api.cap.BaublesCapabilities;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -57,11 +55,13 @@ public class ItemBaubleBox extends ItemMod {
|
||||
@Nonnull
|
||||
@Override
|
||||
public ItemStack insertItem(int slot, @Nonnull ItemStack toInsert, boolean simulate) {
|
||||
/* todo 1.13
|
||||
if(!toInsert.isEmpty()) {
|
||||
boolean isBauble = toInsert.getCapability(BaublesCapabilities.CAPABILITY_ITEM_BAUBLE).isPresent();
|
||||
if(toInsert.getItem() instanceof IManaItem || isBauble)
|
||||
return super.insertItem(slot, toInsert, simulate);
|
||||
}
|
||||
*/
|
||||
return toInsert;
|
||||
}
|
||||
};
|
||||
@@ -87,7 +87,7 @@ public class ItemBaubleBox extends ItemMod {
|
||||
@Nonnull
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, @Nonnull EnumHand hand) {
|
||||
player.openGui(Botania.instance, LibGuiIDs.BAUBLE_BOX, world, hand == EnumHand.OFF_HAND ? 1 : 0, 0, 0);
|
||||
// todo 1.13 player.openGui(Botania.instance, LibGuiIDs.BAUBLE_BOX, world, hand == EnumHand.OFF_HAND ? 1 : 0, 0, 0);
|
||||
return ActionResult.newResult(EnumActionResult.SUCCESS, player.getHeldItem(hand));
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -35,9 +34,11 @@ public class ItemAuraRing extends ItemBauble implements IManaGivingItem {
|
||||
return 10;
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack itemstack) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -10,9 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import baubles.api.IBauble;
|
||||
import baubles.api.cap.IBaublesItemHandler;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
@@ -50,7 +47,7 @@ import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = LibMisc.MOD_ID)
|
||||
public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAttachable, IPhantomInkable {
|
||||
public abstract class ItemBauble extends ItemMod implements ICosmeticAttachable, IPhantomInkable {
|
||||
|
||||
private static final String TAG_HASHCODE = "playerHashcode";
|
||||
private static final String TAG_BAUBLE_UUID_MOST = "baubleUUIDMost";
|
||||
@@ -68,6 +65,7 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
|
||||
// TODO there is still some weirdness going on when dying/returning in the End, figure that out
|
||||
@SubscribeEvent
|
||||
public static void onDeath(LivingDeathEvent evt) {
|
||||
/* todo 1.13
|
||||
if(!evt.getEntityLiving().world.isRemote
|
||||
&& evt.getEntityLiving() instanceof EntityPlayer
|
||||
&& !evt.getEntityLiving().world.getGameRules().getBoolean("keepInventory")
|
||||
@@ -80,6 +78,7 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@@ -89,6 +88,7 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
|
||||
if(!EntityDoppleganger.isTruePlayer(player))
|
||||
return ActionResult.newResult(EnumActionResult.FAIL, stack);
|
||||
|
||||
/* todo 1.13
|
||||
ItemStack toEquip = stack.copy();
|
||||
toEquip.setCount(1);
|
||||
|
||||
@@ -127,6 +127,7 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
return ActionResult.newResult(EnumActionResult.PASS, stack);
|
||||
}
|
||||
@@ -154,17 +155,14 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
|
||||
stacks.add(new TextComponentTranslation("botaniamisc.hasPhantomInk"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEquip(ItemStack stack, EntityLivingBase player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUnequip(ItemStack stack, EntityLivingBase player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWornTick(ItemStack stack, EntityLivingBase player) {
|
||||
if(getLastPlayerHashcode(stack) != player.hashCode()) {
|
||||
onEquippedOrLoadedIntoWorld(stack, player);
|
||||
@@ -172,7 +170,6 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEquipped(ItemStack stack, EntityLivingBase player) {
|
||||
if(player != null) {
|
||||
if(!player.world.isRemote) {
|
||||
@@ -187,7 +184,6 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
|
||||
|
||||
public void onEquippedOrLoadedIntoWorld(ItemStack stack, EntityLivingBase player) {}
|
||||
|
||||
@Override
|
||||
public void onUnequipped(ItemStack stack, EntityLivingBase player) { }
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
@@ -75,10 +74,12 @@ public class ItemBaubleCosmetic extends ItemBauble implements ICosmeticBauble {
|
||||
super.addHiddenTooltip(stack, world, stacks, flags);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.TRINKET;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void onPlayerBaubleRender(ItemStack stack, EntityPlayer player, RenderType type, float partialTicks) {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
@@ -92,10 +91,12 @@ public class ItemBloodPendant extends ItemBauble implements IBrewContainer, IBre
|
||||
}
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.AMULET;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void onWornTick(ItemStack stack, EntityLivingBase player) {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
@@ -41,10 +40,12 @@ public class ItemCloudPendant extends CloudPendantShim implements IBaubleRender
|
||||
super(props);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.AMULET;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.BaublesApi;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.util.concurrent.ListenableFutureTask;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -57,7 +55,7 @@ public class ItemDivaCharm extends ItemBauble implements IManaUsingItem, IBauble
|
||||
Runnable lambda = () -> {
|
||||
EntityLiving target = (EntityLiving) event.getEntityLiving();
|
||||
EntityPlayer player = (EntityPlayer) event.getSource().getImmediateSource();
|
||||
ItemStack amulet = BaublesApi.getBaublesHandler(player).getStackInSlot(6);
|
||||
ItemStack amulet = ItemStack.EMPTY; // todo 1.13 BaublesApi.getBaublesHandler(player).getStackInSlot(6);
|
||||
|
||||
if(!amulet.isEmpty() && amulet.getItem() == this) {
|
||||
final int cost = 250;
|
||||
@@ -90,10 +88,12 @@ public class ItemDivaCharm extends ItemBauble implements IManaUsingItem, IBauble
|
||||
}
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.CHARM;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public boolean usesMana(ItemStack stack) {
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.BaublesApi;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
@@ -52,8 +50,8 @@ public class ItemDodgeRing extends ItemBauble {
|
||||
public static void onKeyDown(KeyInputEvent event) {
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
|
||||
IItemHandler baublesInv = BaublesApi.getBaublesHandler(mc.player);
|
||||
int slot = BaublesApi.isBaubleEquipped(mc.player, ModItems.dodgeRing);
|
||||
IItemHandler baublesInv = null; // BaublesApi.getBaublesHandler(mc.player);
|
||||
int slot = -1; // todo 1.13 BaublesApi.isBaubleEquipped(mc.player, ModItems.dodgeRing);
|
||||
if(slot < 0) {
|
||||
return;
|
||||
}
|
||||
@@ -123,9 +121,11 @@ public class ItemDodgeRing extends ItemBauble {
|
||||
GlStateManager.color4f(1F, 1F, 1F, 1F);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.BaublesApi;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
@@ -92,10 +90,12 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.HEAD;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void fillItemGroup(@Nonnull ItemGroup tab, @Nonnull NonNullList<ItemStack> list) {
|
||||
@@ -185,7 +185,7 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub
|
||||
public void updatePlayerFlyStatus(LivingUpdateEvent event) {
|
||||
if(event.getEntityLiving() instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) event.getEntityLiving();
|
||||
ItemStack tiara = BaublesApi.getBaublesHandler(player).getStackInSlot(4);
|
||||
ItemStack tiara = ItemStack.EMPTY; // todo 1.13 BaublesApi.getBaublesHandler(player).getStackInSlot(4);
|
||||
int left = ItemNBTHelper.getInt(tiara, TAG_TIME_LEFT, MAX_FLY_TIME);
|
||||
|
||||
if(playersWithFlight.contains(playerStr(player))) {
|
||||
@@ -284,7 +284,7 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub
|
||||
}
|
||||
|
||||
private boolean shouldPlayerHaveFlight(EntityPlayer player) {
|
||||
ItemStack armor = BaublesApi.getBaublesHandler(player).getStackInSlot(4);
|
||||
ItemStack armor = ItemStack.EMPTY; // todo 1.13 BaublesApi.getBaublesHandler(player).getStackInSlot(4);
|
||||
if(!armor.isEmpty() && armor.getItem() == this) {
|
||||
int left = ItemNBTHelper.getInt(armor, TAG_TIME_LEFT, MAX_FLY_TIME);
|
||||
boolean flying = ItemNBTHelper.getBoolean(armor, TAG_FLYING, false);
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.BaublesApi;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
@@ -50,18 +48,22 @@ public class ItemGoddessCharm extends ItemBauble implements IManaUsingItem, IBau
|
||||
List<EntityPlayer> players = event.getWorld().getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(vec.x, vec.y, vec.z, vec.x, vec.y, vec.z).grow(8));
|
||||
|
||||
for(EntityPlayer player : players) {
|
||||
/* todo 1.13
|
||||
ItemStack charm = BaublesApi.getBaublesHandler(player).getStackInSlot(6);
|
||||
if(!charm.isEmpty() && charm.getItem() instanceof ItemGoddessCharm && ManaItemHandler.requestManaExact(charm, player, COST, true)) {
|
||||
event.getAffectedBlocks().clear();
|
||||
return;
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.CHARM;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.BaublesApi;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
@@ -52,7 +50,7 @@ public class ItemHolyCloak extends ItemBauble implements IBaubleRender {
|
||||
private void onPlayerDamage(LivingHurtEvent event) {
|
||||
if(event.getEntityLiving() instanceof EntityPlayer && !event.getSource().canHarmInCreative()) {
|
||||
EntityPlayer player = (EntityPlayer) event.getEntityLiving();
|
||||
ItemStack belt = BaublesApi.getBaublesHandler(player).getStackInSlot(5);
|
||||
ItemStack belt = ItemStack.EMPTY; // todo 1.13 BaublesApi.getBaublesHandler(player).getStackInSlot(5);
|
||||
if(!belt.isEmpty() && belt.getItem() instanceof ItemHolyCloak && !isInEffect(belt)) {
|
||||
ItemHolyCloak cloak = (ItemHolyCloak) belt.getItem();
|
||||
int cooldown = getCooldown(belt);
|
||||
@@ -94,10 +92,12 @@ public class ItemHolyCloak extends ItemBauble implements IBaubleRender {
|
||||
return 200;
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.BODY;
|
||||
}
|
||||
*/
|
||||
|
||||
public static int getCooldown(ItemStack stack) {
|
||||
return ItemNBTHelper.getInt(stack, TAG_COOLDOWN, 0);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
@@ -35,10 +34,12 @@ public class ItemIcePendant extends ItemBauble implements IBaubleRender {
|
||||
super(props);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack itemstack) {
|
||||
return BaubleType.AMULET;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void onWornTick(ItemStack stack, EntityLivingBase entity) {
|
||||
|
||||
+2
-1
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.MobEffects;
|
||||
@@ -26,10 +25,12 @@ public class ItemInvisibilityCloak extends ItemBauble implements IManaUsingItem
|
||||
super(props);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.BODY;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void onUnequipped(ItemStack stack, EntityLivingBase player) {
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.BaublesApi;
|
||||
import it.unimi.dsi.fastutil.ints.IntArrayList;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
@@ -144,7 +142,7 @@ public class ItemItemFinder extends ItemBauble implements IBaubleRender {
|
||||
} else if(e instanceof EntityPlayer) {
|
||||
EntityPlayer player_ = (EntityPlayer) e;
|
||||
LazyOptional<IItemHandler> playerInv = player.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY);
|
||||
IItemHandler binv = BaublesApi.getBaublesHandler(player);
|
||||
LazyOptional<IItemHandler> binv = LazyOptional.empty(); // todo 1.13 BaublesApi.getBaublesHandler(player);
|
||||
if(scanInventory(binv, pstack) || scanInventory(playerInv, pstack))
|
||||
entIdBuilder.add(player_.getEntityId());
|
||||
|
||||
@@ -204,10 +202,12 @@ public class ItemItemFinder extends ItemBauble implements IBaubleRender {
|
||||
}).orElse(false);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.HEAD;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import com.google.common.collect.Multimap;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
@@ -35,10 +34,12 @@ public class ItemKnockbackBelt extends ItemBaubleModifier implements IBaubleRend
|
||||
super(props);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack itemstack) {
|
||||
return BaubleType.BELT;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
void fillModifiers(Multimap<String, AttributeModifier> attributes, ItemStack stack) {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
@@ -39,10 +38,12 @@ public class ItemLavaPendant extends ItemBauble implements IBaubleRender {
|
||||
player.extinguish();
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack itemstack) {
|
||||
return BaubleType.AMULET;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.BaublesApi;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@@ -61,6 +59,7 @@ public class ItemMagnetRing extends ItemBauble {
|
||||
}
|
||||
|
||||
private void onTossItem(ItemTossEvent event) {
|
||||
/* todo 1.13
|
||||
IItemHandler inv = BaublesApi.getBaublesHandler(event.getPlayer());
|
||||
for(int i = 0; i < inv.getSlots(); i++) {
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
@@ -69,6 +68,7 @@ public class ItemMagnetRing extends ItemBauble {
|
||||
BotaniaAPI.internalHandler.sendBaubleUpdatePacket(event.getPlayer(), i);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -134,10 +134,12 @@ public class ItemMagnetRing extends ItemBauble {
|
||||
ItemNBTHelper.setInt(stack, TAG_COOLDOWN, cooldown);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -36,10 +35,12 @@ public class ItemManaRing extends ItemBauble implements IManaItem, IManaTooltipD
|
||||
super(props);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack itemstack) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void fillItemGroup(@Nonnull ItemGroup tab, @Nonnull NonNullList<ItemStack> stacks) {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.MobEffects;
|
||||
@@ -54,10 +53,12 @@ public class ItemMiningRing extends ItemBauble implements IManaUsingItem {
|
||||
player.removePotionEffect(MobEffects.HASTE);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public boolean usesMana(ItemStack stack) {
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.BaublesApi;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockRedstoneComparator;
|
||||
import net.minecraft.block.BlockRedstoneRepeater;
|
||||
@@ -43,10 +41,12 @@ public class ItemMonocle extends ItemBauble implements IBurstViewerBauble, ICosm
|
||||
super(props);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.CHARM;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -104,7 +104,7 @@ public class ItemMonocle extends ItemBauble implements IBurstViewerBauble, ICosm
|
||||
|
||||
public static boolean hasMonocle(EntityPlayer player) {
|
||||
for(int i = 0; i < 7; i++) {
|
||||
ItemStack stack = BaublesApi.getBaublesHandler(player).getStackInSlot(i);
|
||||
ItemStack stack = ItemStack.EMPTY; // todo 1.13 BaublesApi.getBaublesHandler(player).getStackInSlot(i);
|
||||
if(!stack.isEmpty()) {
|
||||
Item item = stack.getItem();
|
||||
if(item instanceof IBurstViewerBauble)
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.api.item.IPixieSpawner;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
@@ -21,10 +20,12 @@ public class ItemPixieRing extends ItemBauble implements IPixieSpawner {
|
||||
super(props);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public float getPixieChance(ItemStack stack) {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import com.google.common.collect.Multimap;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -28,9 +27,11 @@ public class ItemReachRing extends ItemBaubleModifier {
|
||||
attributes.put(EntityPlayer.REACH_DISTANCE.getName(), new AttributeModifier(getBaubleUUID(stack), "Reach Ring", 3.5, 0).setSaved(false));
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
@@ -44,10 +43,12 @@ public class ItemSuperLavaPendant extends ItemBauble implements IBaubleRender {
|
||||
living.isImmuneToFire = false;
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack itemstack) {
|
||||
return BaubleType.AMULET;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -84,9 +83,11 @@ public class ItemSwapRing extends ItemBauble {
|
||||
}
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
@@ -65,10 +64,12 @@ public class ItemThirdEye extends ItemBauble implements IManaUsingItem, IBaubleR
|
||||
}
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.BODY;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public boolean usesMana(ItemStack stack) {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import com.google.common.base.Predicates;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
@@ -42,10 +41,12 @@ public class ItemTinyPlanet extends ItemBauble implements IBaubleRender {
|
||||
super(props);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack itemstack) {
|
||||
return BaubleType.CHARM;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void onWornTick(ItemStack stack, EntityLivingBase player) {
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.BaublesApi;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
@@ -62,10 +60,12 @@ public class ItemTravelBelt extends ItemBauble implements IBaubleRender, IManaUs
|
||||
this.fallBuffer = fallBuffer;
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack itemstack) {
|
||||
return BaubleType.BELT;
|
||||
}
|
||||
*/
|
||||
|
||||
@SubscribeEvent
|
||||
public void updatePlayerStepStatus(LivingUpdateEvent event) {
|
||||
@@ -73,7 +73,7 @@ public class ItemTravelBelt extends ItemBauble implements IBaubleRender, IManaUs
|
||||
EntityPlayer player = (EntityPlayer) event.getEntityLiving();
|
||||
String s = playerStr(player);
|
||||
|
||||
ItemStack belt = BaublesApi.getBaublesHandler(player).getStackInSlot(3);
|
||||
ItemStack belt = ItemStack.EMPTY; // todo 1.13 BaublesApi.getBaublesHandler(player).getStackInSlot(3);
|
||||
if(playersWithStepup.contains(s)) {
|
||||
if(shouldPlayerHaveStepup(player)) {
|
||||
ItemTravelBelt beltItem = (ItemTravelBelt) belt.getItem();
|
||||
@@ -116,7 +116,7 @@ public class ItemTravelBelt extends ItemBauble implements IBaubleRender, IManaUs
|
||||
public void onPlayerJump(LivingJumpEvent event) {
|
||||
if(event.getEntityLiving() instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) event.getEntityLiving();
|
||||
ItemStack belt = BaublesApi.getBaublesHandler(player).getStackInSlot(3);
|
||||
ItemStack belt = ItemStack.EMPTY; // todo 1.13 BaublesApi.getBaublesHandler(player).getStackInSlot(3);
|
||||
|
||||
if(!belt.isEmpty() && belt.getItem() instanceof ItemTravelBelt && ManaItemHandler.requestManaExact(belt, player, COST, false)) {
|
||||
player.motionY += ((ItemTravelBelt) belt.getItem()).jump;
|
||||
@@ -126,7 +126,7 @@ public class ItemTravelBelt extends ItemBauble implements IBaubleRender, IManaUs
|
||||
}
|
||||
|
||||
private boolean shouldPlayerHaveStepup(EntityPlayer player) {
|
||||
ItemStack armor = BaublesApi.getBaublesHandler(player).getStackInSlot(3);
|
||||
ItemStack armor = ItemStack.EMPTY; // todo 1.13 BaublesApi.getBaublesHandler(player).getStackInSlot(3);
|
||||
return !armor.isEmpty() && armor.getItem() instanceof ItemTravelBelt && ManaItemHandler.requestManaExact(armor, player, COST, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.BaublesApi;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -37,7 +35,7 @@ public class ItemWaterRing extends ItemBauble implements IManaUsingItem {
|
||||
|
||||
if(player.isInWaterOrBubbleColumn()) {
|
||||
if(player instanceof EntityPlayer) {
|
||||
ItemStack firstRing = BaublesApi.getBaublesHandler((EntityPlayer) player).getStackInSlot(1);
|
||||
ItemStack firstRing = ItemStack.EMPTY; // todo 1.13 BaublesApi.getBaublesHandler((EntityPlayer) player).getStackInSlot(1);
|
||||
if(!firstRing.isEmpty() && firstRing.getItem() instanceof ItemWaterRing && firstRing != stack) {
|
||||
return;
|
||||
}
|
||||
@@ -77,10 +75,12 @@ public class ItemWaterRing extends ItemBauble implements IManaUsingItem {
|
||||
player.removePotionEffect(MobEffects.NIGHT_VISION);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public boolean usesMana(ItemStack stack) {
|
||||
|
||||
-1
@@ -13,7 +13,6 @@ package vazkii.botania.common.item.interaction.thaumcraft;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.Optional;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import vazkii.botania.common.item.equipment.armor.terrasteel.ItemTerrasteelHelm;
|
||||
|
||||
@@ -15,8 +15,6 @@ import java.util.List;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.BaublesApi;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -72,7 +70,8 @@ public class ItemLokiRing extends ItemRelicBauble implements IWireframeCoordinat
|
||||
return;
|
||||
|
||||
int slot = -1;
|
||||
IItemHandler inv = BaublesApi.getBaublesHandler(player);
|
||||
if (1==1) return; // todo 1.13
|
||||
IItemHandler inv = null; // BaublesApi.getBaublesHandler(player);
|
||||
for(int i = 0; i < inv.getSlots(); i++) {
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
if(stack == lokiRing) {
|
||||
@@ -152,10 +151,12 @@ public class ItemLokiRing extends ItemRelicBauble implements IWireframeCoordinat
|
||||
}
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void onUnequipped(ItemStack stack, EntityLivingBase player) {
|
||||
@@ -194,8 +195,8 @@ public class ItemLokiRing extends ItemRelicBauble implements IWireframeCoordinat
|
||||
}
|
||||
|
||||
private static ItemStack getLokiRing(EntityPlayer player) {
|
||||
IItemHandler baubles = BaublesApi.getBaublesHandler(player);
|
||||
int slot = BaublesApi.isBaubleEquipped(player, ModItems.lokiRing);
|
||||
IItemHandler baubles = null; // BaublesApi.getBaublesHandler(player);
|
||||
int slot = -1; // todo 1.13 BaublesApi.isBaubleEquipped(player, ModItems.lokiRing);
|
||||
if (slot < 0) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.relic;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.BaublesApi;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -69,14 +67,16 @@ public class ItemOdinRing extends ItemRelicBauble {
|
||||
}
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
*/
|
||||
|
||||
public static ItemStack getOdinRing(EntityPlayer player) {
|
||||
IItemHandler baubles = BaublesApi.getBaublesHandler(player);
|
||||
int slot = BaublesApi.isBaubleEquipped(player, ModItems.odinRing);
|
||||
IItemHandler baubles = null; // BaublesApi.getBaublesHandler(player);
|
||||
int slot = -1; // todo 1.13 BaublesApi.isBaubleEquipped(player, ModItems.odinRing);
|
||||
if (slot < 0) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.relic;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.BaublesApi;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -26,10 +24,12 @@ public class ItemThorRing extends ItemRelicBauble {
|
||||
super(props);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public ResourceLocation getAdvancement() {
|
||||
@@ -37,8 +37,8 @@ public class ItemThorRing extends ItemRelicBauble {
|
||||
}
|
||||
|
||||
public static ItemStack getThorRing(EntityPlayer player) {
|
||||
IItemHandler baubles = BaublesApi.getBaublesHandler(player);
|
||||
int slot = BaublesApi.isBaubleEquipped(player, ModItems.thorRing);
|
||||
IItemHandler baubles = null; // BaublesApi.getBaublesHandler(player);
|
||||
int slot = -1; // todo 1.13 BaublesApi.isBaubleEquipped(player, ModItems.thorRing);
|
||||
if (slot < 0) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.network;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -39,8 +38,9 @@ public class PacketDodge {
|
||||
EntityPlayerMP player = ctx.get().getSender();
|
||||
player.world.playSound(null, player.posX, player.posY, player.posZ, ModSounds.dash, SoundCategory.PLAYERS, 1F, 1F);
|
||||
|
||||
IItemHandler baublesInv = BaublesApi.getBaublesHandler(player);
|
||||
int slot = BaublesApi.isBaubleEquipped(player, ModItems.dodgeRing);
|
||||
// todo 1.13
|
||||
IItemHandler baublesInv = null; // BaublesApi.getBaublesHandler(player);
|
||||
int slot = -1; // BaublesApi.isBaubleEquipped(player, ModItems.dodgeRing);
|
||||
if(slot < 0) {
|
||||
player.connection.disconnect(new TextComponentTranslation("botaniamisc.invalidDodge"));
|
||||
return;
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.network;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -34,6 +33,7 @@ public class PacketJump {
|
||||
public void handle(Supplier<NetworkEvent.Context> ctx) {
|
||||
ctx.get().enqueueWork(() -> {
|
||||
EntityPlayerMP player = ctx.get().getSender();
|
||||
/* todo 1.13
|
||||
IItemHandler baublesInv = BaublesApi.getBaublesHandler(player);
|
||||
ItemStack amuletStack = baublesInv.getStackInSlot(0);
|
||||
|
||||
@@ -46,6 +46,7 @@ public class PacketJump {
|
||||
if(!belt.isEmpty() && belt.getItem() instanceof ItemTravelBelt)
|
||||
player.fallDistance = -((ItemTravelBelt) belt.getItem()).fallBuffer * ((CloudPendantShim) amuletStack.getItem()).getMaxAllowedJumps();
|
||||
}
|
||||
*/
|
||||
});
|
||||
ctx.get().setPacketHandled(true);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user