-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from haykam821/update-1.21.2
Update mod to Minecraft 1.21.2
- Loading branch information
Showing
104 changed files
with
845 additions
and
675 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
plugins { | ||
id 'fabric-loom' version '1.6.+' | ||
id 'fabric-loom' version '1.8.+' | ||
id 'maven-publish' | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# Done to increase the memory available to gradle. | ||
org.gradle.jvmargs=-Xmx1G | ||
|
||
minecraft_version=1.21 | ||
yarn_mappings=1.21+build.1 | ||
loader_version=0.15.11 | ||
minecraft_version=1.21.2 | ||
yarn_mappings=1.21.2+build.1 | ||
loader_version=0.16.7 | ||
|
||
#Fabric api | ||
fabric_version=0.100.1+1.21 | ||
fabric_version=0.106.1+1.21.2 | ||
|
||
# Mod Properties | ||
mod_version=0.4.12 | ||
mod_version=0.5.0 | ||
maven_group=xyz.nucleoid | ||
archives_base_name=stimuli |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/main/java/xyz/nucleoid/stimuli/duck/ExplosionCancellable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package xyz.nucleoid.stimuli.duck; | ||
|
||
public interface ExplosionCancellable { | ||
boolean stimuli$isCancelled(); | ||
} |
43 changes: 43 additions & 0 deletions
43
src/main/java/xyz/nucleoid/stimuli/event/DroppedItemsResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package xyz.nucleoid.stimuli.event; | ||
|
||
import net.minecraft.item.ItemStack; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
public final class DroppedItemsResult { | ||
private static final DroppedItemsResult DENY = new DroppedItemsResult(EventResult.PASS, Collections.emptyList()); | ||
|
||
private final EventResult result; | ||
private final List<ItemStack> dropStacks; | ||
|
||
private DroppedItemsResult(EventResult result, List<ItemStack> dropStacks) { | ||
this.result = result; | ||
this.dropStacks = dropStacks; | ||
} | ||
|
||
public EventResult result() { | ||
return this.result; | ||
} | ||
|
||
public List<ItemStack> dropStacks() { | ||
return this.dropStacks; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "DroppedItemsResult{result=" + this.result + ", dropStacks=" + this.dropStacks + "}"; | ||
} | ||
|
||
public static DroppedItemsResult pass(List<ItemStack> dropStacks) { | ||
return new DroppedItemsResult(EventResult.PASS, dropStacks); | ||
} | ||
|
||
public static DroppedItemsResult allow(List<ItemStack> dropStacks) { | ||
return new DroppedItemsResult(EventResult.ALLOW, dropStacks); | ||
} | ||
|
||
public static DroppedItemsResult deny() { | ||
return DENY; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package xyz.nucleoid.stimuli.event; | ||
|
||
import net.minecraft.util.ActionResult; | ||
|
||
/** | ||
* Represents the change in control flow that should occur in response to an event listener. | ||
*/ | ||
public enum EventResult { | ||
/** | ||
* Indicates that the event should move on to the next listener. | ||
*/ | ||
PASS, | ||
/** | ||
* Indicates that the event should cancel further processing and allow the behavior to occur. | ||
*/ | ||
ALLOW, | ||
/** | ||
* Indicates that the event should cancel further processing and prevent behavior from occurring. | ||
*/ | ||
DENY; | ||
|
||
public ActionResult asActionResult() { | ||
return switch (this) { | ||
case ALLOW -> ActionResult.SUCCESS; | ||
case DENY -> ActionResult.FAIL; | ||
default -> ActionResult.PASS; | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.