<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://forge.gemwire.uk/index.php?action=history&amp;feed=atom&amp;title=Effects%2F1.16</id>
	<title>Effects/1.16 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://forge.gemwire.uk/index.php?action=history&amp;feed=atom&amp;title=Effects%2F1.16"/>
	<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Effects/1.16&amp;action=history"/>
	<updated>2026-05-01T18:52:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://forge.gemwire.uk/index.php?title=Effects/1.16&amp;diff=2765&amp;oldid=prev</id>
		<title>ShrimpBot: Copy Effects to MC1.16 archive</title>
		<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Effects/1.16&amp;diff=2765&amp;oldid=prev"/>
		<updated>2021-07-27T04:14:11Z</updated>

		<summary type="html">&lt;p&gt;Copy &lt;a href=&quot;/wiki/Effects&quot; class=&quot;mw-redirect&quot; title=&quot;Effects&quot;&gt;Mob Effects&lt;/a&gt; to MC1.16 archive&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:14, 27 July 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l33&quot; &gt;Line 33:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 33:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you are only modifying an entity &amp;lt;code&amp;gt;Attribute&amp;lt;/code&amp;gt;, then there is no need to extend the class. When constructing the effect instance, chain &amp;lt;code&amp;gt;addAttributeModifier&amp;lt;/code&amp;gt; and select the specific attribute, it's unique id, the amount to affect by, and the operation to apply the amount with.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you are only modifying an entity &amp;lt;code&amp;gt;Attribute&amp;lt;/code&amp;gt;, then there is no need to extend the class. When constructing the effect instance, chain &amp;lt;code&amp;gt;addAttributeModifier&amp;lt;/code&amp;gt; and select the specific attribute, it's unique id, the amount to affect by, and the operation to apply the amount with.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Effects need to be [[Registration&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;|registered&lt;/del&gt;/1.16]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Effects need to be [[Registration/1.16&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|registered&lt;/ins&gt;]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &amp;lt;code&amp;gt;EffectInstance&amp;lt;/code&amp;gt; ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &amp;lt;code&amp;gt;EffectInstance&amp;lt;/code&amp;gt; ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l40&quot; &gt;Line 40:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 40:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Game Effects/1.16]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Game Effects/1.16&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|Category:Game Effects&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>ShrimpBot</name></author>
	</entry>
	<entry>
		<id>https://forge.gemwire.uk/index.php?title=Effects/1.16&amp;diff=2700&amp;oldid=prev</id>
		<title>ShrimpBot: Copy Effects to MC1.16 archive</title>
		<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Effects/1.16&amp;diff=2700&amp;oldid=prev"/>
		<updated>2021-07-27T03:58:25Z</updated>

		<summary type="html">&lt;p&gt;Copy &lt;a href=&quot;/wiki/Effects&quot; class=&quot;mw-redirect&quot; title=&quot;Effects&quot;&gt;Mob Effects&lt;/a&gt; to MC1.16 archive&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;An &amp;lt;code&amp;gt;Effect&amp;lt;/code&amp;gt; is what handles the specific logic on the entity it is on. For example, &amp;lt;code&amp;gt;Effects#SPEED&amp;lt;/code&amp;gt; adds an attribute modifier that affects the movement speed while &amp;lt;code&amp;gt;Effects#WITHER&amp;lt;/code&amp;gt; attacks the entity from a &amp;lt;code&amp;gt;DamageSource&amp;lt;/code&amp;gt; whenever the potion effect is ready to be applied.&lt;br /&gt;
&lt;br /&gt;
== Creating an &amp;lt;code&amp;gt;Effect&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
You can create an &amp;lt;code&amp;gt;Effect&amp;lt;/code&amp;gt; using two methods. The first creates a regular &amp;lt;code&amp;gt;Effect&amp;lt;/code&amp;gt; and applies the logic in some event method. The other method involves extending the &amp;lt;code&amp;gt;Effect&amp;lt;/code&amp;gt; class and overriding specific methods when needed. This documentation will focus on the second method.&lt;br /&gt;
&lt;br /&gt;
There are four methods that are important depending on the type of effect you are creating. In each scenario, you should take into account whether you should extend &amp;lt;code&amp;gt;Effect&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;InstantEffect&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the classes and methods to review:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=1&lt;br /&gt;
!Class !!Usage &lt;br /&gt;
|-&lt;br /&gt;
|   &amp;lt;code&amp;gt;Effect&amp;lt;/code&amp;gt;   ||  The basic effect class. Should be used if the effect happens over time. &lt;br /&gt;
|-&lt;br /&gt;
|   &amp;lt;code&amp;gt;InstantEffect&amp;lt;/code&amp;gt;   ||  An extended version of the effect class. Should be used if the effect happens only once and instantly. &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=1&lt;br /&gt;
!Method !!Description &lt;br /&gt;
|-&lt;br /&gt;
|   &amp;lt;code&amp;gt;isReady&amp;lt;/code&amp;gt;   ||  Determines how fast an effect should call &amp;lt;code&amp;gt;performEffect&amp;lt;/code&amp;gt; while applied. This is overridden by &amp;lt;code&amp;gt;InstantEffect&amp;lt;/code&amp;gt; to occur after one tick. If too fast, the server will not have enough time to execute the damage on the entity. &lt;br /&gt;
|-&lt;br /&gt;
|   &amp;lt;code&amp;gt;performEffect&amp;lt;/code&amp;gt;   ||  Executes the logic on the entity when called. &lt;br /&gt;
|-&lt;br /&gt;
|   &amp;lt;code&amp;gt;isInstant&amp;lt;/code&amp;gt;   ||  Determines if the effect is instant. Returns true in &amp;lt;code&amp;gt;InstantEffect&amp;lt;/code&amp;gt;. &lt;br /&gt;
|-&lt;br /&gt;
|   &amp;lt;code&amp;gt;affectEntity&amp;lt;/code&amp;gt;   ||  Executes the logic on the entity when called. &amp;lt;code&amp;gt;isInstant&amp;lt;/code&amp;gt; must return true for this to be called. &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you are only modifying an entity &amp;lt;code&amp;gt;Attribute&amp;lt;/code&amp;gt;, then there is no need to extend the class. When constructing the effect instance, chain &amp;lt;code&amp;gt;addAttributeModifier&amp;lt;/code&amp;gt; and select the specific attribute, it's unique id, the amount to affect by, and the operation to apply the amount with.&lt;br /&gt;
&lt;br /&gt;
Effects need to be [[Registration|registered/1.16]].&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;code&amp;gt;EffectInstance&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
To allow greater customization, each effect is passed in as an &amp;lt;code&amp;gt;EffectInstance&amp;lt;/code&amp;gt; which allows the user to specify additional information for what the effect should do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Effects/1.16]]&lt;/div&gt;</summary>
		<author><name>ShrimpBot</name></author>
	</entry>
</feed>