mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-27 23:45:57 +00:00
Make handling of curios centralized and add handling for no curios (#2913)
Minor fixes to cosmetic bauble rendering (GL stack overflows), include the missed belt in belt curios
This commit is contained in:
1 parent
2f3a1935cf
commit
05c88fd62a
45 files changed
+1334
-1461
No files matched your search
@@ -10,21 +10,17 @@
|
||||
*/
|
||||
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.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraftforge.fml.network.NetworkEvent;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.core.handler.EquipmentHandler;
|
||||
import vazkii.botania.common.core.handler.ModSounds;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.integration.curios.CurioIntegration;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemDodgeRing;
|
||||
import vazkii.botania.common.item.equipment.tool.terrasteel.ItemTerraSword;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@@ -40,11 +36,7 @@ public class PacketDodge {
|
||||
EntityPlayerMP player = ctx.get().getSender();
|
||||
player.world.playSound(null, player.posX, player.posY, player.posZ, ModSounds.dash, SoundCategory.PLAYERS, 1F, 1F);
|
||||
|
||||
ItemStack ringStack = ItemStack.EMPTY;
|
||||
if(Botania.curiosLoaded) {
|
||||
ringStack = CurioIntegration.findOrEmpty(ModItems.dodgeRing, player);
|
||||
}
|
||||
|
||||
ItemStack ringStack = EquipmentHandler.findOrEmpty(ModItems.dodgeRing, player);
|
||||
if(ringStack.isEmpty()) {
|
||||
player.connection.disconnect(new TextComponentTranslation("botaniamisc.invalidDodge"));
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user