regarding that mountainside, I made sure that the sides were always at least one block away from the tracks at all places, and smaller carriages can go through there fine. It's only the third class coach that has issues.
One thing I noticed is that the coaches are simulated as if they had a single set of wheels in the very center, that follows the track, which means that the ends are far away from the center of the track whenever they're at a turn. This also results in the very sudden and often wrong angle changes at slopes.
If you could somehow position the carriages according to both ends, instead of the center, that would probably solve a lot of problems.
Even better would be if you could somehow make the carriages composed of multiple entities that are locked together, so the bounding boxes could actually be rectangular, but I don't know how doable that is.
Also, a bug I found in your version 2: destroying a part of the track doesn't destroy the whole track. Only destroying the root block does.
My post was removed for unknown reasons. Therefore, I will write again.
The server requires additional configuration for the ROW and ROWAM?
In single player it works fine and the train continues to move, no matter if I'm next to him.
When I do the same thing on my server, it does not work, and the train stops once disappeared from sight.
It may need tuning PEX? or a specific version of Forge?
Double post? Since you're getting a double update this week why not? I've finally finished overhauling the rendering code for ROW and I'm proud to say that all render issues should be fixed. This includes the issue with the Ov's right drive mechanisms, and the wheels of the caboose.
Additionally, I managed to snag y'all 12 extra FPS. For some reason the Ov and its tender had memory run issues that were causing them to eat ram like it was candy. In fixing this I changed the models from triangle-based ones to quad-based ones. This may have resulted in a loss of some parts, so let me know if anything's missing.
You also might notice that the Ov and its tender now have labels. I've changed the code around to allow labels on any (but not every) piece of stock. As well as looking pretty, this feature should let me better integrate ROWAM switching.
On the subject of switches, someone mentioned that the pointer is crashing worlds. I've seen warnings about depreciated APIs when compiling the code, so if you're having this problem I suggest you switch to Forge 1291 until I get a chance to work on the pointers. My next update is geared towards track reworking, so expect another FPS boost when I switch to a NBT-block-based track system instead of a tile entity one. Do note that in my testing each locomotive or stock rendered caused about a 3FPS drop on my machine with no other code running, so even with a perfect system there still will be performance penalties associated with rendering the complex models of ROW. That's the price you pay for detail!
Finally, some answers to questions:
@Dumboldoor5
After making ROWAM, I did some work for ROWD making the benches and platforms DAYDiecast posted. Later I implemented platforms and crossing sback in ROWAM, but they used the textures I had from ROWD. I just yanked the code from ROWAM for those two, but took the code from ROWD for the benches. So technically the platforms were ROWD, but the current code is ROWAM.
The hanging lamp in the center is indeed the one that would be carried on the belt. This model was hiding in the code so I just changed the lamp from an item to a block. The unique thing with this one is that it can be placed on the ground, unlike the other lamps.
The crates were actually in ROW all along (minus the version that took out all the decorations). You just had to get creative with the /give command. There was actually two crates in those versions, but only code for one crate, so I only implemented one. When I get time I'll add the second one, as the texture for it is already present.
@Japa
Due to the way Minecraft is coded a missed swing when trying to couple a locomotive is forwarded to whatever block is in front of you. This is interpreted as you hitting said block, and being in creative this results in the block being destroyed. The same thing would happen if you used your hands to couple the carts. What I can do, though, is change the left-click coupling action to a right-click, and move the right-click clearing action to a shift-right-click. This way you don't ever have to swing the prybar and risk breaking anything. This'll take a bit, though, as I'll have to export the functionality to the rolling stock. Expect to see this when I implement a multi-entity-based coupling system.
@nickWtn3
Now now, you should know me well enough by now to know that I don't like modelling. If I implement any new decorations it will most likely be something DAYDiecast whips up, or something that was already in the code to begin with. Not to mention I don't model too well, so anything I do make won't fit well with ROW's high-quality textures.
@Everyone
If there's anything I've missed, please remind me.
Time: 2/15/16 1:02 PM
Description: Rendering entity in world
java.lang.NullPointerException: Rendering entity in world
at net.row.renderer.stock.RenderTenderCher.func_76986_a(RenderTenderCher.java:48)
at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:293)
at net.minecraft.client.renderer.entity.RenderManager.func_147936_a(RenderManager.java:271)
at net.minecraft.client.renderer.entity.RenderManager.func_147937_a(RenderManager.java:244)
at net.minecraft.client.renderer.RenderGlobal.func_147589_a(RenderGlobal.java:716)
at net.minecraft.client.renderer.EntityRenderer.func_78471_a(EntityRenderer.java:1596)
at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1334)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:990)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887)
at net.minecraft.client.main.Main.main(SourceFile:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at net.row.renderer.stock.RenderTenderCher.func_76986_a(RenderTenderCher.java:48)
Bug with the rails is still here: track disappears only if you destroy its "main" block. Also track holds on even if you delete blocks under it (screenshots).
vesion ROW-1.7.10-3.1.0-D
Upd: after trying to destroy track and then removing the main block it leaves some empty blocks.
@Savage_Donkey
Oops. Turns out eclipse's dev environment doesn't catch all issues. I'll have that patched with the next update.
@AlexTrainer
I'm aware of that bug. I botched up the track gag system when I converted gags to be decoration compatible. Currently, I'm in the process of overhauling the track system to cut down on tile entities, so expect the bug to be patched on the next release as well.
@Savage_Donkey
Oops. Turns out eclipse's dev environment doesn't catch all issues. I'll have that patched with the next update.
@AlexTrainer
I'm aware of that bug. I botched up the track gag system when I converted gags to be decoration compatible. Currently, I'm in the process of overhauling the track system to cut down on tile entities, so expect the bug to be patched on the next release as well.
Won't cutting down on tile entities make it harder to line up turns though? Ex.
Won't cutting down on tile entities make it harder to line up turns though?
Not if you make them blocks instead. Currently all ROW tracks spawn blocks with tile entities that contain the location of the master block. This makes looking up what type of track you're on easy, as the tile entities are all capable of holding different information. Unfortunately, this means that a S-16 track has a total of 16*3=48 tile entities. Safe to say, that's a lot of ticking tiles. I've got the system working now where the only tile entity in each track is at the master block. The only problem is my world NBT data isn't parsing correctly, so the system bugs out on a world reload. Once I get that plugged you should see a significant FPS gain. I'm also planning on overhauling the rolling stock code at the same time, so expect near-perfect movement of locomotives.
Does this change mean that tracks will get better lighting, or will they still have the lighting from the parent block applied to the whole track section?
Minecraft uses the light value at a block to control the lighting of said block. Since the tracks are technically only on block, the lighting is dependent on that block only. The only way to make the lighting better would be to split the track into more sections, which is incredibly difficult and more of a job for Naiten than me.
Oh, I finally hammered out the bugs out of the mapping system, so now all that's left is updating the pointers and some stock things. I swear, though, the lack of documentation for Minecraft base code and Forge features is one of the greatest impediments to effective modding. I spent 3 hours trying to implement Minecraft's map savedata system that I could have used to tweak locos or add in Tub inventory systems. At least it's working now...
This is the largest update I've done for ROW. Tons of fixes and re-factoring brings my work to about 85% completion. The download is here.
Changes:
Tracks no longer use Tile Entities as gag blocks, rather they use an integrated block-mapping system. Results in large memory gains and performance increases. This also fixes the bug where you had to destroy the master block to destroy the track.
Coupling system overhauled:
Long stock no longer hangs up on tight turns.
Couplers stay coupled much more reliably, including though world reloads and dimensional transportation.
New: Stock has a rudimentary mass sytem. Each engine has a specific draw power and max speed, while each stock has a specific mass. Pulling too long a train will result in slowdowns (assuming you don't have carts in unloaded chunks). If you really want a long train, then just double-header the thing! Locomotive drawpower is additive, assuming you have the throttle set correctly...
Pointer block updated to remove depreciated method that was causing crashes.
regarding that mountainside, I made sure that the sides were always at least one block away from the tracks at all places, and smaller carriages can go through there fine. It's only the third class coach that has issues.
One thing I noticed is that the coaches are simulated as if they had a single set of wheels in the very center, that follows the track, which means that the ends are far away from the center of the track whenever they're at a turn. This also results in the very sudden and often wrong angle changes at slopes.
If you could somehow position the carriages according to both ends, instead of the center, that would probably solve a lot of problems.
Even better would be if you could somehow make the carriages composed of multiple entities that are locked together, so the bounding boxes could actually be rectangular, but I don't know how doable that is.
Also, a bug I found in your version 2: destroying a part of the track doesn't destroy the whole track. Only destroying the root block does.
Hi Don.
My post was removed for unknown reasons. Therefore, I will write again.
The server requires additional configuration for the ROW and ROWAM?
In single player it works fine and the train continues to move, no matter if I'm next to him.
When I do the same thing on my server, it does not work, and the train stops once disappeared from sight.
It may need tuning PEX? or a specific version of Forge?
Sorry for my English.
Is anybody else getting an issue when placing pointers? I've just loaded up this mod recently to test it out and placing them crashes my game.
error!
ROW Version?
Double post? Since you're getting a double update this week why not? I've finally finished overhauling the rendering code for ROW and I'm proud to say that all render issues should be fixed. This includes the issue with the Ov's right drive mechanisms, and the wheels of the caboose.
Additionally, I managed to snag y'all 12 extra FPS. For some reason the Ov and its tender had memory run issues that were causing them to eat ram like it was candy. In fixing this I changed the models from triangle-based ones to quad-based ones. This may have resulted in a loss of some parts, so let me know if anything's missing.
You also might notice that the Ov and its tender now have labels. I've changed the code around to allow labels on any (but not every) piece of stock. As well as looking pretty, this feature should let me better integrate ROWAM switching.
On the subject of switches, someone mentioned that the pointer is crashing worlds. I've seen warnings about depreciated APIs when compiling the code, so if you're having this problem I suggest you switch to Forge 1291 until I get a chance to work on the pointers. My next update is geared towards track reworking, so expect another FPS boost when I switch to a NBT-block-based track system instead of a tile entity one. Do note that in my testing each locomotive or stock rendered caused about a 3FPS drop on my machine with no other code running, so even with a perfect system there still will be performance penalties associated with rendering the complex models of ROW. That's the price you pay for detail!
Finally, some answers to questions:
@Dumboldoor5
@Japa
@nickWtn3
@Everyone
---- Minecraft Crash Report ----
// Ooh. Shiny.
Time: 2/15/16 1:02 PM
Description: Rendering entity in world
java.lang.NullPointerException: Rendering entity in world
at net.row.renderer.stock.RenderTenderCher.func_76986_a(RenderTenderCher.java:48)
at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:293)
at net.minecraft.client.renderer.entity.RenderManager.func_147936_a(RenderManager.java:271)
at net.minecraft.client.renderer.entity.RenderManager.func_147937_a(RenderManager.java:244)
at net.minecraft.client.renderer.RenderGlobal.func_147589_a(RenderGlobal.java:716)
at net.minecraft.client.renderer.EntityRenderer.func_78471_a(EntityRenderer.java:1596)
at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1334)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:990)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887)
at net.minecraft.client.main.Main.main(SourceFile:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at net.row.renderer.stock.RenderTenderCher.func_76986_a(RenderTenderCher.java:48)
-- Entity being rendered --
Details:
Entity Type: row.TenderCher (net.row.stock.tender.TenderCherepanov)
Entity ID: 70
Entity Name: entity.row.TenderCher.name
Entity's Exact location: 1103.50, 64.38, 890.50
Entity's Block location: World: (1103,64,890), Chunk: (at 15,4,10 in 68,55; contains blocks 1088,0,880 to 1103,255,895), Region: (2,1; contains chunks 64,32 to 95,63, blocks 1024,0,512 to 1535,255,1023)
Entity's Momentum: 0.00, -0.04, 0.00
-- Renderer details --
Details:
Assigned renderer: net.row.renderer.stock.RenderTenderCher@dfb8c98
Location: 0.00,-1.12,1.00 - World: (0,-2,1), Chunk: (at 0,-1,1 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Rotation: 0.0
Delta: 0.79717386
Stacktrace:
at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:293)
at net.minecraft.client.renderer.entity.RenderManager.func_147936_a(RenderManager.java:271)
at net.minecraft.client.renderer.entity.RenderManager.func_147937_a(RenderManager.java:244)
at net.minecraft.client.renderer.RenderGlobal.func_147589_a(RenderGlobal.java:716)
at net.minecraft.client.renderer.EntityRenderer.func_78471_a(EntityRenderer.java:1596)
-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Savage_Rails'/0, l='MpServer', x=1103.50, y=65.62, z=889.50]]
Chunk stats: MultiplayerChunkCache: 961, 970
Level seed: 0
Level generator: ID 01 - flat, ver 0. Features enabled: false
Level generator options:
Level spawn location: World: (1101,4,882), Chunk: (at 13,0,2 in 68,55; contains blocks 1088,0,880 to 1103,255,895), Region: (2,1; contains chunks 64,32 to 95,63, blocks 1024,0,512 to 1535,255,1023)
Level time: 289 game time, 1289 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 2 total; [EntityClientPlayerMP['Savage_Rails'/0, l='MpServer', x=1103.50, y=65.62, z=889.50], TenderCherepanov['entity.row.TenderCher.name'/70, l='MpServer', x=1103.50, y=64.38, z=890.50]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:373)
at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2433)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:908)
at net.minecraft.client.main.Main.main(SourceFile:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_25, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 4931319608 bytes (4702 MB) / 6289358848 bytes (5998 MB) up to 6289358848 bytes (5998 MB)
JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx6144M -Xms6144M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.85.1272 Minecraft Forge 10.13.2.1272 Optifine OptiFine_1.7.10_HD_U_D1 13 mods loaded, 13 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.10.85.1272} [Forge Mod Loader] (forge-1.7.10-10.13.2.1272.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.13.2.1272} [Minecraft Forge] (forge-1.7.10-10.13.2.1272.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
CodeChickenCore{1.0.1.8} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
BetterFoliage{2.0.3} [Better Foliage] (BetterFoliage-MC1.7.10-2.0.3.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
doggystyle{1.1.3.99} [Doggy Style] (DoggyStyle-1.1.3.99.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ForgeMultipart{1.2.0.345} [Forge Multipart] (ForgeMultipart-1.7.10-1.2.0.345-universal.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MrTJPCoreMod{1.1.0.32} [MrTJPCore] (MrTJPCore-1.7.10-1.1.0.32-universal.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ProjRed|Core{4.7.0pre10.93} [ProjectRed Core] (ProjectRed-1.7.10-4.7.0pre10.93-Base.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
row{1.7.10-3.1.0-D} [Rails of War] (Rails of War-1.7.10-3.1.0-D.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
rowam{6.0.4} [Rails of War Automation Module] (ROWAM-1.7.10-6.0.4.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
McMultipart{1.2.0.345} [Minecraft Multipart Plugin] (ForgeMultipart-1.7.10-1.2.0.345-universal.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ForgeMicroblock{1.2.0.345} [Forge Microblocks] (ForgeMultipart-1.7.10-1.2.0.345-universal.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Launched Version: 1.7.10-Forge10.13.2.1272
LWJGL: 2.9.1
OpenGL: GeForce GTX 960/PCIe/SSE2 GL version 4.5.0 NVIDIA 347.88, NVIDIA Corporation
GL Caps: Using GL 1.3 multitexturing.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Anisotropic filtering is supported and maximum anisotropy is 16.
Shaders are available because OpenGL 2.1 is supported.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Anisotropic Filtering: Off (1)
OptiFine Version: OptiFine_1.7.10_HD_U_D1
Render Distance Chunks: 16
Mipmaps: 4
Anisotropic Filtering: 1
Antialiasing: 0
Multitexture: false
OpenGlVersion: 4.5.0 NVIDIA 347.88
OpenGlRenderer: GeForce GTX 960/PCIe/SSE2
OpenGlVendor: NVIDIA Corporation
CpuCount: 4
I don't know why it crashes when i place the Cherepanov tender, doesn't happen with any other entities.
Bug with the rails is still here: track disappears only if you destroy its "main" block. Also track holds on even if you delete blocks under it (screenshots).
vesion ROW-1.7.10-3.1.0-D
Upd: after trying to destroy track and then removing the main block it leaves some empty blocks.
@Savage_Donkey
Oops. Turns out eclipse's dev environment doesn't catch all issues. I'll have that patched with the next update.
@AlexTrainer
I'm aware of that bug. I botched up the track gag system when I converted gags to be decoration compatible. Currently, I'm in the process of overhauling the track system to cut down on tile entities, so expect the bug to be patched on the next release as well.
Won't cutting down on tile entities make it harder to line up turns though? Ex.
Rails of War
also
ROWAM
Minecraft Model Railroad
MC Flight Simulator
Not if you make them blocks instead. Currently all ROW tracks spawn blocks with tile entities that contain the location of the master block. This makes looking up what type of track you're on easy, as the tile entities are all capable of holding different information. Unfortunately, this means that a S-16 track has a total of 16*3=48 tile entities. Safe to say, that's a lot of ticking tiles. I've got the system working now where the only tile entity in each track is at the master block. The only problem is my world NBT data isn't parsing correctly, so the system bugs out on a world reload. Once I get that plugged you should see a significant FPS gain. I'm also planning on overhauling the rolling stock code at the same time, so expect near-perfect movement of locomotives.
Does this change mean that tracks will get better lighting, or will they still have the lighting from the parent block applied to the whole track section?
Minecraft uses the light value at a block to control the lighting of said block. Since the tracks are technically only on block, the lighting is dependent on that block only. The only way to make the lighting better would be to split the track into more sections, which is incredibly difficult and more of a job for Naiten than me.
Oh, I finally hammered out the bugs out of the mapping system, so now all that's left is updating the pointers and some stock things. I swear, though, the lack of documentation for Minecraft base code and Forge features is one of the greatest impediments to effective modding. I spent 3 hours trying to implement Minecraft's map savedata system that I could have used to tweak locos or add in Tub inventory systems. At least it's working now...
Rails of War-1.7.10-3.0.0-D
See now that's your problem right there. You should be using the newest mod version, 3.1.0. That one doesn't have the error.
I added recipes
I made it for my server
something like this would be good for a model
@don: if you're planning on incorporating the features of ROWAM into this would the detector block be made into a track?
Cool, although I would think you would've used iron ingots instead of iron blocks.
too cheap
UPDATE DAY!
This is the largest update I've done for ROW. Tons of fixes and re-factoring brings my work to about 85% completion. The download is here.
Changes: