Skip to content

Commit

Permalink
Bug Fixes & Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
LopyLuna committed Oct 7, 2024
1 parent 2b5a8a8 commit a2116ed
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 48 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version = 1.2b.Beta Mid-Dev
mod_version = 1.2c.Beta Mid-Dev
artifact_minecraft_version = 1.19.2

forge_version = 43.3.13
forge_version = 43.4.4
mc_version=1.19.2
minecraft_version=1.19.2

Expand Down
7 changes: 3 additions & 4 deletions src/main/java/uwu/lopyluna/create_dd/DesireClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent;
import uwu.lopyluna.create_dd.infrastructure.client.DebugOutliner;
import uwu.lopyluna.create_dd.infrastructure.gui.DesiresBaseConfigScreen;
import uwu.lopyluna.create_dd.infrastructure.ponder.DesirePonderTags;
import uwu.lopyluna.create_dd.infrastructure.ponder.DesiresPonderIndex;
import uwu.lopyluna.create_dd.registry.DesiresParticleTypes;

import static uwu.lopyluna.create_dd.DesiresCreate.MOD_ID;
Expand All @@ -28,13 +26,14 @@ public static void onCtorClient(IEventBus modEventBus, IEventBus forgeEventBus)
modEventBus.addListener(DesiresParticleTypes::registerFactories);
}

@SuppressWarnings("removal")
public static void clientInit(final FMLClientSetupEvent event) {

ModLoadingContext.get().getActiveContainer().registerExtensionPoint(ConfigScreenHandler.ConfigScreenFactory.class,
() -> new ConfigScreenHandler.ConfigScreenFactory((minecraft, screen) -> new DesiresBaseConfigScreen(screen, MOD_ID)));

DesirePonderTags.register();
DesiresPonderIndex.register();
//DesirePonderTags.register();
//DesiresPonderIndex.register();
}


Expand Down
2 changes: 1 addition & 1 deletion src/main/java/uwu/lopyluna/create_dd/DesiresCreate.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import java.util.Random;


