-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make painted planks flammable, add #adorn:painted_planks
- Loading branch information
Showing
13 changed files
with
147 additions
and
1 deletion.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
common/src/generated/resources/data/adorn/tags/block/painted_planks.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,20 @@ | ||
{ | ||
"values": [ | ||
"adorn:white_planks", | ||
"adorn:orange_planks", | ||
"adorn:magenta_planks", | ||
"adorn:light_blue_planks", | ||
"adorn:yellow_planks", | ||
"adorn:lime_planks", | ||
"adorn:pink_planks", | ||
"adorn:gray_planks", | ||
"adorn:light_gray_planks", | ||
"adorn:cyan_planks", | ||
"adorn:purple_planks", | ||
"adorn:blue_planks", | ||
"adorn:brown_planks", | ||
"adorn:green_planks", | ||
"adorn:red_planks", | ||
"adorn:black_planks" | ||
] | ||
} |
20 changes: 20 additions & 0 deletions
20
common/src/generated/resources/data/adorn/tags/item/painted_planks.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,20 @@ | ||
{ | ||
"values": [ | ||
"adorn:white_planks", | ||
"adorn:orange_planks", | ||
"adorn:magenta_planks", | ||
"adorn:light_blue_planks", | ||
"adorn:yellow_planks", | ||
"adorn:lime_planks", | ||
"adorn:pink_planks", | ||
"adorn:gray_planks", | ||
"adorn:light_gray_planks", | ||
"adorn:cyan_planks", | ||
"adorn:purple_planks", | ||
"adorn:blue_planks", | ||
"adorn:brown_planks", | ||
"adorn:green_planks", | ||
"adorn:red_planks", | ||
"adorn:black_planks" | ||
] | ||
} |
5 changes: 5 additions & 0 deletions
5
common/src/generated/resources/data/minecraft/tags/block/planks.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,5 @@ | ||
{ | ||
"values": [ | ||
"#adorn:painted_planks" | ||
] | ||
} |
5 changes: 5 additions & 0 deletions
5
common/src/generated/resources/data/minecraft/tags/item/planks.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,5 @@ | ||
{ | ||
"values": [ | ||
"#adorn:painted_planks" | ||
] | ||
} |
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
24 changes: 24 additions & 0 deletions
24
fabric/src/commonData/java/juuxel/adorn/data/AdornBlockTagGenerator.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,24 @@ | ||
package juuxel.adorn.data; | ||
|
||
import juuxel.adorn.block.AdornBlocks; | ||
import juuxel.adorn.lib.AdornTags; | ||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; | ||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.registry.RegistryWrapper; | ||
import net.minecraft.registry.tag.BlockTags; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
public final class AdornBlockTagGenerator extends FabricTagProvider.BlockTagProvider { | ||
public AdornBlockTagGenerator(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) { | ||
super(output, registriesFuture); | ||
} | ||
|
||
@Override | ||
protected void configure(RegistryWrapper.WrapperLookup wrapperLookup) { | ||
getOrCreateTagBuilder(AdornTags.PAINTED_PLANKS.block()) | ||
.add(AdornBlocks.PLANKS.get().values().toArray(Block[]::new)); | ||
getOrCreateTagBuilder(BlockTags.PLANKS).addTag(AdornTags.PAINTED_PLANKS.block()); | ||
} | ||
} |
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
26 changes: 26 additions & 0 deletions
26
fabric/src/commonData/java/juuxel/adorn/data/AdornItemTagGenerator.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 juuxel.adorn.data; | ||
|
||
import juuxel.adorn.lib.AdornTags; | ||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; | ||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider; | ||
import net.minecraft.registry.RegistryWrapper; | ||
import net.minecraft.registry.tag.BlockTags; | ||
import net.minecraft.registry.tag.ItemTags; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
public final class AdornItemTagGenerator extends FabricTagProvider.ItemTagProvider { | ||
public AdornItemTagGenerator(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture, FabricTagProvider.BlockTagProvider blockTagProvider) { | ||
super(output, registriesFuture, blockTagProvider); | ||
} | ||
|
||
@Override | ||
protected void configure(RegistryWrapper.WrapperLookup wrapperLookup) { | ||
copy(AdornTags.PAINTED_PLANKS); | ||
copy(BlockTags.PLANKS, ItemTags.PLANKS); | ||
} | ||
|
||
private void copy(AdornTags.TagPair tagPair) { | ||
copy(tagPair.block(), tagPair.item()); | ||
} | ||
} |
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
26 changes: 26 additions & 0 deletions
26
forge/src/main/java/juuxel/adorn/platform/forge/block/PaintedPlanksBlockNeo.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 juuxel.adorn.platform.forge.block; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.block.BlockState; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.util.math.Direction; | ||
import net.minecraft.world.BlockView; | ||
|
||
public final class PaintedPlanksBlockNeo extends Block { | ||
public PaintedPlanksBlockNeo(Settings arg) { | ||
super(arg); | ||
} | ||
|
||
// getFireSpreadSpeed = burnChance | ||
// getFlammability = spreadChance | ||
|
||
@Override | ||
public int getFireSpreadSpeed(BlockState state, BlockView level, BlockPos pos, Direction direction) { | ||
return 5; | ||
} | ||
|
||
@Override | ||
public int getFlammability(BlockState state, BlockView level, BlockPos pos, Direction direction) { | ||
return 20; | ||
} | ||
} |