-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/zeta120' into zeta120
- Loading branch information
Showing
170 changed files
with
1,970 additions
and
2,211 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#Sat Oct 14 17:25:20 UTC 2023 | ||
mapping_version=1.20.1 | ||
version=4.0-alpha | ||
version=4.0-beta | ||
mod_name=Quark | ||
mc_version=1.20.1 | ||
mapping_channel=official | ||
mod_id=quark | ||
build_number=421 | ||
build_number=423 | ||
dir_output=../Build Output/Quark/ |
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,41 @@ | ||
package org.violetmoon.quark; | ||
|
||
import net.minecraft.core.DefaultedRegistry; | ||
import net.minecraft.core.registries.BuiltInRegistries; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraftforge.eventbus.api.SubscribeEvent; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.registries.MissingMappingsEvent; | ||
import org.violetmoon.quark.base.Quark; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
@Mod.EventBusSubscriber | ||
public class QuarkRemapHandler { | ||
//datafixers could have also been used here but good luck figuring them out | ||
|
||
private static final Map<String, String> REMAP = new HashMap<>(); | ||
|
||
static { | ||
REMAP.put("quark:crafter", "minecraft:crafter"); | ||
REMAP.put("quark:polished_tuff", "minecraft:polished_tuff"); | ||
} | ||
|
||
@SubscribeEvent | ||
public static void onRemapBlocks(MissingMappingsEvent event) { | ||
remapAll(event, BuiltInRegistries.BLOCK); | ||
remapAll(event, BuiltInRegistries.ITEM); | ||
} | ||
|
||
|
||
private static <T> void remapAll(MissingMappingsEvent event, DefaultedRegistry<T> block) { | ||
for (var v : event.getMappings(block.key(), Quark.MOD_ID)) { | ||
String rem = REMAP.get(v.getKey().toString()); | ||
if (rem != null) { | ||
var b = block.getOptional(new ResourceLocation(rem)); | ||
b.ifPresent(v::remap); | ||
} else v.ignore(); | ||
} | ||
} | ||
} |
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
3 changes: 2 additions & 1 deletion
3
src/main/java/org/violetmoon/quark/api/IRuneColorProvider.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 |
---|---|---|
@@ -1,12 +1,13 @@ | ||
package org.violetmoon.quark.api; | ||
|
||
import net.minecraft.world.item.ItemStack; | ||
import org.violetmoon.quark.content.tools.base.RuneColor; | ||
|
||
/** | ||
* @author WireSegal | ||
* Created at 2:22 PM on 8/17/19. | ||
*/ | ||
public interface IRuneColorProvider { | ||
|
||
int getRuneColor(ItemStack stack); | ||
RuneColor getRuneColor(ItemStack stack); | ||
} |
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
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.