Right, I found the code. Sorry again about your struggle with supporting a modding hobby, it is tough to spend so much time on this when life presses. We definitely appreciate the legwork you did on this mod though! And I was just more referring to whether any source of separate documentation or description in text form like your notes might exist somewhere... I think it's pretty typical for such a large software project to have those. From what I can gather at least the real magic is in creating a Minecraft world in a Minecraft world where the smaller world is a ship and can be moved around? Not super sure, but thanks for the start.
I didn't really keep any notes about the mod. If I forgot how something worked, I usually just read the code and the coments until I figured it out. Code reading is a useful life skill for a programmer. =P
Here's the general gist of it though. Create some kind of pseudo World object for the ship so that everything on a ship doesn't even know it's on a ship. Things on ships think they're just in normal worlds and life continues as planned. The whole game is maintaining the illusion of the world-inside-of-a-world as well as possible. The better the illusion, the more things are fooled into thinking they're not in any special kind of environment. The crappier the illusion, the more things see... hey, this isn't a real world, and oops, *crash*. Then you do crazy things to that world, like move it around inside of another world. And then things get really crazy once you start allowing the two worlds to interact with each other (e.g., collision, player actions). It's hard to allow these kinds of interactions while also maintaining the illusion for the things inside the inner world.
My world illusion is primitive, but it was better than the ones that came before it. And world illusions that come after mine will be better than mine ever was. Like the one 4HeadTiger is working on. =) thebest108 has a good one too.
Some ships can sink, others are unsinkable, just depends on the ship geometry. It should also be possible to make a submarine using the baloon blocks for air ships, but I've not tried it. Once ships are properly modifiable, ballast tanks should be possible too.
Right, I'll try figuring this one out. Never worked with ASM in too much depth, and this seems a bit beyond the scope of general ASM. I'm not really asking for hand-holding, but I have no idea where to learn how to do what you just recommended. I'm off to google things of course, but if there are any good resources you know of that might guide me here sharing would be much appreciated.
Best I can offer is the link I was given a page or so ago on the general introduction to coremods, basically you get an opportunity to see the java bytecode of a new class before it is loaded. You can edit the bytecode in place, or replace it with different bytecode. Patches fail when two patches use an overlapping section of bytecode to determine where to inject their changes. The changes from the first applied makes the second applied not recognize where to do its modification. Two ways to solve this, either figure out what the second one expects for identifying its target and make sure it exists in the modified version, or detect that the first modification is already applied and change where you inject the new bytecode. There may be a way to spit out the decompiled patched class after the first patch applies to see what it does, but I don't know.
Best I can offer is the link I was given a page or so ago on the general introduction to coremods, basically you get an opportunity to see the java bytecode of a new class before it is loaded. You can edit the bytecode in place, or replace it with different bytecode. Patches fail when two patches use an overlapping section of bytecode to determine where to inject their changes. The changes from the first applied makes the second applied not recognize where to do its modification. Two ways to solve this, either figure out what the second one expects for identifying its target and make sure it exists in the modified version, or detect that the first modification is already applied and change where you inject the new bytecode. There may be a way to spit out the decompiled patched class after the first patch applies to see what it does, but I don't know.
Thanks, I'll take a look at it.
In the meantime, figure I'd report an error for 4Head. I might be able to get around to try and figuring this one out myself later. The build is crashing in SMP whenever a ship block is right-clicked. Error was failing to intialize class cuchaz.ships.gui.ShipGuiManager, I lost my log so I can't remember much more. This is a pretty useless error report but I'll beef it up later hopefully.
Okay, that actually looks pretty straightforward. I'll see about making a simple API. I can think of 6 events that are important.
Checking if a bed is usable (night time, ownership, whatever)
Laying down in the bed
Hitting the 'Leave Bed' button
Checking if time fastforward is possible
Fastforwarding time
Leaving bed
If anyone's got other events they want to see, now's the time to speak up. I'll also probably start a thread specific for it and drop a message to the galacticraft people to see if they have any input, but it'll probably be tomorrow before I have any time.
Should a bed explode if someone tries to sleep in it.
Should a bed do nothing (neither explode nor activate sleep)
Should a bed reset the spawn point (nb: a sleeping bag is a bed that does not reset the spawn point)
Beds could be used in worlds like Twilight Forest (no time skip, set spawn point), mystcraft/RfTools ages (unusual time skip for that dimension), on a server with Somnia (simulate the passage of time, rather than just changing the current time value), in the nether or end (kaboom), in some mod dimension where it just has no effect (decorative only), etc.
Compatibility with Somnia is going to be fun -- is that mod open source?
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
For people who are talking about modifying Forge, where / how do you get started? All of the "How to go about modifying Forge and submitting requests" that I've seen are for 1.6.4 and earlier -- I've not found any "here's how to do it for 1.7.10" yet.
Re running it in a dev environment, what you have to do is enable coremods. Funny things were happening when I set it up myself, to make it work I had to add this to the VM arguments;
Right -- normally, FML scans a directory to find any packaged mods tagged as core mods, but when you're in a dev environment, they aren't packaged for release, so you have to tell FML that they are in the runtime.
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
Fork the Forge repo on github, modify it, submit a pull request, I would assume. I'm not actually planning to upstream any changes, since it's not worth it unless the Forge guys are interested.
Should a bed explode if someone tries to sleep in it.
Should a bed do nothing (neither explode nor activate sleep)
Should a bed reset the spawn point (nb: a sleeping bag is a bed that does not reset the spawn point)
The first two are covered by event #1. An event for setting the spawn point is probably a good idea.
Compatibility with Somnia is going to be fun -- is that mod open source?
I've never heard of it, so I don't know what it would take to make it work... Once I have the basic system laid out I'll be advertising to existing mods which modify the Bed block and related functions.
@Cuchaz: I was just thinking of something while reading your post about how ships mod creates "a world within a world" so the ships are intractable, a thought came to mind and it's about the docking orientation, I know it's due to the placement of the blocks causing grief when not placed exactly the same way they were before, but that got me thinking about the mod "WorldEdit".
Follow me on this one, what if you implemented a code similar to WorldEdit's copy/paste/rotate commands so when the ship is ready to dock, once the player hits the "Dock Ship" button it activates these commands, basically it remembers the starting orientation of the ship, saves that chunk of blocks into a "clipboard" (like how WE has it's selection clipboard) and rotates that chunk of blocks accordingly to the new orientation.
I know it's probably not easy and might not get implemented, but I thought I would share my thoughts on that.
The issue with rotation is not figuring out where to put the blocks, that's just some basic trig. The problem is some mod blocks don't properly handle being rotated, which can cause weird problems and crashes. It wouldn't be too hard to make it so you can dock rotated if all blocks on the ship are vanilla or support any of the mods which support block rotation. Forge adds Block.rotateBlock, which returns true on success, the hard part is not every mod agrees on how to rotate (face the direction of activation, rotate around the direction of activation, rotate through a specific pattern). It would probably require a mod-by-mod list of how to rotate each one. Vanilla blocks rotate around the activated side, so you just rotate around the top the correct number of times. It would be something that could be added via a config file easily enough, just have to specify the mod prefix, if it is allowed to rotate, and what parameters to pass into rotateBlock to make it rotate around the Y-axis.
IIRC Ruins mod uses a rotation config system. I'll take a look later, but if it supports a heap of blocks already then it may be worth asking AtomicStryker if we can 'borrow' it.
Rollback Post to RevisionRollBack
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
IIRC Ruins mod uses a rotation config system. I'll take a look later, but if it supports a heap of blocks already then it may be worth asking AtomicStryker if we can 'borrow' it.
Yeah, also might be worth looking at Warp Drive, Remain in Motion, and Buildcraft (in the blueprint/builder code). The BC stuff works properly for about 75% of the mod blocks I've tried.
Did some more poking, reading, researching, and mostly just asking the relevant people for what they think of this Smart Moving situation. I'm gonna dedicate more time to trying to solve this one this week. Just a quick question, say we do get these mods to all play nice with the Ships and move things into a relatively stable position: what are the prospects of us being able to ever update this to 1.8+ so it actually remains in use?
Obviously. Unfortunately I definitely don't have the experience to do so myself. Not yet at least. I don't mean to sound entitled or imply that you should do so either, Cuchaz. I've fully written off and respect that you're busy with causes other than this Minecraft mod. I more meant "us" in the abstract to refer to 4HeadTiger and Iperkins who are more recently working on development here and try to gauge their plans for possible 1.8+, or if this new development is for perpetual 1.7.10 personal use.
I have no plans at present to port anything to 1.8 or later, a number of mods I use have said that neither 1.8 nor 1.9 have fancy enough new features to justify a move, and I see little reason to port my mods when I won't be using >1.8 for the foreseeable future. That said, it shouldn't be too hard to maintain both a 1.7.10 and 1.8 branch, since there aren't that many differences between them... If someone wants to go to the work of setting this up with the newest 1.8 forge version and work through all the compiler errors, we can probably get a branch added to the repo.
do i have your permission to have someone who can do some work to port your mod to latest version 1.10.2 or below? I can have him to speak with you about the credit. but only if i found someone who can port your mod?
Speaking of which; how soon until you finish the "Philadelphia Experiment" Add-on for this mod? I expect the highest priority for it.
- The Cubic Chunks Mod is back! Be a part of it's rebirth and Development.
-- Robinton's Mods: [ Mirror ] for some of his Mods incl Cubic Chunks Mod, due to DropBox broken links.
- Dungeon Generator for the Open Cubic Chunks Mod
- QuickSAVE-QuickLOAD for the Open Cubic Chunks Mod
I didn't really keep any notes about the mod. If I forgot how something worked, I usually just read the code and the coments until I figured it out. Code reading is a useful life skill for a programmer. =P
Here's the general gist of it though. Create some kind of pseudo World object for the ship so that everything on a ship doesn't even know it's on a ship. Things on ships think they're just in normal worlds and life continues as planned. The whole game is maintaining the illusion of the world-inside-of-a-world as well as possible. The better the illusion, the more things are fooled into thinking they're not in any special kind of environment. The crappier the illusion, the more things see... hey, this isn't a real world, and oops, *crash*. Then you do crazy things to that world, like move it around inside of another world. And then things get really crazy once you start allowing the two worlds to interact with each other (e.g., collision, player actions). It's hard to allow these kinds of interactions while also maintaining the illusion for the things inside the inner world.
My world illusion is primitive, but it was better than the ones that came before it. And world illusions that come after mine will be better than mine ever was. Like the one 4HeadTiger is working on. =) thebest108 has a good one too.
What's the modpack called? and is it on the Technic launcher? I would like to know waht it is.
(Also please put the list of mods in a spoiler when you reply)
OT: This mod looks pretty good, but can ships sink? If not, then please add that.
http://www.minecraftforum.net/forums/off-topic/forum-games/2862232-indestructible-box
This is my forum game, play it
Some ships can sink, others are unsinkable, just depends on the ship geometry. It should also be possible to make a submarine using the baloon blocks for air ships, but I've not tried it. Once ships are properly modifiable, ballast tanks should be possible too.
Best I can offer is the link I was given a page or so ago on the general introduction to coremods, basically you get an opportunity to see the java bytecode of a new class before it is loaded. You can edit the bytecode in place, or replace it with different bytecode. Patches fail when two patches use an overlapping section of bytecode to determine where to inject their changes. The changes from the first applied makes the second applied not recognize where to do its modification. Two ways to solve this, either figure out what the second one expects for identifying its target and make sure it exists in the modified version, or detect that the first modification is already applied and change where you inject the new bytecode. There may be a way to spit out the decompiled patched class after the first patch applies to see what it does, but I don't know.
Thanks, I'll take a look at it.
In the meantime, figure I'd report an error for 4Head. I might be able to get around to try and figuring this one out myself later. The build is crashing in SMP whenever a ship block is right-clicked. Error was failing to intialize class cuchaz.ships.gui.ShipGuiManager, I lost my log so I can't remember much more. This is a pretty useless error report but I'll beef it up later hopefully.
Should a bed explode if someone tries to sleep in it.
Should a bed do nothing (neither explode nor activate sleep)
Should a bed reset the spawn point (nb: a sleeping bag is a bed that does not reset the spawn point)
Beds could be used in worlds like Twilight Forest (no time skip, set spawn point), mystcraft/RfTools ages (unusual time skip for that dimension), on a server with Somnia (simulate the passage of time, rather than just changing the current time value), in the nether or end (kaboom), in some mod dimension where it just has no effect (decorative only), etc.
Compatibility with Somnia is going to be fun -- is that mod open source?
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
For people who are talking about modifying Forge, where / how do you get started? All of the "How to go about modifying Forge and submitting requests" that I've seen are for 1.6.4 and earlier -- I've not found any "here's how to do it for 1.7.10" yet.
Right -- normally, FML scans a directory to find any packaged mods tagged as core mods, but when you're in a dev environment, they aren't packaged for release, so you have to tell FML that they are in the runtime.
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
Fork the Forge repo on github, modify it, submit a pull request, I would assume. I'm not actually planning to upstream any changes, since it's not worth it unless the Forge guys are interested.
The first two are covered by event #1. An event for setting the spawn point is probably a good idea.
I've never heard of it, so I don't know what it would take to make it work... Once I have the basic system laid out I'll be advertising to existing mods which modify the Bed block and related functions.
@Cuchaz: I was just thinking of something while reading your post about how ships mod creates "a world within a world" so the ships are intractable, a thought came to mind and it's about the docking orientation, I know it's due to the placement of the blocks causing grief when not placed exactly the same way they were before, but that got me thinking about the mod "WorldEdit".
Follow me on this one, what if you implemented a code similar to WorldEdit's copy/paste/rotate commands so when the ship is ready to dock, once the player hits the "Dock Ship" button it activates these commands, basically it remembers the starting orientation of the ship, saves that chunk of blocks into a "clipboard" (like how WE has it's selection clipboard) and rotates that chunk of blocks accordingly to the new orientation.
I know it's probably not easy and might not get implemented, but I thought I would share my thoughts on that.
@ScorpionXR64: here is my updated mods list, not all the mods listed are in the pack atm as I haven't updated the pack yet: https://www.dropbox.com/s/gp1wk5prd0ct94b/Mod Pack Permission List.txt?dl=1
and my modpack is called "The Valley" here's the link from the technic site because I think I still have it hidden: http://www.technicpack.net/modpack/the-valley-testing-phase.797682
please let me know what you think of it so far.
Check out The Valley! My own Server and Modpacks!
Forum: http://thevalley.guildtag.com/
Discord: https://discordapp.com/invite/mx9GCDQ
The Valley 1.7.10 is available on Technic here:The Valley 1.7.10 -> Curseforge External link HERE
The Valley 1.12.2 is available on Curseforge here: The Valley 1.12.2
The Valley 1.20.2 is available at this IP: thevalley.noip.me:25567 (NOW BEDROCK COMPATIBLE!)
The issue with rotation is not figuring out where to put the blocks, that's just some basic trig. The problem is some mod blocks don't properly handle being rotated, which can cause weird problems and crashes. It wouldn't be too hard to make it so you can dock rotated if all blocks on the ship are vanilla or support any of the mods which support block rotation. Forge adds Block.rotateBlock, which returns true on success, the hard part is not every mod agrees on how to rotate (face the direction of activation, rotate around the direction of activation, rotate through a specific pattern). It would probably require a mod-by-mod list of how to rotate each one. Vanilla blocks rotate around the activated side, so you just rotate around the top the correct number of times. It would be something that could be added via a config file easily enough, just have to specify the mod prefix, if it is allowed to rotate, and what parameters to pass into rotateBlock to make it rotate around the Y-axis.
IIRC Ruins mod uses a rotation config system. I'll take a look later, but if it supports a heap of blocks already then it may be worth asking AtomicStryker if we can 'borrow' it.
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
Yeah, also might be worth looking at Warp Drive, Remain in Motion, and Buildcraft (in the blueprint/builder code). The BC stuff works properly for about 75% of the mod blocks I've tried.
O would supply my modlist however it's quite big and would take too long to look through.
Check out The Valley! My own Server and Modpacks!
Forum: http://thevalley.guildtag.com/
Discord: https://discordapp.com/invite/mx9GCDQ
The Valley 1.7.10 is available on Technic here:The Valley 1.7.10 -> Curseforge External link HERE
The Valley 1.12.2 is available on Curseforge here: The Valley 1.12.2
The Valley 1.20.2 is available at this IP: thevalley.noip.me:25567 (NOW BEDROCK COMPATIBLE!)
Did some more poking, reading, researching, and mostly just asking the relevant people for what they think of this Smart Moving situation. I'm gonna dedicate more time to trying to solve this one this week. Just a quick question, say we do get these mods to all play nice with the Ships and move things into a relatively stable position: what are the prospects of us being able to ever update this to 1.8+ so it actually remains in use?
Sure. Send a PR or fork it.
Obviously. Unfortunately I definitely don't have the experience to do so myself. Not yet at least. I don't mean to sound entitled or imply that you should do so either, Cuchaz. I've fully written off and respect that you're busy with causes other than this Minecraft mod. I more meant "us" in the abstract to refer to 4HeadTiger and Iperkins who are more recently working on development here and try to gauge their plans for possible 1.8+, or if this new development is for perpetual 1.7.10 personal use.
I have no plans at present to port anything to 1.8 or later, a number of mods I use have said that neither 1.8 nor 1.9 have fancy enough new features to justify a move, and I see little reason to port my mods when I won't be using >1.8 for the foreseeable future. That said, it shouldn't be too hard to maintain both a 1.7.10 and 1.8 branch, since there aren't that many differences between them... If someone wants to go to the work of setting this up with the newest 1.8 forge version and work through all the compiler errors, we can probably get a branch added to the repo.
thank you
Cuchaz,
do i have your permission to have someone who can do some work to port your mod to latest version 1.10.2 or below? I can have him to speak with you about the credit. but only if i found someone who can port your mod?