Jump to content

Recommended Posts

Posted

Hello,

 

I am currently playing on a Vanilla Server that uses plugins for most of the stuff. There are plugins that include floating items (above a chest for example) which work completely fine on Vanilla Minecraft.

The problem is that those floating items are not shown when using a Forge client (latest version on 1.9 but probably not working on any Forge versions as I could find help requests from over a year ago) which is needed for mods like a minimap, NEI or other client side only stuff.

Since this problem only persists which a Forge client, it must be some error on Forge's end.

 

I'd appreciate if someone would take a look into this.

 

Sincerely,

Rakinare

Posted

How is this not a bug and why would you disable floating items without giving the option to enable them?

 

 

Edit: Sorry, I have just seen there already is a thread from february, which I didn't find on my google research, that's why I didn't search for it again in here. The thread doesn't provide a real solution though. Is there any way to work it out?

 

Edit2: This is what I have found how the items seem to be created. Can you see why Forge prevents that?

 

if(IPSignShop.getInstance().getConfig().getBoolean("use item display")) {
		System.out.println("Initiating item spawn...");
		spawnItem();
		System.out.println("\t>> Item should be spawned now");
	}
	System.out.println("\t>> Updating shop: " + getOwner() + " " + getItemName() + " done");
}

private void spawnItem() {
	System.out.println("Spawning item");
	displayItem = chestLocation.getWorld().dropItem(chestLocation.clone().add(0.5, 1, 0.5), getItem());
	displayItem.setVelocity(new Vector());
	displayItem.setPickupDelay(Integer.MAX_VALUE);
	displayItem.setTicksLived(20 * 60 * 5 - 40);
	// prevent picking up if you somehow managed to do it
	displayItem.getItemStack().setAmount(-1);
	System.out.println("\t>> World is: " + displayItem.getWorld().getName());
	System.out.println("\t>> Item spawned: " + displayItem.isValid() + " " + displayItem.getLocation().toVector());
}

Posted

How the hell is a amount of -1 valid?

Thats the point. Any INVALID STACKS ARE REMOVED by Forge to prevent crashes.

If you want them to show up, make them > 0

Simple as this.

Not a bug, actually a bug fix.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.