GrowthcraftCE / Growthcraft-1.7

Community Edition of Gwafu's Growthcraft Mod
Other
39 stars 29 forks source link

Properly close FishTrap inventory #426

Closed Ghostlyr closed 1 year ago

Ghostlyr commented 7 years ago

Fish trap container is behaving strangely. It does not close visually when I try to do it via Bukkit plugins. With all other containers from mod it works perfectly.

I found the difference between other TileEntities and TileEntityFishTrap. In the latest missing seems to be necessary events: updateEntity, onInventoryChanged, updateBlockTick. Could they be the cause of this problem?

Last version of Growthcraft. Server based on forge 1614 (Thermos)

IceDragon200 commented 7 years ago

@Ghostlyr The fishtrap is updated via the block, it doesn't have a per-tick update (hence needUpdate returns false), so it wouldn't implement updateEntity, or updateBlockTick.

It also wouldn't implement or override onInventoryChanged, the base class would assume the default behaviour (which is suppose to be markDirty).