-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 1.19.4: 3.0.4
- Loading branch information
Showing
17 changed files
with
91 additions
and
419 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
34 changes: 0 additions & 34 deletions
34
...on/src/main/java/com/faboslav/friendsandfoes/common/init/registry/BasicRegistryEntry.java
This file was deleted.
Oops, something went wrong.
67 changes: 0 additions & 67 deletions
67
common/src/main/java/com/faboslav/friendsandfoes/common/init/registry/CustomRegistry.java
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
...n/java/com/faboslav/friendsandfoes/common/init/registry/EnumResourcefulRegistryChild.java
This file was deleted.
Oops, something went wrong.
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
63 changes: 0 additions & 63 deletions
63
...in/java/com/faboslav/friendsandfoes/common/init/registry/fabric/FabricCustomRegistry.java
This file was deleted.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
...ain/java/com/faboslav/friendsandfoes/common/init/registry/fabric/FabricRegistryEntry.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 com.faboslav.friendsandfoes.common.init.registry.fabric; | ||
|
||
import com.faboslav.friendsandfoes.common.init.registry.RegistryEntry; | ||
import net.minecraft.registry.Registry; | ||
import net.minecraft.util.Identifier; | ||
import java.util.function.Supplier; | ||
|
||
/** | ||
* Event/registry related is code based on The Bumblezone/Resourceful Lib mods with permissions from the authors | ||
* | ||
* @author TelepathicGrunt | ||
* <a href="https://github.com/TelepathicGrunt/Bumblezone">https://github.com/TelepathicGrunt/Bumblezone</a> | ||
* @author ThatGravyBoat | ||
* <a href="https://github.com/Team-Resourceful/ResourcefulLib">https://github.com/Team-Resourceful/ResourcefulLib</a> | ||
*/ | ||
public class FabricRegistryEntry<T> implements RegistryEntry<T> | ||
{ | ||
private final Identifier id; | ||
private final T value; | ||
|
||
private FabricRegistryEntry(Identifier id, T value) { | ||
this.id = id; | ||
this.value = value; | ||
} | ||
|
||
public static <T, I extends T> FabricRegistryEntry<I> of( | ||
Registry<T> registry, | ||
Identifier id, | ||
Supplier<I> supplier | ||
) { | ||
return new FabricRegistryEntry<>(id, Registry.register(registry, id, supplier.get())); | ||
} | ||
|
||
@Override | ||
public T get() { | ||
return this.value; | ||
} | ||
|
||
@Override | ||
public Identifier getId() { | ||
return this.id; | ||
} | ||
} |
Oops, something went wrong.