generated from NeoForgeMDKs/MDK-1.21-ModDevGradle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
483 changed files
with
6,569 additions
and
222 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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package github.premiumrush.ascension; | ||
|
||
import github.premiumrush.ascension.init.*; | ||
import github.premiumrush.ascension.loot.ModLootModifiers; | ||
import github.premiumrush.ascension.init.MobEffectInit; | ||
import net.neoforged.bus.api.IEventBus; | ||
import net.neoforged.fml.common.Mod; | ||
|
||
@Mod(Ascension.MODID) | ||
public class Ascension { | ||
public static final String MODID = "ascension"; | ||
|
||
public Ascension(IEventBus bus) { | ||
ItemInit.ITEMS.register(bus); | ||
BlockInit.BLOCKS.register(bus); | ||
CreativeTabInit.TABS.register(bus); | ||
ParticleInit.PARTICLE_TYPES.register(bus); | ||
ArmorMaterialInit.ARMOR_MATERIALS.register(bus); | ||
MobEffectInit.MOB_EFFECTS.register(bus); | ||
|
||
ModLootModifiers.GLOBAL_LOOT_MODIFIER_SERIALIZERS.register(bus); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/github/premiumrush/ascension/datagen/DataGenerators.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,26 @@ | ||
package github.premiumrush.ascension.datagen; | ||
|
||
import github.premiumrush.ascension.Ascension; | ||
import github.premiumrush.ascension.datagen.loot.ModGlobalLootModifiersProvider; | ||
import net.minecraft.core.HolderLookup; | ||
import net.minecraft.data.DataGenerator; | ||
import net.minecraft.data.PackOutput; | ||
import net.neoforged.bus.api.SubscribeEvent; | ||
import net.neoforged.fml.common.EventBusSubscriber; | ||
import net.neoforged.neoforge.common.data.ExistingFileHelper; | ||
import net.neoforged.neoforge.data.event.GatherDataEvent; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
@EventBusSubscriber(modid = Ascension.MODID, bus = EventBusSubscriber.Bus.MOD) | ||
public class DataGenerators { | ||
@SubscribeEvent | ||
public static void gatherData(GatherDataEvent event) { | ||
DataGenerator generator = event.getGenerator(); | ||
PackOutput packOutput = generator.getPackOutput(); | ||
ExistingFileHelper existingFileHelper = event.getExistingFileHelper(); | ||
CompletableFuture<HolderLookup.Provider> lookupProvider = event.getLookupProvider(); | ||
|
||
generator.addProvider(event.includeServer(), new ModGlobalLootModifiersProvider(packOutput, lookupProvider)); | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
src/main/java/github/premiumrush/ascension/datagen/loot/ModGlobalLootModifiersProvider.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,48 @@ | ||
package github.premiumrush.ascension.datagen.loot; | ||
|
||
import github.premiumrush.ascension.Ascension; | ||
import github.premiumrush.ascension.init.ItemInit; | ||
import github.premiumrush.ascension.loot.AddItem; | ||
import net.minecraft.advancements.critereon.EntityEquipmentPredicate; | ||
import net.minecraft.advancements.critereon.EntityPredicate; | ||
import net.minecraft.advancements.critereon.ItemPredicate; | ||
import net.minecraft.core.HolderLookup; | ||
import net.minecraft.data.PackOutput; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.level.storage.loot.LootContext; | ||
import net.minecraft.world.level.storage.loot.predicates.*; | ||
import net.neoforged.neoforge.common.data.GlobalLootModifierProvider; | ||
import net.neoforged.neoforge.common.loot.LootTableIdCondition; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
public class ModGlobalLootModifiersProvider extends GlobalLootModifierProvider { | ||
public ModGlobalLootModifiersProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> registries) { | ||
super(output, registries, Ascension.MODID); | ||
} | ||
|
||
@Override | ||
protected void start() { | ||
add("blaze_gem_from_blaze", new AddItem(new LootItemCondition[] { | ||
|
||
new LootTableIdCondition.Builder(ResourceLocation.parse("entities/blaze")).build(), | ||
|
||
LootItemEntityPropertyCondition.hasProperties( | ||
LootContext.EntityTarget.ATTACKER, | ||
EntityPredicate.Builder.entity().equipment( | ||
EntityEquipmentPredicate.Builder.equipment().mainhand( | ||
ItemPredicate.Builder.item().of(ItemInit.INFUSED_VEXAL_SWORD.get()) | ||
) | ||
) | ||
).build(), | ||
|
||
LootItemRandomChanceCondition.randomChance(0.5f).build() | ||
|
||
}, "blaze_gem_from_blaze", 1 , ItemInit.BLAZE_GEM.get())); | ||
|
||
add("dormant_template_from_end_city", new AddItem(new LootItemCondition[] { | ||
new LootTableIdCondition.Builder(ResourceLocation.parse("chests/end_city_treasure")).build(), | ||
LootItemRandomChanceCondition.randomChance(0.3f).build(), | ||
}, "dormant_template_from_end_city", 1, ItemInit.FLEROVIUM_UPGRADE_SMITHING_TEMPLATE_INACTIVE.get())); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/github/premiumrush/ascension/event/ParticleEvents.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,18 @@ | ||
package github.premiumrush.ascension.event; | ||
|
||
import github.premiumrush.ascension.Ascension; | ||
import github.premiumrush.ascension.init.ParticleInit; | ||
import github.premiumrush.ascension.world.particle.BubbleParticle; | ||
import github.premiumrush.ascension.world.particle.ShadowDodgeParticle; | ||
import net.neoforged.bus.api.SubscribeEvent; | ||
import net.neoforged.fml.common.EventBusSubscriber; | ||
import net.neoforged.neoforge.client.event.RegisterParticleProvidersEvent; | ||
|
||
@EventBusSubscriber(modid = Ascension.MODID, bus = EventBusSubscriber.Bus.MOD) | ||
public class ParticleEvents { | ||
@SubscribeEvent | ||
public static void registerParticleProviders(RegisterParticleProvidersEvent event) { | ||
event.registerSpriteSet(ParticleInit.SHADOW_DODGE_PARTICLE.get(), ShadowDodgeParticle.CosyProvider::new); | ||
event.registerSpriteSet(ParticleInit.BUBBLE_PARTICLE.get(), BubbleParticle.Provider::new); | ||
} | ||
} |
Oops, something went wrong.