mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Merge branch 'mc1.20.1/feature-dev' into jay/mc1.20.1/rework-block-conductors
This commit is contained in:
commit
aa12c64c8c
9 changed files with 32 additions and 36 deletions
|
@ -140,6 +140,7 @@ _Now using Flywheel 1.0_
|
|||
- Added `#create:sugar_cane_variants` to allow the mechanical saw to work with custom sugarcane variants (#7263)
|
||||
- New API for custom storage block behaviour on contraptions.
|
||||
For simple cases, create provides the `#create:simple_mounted_storage` and `#create:chest_mounted_storage` block tags.
|
||||
- Added `#create:non_breakable` to mark blocks that cannot be broken by block-breaking kinetics
|
||||
- Removed LangMerger and related classes
|
||||
- Implemented an api to allow mods to register schematic requirements, partial safe nbt and contraption transforms
|
||||
without implementing interfaces (#4702)
|
||||
|
|
|
@ -59,9 +59,7 @@ public class AllTags {
|
|||
TIC("tconstruct"),
|
||||
QUARK("quark"),
|
||||
GS("galosphere"),
|
||||
CURIOS("curios")
|
||||
|
||||
;
|
||||
CURIOS("curios");
|
||||
|
||||
public final String id;
|
||||
public final boolean optionalDefault;
|
||||
|
@ -92,6 +90,7 @@ public class AllTags {
|
|||
GIRDABLE_TRACKS,
|
||||
MOVABLE_EMPTY_COLLIDER,
|
||||
NON_MOVABLE,
|
||||
NON_BREAKABLE,
|
||||
ORE_OVERRIDE_STONE,
|
||||
PASSIVE_BOILER_HEATERS,
|
||||
SAFE_NBT,
|
||||
|
@ -163,7 +162,8 @@ public class AllTags {
|
|||
return state.is(tag);
|
||||
}
|
||||
|
||||
private static void init() {}
|
||||
private static void init() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -199,17 +199,15 @@ public class AllTags {
|
|||
STRIPPED_LOGS(FORGE),
|
||||
STRIPPED_WOOD(FORGE),
|
||||
PLATES(FORGE),
|
||||
OBSIDIAN_DUST(FORGE,"dusts/obsidian"),
|
||||
OBSIDIAN_DUST(FORGE, "dusts/obsidian"),
|
||||
WRENCH(FORGE, "tools/wrench"),
|
||||
|
||||
ALLURITE(MOD,"stone_types/galosphere/allurite"),
|
||||
AMETHYST(MOD,"stone_types/galosphere/amethyst"),
|
||||
ALLURITE(MOD, "stone_types/galosphere/allurite"),
|
||||
AMETHYST(MOD, "stone_types/galosphere/amethyst"),
|
||||
LUMIERE(MOD, "stone_types/galosphere/lumiere"),
|
||||
|
||||
UA_CORAL(MOD, "upgrade_aquatic/coral"),
|
||||
CURIOS_HEAD(CURIOS, "head")
|
||||
|
||||
;
|
||||
CURIOS_HEAD(CURIOS, "head");
|
||||
|
||||
public final TagKey<Item> tag;
|
||||
public final boolean alwaysDatagen;
|
||||
|
@ -250,7 +248,8 @@ public class AllTags {
|
|||
return stack.is(tag);
|
||||
}
|
||||
|
||||
private static void init() {}
|
||||
private static void init() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -263,9 +262,7 @@ public class AllTags {
|
|||
FAN_PROCESSING_CATALYSTS_SMOKING(MOD, "fan_processing_catalysts/smoking"),
|
||||
FAN_PROCESSING_CATALYSTS_SPLASHING(MOD, "fan_processing_catalysts/splashing"),
|
||||
|
||||
HONEY(FORGE)
|
||||
|
||||
;
|
||||
HONEY(FORGE);
|
||||
|
||||
public final TagKey<Fluid> tag;
|
||||
public final boolean alwaysDatagen;
|
||||
|
@ -305,7 +302,8 @@ public class AllTags {
|
|||
return state.is(tag);
|
||||
}
|
||||
|
||||
private static void init() {}
|
||||
private static void init() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -353,7 +351,8 @@ public class AllTags {
|
|||
return matches(entity.getType());
|
||||
}
|
||||
|
||||
private static void init() {}
|
||||
private static void init() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -396,7 +395,8 @@ public class AllTags {
|
|||
return ForgeRegistries.RECIPE_SERIALIZERS.getHolder(recipeSerializer).orElseThrow().is(tag);
|
||||
}
|
||||
|
||||
private static void init() {}
|
||||
private static void init() {
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
|
|
|
@ -70,19 +70,13 @@ public abstract class DisplaySource {
|
|||
public void onSignalReset(DisplayLinkContext context) {
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
public void populateData(DisplayLinkContext context) {
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
public int getPassiveRefreshTicks() {
|
||||
return 100;
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
public boolean shouldPassiveReset() {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import javax.annotation.Nullable;
|
|||
|
||||
import org.apache.commons.lang3.mutable.MutableBoolean;
|
||||
|
||||
import com.simibubi.create.AllTags;
|
||||
import com.simibubi.create.AllTags.AllBlockTags;
|
||||
import com.simibubi.create.api.behaviour.movement.MovementBehaviour;
|
||||
import com.simibubi.create.content.contraptions.behaviour.MovementContext;
|
||||
import com.simibubi.create.content.contraptions.render.ActorVisual;
|
||||
|
@ -172,7 +172,7 @@ public class HarvesterMovementBehaviour implements MovementBehaviour {
|
|||
if (block == Blocks.SWEET_BERRY_BUSH) {
|
||||
return state.setValue(BlockStateProperties.AGE_3, Integer.valueOf(1));
|
||||
}
|
||||
if (state.is(AllTags.AllBlockTags.SUGAR_CANE_VARIANTS.tag) || block instanceof GrowingPlantBlock) {
|
||||
if (AllBlockTags.SUGAR_CANE_VARIANTS.matches(block) || block instanceof GrowingPlantBlock) {
|
||||
if (state.getFluidState()
|
||||
.isEmpty())
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.simibubi.create.content.kinetics.base;
|
|||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import com.simibubi.create.AllTags.AllBlockTags;
|
||||
import com.simibubi.create.foundation.utility.BlockHelper;
|
||||
|
||||
import net.createmod.catnip.math.VecHelper;
|
||||
|
@ -129,7 +130,7 @@ public abstract class BlockBreakingKineticBlockEntity extends KineticBlockEntity
|
|||
}
|
||||
|
||||
public static boolean isBreakable(BlockState stateToBreak, float blockHardness) {
|
||||
return !(stateToBreak.liquid() || stateToBreak.getBlock() instanceof AirBlock || blockHardness == -1);
|
||||
return !(stateToBreak.liquid() || stateToBreak.getBlock() instanceof AirBlock || blockHardness == -1 || AllBlockTags.NON_BREAKABLE.matches(stateToBreak));
|
||||
}
|
||||
|
||||
public void onBlockBroken(BlockState stateToBreak) {
|
||||
|
|
|
@ -86,8 +86,7 @@ public class TableClothBlockEntity extends SmartBlockEntity {
|
|||
public void lazyTick() {
|
||||
super.lazyTick();
|
||||
BlockPos relativePos = worldPosition.relative(facing);
|
||||
sideOccluded = level.getBlockState(relativePos)
|
||||
.is(AllBlockTags.TABLE_CLOTHS.tag)
|
||||
sideOccluded = AllBlockTags.TABLE_CLOTHS.matches(level.getBlockState(relativePos))
|
||||
|| Block.isFaceFull(level.getBlockState(relativePos.below())
|
||||
.getOcclusionShape(level, relativePos.below()), facing.getOpposite());
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.util.Set;
|
|||
|
||||
import com.simibubi.create.AllSpecialTextures;
|
||||
import com.simibubi.create.AllTags;
|
||||
import com.simibubi.create.AllTags.AllItemTags;
|
||||
import com.simibubi.create.content.equipment.blueprint.BlueprintOverlayRenderer;
|
||||
import com.simibubi.create.foundation.block.ProperWaterloggedBlock;
|
||||
import com.simibubi.create.foundation.utility.BlockHelper;
|
||||
|
@ -375,7 +376,7 @@ public class TrackPlacement {
|
|||
|
||||
ItemStack offhandItem = player.getOffhandItem()
|
||||
.copy();
|
||||
boolean shouldPave = offhandItem.getItem() instanceof BlockItem && !offhandItem.is(AllTags.AllItemTags.INVALID_FOR_TRACK_PAVING.tag);
|
||||
boolean shouldPave = offhandItem.getItem() instanceof BlockItem && !AllItemTags.INVALID_FOR_TRACK_PAVING.matches(offhandItem);
|
||||
if (shouldPave) {
|
||||
BlockItem paveItem = (BlockItem) offhandItem.getItem();
|
||||
paveTracks(level, info, paveItem, true);
|
||||
|
|
|
@ -295,7 +295,7 @@ public class TreeCutter {
|
|||
}
|
||||
|
||||
public static boolean isRoot(BlockState state) {
|
||||
return state.is(AllBlockTags.ROOTS.tag);
|
||||
return AllBlockTags.ROOTS.matches(state);
|
||||
}
|
||||
|
||||
public static boolean isLog(BlockState state) {
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 906 B |
Loading…
Add table
Reference in a new issue