Chipping away

This commit is contained in:
simibubi 2022-08-04 12:56:08 +02:00
parent 4ea1f3e620
commit a9b61b5c2f
31 changed files with 69 additions and 40 deletions

View File

@ -126,6 +126,8 @@ public enum AllRecipeTypes implements IRecipeTypeInfo {
event.register(Registry.RECIPE_TYPE_REGISTRY, helper -> {
for (AllRecipeTypes r : AllRecipeTypes.values()) {
r.type = r.typeSupplier.get();
if (r.type == RecipeType.CRAFTING)
continue;
helper.register(r.id, r.type);
}
});

View File

@ -373,13 +373,14 @@ public class AllTags {
AllItemTags.VANILLA_STRIPPED_LOGS.add(Items.STRIPPED_ACACIA_LOG, Items.STRIPPED_BIRCH_LOG,
Items.STRIPPED_CRIMSON_STEM, Items.STRIPPED_DARK_OAK_LOG, Items.STRIPPED_JUNGLE_LOG, Items.STRIPPED_OAK_LOG,
Items.STRIPPED_SPRUCE_LOG, Items.STRIPPED_WARPED_STEM);
Items.STRIPPED_SPRUCE_LOG, Items.STRIPPED_MANGROVE_LOG, Items.STRIPPED_WARPED_STEM);
AllItemTags.VANILLA_STRIPPED_LOGS.includeIn(AllItemTags.STRIPPED_LOGS);
AllItemTags.VANILLA_STRIPPED_WOOD.add(Items.STRIPPED_ACACIA_WOOD, Items.STRIPPED_BIRCH_WOOD,
Items.STRIPPED_CRIMSON_HYPHAE, Items.STRIPPED_DARK_OAK_WOOD, Items.STRIPPED_JUNGLE_WOOD,
Items.STRIPPED_OAK_WOOD, Items.STRIPPED_SPRUCE_WOOD, Items.STRIPPED_WARPED_HYPHAE);
Items.STRIPPED_OAK_WOOD, Items.STRIPPED_MANGROVE_WOOD, Items.STRIPPED_SPRUCE_WOOD,
Items.STRIPPED_WARPED_HYPHAE);
AllItemTags.VANILLA_STRIPPED_WOOD.includeIn(AllItemTags.STRIPPED_WOOD);

View File

