Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More Compat #55

Open
wants to merge 1 commit into
base: 1.21
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ loader_version=0.15.11

# Mod Properties
mod_name=Particular
mod_version=1.1.1+1.21
mod_version=1.1.2+1.21
maven_group=com.chailotl.particular
archives_base_name=particular

Expand Down
20 changes: 17 additions & 3 deletions src/main/java/com/chailotl/particular/Main.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.chailotl.particular;

import com.chailotl.particular.compat.RegionsUnexplored;
import com.chailotl.particular.compat.Traverse;
import com.chailotl.particular.compat.WilderWild;
import com.chailotl.particular.compat.*;
import com.chailotl.particular.mixin.AccessorBiome;
import net.fabricmc.api.ClientModInitializer;

Expand Down Expand Up @@ -84,6 +82,22 @@ public void onInitializeClient()
WilderWild.addLeaves();
}

if (FabricLoader.getInstance().isModLoaded("pearfection"))
{
Pearfection.addLeaves();
}

if (FabricLoader.getInstance().isModLoaded("verdant"))
{
Verdant.addLeaves();
}

if (FabricLoader.getInstance().isModLoaded("charm"))
{
Charm.addLeaves();
}


// Client events
ClientChunkEvents.CHUNK_LOAD.register((world, chunk) -> {
if (!Main.CONFIG.cascades()) { return; }
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/chailotl/particular/Particles.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ public class Particles
public static final SimpleParticleType WW_CYPRESS_LEAF = registerParticle("ww_cypress_leaf", ConiferLeafParticle.Factory::new);
public static final SimpleParticleType WW_PALM_LEAF = registerParticle("ww_palm_leaf", BigLeafParticle.Factory::new);

// Pearfection leaves
public static final SimpleParticleType PEAR_CALLERY_LEAF = registerParticle("pear_callery_leaf", LeafParticle.Factory::new);

// Verdant leaves
public static final SimpleParticleType VERD_MULBERRY_LEAF = registerParticle("verd_mulberry_leaf", SpinningLeafParticle.Factory::new);

// Charm leaves
public static final SimpleParticleType CHARM_EBONY_LEAF = registerParticle("charm_ebony_leaf", LeafParticle.Factory::new);


// Other particles
public static final SimpleParticleType WATER_RIPPLE = registerParticle("water_ripple", WaterRippleParticle.Factory::new);
public static final SimpleParticleType ENDER_BUBBLE = registerParticle("ender_bubble", EnderBubbleParticle.Factory::new);
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/com/chailotl/particular/compat/Charm.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.chailotl.particular.compat;

import com.chailotl.particular.Main;
import com.chailotl.particular.Particles;
import net.minecraft.util.Identifier;

public class Charm
{
private static String MOD_ID = "charm";

private static Identifier id(String path)
{
return Identifier.of(MOD_ID, path);
}

public static void addLeaves()
{
Main.registerLeafData(id("ebony_leaves"), new Main.LeafData(Particles.CHARM_EBONY_LEAF));
}
}
23 changes: 23 additions & 0 deletions src/main/java/com/chailotl/particular/compat/Pearfection.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.chailotl.particular.compat;

import com.chailotl.particular.Main;
import com.chailotl.particular.Particles;
import net.minecraft.util.Identifier;

import java.awt.*;

public class Pearfection
{
private static String MOD_ID = "pearfection";

private static Identifier id(String path)
{
return Identifier.of(MOD_ID, path);
}

public static void addLeaves()
{
Main.registerLeafData(id("callery_leaves"), new Main.LeafData(Particles.PEAR_CALLERY_LEAF, Color.white));
Main.registerLeafData(id("flowering_callery_leaves"), new Main.LeafData(Particles.PEAR_CALLERY_LEAF, Color.white));
}
}
21 changes: 21 additions & 0 deletions src/main/java/com/chailotl/particular/compat/Verdant.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.chailotl.particular.compat;

import com.chailotl.particular.Main;
import com.chailotl.particular.Particles;
import net.minecraft.util.Identifier;

public class Verdant
{
private static String MOD_ID = "verdant";

private static Identifier id(String path)
{
return Identifier.of(MOD_ID, path);
}

public static void addLeaves()
{
Main.registerLeafData(id("mulberry_leaves"), new Main.LeafData(Particles.VERD_MULBERRY_LEAF));
Main.registerLeafData(id("flowering_mulberry_leaves"), new Main.LeafData(Particles.VERD_MULBERRY_LEAF));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"textures": [
"particular:charm_ebony_leaf_2",
"particular:charm_ebony_leaf_3",
"particular:charm_ebony_leaf_1",
"particular:charm_ebony_leaf_4"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"textures": [
"particular:pear_callery_leaf_1",
"particular:pear_callery_leaf_2",
"particular:pear_callery_leaf_3",
"particular:pear_callery_leaf_4"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"textures": [
"particular:verd_mulberry_leaf_1",
"particular:verd_mulberry_leaf_2",
"particular:verd_mulberry_leaf_3",
"particular:verd_mulberry_leaf_4"
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.