Closed jedediah closed 9 years ago
I can't help but think that WorldThing is kinda an odd name for an interface.
As stated in the PR, I'm open to better suggestions.
Maybe something like WorldContent or WorldObject
WorldProvider
, WorldHolder
WorldContainer
?
Also what about implementing it in WeatherEvent
?
WeatherEvent
already implements it
ah, didn't see it in the list, so I assumed it wasn't included
WorldThing
is still my favorite name so far. I don't want a name that implies the world is owned by the object, since it should be the other way around. And I don't like redundant words like "Object".
I'm considering Physical
WorldBound
? Assuming everything that implements it will only be associated with a single world.
I went with Physical
Add an interface called
WorldThing
(better suggestion?) with a single methodgetWorld()
. The interface is implemented by pretty much everything that already has that method, plus a few more. It's also implemented by everyEvent
subclass that is world-specific. Events are where this is particularly useful, since it was previously quite complex to get an event's world in a general way.Complete list of
WorldThing
inheritors (anything missing?):World
Chunk
Location
Entity
Block
BlockState
BlockImage
Inventory
InventoryHolder
ProjectileSource
MapView
WorldEvent
,EntityEvent
,BlockEvent
,VehicleEvent
,HangingEvent
,PaintingEvent
,PlayerEvent
,PlayerLeashEntityEvent
,InventoryEvent
,InventoryMoveItemEvent
,InventoryPickupItemEvent
,MapInitializeEvent
,WeatherEvent