hammy275 / immersive-mc Goto Github PK
View Code? Open in Web Editor NEWA Minecraft mod to make Minecraft more immersive!
License: GNU Lesser General Public License v3.0
A Minecraft mod to make Minecraft more immersive!
License: GNU Lesser General Public License v3.0
A lot of stuff in common
is meant only to run on the logical side, so we should move that stuff into the server
package.
When a block with immersive-ness is broken, the immersive aspect sticks around.
Since the BlockEvent.BreakEvent
event is only fired server-side, it'll need to send a packet to the client to remove an immersion.
It's perfect to do this now, since most upcoming immersions will have their items stored server-side.
CraftingInventory
to a 3x3 array. This should make manipulation of it a lot easier, including for the above improvementNeeded for Curseforge lol
Probably will use a majority of the code from ChestImmersive
, or build on top of it.
Will replace the right click behavior that's currently in place for chests.
ImmersiveMC isn't just about minimizing GUI usage, but about making Minecraft as a whole more immersive, mainly through the use of removing GUIs. The README should be adjusted to account for this.
We can softly depend on #23 here, as it would be a great GIF to add to the README to demonstrate this
We should sync configs from the client to the server, so the server can check against them before running a tracker on a player
You can hold an item above a campfire. After 15 secs (probably a configurable amount of time), it's cooked
You should basically be able to put a disc into the Jukebox physically to play the disc.
Nothing to really enhance out of VR, so this is VR-only
There should be two videos for a tutorial, in VR and out of VR.
Both should be pretty well edited, and have very good timestamps.
Also caption them
To be made with 1.0.0 release
You should be able to configure the client from within the GUI. Unlike what this mod intends to do, this is planned to be a bog-standard settings UI.
If you have OP permission level 4, there should also be an exposed option to configure the server's settings, too.
Should track contents server-side, taking the items when you put them in. Items are stored by the block position, not the player. Once a second, if a player is looking at an anvil or smithing table, it sends a ping packet. The server sees the ping, gets the anvil/smithing table the player is looking at, and resets a cooldown. If the cooldown reaches 0, the items inside drop back to the ground.
Immersives should activate if being looked at by the HMD in VR.
For most immersives, the hitboxes and positions don't ever change. For these ones, we should use a init()
function in the immersive (not the info) to initialize them, so we don't re-create them every tick.
You currently can't grab items from a furnace, brewing stand, or chest if you're holding that same item in your hand, even if it would make sense to merge the two stacks together! This should be fixed, and have the following behavior:
e35b883 fixed an issue with reaching across logical sides.
HOWEVER, as a consequence of this, we no longer have access to items for all of the immersives (besides crafting). This is obviously extremely bad!
For tracking these, whenever we look at a compatible block client side, we'll initialize like we usually do EXCEPT FOR THE ITEMS!
readyToRender()
function that checks that we have the itemsAbstractImmersiveInfo
*: For now, I'm okay with the side effect for this that an immersive won't update until looked at. So if another player changes items around, it won't reflect for us until we look at it.
Instead of requesting the state of the tile entity at random intervals, the server should send updates to the client. This actually requires a pretty major refactoring, more specifically by doing the following:
There should be a config allowing one to enable/disable certain immersions.
It will exist both server-side and client-side, with both configs having to be enabled to allow an immersion to take place. This way, a server admin can disable certain immersions, and a player can also disable immersions if they don't want to use them
Makes immersive item slots centered so it looks nicer. It'll be a config option that's off by default and won't be synced from the server. Only planned for furnace and possibly brewing stand, as others either align with the block texture (crafting table and jukebox) or align in an already centered sort of way (chest).
May need to do this for the anvil and/or enchanting table once those are added, though.
Idea from Nti on Vivecraft Discord.
Probably place hitboxes above each torch spot, and if your hand is in both the current one and another one, move to that one, then disable the ability to move it back there until either:
Aka, if moving from A tick(s) to B tick(s), you can't move it back to A, until you move it to C, then you can't move it to B, etc.
It would be really cool if you could physically open a chest and grab the items inside.
Each chest block would have a 3x3 set of items on top from inside the chest, representing the top row. If a chest is opened immersively like this, right clicking it would cycle the row that's presented on the top (the other rows aren't grabbable).
You press left click/trigger over an item to grab it, it would go into your inventory.
VR only since this would probably be a hassle to use outside of VR, and opening the chest would probably be very clunky.
Should hopefully be the final fix for chest bugginess.
Right now, we only continue with handling a SwapPacket
if the position our client tells us is loaded https://github.com/hammy3502/immersive-mc/blob/master/src/main/java/net/blf02/immersivemc/common/network/packet/SwapPacket.java#L41 . However, someone could use this to gleam the positions of loaded chunks.
To counter this, we should instead check that both the position is loaded, and that the distanceToSqr()
between the player and its position is at most 256 (aka the distance between the player and it is 16 blocks). This way, it's practically impossible to gleam unknown information to a potential hacker.
Once this is done, I can make a CurseForge page with those same GIFs
Right now, a lot of packets related to a given tile entity are sent to everyone tracking the chunk. Instead, we should only send it to those within 16-ish blocks of the tile entity.
As a bonus, it seems to render slightly off in the right eye (as shown by the immersive for the crafting table).
Will need to store items server side, so we'll wait until after #10 to do this.
Immersives should be cleared on exiting a world/disconnecting from multiplayer
When we leave ~20 blocks of a tile entity, we should stop handling immersion for it, by calling .remove()
on it
Unlike in Vanilla, while your hand is on the button, it will stay pushed in (creating a redstone signal). The button pops out after the usual amount of time once you take your hand away.
I expect this to be iterated on a lot, and have progress made both during and between versions.
Ideas so far:
getPositions
/getHitboxes
, which should instead be reserved purely for the items themselves.The method for getting the other chest doesn't chest that the other chest is connected back to the requesting one iirc. We need to check this
I kinda prematurely made the repo public. I don't plan to private it again, but we need a LICENSE and README in there ASAP.
Going to stick with GNU GPLv3 as I usually do.
Similarly to how Half-Life Alyx does it, picking up items in a similar style would be satisfying, fun, and aid a lot in playing in VR.
A server running ImmersiveMC should allow clients without ImmersiveMC to connect.
We'd keep copies of the Crafting Table for each player on the server. Each player would have a "global crafting table" for this storage, that would expire if the server detects the client hasn't been looking at any crafting table for more than a few seconds. On expiration, give the items back.
To confirm the craft, you'd punch the crafting table, and the output would be summoned as an ItemEntity
above the crafting table to be picked up.
Some immersive blocks (mainly chests) can't be broken. We should allow breaking them, at least when they're closed.
Man this codebase is whack in places, why in the world did I make this twice
Would be fun!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.