mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fixes #2260
This commit is contained in:
parent
ec6f48e374
commit
ac5d5521ce
@ -88,6 +88,7 @@
|
|||||||
* Fixed Fluid Pump not working on Bubble Columns
|
* Fixed Fluid Pump not working on Bubble Columns
|
||||||
* Fixed #2251
|
* Fixed #2251
|
||||||
* Fixed #2257
|
* Fixed #2257
|
||||||
|
* Fixed #2260
|
||||||
|
|
||||||
## Release Candidate 15 (01 Aug 2020)
|
## Release Candidate 15 (01 Aug 2020)
|
||||||
|
|
||||||
|
@ -112,19 +112,21 @@ public class AncientPedestal extends SlimefunItem {
|
|||||||
|
|
||||||
public void placeItem(Player p, Block b) {
|
public void placeItem(Player p, Block b) {
|
||||||
ItemStack hand = p.getInventory().getItemInMainHand();
|
ItemStack hand = p.getInventory().getItemInMainHand();
|
||||||
ItemStack stack = new CustomItem(hand, ITEM_PREFIX + System.nanoTime());
|
ItemStack displayItem = new CustomItem(hand, ITEM_PREFIX + System.nanoTime());
|
||||||
stack.setAmount(1);
|
displayItem.setAmount(1);
|
||||||
|
|
||||||
|
// Get the display name of the original Item in the Player's hand
|
||||||
|
String nametag = ItemUtils.getItemName(hand);
|
||||||
|
|
||||||
if (p.getGameMode() != GameMode.CREATIVE) {
|
if (p.getGameMode() != GameMode.CREATIVE) {
|
||||||
ItemUtils.consumeItem(hand, false);
|
ItemUtils.consumeItem(hand, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
String nametag = ItemUtils.getItemName(stack);
|
Item entity = b.getWorld().dropItem(b.getLocation().add(0.5, 1.2, 0.5), displayItem);
|
||||||
Item entity = b.getWorld().dropItem(b.getLocation().add(0.5, 1.2, 0.5), stack);
|
|
||||||
entity.setVelocity(new Vector(0, 0.1, 0));
|
entity.setVelocity(new Vector(0, 0.1, 0));
|
||||||
SlimefunUtils.markAsNoPickup(entity, "altar_item");
|
|
||||||
entity.setCustomNameVisible(true);
|
entity.setCustomNameVisible(true);
|
||||||
entity.setCustomName(nametag);
|
entity.setCustomName(nametag);
|
||||||
|
SlimefunUtils.markAsNoPickup(entity, "altar_item");
|
||||||
p.playSound(b.getLocation(), Sound.ENTITY_ITEM_PICKUP, 0.3F, 0.3F);
|
p.playSound(b.getLocation(), Sound.ENTITY_ITEM_PICKUP, 0.3F, 0.3F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user