@SuppressWarnings({"deprecation", "unused"})
@SuppressWarnings({"removal", "deprecation", "unused"})
@Mod(DesiresCreate.MOD_ID)
public class DesiresCreate {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ private static <T extends ConfigBase> T register(Supplier<T> factory, ModConfig.
return config;
}

@SuppressWarnings("removal")
public static void register(ModLoadingContext context) {
client = register(DClient::new, ModConfig.Type.CLIENT);
common = register(DCommon::new, ModConfig.Type.COMMON);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import uwu.lopyluna.create_dd.content.data_recipes.MechanicalCraftingRecipeGen;
import uwu.lopyluna.create_dd.content.data_recipes.SequencedAssemblyRecipeGen;
import uwu.lopyluna.create_dd.content.data_tags.DesiresRegistrateTags;
import uwu.lopyluna.create_dd.infrastructure.ponder.DesirePonderTags;
import uwu.lopyluna.create_dd.infrastructure.ponder.DesiresPonderIndex;
import uwu.lopyluna.create_dd.registry.DesiresLangPartial;

import java.util.function.BiConsumer;
Expand Down Expand Up @@ -49,7 +47,7 @@ private static void providePartialLang(BiConsumer<String, String> consumer) {
}

private static void providePonderLang() {
DesirePonderTags.register();
DesiresPonderIndex.register();
//DesirePonderTags.register();
//DesiresPonderIndex.register();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package uwu.lopyluna.create_dd.mixins;

import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.EnchantmentHelper;
import net.minecraft.world.item.enchantment.Enchantments;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import uwu.lopyluna.create_dd.registry.DesiresTags;

@Mixin(EnchantmentHelper.class)
public class MixinEnchantmentHelper {


@SuppressWarnings("deprecation")
@Inject(method = "getMobLooting(Lnet/minecraft/world/entity/LivingEntity;)I", at = @At(value = "HEAD"), cancellable = true)
private static void getMobLooting(LivingEntity pEntity, CallbackInfoReturnable<Integer> cir) {
ItemStack stack = desires$isRightForItem(Enchantments.MOB_LOOTING, pEntity);
if (stack != ItemStack.EMPTY)
cir.setReturnValue((net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(Enchantments.MOB_LOOTING, stack) * 3) + 1);
}

@SuppressWarnings("all")
@Unique
private static ItemStack desires$isRightForItem(Enchantment pEnchantment, LivingEntity pEntity) {
Iterable<ItemStack> iterable = pEnchantment.getSlotItems(pEntity).values();
if (iterable == null) {
return ItemStack.EMPTY;
} else {
ItemStack i = ItemStack.EMPTY;
for(ItemStack itemstack : iterable) {
if (!itemstack.isEmpty() && itemstack.is(DesiresTags.AllItemTags.ADDITIONAL_DROPS_TOOL.tag))
i = itemstack;
}
return i;
}
}
}
31 changes: 0 additions & 31 deletions src/main/java/uwu/lopyluna/create_dd/mixins/MixinForgeHooks.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@
public class DesiresOreFeaturesEntries {

public static final OreFeatureConfigEntry GABBRO_BLOB =
Objects.requireNonNull(create("gabbro_blob", 64, 0.85F, -64, 0).standardDatagenExt())
Objects.requireNonNull(create("gabbro_blob", 64, 0.85F * 0.75f, -64, 0).standardDatagenExt())
.withBlocks(Couple.create(AllPaletteStoneTypes.GRANITE.baseBlock, DesiresPaletteStoneTypes.GABBRO.baseBlock))
.biomeTag(BiomeTags.IS_OVERWORLD)
.parent();

public static final OreFeatureConfigEntry DOLOMITE_BLOB =
Objects.requireNonNull(create("dolomite_blob", 64, 0.85F, -64, 0).standardDatagenExt())
Objects.requireNonNull(create("dolomite_blob", 64, 0.85F * 0.75f, -64, 0).standardDatagenExt())
.withBlocks(Couple.create(AllPaletteStoneTypes.DIORITE.baseBlock, DesiresPaletteStoneTypes.DOLOMITE.baseBlock))
.biomeTag(BiomeTags.IS_OVERWORLD)
.parent();

public static final OreFeatureConfigEntry STRIATED_ERODED_OVERWORLD =
Objects.requireNonNull(create("striated_eroded_overworld", 24, 1 / 36f, -64, 0).layeredDatagenExt())
Objects.requireNonNull(create("striated_eroded_overworld", 24, (1 / 36f) * 0.75f, -64, 0).layeredDatagenExt())
.withLayerPattern(DesiresLayerPatterns.SPACE_ROCK)
.biomeTag(BiomeTags.IS_OVERWORLD)
.parent();

public static final OreFeatureConfigEntry STRIATED_ERODED_NETHER =
Objects.requireNonNull(create("striated_eroded_nether", 24, 1 / 36f, 0, 100).layeredDatagenExt())
Objects.requireNonNull(create("striated_eroded_nether", 24, (1 / 36f) * 0.75f, 0, 100).layeredDatagenExt())
.withLayerPattern(DesiresLayerPatterns.SPACE_ROCK)
.biomeTag(BiomeTags.IS_NETHER)
.parent();

public static final OreFeatureConfigEntry STRIATED_ORES_OCEANS =
Objects.requireNonNull(create("striated_ores_oceans", 32, 1 / 18f, -30, 70).layeredDatagenExt())
Objects.requireNonNull(create("striated_ores_oceans", 32, (1 / 18f) * 0.75f, -30, 70).layeredDatagenExt())
.withLayerPattern(DesiresLayerPatterns.WEATHERED_LIMESTONE)
.biomeTag(BiomeTags.IS_OCEAN)
.parent();
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/create_dd.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"MixinBlockFluidResBlock",
"MixinClutchBlock",
"MixinClutchBlockEntity",
"MixinEnchantmentHelper",
"MixinFluidPropagator",
"MixinForgeHooks",
"MixinGearshiftBlock",
"MixinGearshiftBlockEntity",
"MixinKineticBlockEntity",
Expand Down

0 comments on commit a2116ed

Please sign in to comment.