-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
316 additions
and
13 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8
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,2 +1,2 @@ | ||
// 1.20.1 2024-07-17T09:42:50.1869728 Languages: en_us | ||
61f2488da9c2d0bd4c79826c201d0988e589ae21 assets/collectorsreap/lang/en_us.json | ||
// 1.20.1 2024-08-08T16:31:48.7391044 Languages: en_us | ||
3503d01507bf587c1ee9e665f3a36669221592a4 assets/collectorsreap/lang/en_us.json |
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
31 changes: 30 additions & 1 deletion
31
src/main/java/net/brdle/collectorsreap/common/fluid/CRFluids.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,10 +1,39 @@ | ||
package net.brdle.collectorsreap.common.fluid; | ||
|
||
import net.brdle.collectorsreap.CollectorsReap; | ||
import net.minecraft.world.level.material.FlowingFluid; | ||
import net.minecraft.world.level.material.Fluid; | ||
import net.minecraftforge.eventbus.api.IEventBus; | ||
import net.minecraftforge.fluids.FluidType; | ||
import net.minecraftforge.fluids.ForgeFlowingFluid; | ||
import net.minecraftforge.registries.DeferredRegister; | ||
import net.minecraftforge.registries.ForgeRegistries; | ||
import net.minecraftforge.registries.RegistryObject; | ||
|
||
public class CRFluids { | ||
public static final DeferredRegister<FluidType> FLUID_TYPES = DeferredRegister.create(ForgeRegistries.FLUID_TYPES.get(), CollectorsReap.MODID); | ||
|
||
public static final DeferredRegister<Fluid> FLUIDS = DeferredRegister.create(ForgeRegistries.FLUIDS, CollectorsReap.MODID); | ||
public static final DeferredRegister<FluidType> TYPES = DeferredRegister.create(ForgeRegistries.Keys.FLUID_TYPES, CollectorsReap.MODID); | ||
|
||
public static final RegistryObject<FluidType> LIME_GREEN_TEA_TYPE = TYPES.register("lime_green_tea_type", | ||
() -> new TeaFluidType(0xff95ac38)); | ||
public static final RegistryObject<FlowingFluid> LIME_GREEN_TEA = FLUIDS.register("lime_green_tea", | ||
() -> new ForgeFlowingFluid.Source(CRFluids.LIME_GREEN_TEA_PROPERTIES)); | ||
public static final RegistryObject<FlowingFluid> FLOWING_LIME_GREEN_TEA = FLUIDS.register("flowing_lime_green_tea", | ||
() -> new ForgeFlowingFluid.Flowing(CRFluids.LIME_GREEN_TEA_PROPERTIES)); | ||
|
||
public static final RegistryObject<FluidType> POMEGRANATE_BLACK_TEA_TYPE = TYPES.register("pomegranate_black_tea_type", | ||
() -> new TeaFluidType(0xff900f2f)); | ||
public static final RegistryObject<FlowingFluid> POMEGRANATE_BLACK_TEA = FLUIDS.register("pomegranate_black_tea", | ||
() -> new ForgeFlowingFluid.Source(CRFluids.POMEGRANATE_BLACK_TEA_PROPERTIES)); | ||
public static final RegistryObject<FlowingFluid> FLOWING_POMEGRANATE_BLACK_TEA = FLUIDS.register("flowing_pomegranate_black_tea", | ||
() -> new ForgeFlowingFluid.Flowing(CRFluids.POMEGRANATE_BLACK_TEA_PROPERTIES)); | ||
|
||
public static final ForgeFlowingFluid.Properties LIME_GREEN_TEA_PROPERTIES = new ForgeFlowingFluid.Properties(LIME_GREEN_TEA_TYPE, LIME_GREEN_TEA, FLOWING_LIME_GREEN_TEA); | ||
public static final ForgeFlowingFluid.Properties POMEGRANATE_BLACK_TEA_PROPERTIES = new ForgeFlowingFluid.Properties(POMEGRANATE_BLACK_TEA_TYPE, POMEGRANATE_BLACK_TEA, FLOWING_POMEGRANATE_BLACK_TEA); | ||
|
||
public static void create(IEventBus bus) { | ||
FLUIDS.register(bus); | ||
TYPES.register(bus); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
src/main/java/net/brdle/collectorsreap/common/fluid/TeaFluidType.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,40 @@ | ||
package net.brdle.collectorsreap.common.fluid; | ||
|
||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.sounds.SoundEvents; | ||
import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions; | ||
import net.minecraftforge.common.SoundActions; | ||
import net.minecraftforge.fluids.FluidType; | ||
import java.util.function.Consumer; | ||
|
||
public class TeaFluidType extends FluidType { | ||
private final int tint; | ||
|
||
public TeaFluidType(int tint) { | ||
super(Properties.create() | ||
.sound(SoundActions.BUCKET_FILL, SoundEvents.BUCKET_FILL) | ||
.sound(SoundActions.BUCKET_EMPTY, SoundEvents.BUCKET_EMPTY) | ||
); | ||
this.tint = tint; | ||
} | ||
|
||
@Override | ||
public void initializeClient(Consumer<IClientFluidTypeExtensions> consumer) { | ||
consumer.accept(new IClientFluidTypeExtensions() { | ||
@Override | ||
public int getTintColor() { | ||
return tint; | ||
} | ||
|
||
@Override | ||
public ResourceLocation getStillTexture() { | ||
return new ResourceLocation("block/water_still"); | ||
} | ||
|
||
@Override | ||
public ResourceLocation getFlowingTexture() { | ||
return new ResourceLocation("block/water_flow"); | ||
} | ||
}); | ||
} | ||
} |
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
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
50 changes: 50 additions & 0 deletions
50
...ain/resources/data/collectorsreap/recipes/integration/create/emptying/lime_green_tea.json
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,50 @@ | ||
{ | ||
"type": "forge:conditional", | ||
"recipes": [ | ||
{ | ||
"conditions": [ | ||
{ | ||
"type": "forge:and", | ||
"values": [ | ||
{ | ||
"type": "collectorsreap:enabled", | ||
"value": "lime_green_tea" | ||
}, | ||
{ | ||
"type": "forge:not", | ||
"value": { | ||
"type": "forge:tag_empty", | ||
"tag": "forge:tea_leaves/green" | ||
} | ||
}, | ||
{ | ||
"type": "forge:mod_loaded", | ||
"modid": "farmersrespite" | ||
}, | ||
{ | ||
"type": "forge:mod_loaded", | ||
"modid": "create" | ||
} | ||
] | ||
} | ||
], | ||
"recipe": { | ||
"type": "create:emptying", | ||
"ingredients": [ | ||
{ | ||
"item": "collectorsreap:lime_green_tea" | ||
} | ||
], | ||
"results": [ | ||
{ | ||
"item": "minecraft:glass_bottle" | ||
}, | ||
{ | ||
"amount": 250, | ||
"fluid": "collectorsreap:lime_green_tea" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
50 changes: 50 additions & 0 deletions
50
...ources/data/collectorsreap/recipes/integration/create/emptying/pomegranate_black_tea.json
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,50 @@ | ||
{ | ||
"type": "forge:conditional", | ||
"recipes": [ | ||
{ | ||
"conditions": [ | ||
{ | ||
"type": "forge:and", | ||
"values": [ | ||
{ | ||
"type": "collectorsreap:enabled", | ||
"value": "pomegranate_black_tea" | ||
}, | ||
{ | ||
"type": "forge:not", | ||
"value": { | ||
"type": "forge:tag_empty", | ||
"tag": "forge:tea_leaves/black" | ||
} | ||
}, | ||
{ | ||
"type": "forge:mod_loaded", | ||
"modid": "farmersrespite" | ||
}, | ||
{ | ||
"type": "forge:mod_loaded", | ||
"modid": "create" | ||
} | ||
] | ||
} | ||
], | ||
"recipe": { | ||
"type": "create:emptying", | ||
"ingredients": [ | ||
{ | ||
"item": "collectorsreap:pomegranate_black_tea" | ||
} | ||
], | ||
"results": [ | ||
{ | ||
"item": "minecraft:glass_bottle" | ||
}, | ||
{ | ||
"amount": 250, | ||
"fluid": "collectorsreap:pomegranate_black_tea" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.