-
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.
fixed compile errors in common when compiled with the forge side
- Loading branch information
Showing
14 changed files
with
45 additions
and
144 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
27 changes: 27 additions & 0 deletions
27
common/src/main/java/muramasa/antimatter/recipe/BaseRecipeSerializer.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,27 @@ | ||
package muramasa.antimatter.recipe; | ||
|
||
import muramasa.antimatter.recipe.material.MaterialSerializer; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.item.crafting.Recipe; | ||
import net.minecraft.world.item.crafting.RecipeSerializer; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public abstract class BaseRecipeSerializer<T extends Recipe<?>> implements RecipeSerializer<T> { | ||
private ResourceLocation registryName = null; | ||
|
||
public RecipeSerializer<?> setRegistryName(ResourceLocation arg) { | ||
if (getRegistryName() != null) | ||
throw new IllegalStateException("Attempted to set registry name with existing registry name! New: " + arg.toString() + " Old: " + getRegistryName()); | ||
this.registryName = arg; | ||
return this; | ||
} | ||
|
||
@Nullable | ||
public ResourceLocation getRegistryName() { | ||
return registryName; | ||
} | ||
|
||
public Class getRegistryType() { | ||
return this.getClass(); | ||
} | ||
} |
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
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
33 changes: 0 additions & 33 deletions
33
forge/src/main/java/muramasa/antimatter/mixin/forge/AntimatterRecipeSerializerMixin.java
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
forge/src/main/java/muramasa/antimatter/mixin/forge/ContainerShapedSerializerMixin.java
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
forge/src/main/java/muramasa/antimatter/mixin/forge/ContainerShapelessSerializerMixin.java
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
forge/src/main/java/muramasa/antimatter/mixin/forge/MaterialSerializerMixin.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