Minecraft Wiki
Register
Advertisement

Thumbnail[]

What happened to the little pic in the Items directory at the bottom of the page? It now looks like a painting. -RobotAccomplice –Preceding unsigned comment was added by 75.73.151.49 (talk) at 16:54, 23 October 2012 (UTC). Please sign your posts with ~~~~

Formatting[]

Every Item page needs;

Infobox
Small Desription
Crafting
Summary
{{Blocks}}
Grid Cakebomb Arrran Weeviling The Inventor of the Cake Bomb! 22:37, 2 September 2012 (UTC) Keep on formattin

Renew[]

Sticks (Wood > Tree)
String (Spider)
Carrot (Farming)
Grid Cakebomb Arrran Weeviling The Inventor of the Cake Bomb! 22:37, 2 September 2012 (UTC) Keep on farmin'

Portals[]

Can you ride a pig through a portal? –Preceding unsigned comment was added by 145.120.12.29 (Talk) 14:45, 17 September 2012 (UTC). Please sign your posts with ~~~~

Of course you can. As of 12w34a, all entities can travel to the Nether or the End via portals. I've added this fact to the article. --M0rphzone(talk) (*How to remove sidebar*) 18:37, 22 September 2012 (UTC)
Doesn't mean you can ride them through. I found by experiment that a minecart by itself can go through a portal, so can I, so can a Zombie Pigman... but me or the ZP riding in a minecart fail (in slightly different ways). Similarly, I just did a creative-mode experiment and confirmed that as was recently edited into the page (not by me), you cannot in fact ride a pig through the portal. --Mental Mouse 19:13, 2 January 2013 (UTC)

How?[]

how do you add the crafting picture-link thing on the page? (no vid. please) –Preceding unsigned comment was added by Mcpantsonfire (Talk|Contribs) 21:50, 19 September 2012 (UTC). Please sign your posts with ~~~~

[[Template:Crafting_grid]] --Kanegasi C 23:07, 19 September 2012 (UTC)

Discrepancy[]

This article states pigs have a top speed of 4 m/s without boost, and Pig 5 m/s. Which one is correct? 70.193.203.151 01:23, 20 April 2013 (UTC)

I did some testing and found that pigs move at a constant 4.6 blocks a second when you are holding but not clicking with a carrot on a stick and move at around 7.9 blocks a second while using the carrot on a stick. There was a constant speed for just holding the carrot on a stick while riding the pig and a random speed ranging from 6.1 to 9.7 blocks a second. This averaged as 7.9 blocks a second while using the carrot on a stick. - SuperDyl19 (talk) 06:15, 13 December 2015 (UTC)
Normal pig AI speed is related to, but not equal to its speed when a player with a carrot on a stick is riding it. A combination of testing, code diving and analysis led to me re-writing the boosted section.
Code diving using minecraft coder pack 1.12 revealed that boosted time was random between 140 and 980 ticks (and I have yet to see a boosted time outside of this range in 1.13). The pig's speed is recalculated each tick. It should boil down to this - b + b * 1.15 * sin(x * π / m), where b is the pig's base speed (which I went on to test as ~2.42m/s), x is the amount of ticks elapsed since the pig started boosting, π is the famous mathematical constant, and m is the maximum boosted ticks chosen initially by a PRNG. If you graph this and limit it to range {0 <= x <= m} you'll see that it makes the top half of a period of a sin wave. A neat property of half of a sin wave is that the average of all values is the peak value*π/2 (I actually had to adjust that formula slightly to account for our wave's y value not being centered on 0) and that doesn't depend on the wavelength/frequency. This is great since the only random element, "m, the maximum boosted ticks", only alters the frequency of the wave and doesn't touch the peaks. After I measured the peak speed as 5.2 m/s, I calculated the the average speed of a complete period of boosting, no matter the randomly assigned m value, is about 4.19m/s.
To get the speed that a pig travels when a player is riding it with a carrot on a stick, I simply did that in vanilla java 1.13 for 30 seconds using a stopwatch. I traveled about 72 blocks and my speed didn't seem to change so I must have traveled a constant speed of about 2.4 block/second. I tested in forge 1.12 with the speedometer mod (which just measures distance traveled per tick) to get a more accurate reading of 2.42 block/second.
Measuring the top speed is a lot harder without external tools. Your boosted speed is not constant and since the boost time is random, you can't even predict how long it will take to reach the top speed. However, the formula I derived from the code predicts the top speed should be ~5.20m/s and measuring that in forge 1.12 with the speedometer mod gives exactly that result. Although I can't properly test it in vanilla 1.13, I think I can trust my methods to give at least better values that were shown before, so long as pig mechanics didn't change in 1.13.
To get the average boosted speed, I used a 10 minute test in a superflat world while holding down right click so the pig would stay boosted. I took screenshots of coordinates before and after the 10 minute period. I think you really need to use long periods of time to get accurate measurements of this because of the wave-nature of the speed. The pig is constantly accelerating or decelerating so for small periods of time, you might catch it when it decelerated significantly more than it accelerated. For large periods of time, the effect is much less pronounced though since every period includes exactly as much acceleration as it does deceleration. Anyway after my 10 minute test my pig moved about 2508 blocks. That comes out to 4.18m/s (with some error) so I assumed that the 4.19m/s I calculated earlier is accurate and used that.
Rypofalem (talk) 23:00, 13 January 2019 (UTC)
I wrote the speed formula incorrectly (but used the correct formula in my calculations, so the result is the same). Fixed. Rypofalem (talk) 00:24, 14 January 2019 (UTC)
Advertisement