mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 12:42:50 +00:00
more curio stuff
This commit is contained in:
1 parent
5fbf520c1d
commit
58ce052176
28 files changed
+370
-330
No files matched your search
@@ -10,16 +10,14 @@
|
||||
*/
|
||||
package vazkii.botania.common.network;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraftforge.fml.network.NetworkEvent;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.bauble.CloudPendantShim;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.integration.curios.CurioIntegration;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemCloudPendant;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemTravelBelt;
|
||||
import vazkii.botania.common.item.equipment.tool.terrasteel.ItemTerraSword;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@@ -33,20 +31,18 @@ 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);
|
||||
|
||||
if(!amuletStack.isEmpty() && amuletStack.getItem() instanceof CloudPendantShim) {
|
||||
player.addExhaustion(0.3F);
|
||||
player.fallDistance = 0;
|
||||
if(Botania.curiosLoaded) {
|
||||
ItemStack amuletStack = CurioIntegration.findOrEmpty(s -> s.getItem() instanceof ItemCloudPendant, player);
|
||||
if(!amuletStack.isEmpty()) {
|
||||
player.addExhaustion(0.3F);
|
||||
player.fallDistance = 0;
|
||||
|
||||
ItemStack belt = BaublesApi.getBaublesHandler(player).getStackInSlot(3);
|
||||
|
||||
if(!belt.isEmpty() && belt.getItem() instanceof ItemTravelBelt)
|
||||
player.fallDistance = -((ItemTravelBelt) belt.getItem()).fallBuffer * ((CloudPendantShim) amuletStack.getItem()).getMaxAllowedJumps();
|
||||
ItemStack belt = CurioIntegration.findOrEmpty(s -> s.getItem() instanceof ItemTravelBelt, player);
|
||||
if(!belt.isEmpty())
|
||||
player.fallDistance = -((ItemTravelBelt) belt.getItem()).fallBuffer * ((ItemCloudPendant) amuletStack.getItem()).getMaxAllowedJumps();
|
||||
}
|
||||
}
|
||||
*/
|
||||
});
|
||||
ctx.get().setPacketHandled(true);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user