Comments (4)
I will look into it sometime next week. Thanks for the report.
Op zo 13 dec. 2015 17:42 schreef Cem Gökmen [email protected]:
Hello,
I am using the TrainCarts plugin on a Spigot 188 server, and while I enjoy
the plugin very much and appreciate your work, I have a small problem with
it that I would like to solveThe problem is as follows: when the carts of a train are travelling (no
matter the speed) sometimes they start flipping back and forward randomly
This does not affect the motion of the entire train, but is a very ugly
visual glitch, especially when it comes to storage minecarts The handle
faces forward, then backward, then forward again, repeatedly every secondThe most important result of this bug (or maybe an isolated, more severe
bug), however, is as follows: when a long train (let's say 10 carts)
powered using a furnace-minecart (either from the front, back, or middle,
no difference) makes a U-turn where the short section (the bottom of the
letter U) is shorter than the train (let's say 3 blocks), the train is
simultaneously facing two opposite directions at the same time As a result,
the direction calculation method fails, causing the furnace cart to
repeatedly switch directions of force This causes the entire train to start
going forward, backward, forward, backward; oscillating within the
U-corner, never getting outHere is a YouTube video containing evidence of the second issue, it's very
easy to reproduce:
https://wwwyoutubecom/watch?v=9IRtlpXMZtcI tried unsuccessfully to solve the issue, I'm really unfamiliar with the
source code and as such me fixing it would require a lot of extra time to
identify the source of the problemThank you for your help!
sultanskyman—
Reply to this email directly or view it on GitHub
#35.
Met vriendelijk groeten,
Matthijs Giezenberg
from traincarts.
Actually, I realized that even without any other carts, the powered minecart behaves very weirdly. At the corner it keeps changing direction, and is very bugged - and also, when it is placed on the rail and fed with coal, it tends to go off in a random direction, instead of the direction you're facing like it's supposed to.
It's breaking a lot of things on the server, so if you guys have any ideas what might be causing this - I can even try to fix it myself.
from traincarts.
Alright, I have isolated the issue into two different parts of code.
The first problem is that the block in a cart (furnace, chest, etc) randomly changes direction during travel, especially on u-turns and 45-degree rails. This, however, does not affect its movement, and the direction property of the MinecartMember instance does not change, meaning it's a visual bug only, probably caused by something within the BKCommonLib library. This fix is outside my reach and I could not find the lines of code that were related to it.
The second problem is that the pushDirection property of a furnace minecart in the MinecartMemberFurnace class is incorrectly set at some turns. This is usually during turns where the minecart would eventually be facing the north/south direction. However, it doesn't make sense for a minecart to have a pushDirection property in the type of a BlockFace, when the only directions a powered minecart can push relative to the minecart's facing direction are forward, backward, and none.
As a result, I am submitting a pull request where I changed the pushDirection property to an integer that goes back and forth between -1, 0 and 1, representing reverse, no force, and forward respectively. This change also eliminates the need to update the pushDirection every time the minecart turns. With this fix, the problem of the infinite back-forward loop in the corner is also fixed.
I cannot think of any feature that would require the pushDirection to be a BlockFace like it is right now. If that is so, please review the pull request and merge it with the code. I will add to this issue any unexpected results this fix may cause, too.
from traincarts.
Good work! I haven't really looked deep into this but it is a nice thing to have it fixed now. Thank you.
from traincarts.
Related Issues (20)
- When typing `/train speedlimit` without any additional arguments, get the current speed of the train back. HOT 6
- [Request] Option to exempt Weighted Pressure Plates (or pressure plates in general) from pressure plate logic HOT 6
- Signs not working in 1.19.4 HOT 2
- All players will be kicked by server when trying editing a SignLink sign HOT 9
- Add stopwatch placeholder
- Spinning wheel animations go wild at speed HOT 8
- Train chests don't always preserve cart orientation/flipped status HOT 4
- Locked, Finite Train Chests Should Be Removed from the Player’s Inventory HOT 3
- Combined trains break apart after server restarting HOT 42
- Interesting deadmessage HOT 4
- After waiting at waiter sign, trains aren't launched to full speed again HOT 28
- Announce next destination HOT 1
- Folia Support HOT 3
- Failed to perform physics HOT 16
- multiple trains in/waiting at spmutex enter region after server restart HOT 38
- Switcher sign fault not switching rail to the left HOT 1
- Update the demo
- Cannot place MineCarts outside vanilla worldheight HOT 21
- Configuration Option for Permanent Chunk Loading to Reduce I/O Pressure in Train Carts HOT 4
- Powered Rail Bug HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traincarts.