-
Notifications
You must be signed in to change notification settings - Fork 55
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/dev' into feature/mother_generation
- Loading branch information
Showing
29 changed files
with
282 additions
and
133 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 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
25 changes: 25 additions & 0 deletions
25
src/lib/java/de/teamlapen/lib/lib/util/RegisterHelper.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,25 @@ | ||
package de.teamlapen.lib.lib.util; | ||
|
||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.level.ItemLike; | ||
import net.minecraft.world.level.block.*; | ||
|
||
public class RegisterHelper { | ||
|
||
public static <T extends ItemLike> T compostable(T item, float chance) { | ||
ComposterBlock.COMPOSTABLES.put(item, chance); | ||
return item; | ||
} | ||
|
||
public static <T extends Block> T flammable(T block, int encouragement, int flammability) { | ||
FireBlock fireblock = (FireBlock) Blocks.FIRE; | ||
fireblock.setFlammable(block, encouragement, flammability); | ||
return block; | ||
} | ||
|
||
public static <T extends Block> T potted(T potBlock, ResourceLocation plant) { | ||
FlowerPotBlock pot = (FlowerPotBlock) Blocks.FLOWER_POT; | ||
pot.addPlant(plant, () -> potBlock); | ||
return potBlock; | ||
} | ||
} |
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.