mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Merge remote-tracking branch 'concealed/mc1.20.1/feature-dev' into mc1.20.1/feature-dev
This commit is contained in:
commit
489c30d39f
41 changed files with 684 additions and 517 deletions
|
@ -20,7 +20,7 @@ use_parchment = true
|
|||
# dependency versions
|
||||
registrate_version = MC1.20-1.3.3
|
||||
flywheel_minecraft_version = 1.20.1
|
||||
flywheel_version = 1.0.0-beta-4
|
||||
flywheel_version = 1.0.0-beta-196
|
||||
jei_minecraft_version = 1.20.1
|
||||
jei_version = 15.19.0.85
|
||||
curios_minecraft_version = 1.20.1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 1.20.1 2024-10-18T15:46:50.5780971 Create's Sequenced Assembly Recipes
|
||||
// 1.20.1 2025-02-02T11:59:39.5960908 Create's Sequenced Assembly Recipes
|
||||
dbaca5a5aa312f3bc7b826e51e665d32e798a5d7 data/create/recipes/sequenced_assembly/precision_mechanism.json
|
||||
dacafdb106304d183b00e21fb01517ac45eca800 data/create/recipes/sequenced_assembly/sturdy_sheet.json
|
||||
1274315b5c570722d6f5b2ed7f5e53fe01b6288a data/create/recipes/sequenced_assembly/track.json
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
|||
// 1.20.1 2025-01-07T16:08:48.0358648 Create's Advancements
|
||||
// 1.20.1 2025-02-02T11:59:39.4186146 Create's Advancements
|
||||
2661a689fdcf729494f46e3c719f71c62e31582e data/create/advancements/andesite_alloy.json
|
||||
fa16c4afe0496edc3f157858a6e0ff177a1622ff data/create/advancements/andesite_casing.json
|
||||
5a694002d0a663bc869b09d15924a10c43dc522f data/create/advancements/anvil_plough.json
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 1.20.1 2024-10-18T15:46:50.4863422 Create Train Hat Information
|
||||
// 1.20.1 2025-02-02T11:59:39.4206093 Create Train Hat Information
|
||||
be16d47aa64e673b1107a36ce06475016e316fca assets/minecraft/train_hat_info/axolotl.json
|
||||
b8ae6d9c8014439f4049622e0d6e79b9d6716260 assets/minecraft/train_hat_info/bat.json
|
||||
5053a6c9fb412dfac1bf17eb0f57f9fd314198e4 assets/minecraft/train_hat_info/bee.json
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 1.20.1 2024-10-18T15:46:50.5880704 Create's Mechanical Crafting Recipes
|
||||
// 1.20.1 2025-02-02T11:59:39.6030726 Create's Mechanical Crafting Recipes
|
||||
f076d64d9f30709bed34775136c9241097b28aa9 data/create/recipes/mechanical_crafting/crushing_wheel.json
|
||||
694dca9dcff246bb7f560b3304fcc244c53217d5 data/create/recipes/mechanical_crafting/extendo_grip.json
|
||||
c03bc27f537e2d6531438bf58a17d977a7e16c7b data/create/recipes/mechanical_crafting/potato_cannon.json
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 1.20.1 2025-01-03T17:19:12.8387789 Create's Standard Recipes
|
||||
// 1.20.1 2025-02-02T11:59:39.5980858 Create's Standard Recipes
|
||||
a8cc4af26f6c7c45a9eef12e92af1452fe042454 data/create/advancements/recipes/combat/crafting/appliances/netherite_backtank.json
|
||||
2c2639c7b307ee7c7a4e97e5efebf496788998ad data/create/advancements/recipes/combat/crafting/appliances/netherite_backtank_from_netherite.json
|
||||
81dcf0cb1aa99e39bc7d1a386e07cad4cee7d8b9 data/create/advancements/recipes/combat/crafting/appliances/netherite_diving_boots.json
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 1.20.1 2024-10-18T15:46:50.5770997 Create's Damage Type Tags
|
||||
// 1.20.1 2025-02-02T11:59:39.5960908 Create's Damage Type Tags
|
||||
7884716b2f4bb1330ff215366bb4bab06e4728c2 data/minecraft/tags/damage_type/bypasses_armor.json
|
||||
1fcad1f89265fba8bdb05b03a1dfcc88d7b7a550 data/minecraft/tags/damage_type/is_explosion.json
|
||||
08324c61115b72bb8a6370d7f34d84d9a31afd16 data/minecraft/tags/damage_type/is_fire.json
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 1.20.1 2025-01-29T11:38:11.6747376 Create's Processing Recipes
|
||||
// 1.20.1 2025-02-02T11:59:39.4216053 Create's Processing Recipes
|
||||
3c94326fb730f68c1e44fe1e2ef09c9db6ffd92b data/create/recipes/compacting/andesite_from_flint.json
|
||||
8d3d5b31f3601b9f681ff710e0545a483a1494c6 data/create/recipes/compacting/blaze_cake.json
|
||||
8bd7f4e3a686ab520b2d55594d2018d0e9a50c91 data/create/recipes/compacting/chocolate.json
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
// 1.20.1 2025-01-08T09:46:32.7381345 Create's Custom Sounds
|
||||
// 1.20.1 2025-02-02T11:59:39.428609 Create's Custom Sounds
|
||||
0bca17432111ff732e5188cd3098201330e386bc assets/create/sounds.json
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
// 1.20.1 2024-10-18T15:46:50.5751052 Create's Recipe Serializer Tags
|
||||
// 1.20.1 2025-02-02T11:59:39.5950933 Create's Recipe Serializer Tags
|
||||
0d8718f7383761bc5d7bc45306ed266ebf25dc1d data/create/tags/recipe_serializer/automation_ignore.json
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// 1.20.1 2024-10-18T15:46:50.5800917 Create's Generated Registry Entries
|
||||
// 1.20.1 2025-02-02T11:59:39.5970888 Create's Generated Registry Entries
|
||||
030ede1044384c4117ac1e491bf5c78bbd2842f5 data/create/damage_type/crush.json
|
||||
92b0416950ffeb3ba68811e587177c2f8811c2c5 data/create/damage_type/cuckoo_surprise.json
|
||||
d2a4fdb64f4ba817e13a7b20c73fd1ca34b825fc data/create/damage_type/fan_fire.json
|
||||
|
|
|
@ -521,7 +521,7 @@
|
|||
"block.create.industrial_iron_window_pane": "ǝuɐԀ ʍopuıM uoɹI ןɐıɹʇsnpuI",
|
||||
"block.create.item_drain": "uıɐɹᗡ ɯǝʇI",
|
||||
"block.create.item_hatch": "ɥɔʇɐH ɯǝʇI",
|
||||
"block.create.item_hatch.tooltip.behaviour1": "˙pǝɹɹǝɟsuɐɹʇ ǝq ‾ʇou‾ ןןıʍ ‾sʇuǝʇuoɔ ɥʇıʍ‾ sɯǝʇı puɐ ‾sɯǝʇı ɹɐqʇoH‾ ˙uo pǝɔɐןd sı ʇı ‾ɹǝuıɐʇuoɔ‾ ǝɥʇ oʇuı sɯǝʇı ɹnoʎ ‾sʇısodǝᗡ‾",
|
||||
"block.create.item_hatch.tooltip.behaviour1": "˙sɯǝʇı ɹɐqʇoH ʇdǝɔxǝ ‾buıɥʇʎɹǝʌǝ‾ ‾ʇısodǝp‾ oʇ ‾ʞɔıןɔ-ʞɐǝuS‾ ˙uo pǝɔɐןd sı ʇı ‾ɹǝuıɐʇuoɔ‾ ǝɥʇ oʇuı ‾ɯǝʇı pןǝɥ‾ ɹnoʎ ‾sʇısodǝᗡ‾",
|
||||
"block.create.item_hatch.tooltip.condition1": "pǝʞɔıןƆ-ᴚ uǝɥM",
|
||||
"block.create.item_hatch.tooltip.summary": "˙ɯǝןqoɹd s,ǝsןǝ ǝuoǝɯos ʇı sǝʞɐɯ puɐ ɹǝʇʇnןɔ ‾ʎɹoʇuǝʌuı‾ ɹnoʎ ‾sǝʌןos ʎןʞɔınὉ‾",
|
||||
"block.create.item_vault": "ʇןnɐΛ ɯǝʇI",
|
||||
|
|
|
@ -521,7 +521,7 @@
|
|||
"block.create.industrial_iron_window_pane": "Industrial Iron Window Pane",
|
||||
"block.create.item_drain": "Item Drain",
|
||||
"block.create.item_hatch": "Item Hatch",
|
||||
"block.create.item_hatch.tooltip.behaviour1": "_Deposits_ your items into the _container_ it is placed on. _Hotbar items_ and items _with contents_ will _not_ be transferred.",
|
||||
"block.create.item_hatch.tooltip.behaviour1": "_Deposits_ your _held item_ into the _container_ it is placed on. _Sneak-click_ to _deposit_ _everything_ except Hotbar items.",
|
||||
"block.create.item_hatch.tooltip.condition1": "When R-Clicked",
|
||||
"block.create.item_hatch.tooltip.summary": "_Quickly solves_ your _inventory_ clutter and makes it someone else's problem.",
|
||||
"block.create.item_vault": "Item Vault",
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_glass_panes_colorless": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"tag": "forge:glass_panes/colorless"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "create:framed_glass_pane_from_glass_panes_colorless_stonecutting"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_glass_panes_colorless",
|
||||
"has_the_recipe"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"create:framed_glass_pane_from_glass_panes_colorless_stonecutting"
|
||||
]
|
||||
},
|
||||
"sends_telemetry_event": false
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_glass_panes_colorless": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"tag": "forge:glass_panes/colorless"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "create:horizontal_framed_glass_pane_from_glass_panes_colorless_stonecutting"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_glass_panes_colorless",
|
||||
"has_the_recipe"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"create:horizontal_framed_glass_pane_from_glass_panes_colorless_stonecutting"
|
||||
]
|
||||
},
|
||||
"sends_telemetry_event": false
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_glass_panes_colorless": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"tag": "forge:glass_panes/colorless"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "create:tiled_glass_pane_from_glass_panes_colorless_stonecutting"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_glass_panes_colorless",
|
||||
"has_the_recipe"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"create:tiled_glass_pane_from_glass_panes_colorless_stonecutting"
|
||||
]
|
||||
},
|
||||
"sends_telemetry_event": false
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_glass_panes_colorless": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"tag": "forge:glass_panes/colorless"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "create:vertical_framed_glass_pane_from_glass_panes_colorless_stonecutting"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_glass_panes_colorless",
|
||||
"has_the_recipe"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"create:vertical_framed_glass_pane_from_glass_panes_colorless_stonecutting"
|
||||
]
|
||||
},
|
||||
"sends_telemetry_event": false
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"type": "minecraft:stonecutting",
|
||||
"count": 1,
|
||||
"ingredient": {
|
||||
"tag": "forge:glass_panes/colorless"
|
||||
},
|
||||
"result": "create:framed_glass_pane"
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"type": "minecraft:stonecutting",
|
||||
"count": 1,
|
||||
"ingredient": {
|
||||
"tag": "forge:glass_panes/colorless"
|
||||
},
|
||||
"result": "create:horizontal_framed_glass_pane"
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"type": "minecraft:stonecutting",
|
||||
"count": 1,
|
||||
"ingredient": {
|
||||
"tag": "forge:glass_panes/colorless"
|
||||
},
|
||||
"result": "create:tiled_glass_pane"
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"type": "minecraft:stonecutting",
|
||||
"count": 1,
|
||||
"ingredient": {
|
||||
"tag": "forge:glass_panes/colorless"
|
||||
},
|
||||
"result": "create:vertical_framed_glass_pane"
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"values": [
|
||||
"create:tiled_glass_pane",
|
||||
"create:framed_glass_pane",
|
||||
"create:horizontal_framed_glass_pane",
|
||||
"create:vertical_framed_glass_pane"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"values": [
|
||||
"create:tiled_glass_pane",
|
||||
"create:framed_glass_pane",
|
||||
"create:horizontal_framed_glass_pane",
|
||||
"create:vertical_framed_glass_pane"
|
||||
]
|
||||
}
|
|
@ -1194,12 +1194,11 @@ public abstract class Contraption {
|
|||
|
||||
BoundingBox boundingBox = optionalBoundingBox.get();
|
||||
BlockPos newControllerPos = new BlockPos(boundingBox.minX(), boundingBox.minY(), boundingBox.minZ());
|
||||
BlockPos newLocalPos = toLocalPos(newControllerPos);
|
||||
BlockPos otherPos = transform.unapply(newControllerPos);
|
||||
|
||||
multiblockParts.forEach(info -> info.nbt().put("Controller", NbtUtils.writeBlockPos(newControllerPos)));
|
||||
|
||||
if (controllerPos.equals(newLocalPos))
|
||||
if (controllerPos.equals(otherPos))
|
||||
return;
|
||||
|
||||
// swap nbt data to the new controller position
|
||||
|
|
|
@ -92,6 +92,10 @@ public class ContraptionHandlerClient {
|
|||
Collection<WeakReference<AbstractContraptionEntity>> contraptions =
|
||||
ContraptionHandler.loadedContraptions.get(mc.level)
|
||||
.values();
|
||||
|
||||
double bestDistance = Double.MAX_VALUE;
|
||||
BlockHitResult bestResult = null;
|
||||
AbstractContraptionEntity bestEntity = null;
|
||||
|
||||
for (WeakReference<AbstractContraptionEntity> ref : contraptions) {
|
||||
AbstractContraptionEntity contraptionEntity = ref.get();
|
||||
|
@ -104,20 +108,31 @@ public class ContraptionHandlerClient {
|
|||
BlockHitResult rayTraceResult = rayTraceContraption(origin, target, contraptionEntity);
|
||||
if (rayTraceResult == null)
|
||||
continue;
|
||||
|
||||
InteractionHand hand = event.getHand();
|
||||
Direction face = rayTraceResult.getDirection();
|
||||
BlockPos pos = rayTraceResult.getBlockPos();
|
||||
|
||||
if (contraptionEntity.handlePlayerInteraction(player, pos, face, hand)) {
|
||||
AllPackets.getChannel().sendToServer(new ContraptionInteractionPacket(contraptionEntity, hand, pos, face));
|
||||
} else if (handleSpecialInteractions(contraptionEntity, player, pos, face, hand)) {
|
||||
} else
|
||||
|
||||
double distance = contraptionEntity.toGlobalVector(rayTraceResult.getLocation(), 1).distanceTo(origin);
|
||||
if (distance > bestDistance)
|
||||
continue;
|
||||
|
||||
event.setCanceled(true);
|
||||
event.setSwingHand(false);
|
||||
|
||||
bestResult = rayTraceResult;
|
||||
bestDistance = distance;
|
||||
bestEntity = contraptionEntity;
|
||||
}
|
||||
|
||||
if (bestResult == null)
|
||||
return;
|
||||
|
||||
InteractionHand hand = event.getHand();
|
||||
Direction face = bestResult.getDirection();
|
||||
BlockPos pos = bestResult.getBlockPos();
|
||||
|
||||
if (bestEntity.handlePlayerInteraction(player, pos, face, hand)) {
|
||||
AllPackets.getChannel()
|
||||
.sendToServer(new ContraptionInteractionPacket(bestEntity, hand, pos, face));
|
||||
} else
|
||||
handleSpecialInteractions(bestEntity, player, pos, face, hand);
|
||||
|
||||
event.setCanceled(true);
|
||||
event.setSwingHand(false);
|
||||
}
|
||||
|
||||
private static boolean handleSpecialInteractions(AbstractContraptionEntity contraptionEntity, Player player,
|
||||
|
|
|
@ -15,6 +15,7 @@ import com.simibubi.create.content.contraptions.behaviour.MovementContext;
|
|||
import com.simibubi.create.foundation.utility.worldWrappers.WrappedBlockAndTintGetter;
|
||||
import com.simibubi.create.foundation.virtualWorld.VirtualRenderWorld;
|
||||
|
||||
import dev.engine_room.flywheel.api.material.CardinalLightingMode;
|
||||
import dev.engine_room.flywheel.api.model.Model;
|
||||
import dev.engine_room.flywheel.api.task.Plan;
|
||||
import dev.engine_room.flywheel.api.visual.BlockEntityVisual;
|
||||
|
@ -28,6 +29,8 @@ import dev.engine_room.flywheel.api.visualization.VisualizationContext;
|
|||
import dev.engine_room.flywheel.api.visualization.VisualizerRegistry;
|
||||
import dev.engine_room.flywheel.lib.instance.InstanceTypes;
|
||||
import dev.engine_room.flywheel.lib.instance.TransformedInstance;
|
||||
import dev.engine_room.flywheel.lib.material.SimpleMaterial;
|
||||
import dev.engine_room.flywheel.lib.model.ModelUtil;
|
||||
import dev.engine_room.flywheel.lib.model.baked.ForgeMultiBlockModelBuilder;
|
||||
import dev.engine_room.flywheel.lib.task.ForEachPlan;
|
||||
import dev.engine_room.flywheel.lib.task.NestedPlan;
|
||||
|
@ -93,6 +96,8 @@ public class ContraptionVisual<E extends AbstractContraptionEntity> extends Abst
|
|||
|
||||
model = new ForgeMultiBlockModelBuilder(modelWorld, blocks.positions())
|
||||
.modelDataLookup(pos -> contraption.modelData.getOrDefault(pos, ModelData.EMPTY))
|
||||
.materialFunc((renderType, aBoolean) -> SimpleMaterial.builderOf(ModelUtil.getMaterial(renderType, aBoolean))
|
||||
.cardinalLightingMode(CardinalLightingMode.CHUNK))
|
||||
.build();
|
||||
|
||||
var instancer = embedding.instancerProvider()
|
||||
|
|
|
@ -41,7 +41,7 @@ public class DrillActorVisual extends ActorVisual {
|
|||
public void tick() {
|
||||
previousRotation = rotation;
|
||||
|
||||
if (context.contraption.stalled || context.disabled
|
||||
if (context.disabled
|
||||
|| VecHelper.isVecPointingTowards(context.relativeMotion, facing.getOpposite()))
|
||||
return;
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ import com.simibubi.create.content.kinetics.belt.behaviour.TransportedItemStackH
|
|||
import com.simibubi.create.content.kinetics.fan.processing.AllFanProcessingTypes;
|
||||
import com.simibubi.create.content.kinetics.fan.processing.FanProcessing;
|
||||
import com.simibubi.create.content.kinetics.fan.processing.FanProcessingType;
|
||||
import com.simibubi.create.content.kinetics.fan.processing.FanProcessingTypeRegistry;
|
||||
import com.simibubi.create.foundation.advancement.AllAdvancements;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
|
||||
import com.simibubi.create.infrastructure.config.AllConfigs;
|
||||
|
|
|
@ -23,6 +23,7 @@ import net.minecraft.core.Direction.Axis;
|
|||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
@ -71,7 +72,7 @@ public class FactoryPanelBlockEntity extends SmartBlockEntity {
|
|||
return;
|
||||
|
||||
if (activePanels() == 0)
|
||||
level.destroyBlock(worldPosition, false);
|
||||
level.setBlockAndUpdate(worldPosition, Blocks.AIR.defaultBlockState());
|
||||
|
||||
if (AllBlocks.FACTORY_GAUGE.has(getBlockState())) {
|
||||
boolean shouldBeRestocker = AllBlocks.PACKAGER
|
||||
|
|
|
@ -13,8 +13,6 @@ import com.simibubi.create.foundation.gui.AllGuiTextures;
|
|||
import com.simibubi.create.foundation.gui.AllIcons;
|
||||
import com.simibubi.create.foundation.gui.menu.AbstractSimiContainerScreen;
|
||||
import com.simibubi.create.foundation.gui.widget.IconButton;
|
||||
import com.simibubi.create.foundation.gui.widget.Indicator;
|
||||
import com.simibubi.create.foundation.gui.widget.Indicator.State;
|
||||
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
|
@ -119,15 +117,11 @@ public abstract class AbstractFilterScreen<F extends AbstractFilterMenu> extends
|
|||
|
||||
public void handleIndicators() {
|
||||
for (IconButton button : getTooltipButtons())
|
||||
button.active = isButtonEnabled(button);
|
||||
for (Indicator indicator : getIndicators())
|
||||
indicator.state = isIndicatorOn(indicator) ? State.ON : State.OFF;
|
||||
button.green = !isButtonEnabled(button);
|
||||
}
|
||||
|
||||
protected abstract boolean isButtonEnabled(IconButton button);
|
||||
|
||||
protected abstract boolean isIndicatorOn(Indicator indicator);
|
||||
|
||||
protected List<IconButton> getTooltipButtons() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
@ -136,10 +130,6 @@ public abstract class AbstractFilterScreen<F extends AbstractFilterMenu> extends
|
|||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
protected List<Indicator> getIndicators() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
private void fillToolTip(IconButton button, Component tooltip) {
|
||||
if (!button.isHoveredOrFocused())
|
||||
return;
|
||||
|
|
|
@ -70,8 +70,8 @@ public class AttributeFilterMenu extends AbstractFilterMenu {
|
|||
|
||||
@Override
|
||||
protected void addFilterSlots() {
|
||||
this.addSlot(new SlotItemHandler(ghostInventory, 0, 16, 24));
|
||||
this.addSlot(new SlotItemHandler(ghostInventory, 1, 22, 59) {
|
||||
this.addSlot(new SlotItemHandler(ghostInventory, 0, 16, 27));
|
||||
this.addSlot(new SlotItemHandler(ghostInventory, 1, 16, 62) {
|
||||
@Override
|
||||
public boolean mayPickup(Player playerIn) {
|
||||
return false;
|
||||
|
|
|
@ -15,7 +15,6 @@ import com.simibubi.create.content.logistics.item.filter.attribute.ItemAttribute
|
|||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.gui.AllIcons;
|
||||
import com.simibubi.create.foundation.gui.widget.IconButton;
|
||||
import com.simibubi.create.foundation.gui.widget.Indicator;
|
||||
import com.simibubi.create.foundation.gui.widget.Label;
|
||||
import com.simibubi.create.foundation.gui.widget.SelectionScrollInput;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
@ -49,7 +48,6 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterM
|
|||
private Component selectedT = CreateLang.translateDirect(PREFIX + "selected_attributes");
|
||||
|
||||
private IconButton whitelistDis, whitelistCon, blacklist;
|
||||
private Indicator whitelistDisIndicator, whitelistConIndicator, blacklistIndicator;
|
||||
private IconButton add;
|
||||
private IconButton addInverted;
|
||||
|
||||
|
@ -71,34 +69,29 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterM
|
|||
int x = leftPos;
|
||||
int y = topPos;
|
||||
|
||||
whitelistDis = new IconButton(x + 47, y + 61, AllIcons.I_WHITELIST_OR);
|
||||
whitelistDis = new IconButton(x + 38, y + 61, AllIcons.I_WHITELIST_OR);
|
||||
whitelistDis.withCallback(() -> {
|
||||
menu.whitelistMode = WhitelistMode.WHITELIST_DISJ;
|
||||
sendOptionUpdate(Option.WHITELIST);
|
||||
});
|
||||
whitelistDis.setToolTip(allowDisN);
|
||||
whitelistCon = new IconButton(x + 65, y + 61, AllIcons.I_WHITELIST_AND);
|
||||
whitelistCon = new IconButton(x + 56, y + 61, AllIcons.I_WHITELIST_AND);
|
||||
whitelistCon.withCallback(() -> {
|
||||
menu.whitelistMode = WhitelistMode.WHITELIST_CONJ;
|
||||
sendOptionUpdate(Option.WHITELIST2);
|
||||
});
|
||||
whitelistCon.setToolTip(allowConN);
|
||||
blacklist = new IconButton(x + 83, y + 61, AllIcons.I_WHITELIST_NOT);
|
||||
blacklist = new IconButton(x + 74, y + 61, AllIcons.I_WHITELIST_NOT);
|
||||
blacklist.withCallback(() -> {
|
||||
menu.whitelistMode = WhitelistMode.BLACKLIST;
|
||||
sendOptionUpdate(Option.BLACKLIST);
|
||||
});
|
||||
blacklist.setToolTip(denyN);
|
||||
|
||||
whitelistDisIndicator = new Indicator(x + 47, y + 55, CommonComponents.EMPTY);
|
||||
whitelistConIndicator = new Indicator(x + 65, y + 55, CommonComponents.EMPTY);
|
||||
blacklistIndicator = new Indicator(x + 83, y + 55, CommonComponents.EMPTY);
|
||||
addRenderableWidgets(blacklist, whitelistCon, whitelistDis);
|
||||
|
||||
addRenderableWidgets(blacklist, whitelistCon, whitelistDis, blacklistIndicator, whitelistConIndicator,
|
||||
whitelistDisIndicator);
|
||||
|
||||
addRenderableWidget(add = new IconButton(x + 182, y + 23, AllIcons.I_ADD));
|
||||
addRenderableWidget(addInverted = new IconButton(x + 200, y + 23, AllIcons.I_ADD_INVERTED_ATTRIBUTE));
|
||||
addRenderableWidget(add = new IconButton(x + 182, y + 26, AllIcons.I_ADD));
|
||||
addRenderableWidget(addInverted = new IconButton(x + 200, y + 26, AllIcons.I_ADD_INVERTED_ATTRIBUTE));
|
||||
add.withCallback(() -> {
|
||||
handleAddedAttibute(false);
|
||||
});
|
||||
|
@ -110,9 +103,9 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterM
|
|||
|
||||
handleIndicators();
|
||||
|
||||
attributeSelectorLabel = new Label(x + 43, y + 28, CommonComponents.EMPTY).colored(0xF3EBDE)
|
||||
attributeSelectorLabel = new Label(x + 43, y + 31, CommonComponents.EMPTY).colored(0xF3EBDE)
|
||||
.withShadow();
|
||||
attributeSelector = new SelectionScrollInput(x + 39, y + 23, 137, 18);
|
||||
attributeSelector = new SelectionScrollInput(x + 39, y + 26, 137, 18);
|
||||
attributeSelector.forOptions(Arrays.asList(CommonComponents.EMPTY));
|
||||
attributeSelector.removeCallback();
|
||||
referenceItemChanged(menu.ghostInventory.getStackInSlot(0));
|
||||
|
@ -186,7 +179,7 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterM
|
|||
PoseStack matrixStack = graphics.pose();
|
||||
matrixStack.pushPose();
|
||||
matrixStack.translate(0, 0, 150);
|
||||
graphics.renderItemDecorations(font, stack, leftPos + 22, topPos + 59,
|
||||
graphics.renderItemDecorations(font, stack, leftPos + 16, topPos + 62,
|
||||
String.valueOf(selectedAttributes.size() - 1));
|
||||
matrixStack.popPose();
|
||||
|
||||
|
@ -223,11 +216,6 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterM
|
|||
return Arrays.asList(denyDESC.plainCopy(), allowConDESC.plainCopy(), allowDisDESC.plainCopy());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<Indicator> getIndicators() {
|
||||
return Arrays.asList(blacklistIndicator, whitelistConIndicator, whitelistDisIndicator);
|
||||
}
|
||||
|
||||
protected boolean handleAddedAttibute(boolean inverted) {
|
||||
int index = attributeSelector.getState();
|
||||
if (index >= attributesOfItem.size())
|
||||
|
@ -269,15 +257,4 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterM
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isIndicatorOn(Indicator indicator) {
|
||||
if (indicator == blacklistIndicator)
|
||||
return menu.whitelistMode == WhitelistMode.BLACKLIST;
|
||||
if (indicator == whitelistConIndicator)
|
||||
return menu.whitelistMode == WhitelistMode.WHITELIST_CONJ;
|
||||
if (indicator == whitelistDisIndicator)
|
||||
return menu.whitelistMode == WhitelistMode.WHITELIST_DISJ;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public class FilterMenu extends AbstractFilterMenu {
|
|||
@Override
|
||||
protected void addFilterSlots() {
|
||||
int x = 23;
|
||||
int y = 22;
|
||||
int y = 25;
|
||||
for (int row = 0; row < 2; ++row)
|
||||
for (int col = 0; col < 9; ++col)
|
||||
this.addSlot(new SlotItemHandler(ghostInventory, col + row * 9, x + col * 18, y + row * 18));
|
||||
|
|
|
@ -7,10 +7,8 @@ import com.simibubi.create.content.logistics.filter.FilterScreenPacket.Option;
|
|||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.gui.AllIcons;
|
||||
import com.simibubi.create.foundation.gui.widget.IconButton;
|
||||
import com.simibubi.create.foundation.gui.widget.Indicator;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
|
@ -31,8 +29,6 @@ public class FilterScreen extends AbstractFilterScreen<FilterMenu> {
|
|||
|
||||
private IconButton whitelist, blacklist;
|
||||
private IconButton respectNBT, ignoreNBT;
|
||||
private Indicator whitelistIndicator, blacklistIndicator;
|
||||
private Indicator respectNBTIndicator, ignoreNBTIndicator;
|
||||
|
||||
public FilterScreen(FilterMenu menu, Inventory inv, Component title) {
|
||||
super(menu, inv, title, AllGuiTextures.FILTER);
|
||||
|
@ -58,9 +54,7 @@ public class FilterScreen extends AbstractFilterScreen<FilterMenu> {
|
|||
sendOptionUpdate(Option.WHITELIST);
|
||||
});
|
||||
whitelist.setToolTip(allowN);
|
||||
blacklistIndicator = new Indicator(x + 18, y + 69, CommonComponents.EMPTY);
|
||||
whitelistIndicator = new Indicator(x + 36, y + 69, CommonComponents.EMPTY);
|
||||
addRenderableWidgets(blacklist, whitelist, blacklistIndicator, whitelistIndicator);
|
||||
addRenderableWidgets(blacklist, whitelist);
|
||||
|
||||
respectNBT = new IconButton(x + 60, y + 75, AllIcons.I_RESPECT_NBT);
|
||||
respectNBT.withCallback(() -> {
|
||||
|
@ -74,9 +68,7 @@ public class FilterScreen extends AbstractFilterScreen<FilterMenu> {
|
|||
sendOptionUpdate(Option.IGNORE_DATA);
|
||||
});
|
||||
ignoreNBT.setToolTip(ignoreDataN);
|
||||
respectNBTIndicator = new Indicator(x + 60, y + 69, CommonComponents.EMPTY);
|
||||
ignoreNBTIndicator = new Indicator(x + 78, y + 69, CommonComponents.EMPTY);
|
||||
addRenderableWidgets(respectNBT, ignoreNBT, respectNBTIndicator, ignoreNBTIndicator);
|
||||
addRenderableWidgets(respectNBT, ignoreNBT);
|
||||
|
||||
handleIndicators();
|
||||
}
|
||||
|
@ -91,11 +83,6 @@ public class FilterScreen extends AbstractFilterScreen<FilterMenu> {
|
|||
return Arrays.asList(denyDESC.plainCopy(), allowDESC.plainCopy(), respectDataDESC.plainCopy(), ignoreDataDESC.plainCopy());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<Indicator> getIndicators() {
|
||||
return Arrays.asList(blacklistIndicator, whitelistIndicator, respectNBTIndicator, ignoreNBTIndicator);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isButtonEnabled(IconButton button) {
|
||||
if (button == blacklist)
|
||||
|
@ -109,17 +96,4 @@ public class FilterScreen extends AbstractFilterScreen<FilterMenu> {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isIndicatorOn(Indicator indicator) {
|
||||
if (indicator == blacklistIndicator)
|
||||
return menu.blacklist;
|
||||
if (indicator == whitelistIndicator)
|
||||
return !menu.blacklist;
|
||||
if (indicator == respectNBTIndicator)
|
||||
return menu.respectNBT;
|
||||
if (indicator == ignoreNBTIndicator)
|
||||
return !menu.respectNBT;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ import com.simibubi.create.content.logistics.box.PackageStyles;
|
|||
import com.simibubi.create.content.logistics.filter.FilterScreenPacket.Option;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.gui.widget.IconButton;
|
||||
import com.simibubi.create.foundation.gui.widget.Indicator;
|
||||
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
|
@ -102,9 +101,4 @@ public class PackageFilterScreen extends AbstractFilterScreen<PackageFilterMenu>
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isIndicatorOn(Indicator indicator) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -561,8 +561,8 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
|||
ms.popPose();
|
||||
}
|
||||
|
||||
if (itemsToOrder.size() > 8) {
|
||||
graphics.drawString(font, Component.literal("[+" + (itemsToOrder.size() - 8) + "]"), x + windowWidth - 40,
|
||||
if (itemsToOrder.size() > 9) {
|
||||
graphics.drawString(font, Component.literal("[+" + (itemsToOrder.size() - 9) + "]"), x + windowWidth - 40,
|
||||
orderY + 21, 0xF8F8EC);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ public class StandardBogeyVisual implements BogeyVisual {
|
|||
var shaftInstancer = ctx.instancerProvider()
|
||||
.instancer(InstanceTypes.TRANSFORMED, Models.partial(AllPartialModels.SHAFT));
|
||||
|
||||
shaft1 = shaftInstancer.createInstance().rotateToFace(Direction.SOUTH);
|
||||
shaft2 = shaftInstancer.createInstance().rotateToFace(Direction.SOUTH);
|
||||
shaft1 = shaftInstancer.createInstance();
|
||||
shaft2 = shaftInstancer.createInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -33,13 +33,15 @@ public class StandardBogeyVisual implements BogeyVisual {
|
|||
shaft1.setTransform(poseStack)
|
||||
.translate(-.5f, .25f, 0)
|
||||
.center()
|
||||
.rotateZDegrees(wheelAngle)
|
||||
.rotateTo(Direction.UP, Direction.SOUTH)
|
||||
.rotateYDegrees(wheelAngle)
|
||||
.uncenter()
|
||||
.setChanged();
|
||||
shaft2.setTransform(poseStack)
|
||||
.translate(-.5f, .25f, -1)
|
||||
.center()
|
||||
.rotateZDegrees(wheelAngle)
|
||||
.rotateTo(Direction.UP, Direction.SOUTH)
|
||||
.rotateYDegrees(wheelAngle)
|
||||
.uncenter()
|
||||
.setChanged();
|
||||
}
|
||||
|
@ -145,8 +147,8 @@ public class StandardBogeyVisual implements BogeyVisual {
|
|||
super(ctx, partialTick, inContraption);
|
||||
var secondaryShaftInstancer = ctx.instancerProvider()
|
||||
.instancer(InstanceTypes.TRANSFORMED, Models.partial(AllPartialModels.SHAFT));
|
||||
secondaryShaft1 = secondaryShaftInstancer.createInstance().rotateToFace(Direction.EAST);
|
||||
secondaryShaft2 = secondaryShaftInstancer.createInstance().rotateToFace(Direction.EAST);
|
||||
secondaryShaft1 = secondaryShaftInstancer.createInstance();
|
||||
secondaryShaft2 = secondaryShaftInstancer.createInstance();
|
||||
drive = ctx.instancerProvider()
|
||||
.instancer(InstanceTypes.TRANSFORMED, Models.partial(AllPartialModels.BOGEY_DRIVE))
|
||||
.createInstance();
|
||||
|
@ -167,13 +169,15 @@ public class StandardBogeyVisual implements BogeyVisual {
|
|||
secondaryShaft1.setTransform(poseStack)
|
||||
.translate(-.5f, .25f, .5f)
|
||||
.center()
|
||||
.rotateXDegrees(wheelAngle)
|
||||
.rotateTo(Direction.UP, Direction.EAST)
|
||||
.rotateYDegrees(wheelAngle)
|
||||
.uncenter()
|
||||
.setChanged();
|
||||
secondaryShaft2.setTransform(poseStack)
|
||||
.translate(-.5f, .25f, -1.5f)
|
||||
.center()
|
||||
.rotateXDegrees(wheelAngle)
|
||||
.rotateTo(Direction.UP, Direction.EAST)
|
||||
.rotateYDegrees(wheelAngle)
|
||||
.uncenter()
|
||||
.setChanged();
|
||||
drive.setTransform(poseStack)
|
||||
|
|
|
@ -17,6 +17,7 @@ import com.simibubi.create.foundation.block.connected.ConnectedTextureBehaviour;
|
|||
import com.simibubi.create.foundation.block.connected.GlassPaneCTBehaviour;
|
||||
import com.simibubi.create.foundation.block.connected.HorizontalCTBehaviour;
|
||||
import com.tterrag.registrate.builders.BlockBuilder;
|
||||
import com.tterrag.registrate.builders.ItemBuilder;
|
||||
import com.tterrag.registrate.providers.DataGenContext;
|
||||
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
|
||||
import com.tterrag.registrate.providers.RegistrateRecipeProvider;
|
||||
|
@ -33,6 +34,7 @@ import net.minecraft.data.recipes.ShapedRecipeBuilder;
|
|||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
@ -41,7 +43,6 @@ import net.minecraft.world.level.block.state.BlockBehaviour.Properties;
|
|||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.WoodType;
|
||||
import net.minecraft.world.level.material.MapColor;
|
||||
|
||||
import net.minecraftforge.client.model.generators.ConfiguredModel;
|
||||
import net.minecraftforge.client.model.generators.ModelFile;
|
||||
import net.minecraftforge.common.Tags;
|
||||
|
@ -164,7 +165,7 @@ public class WindowGen {
|
|||
ResourceLocation itemSideTexture = Create.asResource(palettesDir() + name);
|
||||
ResourceLocation topTexture = Create.asResource(palettesDir() + "framed_glass_pane_top");
|
||||
Supplier<Supplier<RenderType>> renderType = () -> RenderType::cutoutMipped;
|
||||
return connectedGlassPane(name, parent, ctshift, sideTexture, itemSideTexture, topTexture, renderType)
|
||||
return connectedGlassPane(name, parent, ctshift, sideTexture, itemSideTexture, topTexture, renderType, true)
|
||||
.register();
|
||||
}
|
||||
|
||||
|
@ -173,7 +174,7 @@ public class WindowGen {
|
|||
Supplier<Supplier<RenderType>> renderType) {
|
||||
ResourceLocation topTexture = Create.asResource(palettesDir() + name + "_pane_top");
|
||||
ResourceLocation sideTexture = Create.asResource(palettesDir() + name);
|
||||
return connectedGlassPane(name, parent, ctshift, sideTexture, sideTexture, topTexture, renderType);
|
||||
return connectedGlassPane(name, parent, ctshift, sideTexture, sideTexture, topTexture, renderType, false);
|
||||
}
|
||||
|
||||
public static BlockEntry<ConnectedGlassPaneBlock> woodenWindowPane(WoodType woodType,
|
||||
|
@ -188,7 +189,7 @@ public class WindowGen {
|
|||
ResourceLocation topTexture = new ResourceLocation("block/" + woodName + "_planks");
|
||||
ResourceLocation sideTexture = Create.asResource(palettesDir() + name);
|
||||
return connectedGlassPane(name, parent, () -> AllSpriteShifts.getWoodenWindow(woodType), sideTexture,
|
||||
sideTexture, topTexture, renderType).register();
|
||||
sideTexture, topTexture, renderType, false).register();
|
||||
}
|
||||
|
||||
public static BlockEntry<GlassPaneBlock> standardGlassPane(String name, Supplier<? extends Block> parent,
|
||||
|
@ -196,12 +197,12 @@ public class WindowGen {
|
|||
NonNullBiConsumer<DataGenContext<Block, GlassPaneBlock>, RegistrateBlockstateProvider> stateProvider =
|
||||
(c, p) -> p.paneBlock(c.get(), sideTexture, topTexture);
|
||||
return glassPane(name, parent, sideTexture, topTexture, GlassPaneBlock::new, renderType, $ -> {
|
||||
}, stateProvider).register();
|
||||
}, stateProvider, true).register();
|
||||
}
|
||||
|
||||
private static BlockBuilder<ConnectedGlassPaneBlock, CreateRegistrate> connectedGlassPane(String name,
|
||||
Supplier<? extends Block> parent, Supplier<CTSpriteShiftEntry> ctshift, ResourceLocation sideTexture,
|
||||
ResourceLocation itemSideTexture, ResourceLocation topTexture, Supplier<Supplier<RenderType>> renderType) {
|
||||
ResourceLocation itemSideTexture, ResourceLocation topTexture, Supplier<Supplier<RenderType>> renderType, boolean colorless) {
|
||||
NonNullConsumer<? super ConnectedGlassPaneBlock> connectedTextures = ctshift == null ? $ -> {
|
||||
} : connectedTextures(() -> new GlassPaneCTBehaviour(ctshift.get()));
|
||||
String CGPparents = "block/connected_glass_pane/";
|
||||
|
@ -219,7 +220,7 @@ public class WindowGen {
|
|||
noSideAlt.apply(p));
|
||||
|
||||
return glassPane(name, parent, itemSideTexture, topTexture, ConnectedGlassPaneBlock::new, renderType,
|
||||
connectedTextures, stateProvider);
|
||||
connectedTextures, stateProvider, colorless);
|
||||
}
|
||||
|
||||
private static Function<RegistrateBlockstateProvider, ModelFile> getPaneModelProvider(String CGPparents,
|
||||
|
@ -234,28 +235,46 @@ public class WindowGen {
|
|||
Supplier<? extends Block> parent, ResourceLocation sideTexture, ResourceLocation topTexture,
|
||||
NonNullFunction<Properties, G> factory, Supplier<Supplier<RenderType>> renderType,
|
||||
NonNullConsumer<? super G> connectedTextures,
|
||||
NonNullBiConsumer<DataGenContext<Block, G>, RegistrateBlockstateProvider> stateProvider) {
|
||||
NonNullBiConsumer<DataGenContext<Block, G>, RegistrateBlockstateProvider> stateProvider, boolean colorless) {
|
||||
name += "_pane";
|
||||
|
||||
return REGISTRATE.block(name, factory)
|
||||
|
||||
|
||||
ItemBuilder<BlockItem, BlockBuilder<G, CreateRegistrate>> itemBuilder = REGISTRATE.block(name, factory)
|
||||
.onRegister(connectedTextures)
|
||||
.addLayer(renderType)
|
||||
.initialProperties(() -> Blocks.GLASS_PANE)
|
||||
.properties(p -> p.mapColor(parent.get()
|
||||
.defaultMapColor()))
|
||||
.blockstate(stateProvider)
|
||||
.recipe((c, p) -> ShapedRecipeBuilder.shaped(RecipeCategory.BUILDING_BLOCKS, c.get(), 16)
|
||||
.pattern("###")
|
||||
.pattern("###")
|
||||
.define('#', parent.get())
|
||||
.unlockedBy("has_ingredient", RegistrateRecipeProvider.has(parent.get()))
|
||||
.save(p::accept))
|
||||
.tag(Tags.Blocks.GLASS_PANES)
|
||||
.recipe((c, p) -> {
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.BUILDING_BLOCKS, c.get(), 16)
|
||||
.pattern("###")
|
||||
.pattern("###")
|
||||
.define('#', parent.get())
|
||||
.unlockedBy("has_ingredient", RegistrateRecipeProvider.has(parent.get()))
|
||||
.save(p::accept);
|
||||
if (colorless)
|
||||
p.stonecutting(DataIngredient.tag(Tags.Items.GLASS_PANES_COLORLESS), RecipeCategory.BUILDING_BLOCKS,
|
||||
c::get);
|
||||
})
|
||||
.loot((t, g) -> t.dropWhenSilkTouch(g))
|
||||
.item()
|
||||
.tag(Tags.Items.GLASS_PANES)
|
||||
.item();
|
||||
|
||||
if (colorless)
|
||||
itemBuilder.tag(Tags.Items.GLASS_PANES, Tags.Items.GLASS_PANES_COLORLESS);
|
||||
else
|
||||
itemBuilder.tag(Tags.Items.GLASS_PANES);
|
||||
|
||||
BlockBuilder<G, CreateRegistrate> blockBuilder = itemBuilder
|
||||
.model((c, p) -> p.generated(c, sideTexture))
|
||||
.build();
|
||||
|
||||
if (colorless)
|
||||
blockBuilder.tag(Tags.Blocks.GLASS_PANES, Tags.Blocks.GLASS_PANES_COLORLESS);
|
||||
else
|
||||
blockBuilder.tag(Tags.Blocks.GLASS_PANES);
|
||||
|
||||
return blockBuilder;
|
||||
}
|
||||
|
||||
private static String palettesDir() {
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
|
||||
"block.create.item_hatch.tooltip.summary": "_Quickly solves_ your _inventory_ clutter and makes it someone else's problem.",
|
||||
"block.create.item_hatch.tooltip.condition1": "When R-Clicked",
|
||||
"block.create.item_hatch.tooltip.behaviour1": "_Deposits_ your items into the _container_ it is placed on. _Hotbar items_ and items _with contents_ will _not_ be transferred.",
|
||||
"block.create.item_hatch.tooltip.behaviour1": "_Deposits_ your _held item_ into the _container_ it is placed on. _Sneak-click_ to _deposit_ _everything_ except Hotbar items.",
|
||||
|
||||
"block.create.clipboard.tooltip.summary": "_Keeps your notes_ and makes you look more professional.",
|
||||
"block.create.clipboard.tooltip.condition1": "When R-Clicked",
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.8 KiB |
Loading…
Add table
Reference in a new issue