Skip to content

Commit

Permalink
Added missing loot barrel textures. Implements #13
Browse files Browse the repository at this point in the history
DaFuqs committed Sep 19, 2021
1 parent bead11a commit 3381b5c
Showing 14 changed files with 22 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -49,10 +49,12 @@ public void appendStacks(@NotNull DefaultedList<ItemStack> stacks) {

for(Item lootBagItem : allLootBags) {
for (Identifier lootTable : allLootTables) {
NbtCompound compound = LootBagItem.getItemCompoundTag(lootTable, 0);
ItemStack itemStack = new ItemStack(lootBagItem);
itemStack.setNbt(compound);
stacks.add(itemStack);
if(!lootTable.getPath().contains("entities")) { // to reduce the lists size a bit
NbtCompound compound = LootBagItem.getItemCompoundTag(lootTable, 0);
ItemStack itemStack = new ItemStack(lootBagItem);
itemStack.setNbt(compound);
stacks.add(itemStack);
}
}
}

Original file line number Diff line number Diff line change
@@ -56,21 +56,23 @@ private ArrayList<ItemStack> getPredefinedLootCrates() {

for(Item lootCrateItem : allLootCrates) {
for (Identifier lootTable : allLootTables) {
for (Long replenishTimeTicks : replenishTimeTicksValues) {
for (boolean locked : booleans) {
for (boolean trapped : booleans) {
for (boolean doNotConsumeKeyOnUnlock : booleans) {
for (boolean oncePerPlayer : booleans) {
if (oncePerPlayer && replenishTimeTicks < 0) {
// oncePerPlayer really is only useful when replenish time is positive
} else {
if (doNotConsumeKeyOnUnlock && !locked) {
// no use in that tag when there is no lock, is there?
if(!lootTable.getPath().contains("entities")) { // to reduce the lists size a bit
for (Long replenishTimeTicks : replenishTimeTicksValues) {
for (boolean locked : booleans) {
for (boolean trapped : booleans) {
for (boolean doNotConsumeKeyOnUnlock : booleans) {
for (boolean oncePerPlayer : booleans) {
if (oncePerPlayer && replenishTimeTicks < 0) {
// oncePerPlayer really is only useful when replenish time is positive
} else {
NbtCompound compound = LootCrateItem.getLootCrateItemCompoundTag(lootTable, locked, doNotConsumeKeyOnUnlock, replenishTimeTicks, 0, oncePerPlayer, trapped);
ItemStack itemStack = new ItemStack(lootCrateItem);
itemStack.setNbt(compound);
stacks.add(itemStack);
if (doNotConsumeKeyOnUnlock && !locked) {
// no use in that tag when there is no lock, is there?
} else {
NbtCompound compound = LootCrateItem.getLootCrateItemCompoundTag(lootTable, locked, doNotConsumeKeyOnUnlock, replenishTimeTicks, 0, oncePerPlayer, trapped);
ItemStack itemStack = new ItemStack(lootCrateItem);
itemStack.setNbt(compound);
stacks.add(itemStack);
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3381b5c

Please sign in to comment.