@ -404,13 +404,13 @@ public class ClientEvents {
@SubscribeEvent
public static void registerGuiOverlays(RegisterGuiOverlaysEvent event) {
// Register overlays in reverse order
event.registerAbove(VanillaGuiOverlay.AIR_LEVEL.id(), "Create's Remaining Air", CopperBacktankArmorLayer.REMAINING_AIR_OVERLAY);
event.registerAbove(VanillaGuiOverlay.EXPERIENCE_BAR.id(), "Create's Train Driver HUD", TrainHUD.OVERLAY);
event.registerAbove(VanillaGuiOverlay.HOTBAR.id(), "Create's Goggle Information", GoggleOverlayRenderer.OVERLAY);
event.registerAbove(VanillaGuiOverlay.HOTBAR.id(), "Create's Blueprints", BlueprintOverlayRenderer.OVERLAY);
event.registerAbove(VanillaGuiOverlay.HOTBAR.id(), "Create's Linked Controller", LinkedControllerClientHandler.OVERLAY);
event.registerAbove(VanillaGuiOverlay.HOTBAR.id(), "Create's Schematics", CreateClient.SCHEMATIC_HANDLER.getOverlayRenderer());
event.registerAbove(VanillaGuiOverlay.HOTBAR.id(), "Create's Toolboxes", ToolboxHandlerClient.OVERLAY);
event.registerAbove(VanillaGuiOverlay.AIR_LEVEL.id(), "remaining_air", CopperBacktankArmorLayer.REMAINING_AIR_OVERLAY);
event.registerAbove(VanillaGuiOverlay.EXPERIENCE_BAR.id(), "train_hud", TrainHUD.OVERLAY);
event.registerAbove(VanillaGuiOverlay.HOTBAR.id(), "goggle_info", GoggleOverlayRenderer.OVERLAY);
event.registerAbove(VanillaGuiOverlay.HOTBAR.id(), "blueprint", BlueprintOverlayRenderer.OVERLAY);
event.registerAbove(VanillaGuiOverlay.HOTBAR.id(), "linked_controller", LinkedControllerClientHandler.OVERLAY);
event.registerAbove(VanillaGuiOverlay.HOTBAR.id(), "schematic", CreateClient.SCHEMATIC_HANDLER.getOverlayRenderer());
event.registerAbove(VanillaGuiOverlay.HOTBAR.id(), "toolbox", ToolboxHandlerClient.OVERLAY);
}
@SubscribeEvent

View File

@ -7,6 +7,7 @@ import java.util.IdentityHashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Supplier;
import java.util.stream.Collectors;
@ -42,6 +43,8 @@ import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockBehaviour.Properties;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions;
import net.minecraftforge.fluids.FluidType;
import net.minecraftforge.fluids.ForgeFlowingFluid;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
@ -175,14 +178,15 @@ public class CreateRegistrate extends AbstractRegistrate<CreateRegistrate> {
public FluidBuilder<VirtualFluid, CreateRegistrate> virtualFluid(String name) {
return entry(name,
c -> new VirtualFluidBuilder<>(self(), self(), name, c, Create.asResource("fluid/" + name + "_still"),
Create.asResource("fluid/" + name + "_flow"), null, VirtualFluid::new));
c -> new VirtualFluidBuilder<VirtualFluid, CreateRegistrate>(self(), self(), name, c,
Create.asResource("fluid/" + name + "_still"), Create.asResource("fluid/" + name + "_flow"),
CreateRegistrate::defaultFluidType, VirtualFluid::new));
}
public FluidBuilder<VirtualFluid, CreateRegistrate> virtualFluid(String name, ResourceLocation still,
ResourceLocation flow) {
return entry(name,
c -> new VirtualFluidBuilder<>(self(), self(), name, c, still, flow, null, VirtualFluid::new));
return entry(name, c -> new VirtualFluidBuilder<>(self(), self(), name, c, still, flow,
CreateRegistrate::defaultFluidType, VirtualFluid::new));
}
public FluidBuilder<ForgeFlowingFluid.Flowing, CreateRegistrate> standardFluid(String name) {
@ -195,6 +199,26 @@ public class CreateRegistrate extends AbstractRegistrate<CreateRegistrate> {
typeFactory);
}
public static FluidType defaultFluidType(FluidType.Properties properties, ResourceLocation stillTexture,
ResourceLocation flowingTexture) {
return new FluidType(properties) {
@Override
public void initializeClient(Consumer<IClientFluidTypeExtensions> consumer) {
consumer.accept(new IClientFluidTypeExtensions() {
@Override
public ResourceLocation getStillTexture() {
return stillTexture;
}
@Override
public ResourceLocation getFlowingTexture() {
return flowingTexture;
}
});
}
};
}
/* Util */
public static <T extends Block> NonNullConsumer<? super T> casingConnectivity(

View File

@ -20,6 +20,7 @@ public class CuttingRecipeGen extends ProcessingRecipeGen {
JUNGLE_WOOD = stripAndMakePlanks(Blocks.JUNGLE_WOOD, Blocks.STRIPPED_JUNGLE_WOOD, Blocks.JUNGLE_PLANKS),
ACACIA_WOOD = stripAndMakePlanks(Blocks.ACACIA_WOOD, Blocks.STRIPPED_ACACIA_WOOD, Blocks.ACACIA_PLANKS),
DARK_OAK_WOOD = stripAndMakePlanks(Blocks.DARK_OAK_WOOD, Blocks.STRIPPED_DARK_OAK_WOOD, Blocks.DARK_OAK_PLANKS),
MANGROVE_WOOD = stripAndMakePlanks(Blocks.MANGROVE_WOOD, Blocks.STRIPPED_MANGROVE_WOOD, Blocks.MANGROVE_PLANKS),
CRIMSON_WOOD = stripAndMakePlanks(Blocks.CRIMSON_HYPHAE, Blocks.STRIPPED_CRIMSON_HYPHAE, Blocks.CRIMSON_PLANKS),
WARPED_WOOD = stripAndMakePlanks(Blocks.WARPED_HYPHAE, Blocks.STRIPPED_WARPED_HYPHAE, Blocks.WARPED_PLANKS),
@ -29,6 +30,7 @@ public class CuttingRecipeGen extends ProcessingRecipeGen {
JUNGLE_LOG = stripAndMakePlanks(Blocks.JUNGLE_LOG, Blocks.STRIPPED_JUNGLE_LOG, Blocks.JUNGLE_PLANKS),
ACACIA_LOG = stripAndMakePlanks(Blocks.ACACIA_LOG, Blocks.STRIPPED_ACACIA_LOG, Blocks.ACACIA_PLANKS),
DARK_OAK_LOG = stripAndMakePlanks(Blocks.DARK_OAK_LOG, Blocks.STRIPPED_DARK_OAK_LOG, Blocks.DARK_OAK_PLANKS),
MANGROVE_LOG = stripAndMakePlanks(Blocks.MANGROVE_LOG, Blocks.STRIPPED_MANGROVE_LOG, Blocks.MANGROVE_PLANKS),
CRIMSON_LOG = stripAndMakePlanks(Blocks.CRIMSON_STEM, Blocks.STRIPPED_CRIMSON_STEM, Blocks.CRIMSON_PLANKS),
WARPED_LOG = stripAndMakePlanks(Blocks.WARPED_STEM, Blocks.STRIPPED_WARPED_STEM, Blocks.WARPED_PLANKS),

View File

@ -1,7 +1,6 @@
package com.simibubi.create.foundation.mixin;
import java.lang.ref.Reference;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
@ -23,6 +22,7 @@ import net.minecraft.core.BlockPos;
import net.minecraft.core.particles.BlockParticleOption;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.util.RandomSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.MoverType;
import net.minecraft.world.entity.player.Player;
@ -44,7 +44,7 @@ public abstract class EntityContraptionInteractionMixin extends CapabilityProvid
@Final
@Shadow
protected Random random;
protected RandomSource random;
@Shadow
private float nextStep;

View File

@ -1,7 +1,7 @@
{
"parent": "block/block",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/blaze_burner/blaze_cage.obj",
"textures": {
"0": "create:block/blaze_heater_brazier",

View File

@ -1,7 +1,7 @@
{
"parent": "block/block",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/blaze_burner/item.obj",
"textures": {
"0": "create:block/blaze_heater_brazier",

View File

@ -1,7 +1,7 @@
{
"parent": "block/block",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/blaze_burner/campfire.obj",
"textures": {
"0": "create:block/blaze_heater_brazier",

View File

@ -1,7 +1,7 @@
{
"parent": "block/block",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/blaze_burner/campfire.obj",
"textures": {
"0": "create:block/blaze_heater_brazier_soul",

View File

@ -1,7 +1,7 @@
{
"parent": "block/block",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/blaze_burner/blaze_flame.obj",
"textures": {
"0": "create:block/blaze_burner_flame"

View File

@ -1,7 +1,7 @@
{
"parent": "block/block",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/blaze_burner/blaze_rods_large.obj",
"textures": {
"0": "create:block/blaze_active"

View File

@ -1,7 +1,7 @@
{
"parent": "block/block",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/blaze_burner/blaze_rods_small.obj",
"textures": {
"0": "create:block/blaze_active"

View File

@ -1,7 +1,7 @@
{
"parent": "block/block",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/blaze_burner/blaze_rods_large.obj",
"textures": {
"0": "create:block/blaze_super"

View File

@ -1,7 +1,7 @@
{
"parent": "block/block",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/blaze_burner/blaze_rods_small.obj",
"textures": {
"0": "create:block/blaze_super"

View File

@ -1,6 +1,6 @@
{
"parent": "create:block/flywheel/flywheel",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/flywheel/flywheel_shaftless.obj"
}

View File

@ -1,7 +1,7 @@
{
"parent": "create:block/flywheel/flywheel",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/flywheel/flywheel.obj",
"display": {
"gui": {

View File

@ -1,7 +1,7 @@
{
"loader": "forge:obj",
"ambientocclusion": false,
"flip-v": true,
"flip_v": true,
"model": "create:models/block/track/ascending.obj",
"textures": {
"0": "create:block/standard_track",

View File

@ -1,6 +1,6 @@
{
"parent": "create:block/track/bogey/textures",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/track/bogey/bogey_drive.obj"
}

View File

@ -1,6 +1,6 @@
{
"parent": "create:block/track/bogey/textures",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/track/bogey/bogey_drive_piston.obj"
}

View File

@ -1,6 +1,6 @@
{
"parent": "create:block/track/bogey/textures",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/track/bogey/bogey_drive_wheel.obj"
}

View File

@ -1,6 +1,6 @@
{
"parent": "create:block/track/bogey/textures",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/track/bogey/bogey_drive_wheel_pin.obj"
}

View File

@ -1,6 +1,6 @@
{
"parent": "create:block/track/bogey/textures",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/track/bogey/bogey_frame.obj"
}

View File

@ -1,6 +1,6 @@
{
"parent": "create:block/track/bogey/textures",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/track/bogey/bogey_wheel.obj"
}

View File

@ -1,6 +1,6 @@
{
"parent": "create:block/track/obj_track",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/track/cross_d1_xo.obj"
}

View File

@ -1,6 +1,6 @@
{
"parent": "create:block/track/obj_track",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/track/cross_d1_zo.obj"
}

View File

@ -1,6 +1,6 @@
{
"parent": "create:block/track/obj_track",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/track/cross_d2_xo.obj"
}

View File

@ -1,6 +1,6 @@
{
"parent": "create:block/track/obj_track",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/track/cross_d2_zo.obj"
}

View File

@ -1,6 +1,6 @@
{
"parent": "create:block/track/obj_track",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/track/cross_diag.obj"
}

View File

@ -1,6 +1,6 @@
{
"parent": "create:block/track/obj_track",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/track/diag.obj"
}

View File

@ -1,6 +1,6 @@
{
"parent": "create:block/track/obj_track",
"loader": "forge:obj",
"flip-v": true,
"flip_v": true,
"model": "create:models/block/track/diag_2.obj"
}