Bump tools to 1.1, fix entity drop adding (#258)
This commit is contained in:
parent
9480c13f6f
commit
c809b8de08
@ -60,7 +60,7 @@ dependencies {
|
||||
implementation 'net.md-5:bungeecord-chat:1.16-R0.4'
|
||||
implementation 'mysql:mysql-connector-java:5.1.49'
|
||||
implementation 'org.yaml:snakeyaml:1.27'
|
||||
implementation 'io.izzel:tools:1.0.+'
|
||||
implementation 'io.izzel:tools:1.1.+'
|
||||
implementation project(':arclight-api')
|
||||
implementation project(':i18n-config')
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package io.izzel.arclight.common.mod.server.event;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import io.izzel.arclight.common.mod.util.ArclightCaptures;
|
||||
import io.izzel.tools.collection.XmapList;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.item.ItemEntity;
|
||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||
@ -33,8 +33,9 @@ public class EntityEventDispatcher {
|
||||
if (!(drops instanceof ArrayList)) {
|
||||
drops = new ArrayList<>(drops);
|
||||
}
|
||||
List<ItemStack> itemStackList = Lists.transform((List<ItemEntity>) drops,
|
||||
(ItemEntity entity) -> CraftItemStack.asCraftMirror(entity.getItem()));
|
||||
List<ItemStack> itemStackList = XmapList.create((List<ItemEntity>) drops, ItemStack.class,
|
||||
(ItemEntity entity) -> CraftItemStack.asCraftMirror(entity.getItem()),
|
||||
itemStack -> new ItemEntity(livingEntity.world, livingEntity.getPosX(), livingEntity.getPosY(), livingEntity.getPosZ(), CraftItemStack.asNMSCopy(itemStack)));
|
||||
ArclightEventFactory.callEntityDeathEvent(livingEntity, itemStackList);
|
||||
if (drops.isEmpty()) {
|
||||
event.setCanceled(true);
|
||||
|
||||
@ -75,7 +75,7 @@ dependencies {
|
||||
embed 'net.md-5:bungeecord-chat:1.16-R0.4@jar'
|
||||
embed "org.spigotmc:spigot-api:$minecraftVersion-R0.1-SNAPSHOT@jar"
|
||||
embed 'com.github.ArclightTeam:mixin-tools:1.0.0@jar'
|
||||
embed 'io.izzel:tools:1.0.+'
|
||||
embed 'io.izzel:tools:1.1.+'
|
||||
annotationProcessor 'org.spongepowered:mixin:0.8.2:processor'
|
||||
annotationProcessor 'com.github.ArclightTeam:mixin-tools:1.0.0'
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user