mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +01:00
Fixed block tag gen and loading, fixed fan generating over extinguished camp fires
This commit is contained in:
parent
e276302cee
commit
e7a851c8c0
13 changed files with 2652 additions and 2635 deletions
File diff suppressed because it is too large
Load diff
|
@ -181,10 +181,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "false",
|
||||
"south": "true",
|
||||
"west": "true",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"north": "false",
|
||||
"south": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lu_y"
|
||||
|
@ -192,10 +192,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "false",
|
||||
"south": "true",
|
||||
"west": "false",
|
||||
"east": "true"
|
||||
"east": "true",
|
||||
"north": "false",
|
||||
"south": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ru_y"
|
||||
|
@ -203,10 +203,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "true",
|
||||
"south": "false",
|
||||
"west": "true",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"north": "true",
|
||||
"south": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ld_y"
|
||||
|
@ -214,10 +214,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "true",
|
||||
"south": "false",
|
||||
"west": "false",
|
||||
"east": "true"
|
||||
"east": "true",
|
||||
"north": "true",
|
||||
"south": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/rd_y"
|
||||
|
@ -225,10 +225,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"north": "true",
|
||||
"south": "true",
|
||||
"west": "false",
|
||||
"east": "false"
|
||||
"south": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_y"
|
||||
|
@ -236,10 +236,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"north": "false",
|
||||
"south": "true",
|
||||
"west": "false",
|
||||
"east": "false"
|
||||
"south": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_y"
|
||||
|
@ -247,10 +247,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"north": "true",
|
||||
"south": "false",
|
||||
"west": "false",
|
||||
"east": "false"
|
||||
"south": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_y"
|
||||
|
@ -258,10 +258,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "false",
|
||||
"south": "false",
|
||||
"west": "true",
|
||||
"east": "true"
|
||||
"east": "true",
|
||||
"north": "false",
|
||||
"south": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_y"
|
||||
|
@ -269,10 +269,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "false",
|
||||
"south": "false",
|
||||
"west": "true",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"north": "false",
|
||||
"south": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_y"
|
||||
|
@ -280,10 +280,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "false",
|
||||
"south": "false",
|
||||
"west": "false",
|
||||
"east": "true"
|
||||
"east": "true",
|
||||
"north": "false",
|
||||
"south": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_y"
|
||||
|
@ -291,10 +291,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "false",
|
||||
"south": "false",
|
||||
"west": "false",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"north": "false",
|
||||
"south": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/none_y"
|
||||
|
@ -302,10 +302,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"up": "true",
|
||||
"west": "false",
|
||||
"down": "false",
|
||||
"east": "true"
|
||||
"east": "true",
|
||||
"up": "true",
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lu_z"
|
||||
|
@ -313,10 +313,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"up": "true",
|
||||
"west": "true",
|
||||
"down": "false",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"up": "true",
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ru_z"
|
||||
|
@ -324,10 +324,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"west": "false",
|
||||
"down": "true",
|
||||
"east": "true"
|
||||
"east": "true",
|
||||
"up": "false",
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ld_z"
|
||||
|
@ -335,10 +335,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"west": "true",
|
||||
"down": "true",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"up": "false",
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/rd_z"
|
||||
|
@ -346,10 +346,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"up": "true",
|
||||
"west": "false",
|
||||
"down": "true",
|
||||
"east": "false"
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_z"
|
||||
|
@ -357,10 +357,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "false",
|
||||
"east": "false",
|
||||
"up": "true",
|
||||
"west": "false",
|
||||
"down": "false",
|
||||
"east": "false"
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_z"
|
||||
|
@ -368,10 +368,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"west": "false",
|
||||
"down": "true",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"up": "false",
|
||||
"down": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/ud_z"
|
||||
|
@ -379,10 +379,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"west": "true",
|
||||
"down": "false",
|
||||
"east": "true"
|
||||
"east": "true",
|
||||
"up": "false",
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_z"
|
||||
|
@ -390,10 +390,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"west": "false",
|
||||
"down": "false",
|
||||
"east": "true"
|
||||
"east": "true",
|
||||
"up": "false",
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_z"
|
||||
|
@ -401,10 +401,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"west": "true",
|
||||
"down": "false",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"up": "false",
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/lr_z"
|
||||
|
@ -412,10 +412,10 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"up": "false",
|
||||
"west": "false",
|
||||
"down": "false",
|
||||
"east": "false"
|
||||
"east": "false",
|
||||
"up": "false",
|
||||
"down": "false"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/fluid_pipe/none_z"
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "x",
|
||||
"sticky_south": "true"
|
||||
"sticky_south": "true",
|
||||
"axis": "x"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x_sticky",
|
||||
|
@ -39,8 +39,8 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "y",
|
||||
"sticky_south": "true"
|
||||
"sticky_south": "true",
|
||||
"axis": "y"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_y_sticky"
|
||||
|
@ -48,8 +48,8 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "z",
|
||||
"sticky_south": "true"
|
||||
"sticky_south": "true",
|
||||
"axis": "z"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x_sticky",
|
||||
|
@ -59,8 +59,8 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "x",
|
||||
"sticky_south": "false"
|
||||
"sticky_south": "false",
|
||||
"axis": "x"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x",
|
||||
|
@ -69,8 +69,8 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "y",
|
||||
"sticky_south": "false"
|
||||
"sticky_south": "false",
|
||||
"axis": "y"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_y"
|
||||
|
@ -78,8 +78,8 @@
|
|||
},
|
||||
{
|
||||
"when": {
|
||||
"axis": "z",
|
||||
"sticky_south": "false"
|
||||
"sticky_south": "false",
|
||||
"axis": "z"
|
||||
},
|
||||
"apply": {
|
||||
"model": "create:block/radial_chassis_side_x",
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
"create:extractor",
|
||||
"create:vertical_extractor",
|
||||
"create:linked_extractor",
|
||||
"create:vertical_linked_extractor"
|
||||
"create:vertical_linked_extractor",
|
||||
"#minecraft:doors",
|
||||
"minecraft:flower_pot",
|
||||
"minecraft:bell"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"create:blaze_heater",
|
||||
"minecraft:magma_block",
|
||||
"minecraft:campfire",
|
||||
"minecraft:lava",
|
||||
"minecraft:fire"
|
||||
]
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"create:blaze_heater"
|
||||
"create:blaze_heater",
|
||||
"#minecraft:fences",
|
||||
"minecraft:iron_bars"
|
||||
]
|
||||
}
|
|
@ -404,11 +404,10 @@ public class AllBlocks {
|
|||
.initialProperties(SharedProperties::softMetal)
|
||||
.properties(p -> p.lightValue(12))
|
||||
.addLayer(() -> RenderType::getCutoutMipped)
|
||||
.tag(AllBlockTags.FAN_TRANSPARENT.tag)
|
||||
.tag(AllBlockTags.FAN_TRANSPARENT.tag, AllBlockTags.FAN_HEATERS.tag)
|
||||
.blockstate((c, p) -> p.simpleBlock(c.getEntry(), AssetLookup.partialBaseModel(c, p)))
|
||||
.item(HeaterBlockItem::new)
|
||||
.build()
|
||||
// .transform(heaterItemModel())
|
||||
.register();
|
||||
|
||||
public static final BlockEntry<DepotBlock> DEPOT = REGISTRATE.block("depot", DepotBlock::new)
|
||||
|
|
|
@ -12,6 +12,7 @@ import com.tterrag.registrate.util.nullness.NonNullFunction;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -95,21 +96,46 @@ public class AllTags {
|
|||
public Tag<Block> tag;
|
||||
|
||||
private AllBlockTags() {
|
||||
this("");
|
||||
this(MOD, "");
|
||||
}
|
||||
|
||||
private AllBlockTags(String path) {
|
||||
|
||||
private AllBlockTags(NameSpace namespace) {
|
||||
this(namespace, "");
|
||||
}
|
||||
|
||||
private AllBlockTags(NameSpace namespace, String path) {
|
||||
tag = new BlockTags.Wrapper(
|
||||
new ResourceLocation(Create.ID, (path.isEmpty() ? "" : path + "/") + Lang.asId(name())));
|
||||
new ResourceLocation(namespace.id, (path.isEmpty() ? "" : path + "/") + Lang.asId(name())));
|
||||
}
|
||||
|
||||
public boolean matches(BlockState block) {
|
||||
return tag.contains(block.getBlock());
|
||||
}
|
||||
|
||||
public void includeIn(AllBlockTags parent) {
|
||||
REGISTRATE.addDataGenerator(ProviderType.BLOCK_TAGS, prov -> prov.getBuilder(parent.tag)
|
||||
.add(tag));
|
||||
}
|
||||
|
||||
public void includeAll(Tag<Block> child) {
|
||||
REGISTRATE.addDataGenerator(ProviderType.BLOCK_TAGS, prov -> prov.getBuilder(tag).add(child));
|
||||
}
|
||||
|
||||
public void add(Block ...values) {
|
||||
REGISTRATE.addDataGenerator(ProviderType.BLOCK_TAGS, prov -> prov.getBuilder(tag).add(values));
|
||||
}
|
||||
}
|
||||
|
||||
public static void register() {
|
||||
AllItemTags.CREATE_INGOTS.includeIn(AllItemTags.BEACON_PAYMENT);
|
||||
AllItemTags.CREATE_INGOTS.includeIn(AllItemTags.INGOTS);
|
||||
|
||||
AllBlockTags.BRITTLE.includeAll(BlockTags.DOORS);
|
||||
AllBlockTags.BRITTLE.add(Blocks.FLOWER_POT, Blocks.BELL);
|
||||
|
||||
AllBlockTags.FAN_TRANSPARENT.includeAll(BlockTags.FENCES);
|
||||
AllBlockTags.FAN_TRANSPARENT.add(Blocks.IRON_BARS);
|
||||
|
||||
AllBlockTags.FAN_HEATERS.add(Blocks.MAGMA_BLOCK, Blocks.CAMPFIRE, Blocks.LAVA, Blocks.FIRE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,12 +3,12 @@ package com.simibubi.create.content.contraptions.components.fan;
|
|||
import com.simibubi.create.AllTags.AllBlockTags;
|
||||
import com.simibubi.create.content.contraptions.base.GeneratingKineticTileEntity;
|
||||
import com.simibubi.create.content.contraptions.processing.HeaterBlock;
|
||||
import com.simibubi.create.content.contraptions.processing.HeaterTileEntity;
|
||||
import com.simibubi.create.content.logistics.block.chute.ChuteTileEntity;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.config.CKinetics;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.CampfireBlock;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -78,9 +78,9 @@ public class EncasedFanTileEntity extends GeneratingKineticTileEntity {
|
|||
if (world == null)
|
||||
return false;
|
||||
BlockState checkState = world.getBlockState(pos.down());
|
||||
return checkState.getBlock()
|
||||
.isIn(AllBlockTags.FAN_HEATERS.tag)
|
||||
|| (checkState.has(HeaterBlock.BLAZE_LEVEL) && checkState.get(HeaterBlock.BLAZE_LEVEL) >= 1);
|
||||
return checkState.getBlock().isIn(AllBlockTags.FAN_HEATERS.tag)
|
||||
&& ((!checkState.has(HeaterBlock.BLAZE_LEVEL)) || checkState.get(HeaterBlock.BLAZE_LEVEL) >= 1)
|
||||
&& (!checkState.has(BlockStateProperties.LIT) || checkState.get(BlockStateProperties.LIT));
|
||||
}
|
||||
|
||||
public float getMaxDistance() {
|
||||
|
|
|
@ -2,6 +2,8 @@ package com.simibubi.create.content.contraptions.particle;
|
|||
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import com.mojang.brigadier.StringReader;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import com.simibubi.create.AllParticleTypes;
|
||||
|
@ -12,8 +14,6 @@ import net.minecraft.network.PacketBuffer;
|
|||
import net.minecraft.particles.IParticleData;
|
||||
import net.minecraft.particles.ParticleType;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
public class HeaterParticleData implements IParticleData, ICustomParticle<HeaterParticleData> {
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#minecraft:doors",
|
||||
"minecraft:flower_pot",
|
||||
"minecraft:bell"
|
||||
],
|
||||
"optional": [
|
||||
|
||||
]
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:fire", "minecraft:campfire", "minecraft:lava", "minecraft:magma_block"
|
||||
]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#minecraft:fences",
|
||||
"minecraft:iron_bars"
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue