diff --git a/src/main/java/com/lothrazar/cyclic/base/TileEntityBase.java b/src/main/java/com/lothrazar/cyclic/base/TileEntityBase.java index 58537fcdb..dc66c6401 100644 --- a/src/main/java/com/lothrazar/cyclic/base/TileEntityBase.java +++ b/src/main/java/com/lothrazar/cyclic/base/TileEntityBase.java @@ -12,9 +12,7 @@ import com.lothrazar.cyclic.util.UtilEntity; import com.lothrazar.cyclic.util.UtilFakePlayer; import com.lothrazar.cyclic.util.UtilFluid; -import com.lothrazar.cyclic.util.UtilItemStack; import java.lang.ref.WeakReference; -import java.util.ArrayList; import java.util.List; import java.util.UUID; import net.minecraft.block.BlockState; @@ -91,19 +89,6 @@ protected PlayerEntity getLookingPlayer(int maxRange, boolean mustCrouch) { return null; } - public void tryDumpFakePlayerInvo(WeakReference fp, boolean includeMainHand) { - int start = (includeMainHand) ? 0 : 1; - ArrayList toDrop = new ArrayList(); - for (int i = start; i < fp.get().inventory.mainInventory.size(); i++) { - ItemStack s = fp.get().inventory.mainInventory.get(i); - if (s.isEmpty() == false) { - toDrop.add(s.copy()); - fp.get().inventory.mainInventory.set(i, ItemStack.EMPTY); - } - } - UtilItemStack.drop(this.world, this.pos.up(), toDrop); - } - public static void tryEquipItem(ItemStack item, WeakReference fp, Hand hand) { if (fp == null) { return; diff --git a/src/main/java/com/lothrazar/cyclic/block/spikes/TileDiamondSpikes.java b/src/main/java/com/lothrazar/cyclic/block/spikes/TileDiamondSpikes.java index 00bd51d01..ae674f6e5 100644 --- a/src/main/java/com/lothrazar/cyclic/block/spikes/TileDiamondSpikes.java +++ b/src/main/java/com/lothrazar/cyclic/block/spikes/TileDiamondSpikes.java @@ -3,7 +3,9 @@ import com.google.common.collect.Maps; import com.lothrazar.cyclic.base.TileEntityBase; import com.lothrazar.cyclic.registry.TileRegistry; +import com.lothrazar.cyclic.util.UtilItemStack; import java.lang.ref.WeakReference; +import java.util.ArrayList; import java.util.Map; import java.util.UUID; import net.minecraft.block.BlockState; @@ -70,6 +72,19 @@ public void tick() { } } + private void tryDumpFakePlayerInvo(WeakReference fp, boolean includeMainHand) { + int start = (includeMainHand) ? 0 : 1; + ArrayList toDrop = new ArrayList(); + for (int i = start; i < fp.get().inventory.mainInventory.size(); i++) { + ItemStack s = fp.get().inventory.mainInventory.get(i); + if (s.isEmpty() == false) { + toDrop.add(s.copy()); + fp.get().inventory.mainInventory.set(i, ItemStack.EMPTY); + } + } + UtilItemStack.drop(this.world, this.pos.up(), toDrop); + } + @Override public void setField(int field, int value) {} diff --git a/src/main/java/com/lothrazar/cyclic/block/user/TileUser.java b/src/main/java/com/lothrazar/cyclic/block/user/TileUser.java index 27a864ddc..fb113e0e0 100644 --- a/src/main/java/com/lothrazar/cyclic/block/user/TileUser.java +++ b/src/main/java/com/lothrazar/cyclic/block/user/TileUser.java @@ -117,7 +117,6 @@ public void tick() { catch (Exception e) { ModCyclic.LOGGER.error("User action item error", e); } - tryDumpFakePlayerInvo(fakePlayer, false); } public boolean isUsingLeftHand() { diff --git a/update.json b/update.json index 9bebd5c71..d469244b8 100644 --- a/update.json +++ b/update.json @@ -79,6 +79,6 @@ ,"1.5.20":"#2102 wooden and golden hopper deposit logic fixed, now matches 1.18.2+ versions. #2085 Hopper reach area & pickup logic now uses vanilla-hopper area size. JEED compatibility added for some potion effects. Port Fishing Net and Mending Fishingrods compatibility from 1.12.2 #2067. Ender Apple now sends a message if nothing is found (void/flatworlds/etc). Growth enchant now skips IGrowable blocks that return false for 'canGrow();'. Many new config options added for: growth enchant, beheading enchant, battery, sprinkler, experience_pylon, fisher, scythes, and others in cyclic.toml" ,"1.5.21":"#1933 Sack of Holding chest placement override added, with new config to revert back to legacy behavior if desired (overrideChestSingle). #2168 fix bug where ender shelf sometimes would not save contents when mined after exiting reloading world when client data desyncs. Added a percentage config and ignorelist config for cyclic:disarm enchantment (disarmPercentPerLevel, disarmIngoredMobs), resolves it dropping your copied weapon from alexsmobs:mimicube #2249. Fix #1878 layered and/or logic for multiple wireless transmitters on the same node " ,"1.5.22":"Fix #2351 advanced crafting stick not opening. " - ,"1.5.23":"Growth enchantment now uses the same logic as Sprinkler & Terra Soil (only minecraft:crops or minecraft::saplings can grow, respect IGrowable::canUseBonemeal). New gloomIgnored config Gloom enchant (cyclic:curse) to ignore and not use these effects #2217 #2325. New config 'Fix Soundproofing block not muting Mekanism sounds #2389 (for example Precision Sawmill and others - you may need four or more soundproofing blocks for the desired effect). New config [cyclic.blocks.soundproofing] radius = 6 to control the area. Fix item cable routing #2245 #2230. New config under [cyclic.blocks] wireless_transfer_dimensional = true allowing transfer nodes to connect across dimensions #1913. Balance recipe changes for #2372. Balance changes made for Excavate enchant it will no longer trigger if the tool is not 'mineable' effective for example axe on dirt. New feature for Excavate enchant #2116 it will not trigger on anything matching the block data-tag 'cyclic:ignored/excavate'. [Backported changes from mc1.20.1] zenscript support for generator_fluid and generator_item; #2182 candle model assets; Block Breaker no longer tries (and fails) to mine liquid source blocks; Block Randomizer use wireframe rendering only of non-air instead of solid shading; Glistering & Corrupted chorus only restores 1 food-unit down from 3; a few recipes tweaked/backported to match mc1.20.1+ " + ,"1.5.23":"Growth enchantment now uses the same logic as Sprinkler & Terra Soil (only minecraft:crops or minecraft::saplings can grow, respect IGrowable::canUseBonemeal). New gloomIgnored config Gloom enchant (cyclic:curse) to ignore and not use these effects #2217 #2325. New config 'Fix Soundproofing block not muting Mekanism sounds #2389 (for example Precision Sawmill and others - you may need four or more soundproofing blocks for the desired effect). Patch an edge-case where User might drop items on the ground. New config [cyclic.blocks.soundproofing] radius = 6 to control the area. Fix item cable routing #2245 #2230. New config under [cyclic.blocks] wireless_transfer_dimensional = true allowing transfer nodes to connect across dimensions #1913. Balance recipe changes for #2372. Balance changes made for Excavate enchant it will no longer trigger if the tool is not 'mineable' effective for example axe on dirt. New feature for Excavate enchant #2116 it will not trigger on anything matching the block data-tag 'cyclic:ignored/excavate'. [Backported changes from mc1.20.1] zenscript support for generator_fluid and generator_item; #2182 candle model assets; Block Breaker no longer tries (and fails) to mine liquid source blocks; Block Randomizer use wireframe rendering only of non-air instead of solid shading; Glistering & Corrupted chorus only restores 1 food-unit down from 3; a few recipes tweaked/backported to match mc1.20.1+ " } }