Skip to content

Commit

Permalink
v1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Feb 15, 2021
1 parent 3ac5c56 commit e786a87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=1.16.2+build.47
loader_version=0.9.3+build.207

# Mod Properties
mod_version = v1.8
mod_version = v1.9
maven_group = net.guavy
archives_base_name = gravestones

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ private boolean RetrieveGrave(PlayerEntity playerEntity, World world, BlockPos p
retrievalInventory.addAll(playerEntity.inventory.armor);
retrievalInventory.addAll(playerEntity.inventory.offHand);

playerEntity.inventory.clear();

if(GravestonesConfig.getConfig().mainSettings.dropType == GravestoneDropType.PUT_IN_INVENTORY) {
List<ItemStack> armor = items.subList(36, 40);
Expand All @@ -131,8 +132,9 @@ private boolean RetrieveGrave(PlayerEntity playerEntity, World world, BlockPos p
List<Integer> openArmorSlots = getInventoryOpenSlots(playerEntity.inventory.armor);

for(int i = 0; i < 4; i++) {
if(openArmorSlots.contains(i))
playerEntity.equipStack(EquipmentSlot.fromTypeIndex(EquipmentSlot.Type.ARMOR, 3 - i), retrievalInventory.subList(36, 40).get(i));
if(openArmorSlots.contains(i)) {
playerEntity.equipStack(EquipmentSlot.fromTypeIndex(EquipmentSlot.Type.ARMOR, i), retrievalInventory.subList(36, 40).get(i));
}
else
extraItems.add(retrievalInventory.subList(36, 40).get(i));
}
Expand Down

0 comments on commit e786a87

Please sign in to comment.