mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-30 14:55:07 +01:00
Pondering Alone, Part I
This commit is contained in:
parent
1ec63c1511
commit
bce234ec50
893 changed files with 4106 additions and 20444 deletions
81
build.gradle
81
build.gradle
|
@ -25,7 +25,19 @@ apply plugin: 'org.spongepowered.mixin'
|
|||
boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equals('false');
|
||||
// jozu: I use a gradle workspace with both projects.
|
||||
// The project is named Flywheel-Forge, but sub-projects are named by folder.
|
||||
boolean inWorkspace = findProject(':Flywheel') != null
|
||||
boolean flywheelInWorkspace = findProject(':Flywheel') != null
|
||||
|
||||
boolean inMultiModWorkspace = rootProject.hasProperty('multiModWorkspace.enabled')
|
||||
boolean catnipInWorkspace = rootProject.hasProperty('multiModWorkspace.catnip')
|
||||
boolean ponderInWorkspace = rootProject.hasProperty('multiModWorkspace.ponder')
|
||||
|
||||
if (catnipInWorkspace) {
|
||||
evaluationDependsOn(":catnip")
|
||||
}
|
||||
|
||||
if (ponderInWorkspace) {
|
||||
evaluationDependsOn(":Ponder")
|
||||
}
|
||||
|
||||
ext.buildNumber = System.getenv('BUILD_NUMBER')
|
||||
if (buildNumber == null) buildNumber = 'custom'
|
||||
|
@ -44,8 +56,18 @@ minecraft {
|
|||
runs {
|
||||
client {
|
||||
workingDirectory project.file('run')
|
||||
if (inMultiModWorkspace)
|
||||
ideaModule "createmod.Create.main"
|
||||
else
|
||||
ideaModule "Create.main"
|
||||
|
||||
arg '-mixin.config=create.mixins.json'
|
||||
arg '-mixin.config=flywheel.mixins.json'
|
||||
|
||||
if (catnipInWorkspace) {
|
||||
arg '-mixin.config=catnip.mixins.json'
|
||||
}
|
||||
|
||||
//jvmArgs '-XX:+UnlockCommercialFeatures' // uncomment for profiling
|
||||
property 'forge.logging.console.level', 'info'
|
||||
mods {
|
||||
|
@ -53,11 +75,25 @@ minecraft {
|
|||
source sourceSets.main
|
||||
}
|
||||
|
||||
if (inWorkspace) {
|
||||
if (flywheelInWorkspace) {
|
||||
flywheel {
|
||||
source project(":Flywheel").sourceSets.main
|
||||
}
|
||||
}
|
||||
|
||||
if (catnipInWorkspace) {
|
||||
catnip {
|
||||
source project(":catnip:Common").sourceSets.main
|
||||
source project(":catnip:Forge").sourceSets.main
|
||||
}
|
||||
}
|
||||
|
||||
if (ponderInWorkspace) {
|
||||
ponder {
|
||||
source project(":Ponder:Common").sourceSets.main
|
||||
source project(":Ponder:Forge").sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,6 +105,20 @@ minecraft {
|
|||
create {
|
||||
source sourceSets.main
|
||||
}
|
||||
|
||||
if (catnipInWorkspace) {
|
||||
catnip {
|
||||
source project(":catnip:Common").sourceSets.main
|
||||
source project(":catnip:Forge").sourceSets.main
|
||||
}
|
||||
}
|
||||
|
||||
if (ponderInWorkspace) {
|
||||
ponder {
|
||||
source project(":Ponder:Common").sourceSets.main
|
||||
source project(":Ponder:Forge").sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,11 +132,18 @@ minecraft {
|
|||
source sourceSets.main
|
||||
}
|
||||
|
||||
if (inWorkspace) {
|
||||
if (flywheelInWorkspace) {
|
||||
flywheel {
|
||||
source project(":Flywheel").sourceSets.main
|
||||
}
|
||||
}
|
||||
|
||||
if (ponderInWorkspace) {
|
||||
ponder {
|
||||
source project(":Ponder:Common").sourceSets.main
|
||||
source project(":Ponder:Forge").sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -152,12 +209,28 @@ dependencies {
|
|||
implementation fg.deobf(registrate)
|
||||
shade registrate
|
||||
|
||||
if (inWorkspace) {
|
||||
if (flywheelInWorkspace) {
|
||||
implementation project(':Flywheel')
|
||||
} else {
|
||||
implementation fg.deobf("com.jozufozu.flywheel:Flywheel-Forge:${flywheel_version}")
|
||||
}
|
||||
|
||||
if (catnipInWorkspace) {
|
||||
implementation project(":catnip:Common")
|
||||
implementation project(":catnip:Forge")
|
||||
} else {
|
||||
//todo
|
||||
throw new AssertionError()
|
||||
}
|
||||
|
||||
if (ponderInWorkspace) {
|
||||
implementation project(":Ponder:Common")
|
||||
implementation project(":Ponder:Forge")
|
||||
} else {
|
||||
//todo
|
||||
throw new AssertionError()
|
||||
}
|
||||
|
||||
compileOnly fg.deobf("mezz.jei:jei-${jei_minecraft_version}:${jei_version}:api")
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-${jei_minecraft_version}:${jei_version}")
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import java.util.Map;
|
|||
|
||||
import com.jozufozu.flywheel.core.PartialModel;
|
||||
import com.simibubi.create.content.contraptions.fluids.FluidTransportBehaviour;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.createmod.catnip.utility.lang.Lang;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.DyeColor;
|
||||
|
||||
|
|
|
@ -231,13 +231,13 @@ import com.simibubi.create.foundation.data.SharedProperties;
|
|||
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||
import com.simibubi.create.foundation.item.UncontainableBlockItem;
|
||||
import com.simibubi.create.foundation.utility.ColorHandlers;
|
||||
import com.simibubi.create.foundation.utility.Couple;
|
||||
import com.simibubi.create.foundation.utility.DyeHelper;
|
||||
import com.tterrag.registrate.providers.RegistrateRecipeProvider;
|
||||
import com.tterrag.registrate.providers.loot.RegistrateBlockLootTables;
|
||||
import com.tterrag.registrate.util.DataIngredient;
|
||||
import com.tterrag.registrate.util.entry.BlockEntry;
|
||||
|
||||
import net.createmod.catnip.utility.Couple;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
import net.minecraft.core.Direction.AxisDirection;
|
||||
|
|
|
@ -17,12 +17,12 @@ import com.simibubi.create.content.logistics.trains.entity.CarriageContraptionEn
|
|||
import com.simibubi.create.content.logistics.trains.entity.CarriageContraptionEntityRenderer;
|
||||
import com.simibubi.create.content.logistics.trains.entity.CarriageContraptionInstance;
|
||||
import com.simibubi.create.foundation.data.CreateEntityBuilder;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.tterrag.registrate.util.entry.EntityEntry;
|
||||
import com.tterrag.registrate.util.nullness.NonNullConsumer;
|
||||
import com.tterrag.registrate.util.nullness.NonNullFunction;
|
||||
import com.tterrag.registrate.util.nullness.NonNullSupplier;
|
||||
|
||||
import net.createmod.catnip.utility.lang.Lang;
|
||||
import net.minecraft.client.renderer.entity.EntityRenderer;
|
||||
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
|
|
|
@ -12,8 +12,8 @@ import com.simibubi.create.content.contraptions.particle.ICustomParticleData;
|
|||
import com.simibubi.create.content.contraptions.particle.RotationIndicatorParticleData;
|
||||
import com.simibubi.create.content.curiosities.bell.SoulBaseParticle;
|
||||
import com.simibubi.create.content.curiosities.bell.SoulParticle;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
||||
import net.createmod.catnip.utility.lang.Lang;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.ParticleEngine;
|
||||
import net.minecraft.core.particles.ParticleOptions;
|
||||
|
|
|
@ -25,9 +25,9 @@ import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuild
|
|||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeSerializer;
|
||||
import com.simibubi.create.content.curiosities.toolbox.ToolboxDyeingRecipe;
|
||||
import com.simibubi.create.content.curiosities.tools.SandPaperPolishingRecipe;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.recipe.IRecipeTypeInfo;
|
||||
|
||||
import net.createmod.catnip.utility.lang.Lang;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.Container;
|
||||
|
|
|
@ -9,8 +9,8 @@ import java.util.function.BiFunction;
|
|||
|
||||
import com.simibubi.create.content.logistics.block.chute.ChuteShapes;
|
||||
import com.simibubi.create.content.logistics.trains.track.TrackVoxelShapes;
|
||||
import com.simibubi.create.foundation.utility.VoxelShaper;
|
||||
|
||||
import net.createmod.catnip.utility.VoxelShaper;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
|
|
@ -12,9 +12,9 @@ import com.google.gson.Gson;
|
|||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.simibubi.create.foundation.utility.Couple;
|
||||
import com.simibubi.create.foundation.utility.Pair;
|
||||
|
||||
import net.createmod.catnip.utility.Couple;
|
||||
import net.createmod.catnip.utility.Pair;
|
||||
import net.minecraft.core.Vec3i;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.data.DataProvider;
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package com.simibubi.create;
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
|
||||
import net.createmod.catnip.render.BindableTexture;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
public enum AllSpecialTextures {
|
||||
public enum AllSpecialTextures implements BindableTexture {
|
||||
|
||||
BLANK("blank.png"),
|
||||
CHECKERED("checkerboard.png"),
|
||||
THIN_CHECKERED("thin_checkerboard.png"),
|
||||
CUTOUT_CHECKERED("cutout_checkerboard.png"),
|
||||
|
@ -17,18 +15,14 @@ public enum AllSpecialTextures {
|
|||
;
|
||||
|
||||
public static final String ASSET_PATH = "textures/special/";
|
||||
private ResourceLocation location;
|
||||
private final ResourceLocation location;
|
||||
|
||||
private AllSpecialTextures(String filename) {
|
||||
AllSpecialTextures(String filename) {
|
||||
location = Create.asResource(ASSET_PATH + filename);
|
||||
}
|
||||
|
||||
public void bind() {
|
||||
RenderSystem.setShaderTexture(0, location);
|
||||
}
|
||||
|
||||
public ResourceLocation getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,8 @@ import com.simibubi.create.foundation.block.connected.CTSpriteShifter;
|
|||
import com.simibubi.create.foundation.block.connected.CTType;
|
||||
import com.simibubi.create.foundation.block.render.SpriteShiftEntry;
|
||||
import com.simibubi.create.foundation.block.render.SpriteShifter;
|
||||
import com.simibubi.create.foundation.utility.Couple;
|
||||
|
||||
import net.createmod.catnip.utility.Couple;
|
||||
import net.minecraft.world.item.DyeColor;
|
||||
import net.minecraft.world.level.block.state.properties.WoodType;
|
||||
|
||||
|
|
|
@ -8,12 +8,12 @@ import java.util.Collections;
|
|||
|
||||
import com.simibubi.create.foundation.data.CreateRegistrate;
|
||||
import com.simibubi.create.foundation.data.recipe.Mods;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.tterrag.registrate.builders.BlockBuilder;
|
||||
import com.tterrag.registrate.builders.ItemBuilder;
|
||||
import com.tterrag.registrate.providers.ProviderType;
|
||||
import com.tterrag.registrate.util.nullness.NonNullFunction;
|
||||
|
||||
import net.createmod.catnip.utility.lang.Lang;
|
||||
import net.minecraft.data.tags.TagsProvider.TagAppender;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
|
@ -445,7 +445,7 @@ public class AllTags {
|
|||
strippedWoodCompat(Mods.BOP, "fir", "redwood", "cherry", "mahogany", "jacaranda", "palm", "willow", "dead",
|
||||
"magic", "umbran", "hellbark");
|
||||
strippedWoodCompat(Mods.BSK, "bluebright", "starlit", "frostbright", "lunar", "dusk", "maple", "cherry");
|
||||
|
||||
|
||||
AllItemTags.MODDED_STRIPPED_LOGS.addOptional(Mods.BYG, "stripped_bulbis_stem");
|
||||
AllItemTags.MODDED_STRIPPED_WOOD.addOptional(Mods.BYG, "stripped_bulbis_wood");
|
||||
|
||||
|
|
|
@ -20,17 +20,18 @@ import com.simibubi.create.content.schematics.client.SchematicAndQuillHandler;
|
|||
import com.simibubi.create.content.schematics.client.SchematicHandler;
|
||||
import com.simibubi.create.foundation.ClientResourceReloadListener;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.gui.UIRenderHelper;
|
||||
import com.simibubi.create.foundation.ponder.content.PonderIndex;
|
||||
import com.simibubi.create.foundation.ponder.element.WorldSectionElement;
|
||||
import com.simibubi.create.foundation.ponder.CreatePonderIndex;
|
||||
import com.simibubi.create.foundation.ponder.CreatePonderTag;
|
||||
import com.simibubi.create.foundation.ponder.CreateSharedPonderText;
|
||||
import com.simibubi.create.foundation.ponder.PonderWorldTileFix;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.CreateContexts;
|
||||
import com.simibubi.create.foundation.render.SuperByteBufferCache;
|
||||
import com.simibubi.create.foundation.utility.ModelSwapper;
|
||||
import com.simibubi.create.foundation.utility.ShippedResourcePacks;
|
||||
import com.simibubi.create.foundation.utility.ghost.GhostBlocks;
|
||||
import com.simibubi.create.foundation.utility.outliner.Outliner;
|
||||
|
||||
import net.createmod.ponder.foundation.PonderIndex;
|
||||
import net.createmod.ponder.foundation.PonderWorld;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.GraphicsStatus;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -48,8 +49,7 @@ import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
|||
public class CreateClient {
|
||||
|
||||
public static final SuperByteBufferCache BUFFER_CACHE = new SuperByteBufferCache();
|
||||
public static final Outliner OUTLINER = new Outliner();
|
||||
public static final GhostBlocks GHOST_BLOCKS = new GhostBlocks();
|
||||
//public static final Outliner OUTLINER = new Outliner();
|
||||
public static final ModelSwapper MODEL_SWAPPER = new ModelSwapper();
|
||||
public static final CasingConnectivity CASING_CONNECTIVITY = new CasingConnectivity();
|
||||
|
||||
|
@ -75,6 +75,8 @@ public class CreateClient {
|
|||
|
||||
ZAPPER_RENDER_HANDLER.registerListeners(forgeEventBus);
|
||||
POTATO_CANNON_RENDER_HANDLER.registerListeners(forgeEventBus);
|
||||
|
||||
CreateSharedPonderText.loadClass();
|
||||
}
|
||||
|
||||
public static void clientInit(final FMLClientSetupEvent event) {
|
||||
|
@ -83,7 +85,6 @@ public class CreateClient {
|
|||
BUFFER_CACHE.registerCompartment(CachedBufferer.DIRECTIONAL_PARTIAL);
|
||||
BUFFER_CACHE.registerCompartment(KineticTileEntityRenderer.KINETIC_TILE);
|
||||
BUFFER_CACHE.registerCompartment(SBBContraptionManager.CONTRAPTION, 20);
|
||||
BUFFER_CACHE.registerCompartment(WorldSectionElement.DOC_WORLD_SECTION, 20);
|
||||
|
||||
ShippedResourcePacks.extractFiles("Copper Legacy Pack");
|
||||
|
||||
|
@ -92,12 +93,13 @@ public class CreateClient {
|
|||
AllBlockPartials.init();
|
||||
AllStitchedTextures.init();
|
||||
|
||||
PonderIndex.register();
|
||||
PonderIndex.registerTags();
|
||||
CreatePonderIndex.register();
|
||||
CreatePonderIndex.registerTags();
|
||||
PonderIndex.addIndex(CreatePonderIndex::register);
|
||||
PonderIndex.addIndex(CreatePonderTag::register);
|
||||
PonderWorld.onRestore(PonderWorldTileFix::fixControllerTiles);
|
||||
|
||||
registerOverlays();
|
||||
|
||||
UIRenderHelper.init();
|
||||
}
|
||||
|
||||
private static void registerOverlays() {
|
||||
|
|
|
@ -15,8 +15,8 @@ import org.apache.commons.lang3.tuple.Pair;
|
|||
|
||||
import com.simibubi.create.content.contraptions.fluids.tank.CreativeFluidTankTileEntity;
|
||||
import com.simibubi.create.foundation.tileEntity.IMultiTileContainer;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
|
@ -316,13 +316,13 @@ public class ConnectivityHandler {
|
|||
for (int yOffset = 0; yOffset < height; yOffset++) {
|
||||
for (int xOffset = 0; xOffset < width; xOffset++) {
|
||||
for (int zOffset = 0; zOffset < width; zOffset++) {
|
||||
|
||||
|
||||
BlockPos pos = switch (axis) {
|
||||
case X -> origin.offset(yOffset, xOffset, zOffset);
|
||||
case Y -> origin.offset(xOffset, yOffset, zOffset);
|
||||
case Z -> origin.offset(xOffset, zOffset, yOffset);
|
||||
};
|
||||
|
||||
|
||||
T partAt = partAt(be.getType(), level, pos);
|
||||
if (partAt == null)
|
||||
continue;
|
||||
|
@ -354,19 +354,19 @@ public class ConnectivityHandler {
|
|||
frontier.add(partAt);
|
||||
partAt.preventConnectivityUpdate();
|
||||
}
|
||||
if (cache != null)
|
||||
if (cache != null)
|
||||
cache.put(pos, partAt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (be instanceof IMultiTileContainer.Inventory iinv && iinv.hasInventory())
|
||||
be.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)
|
||||
.invalidate();
|
||||
if (be instanceof IMultiTileContainer.Fluid ifluid && ifluid.hasTank())
|
||||
be.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
|
||||
.invalidate();
|
||||
|
||||
|
||||
if (tryReconnect)
|
||||
formMulti(be.getType(), level, cache == null ? new SearchCache<>() : cache, frontier);
|
||||
}
|
||||
|
|
|
@ -3,8 +3,7 @@ package com.simibubi.create.compat;
|
|||
import java.util.Optional;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
||||
import net.createmod.catnip.utility.lang.Lang;
|
||||
import net.minecraftforge.fml.ModList;
|
||||
|
||||
/**
|
||||
|
|
|
@ -53,7 +53,6 @@ import com.simibubi.create.content.logistics.item.filter.AbstractFilterScreen;
|
|||
import com.simibubi.create.content.logistics.trains.management.schedule.ScheduleScreen;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.config.CRecipes;
|
||||
import com.simibubi.create.foundation.config.ConfigBase.ConfigBool;
|
||||
import com.simibubi.create.foundation.data.recipe.LogStrippingFakeRecipes;
|
||||
import com.simibubi.create.foundation.gui.container.AbstractSimiContainerScreen;
|
||||
import com.simibubi.create.foundation.utility.recipe.IRecipeTypeInfo;
|
||||
|
@ -69,6 +68,7 @@ import mezz.jei.api.registration.IRecipeRegistration;
|
|||
import mezz.jei.api.registration.IRecipeTransferRegistration;
|
||||
import mezz.jei.api.registration.ISubtypeRegistration;
|
||||
import mezz.jei.api.runtime.IIngredientManager;
|
||||
import net.createmod.catnip.config.ConfigBase.ConfigBool;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
|
|
@ -4,9 +4,9 @@ import java.util.function.Supplier;
|
|||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.simibubi.create.foundation.gui.element.GuiGameElement;
|
||||
|
||||
import mezz.jei.api.gui.drawable.IDrawable;
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
public class DoubleItemIcon implements IDrawable {
|
||||
|
|
|
@ -3,10 +3,10 @@ package com.simibubi.create.compat.jei;
|
|||
import java.util.List;
|
||||
|
||||
import com.simibubi.create.content.contraptions.fluids.potion.PotionFluid.BottleType;
|
||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
|
||||
import mezz.jei.api.ingredients.subtypes.IIngredientSubtypeInterpreter;
|
||||
import mezz.jei.api.ingredients.subtypes.UidContext;
|
||||
import net.createmod.catnip.utility.NBTHelper;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.effect.MobEffectInstance;
|
||||
import net.minecraft.world.item.alchemy.Potion;
|
||||
|
|
|
@ -16,19 +16,19 @@ public class ScreenResourceWrapper implements IDrawable {
|
|||
|
||||
@Override
|
||||
public int getWidth() {
|
||||
return resource.width;
|
||||
return resource.getWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHeight() {
|
||||
return resource.height;
|
||||
return resource.getHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(PoseStack matrixStack, int xOffset, int yOffset) {
|
||||
resource.bind();
|
||||
GuiComponent.blit(matrixStack, xOffset, yOffset, 0, resource.startX, resource.startY, resource.width,
|
||||
resource.height, 256, 256);
|
||||
GuiComponent.blit(matrixStack, xOffset, yOffset, 0, resource.getStartX(), resource.getStartY(), resource.getWidth(),
|
||||
resource.getHeight(), 256, 256);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,8 +17,7 @@ import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlo
|
|||
import com.simibubi.create.foundation.fluid.FluidIngredient;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.item.ItemHelper;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.Pair;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import mezz.jei.api.constants.VanillaTypes;
|
||||
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
|
||||
|
@ -26,6 +25,7 @@ import mezz.jei.api.gui.drawable.IDrawable;
|
|||
import mezz.jei.api.gui.ingredient.IRecipeSlotsView;
|
||||
import mezz.jei.api.recipe.IFocusGroup;
|
||||
import mezz.jei.api.recipe.RecipeIngredientRole;
|
||||
import net.createmod.catnip.utility.Pair;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
|
@ -136,7 +136,7 @@ public class BasinCategory extends CreateRecipeCategory<BasinRecipe> {
|
|||
|
||||
AllGuiTextures heatBar = noHeat ? AllGuiTextures.JEI_NO_HEAT_BAR : AllGuiTextures.JEI_HEAT_BAR;
|
||||
heatBar.render(matrixStack, 4, 80);
|
||||
Minecraft.getInstance().font.draw(matrixStack, Lang.translateDirect(requiredHeat.getTranslationKey()), 9,
|
||||
Minecraft.getInstance().font.draw(matrixStack, CreateLang.translateDirect(requiredHeat.getTranslationKey()), 9,
|
||||
86, requiredHeat.getColor());
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import com.simibubi.create.compat.jei.EmptyBackground;
|
|||
import com.simibubi.create.content.contraptions.fluids.potion.PotionFluidHandler;
|
||||
import com.simibubi.create.content.contraptions.processing.ProcessingOutput;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import mezz.jei.api.constants.VanillaTypes;
|
||||
import mezz.jei.api.gui.drawable.IDrawable;
|
||||
|
@ -77,7 +77,7 @@ public abstract class CreateRecipeCategory<T extends Recipe<?>> implements IReci
|
|||
|
||||
@Override
|
||||
public Component getTitle() {
|
||||
return Lang.translateDirect("recipe." + name);
|
||||
return CreateLang.translateDirect("recipe." + name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -125,7 +125,7 @@ public abstract class CreateRecipeCategory<T extends Recipe<?>> implements IReci
|
|||
return (view, tooltip) -> {
|
||||
float chance = output.getChance();
|
||||
if (chance != 1)
|
||||
tooltip.add(1, Lang.translateDirect("recipe.processing.chance", chance < 0.01 ? "<1" : (int) (chance * 100))
|
||||
tooltip.add(1, CreateLang.translateDirect("recipe.processing.chance", chance < 0.01 ? "<1" : (int) (chance * 100))
|
||||
.withStyle(ChatFormatting.GOLD));
|
||||
};
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ public abstract class CreateRecipeCategory<T extends Recipe<?>> implements IReci
|
|||
}
|
||||
|
||||
int amount = mbAmount == -1 ? fluidStack.getAmount() : mbAmount;
|
||||
Component text = new TextComponent(String.valueOf(amount)).append(Lang.translateDirect("generic.unit.millibuckets")).withStyle(ChatFormatting.GOLD);
|
||||
Component text = new TextComponent(String.valueOf(amount)).append(CreateLang.translateDirect("generic.unit.millibuckets")).withStyle(ChatFormatting.GOLD);
|
||||
if (tooltip.isEmpty())
|
||||
tooltip.add(0, text);
|
||||
else {
|
||||
|
@ -183,12 +183,12 @@ public abstract class CreateRecipeCategory<T extends Recipe<?>> implements IReci
|
|||
return new IDrawable() {
|
||||
@Override
|
||||
public int getWidth() {
|
||||
return texture.width;
|
||||
return texture.getWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHeight() {
|
||||
return texture.height;
|
||||
return texture.getHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,12 +13,12 @@ import com.simibubi.create.content.contraptions.components.crusher.AbstractCrush
|
|||
import com.simibubi.create.content.contraptions.processing.ProcessingOutput;
|
||||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipe;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.ponder.ui.LayoutHelper;
|
||||
|
||||
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
|
||||
import mezz.jei.api.gui.ingredient.IRecipeSlotsView;
|
||||
import mezz.jei.api.recipe.IFocusGroup;
|
||||
import mezz.jei.api.recipe.RecipeIngredientRole;
|
||||
import net.createmod.catnip.utility.layout.LayoutHelper;
|
||||
|
||||
@ParametersAreNonnullByDefault
|
||||
public class CrushingCategory extends CreateRecipeCategory<AbstractCrushingRecipe> {
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.simibubi.create.AllBlocks;
|
|||
import com.simibubi.create.compat.jei.category.animations.AnimatedDeployer;
|
||||
import com.simibubi.create.content.contraptions.components.deployer.DeployerApplicationRecipe;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
|
||||
import mezz.jei.api.gui.builder.IRecipeSlotBuilder;
|
||||
|
@ -47,7 +47,7 @@ public class DeployingCategory extends CreateRecipeCategory<DeployerApplicationR
|
|||
.addTooltipCallback(addStochasticTooltip(recipe.getRollableResults().get(0)));
|
||||
|
||||
if (recipe.shouldKeepHeldItem()) {
|
||||
handItemSlot.addTooltipCallback((recipeSlotView, tooltip) -> tooltip.add(1, Lang.translateDirect("recipe.deploying.not_consumed").withStyle(ChatFormatting.GOLD)));
|
||||
handItemSlot.addTooltipCallback((recipeSlotView, tooltip) -> tooltip.add(1, CreateLang.translateDirect("recipe.deploying.not_consumed").withStyle(ChatFormatting.GOLD)));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import com.mojang.blaze3d.vertex.PoseStack;
|
|||
import com.simibubi.create.AllItems;
|
||||
import com.simibubi.create.compat.jei.category.animations.AnimatedKinetics;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.gui.element.GuiGameElement;
|
||||
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.crafting.AbstractCookingRecipe;
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
|
|
|
@ -7,8 +7,8 @@ import com.simibubi.create.AllItems;
|
|||
import com.simibubi.create.compat.jei.category.animations.AnimatedKinetics;
|
||||
import com.simibubi.create.content.contraptions.components.fan.HauntingRecipe;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.gui.element.GuiGameElement;
|
||||
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import com.mojang.blaze3d.vertex.PoseStack;
|
|||
import com.simibubi.create.AllItems;
|
||||
import com.simibubi.create.compat.jei.category.animations.AnimatedKinetics;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.gui.element.GuiGameElement;
|
||||
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.crafting.SmokingRecipe;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
|
|
@ -6,8 +6,8 @@ import com.mojang.blaze3d.vertex.PoseStack;
|
|||
import com.simibubi.create.AllItems;
|
||||
import com.simibubi.create.compat.jei.category.animations.AnimatedKinetics;
|
||||
import com.simibubi.create.content.contraptions.components.fan.SplashingRecipe;
|
||||
import com.simibubi.create.foundation.gui.element.GuiGameElement;
|
||||
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
|
||||
|
|
|
@ -10,14 +10,14 @@ import com.simibubi.create.AllItems;
|
|||
import com.simibubi.create.compat.jei.category.animations.AnimatedKinetics;
|
||||
import com.simibubi.create.content.contraptions.processing.ItemApplicationRecipe;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.gui.element.GuiGameElement;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import mezz.jei.api.constants.VanillaTypes;
|
||||
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
|
||||
import mezz.jei.api.gui.ingredient.IRecipeSlotsView;
|
||||
import mezz.jei.api.recipe.IFocusGroup;
|
||||
import mezz.jei.api.recipe.RecipeIngredientRole;
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.Item;
|
||||
|
@ -47,7 +47,7 @@ public class ItemApplicationCategory extends CreateRecipeCategory<ItemApplicatio
|
|||
.addIngredients(recipe.getRequiredHeldItem())
|
||||
.addTooltipCallback(
|
||||
recipe.shouldKeepHeldItem()
|
||||
? (view, tooltip) -> tooltip.add(1, Lang.translateDirect("recipe.deploying.not_consumed")
|
||||
? (view, tooltip) -> tooltip.add(1, CreateLang.translateDirect("recipe.deploying.not_consumed")
|
||||
.withStyle(ChatFormatting.GOLD))
|
||||
: (view, tooltip) -> {}
|
||||
);
|
||||
|
|
|
@ -7,12 +7,12 @@ import com.simibubi.create.AllItems;
|
|||
import com.simibubi.create.content.contraptions.processing.ProcessingOutput;
|
||||
import com.simibubi.create.content.curiosities.tools.SandPaperPolishingRecipe;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.gui.element.GuiGameElement;
|
||||
|
||||
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
|
||||
import mezz.jei.api.gui.ingredient.IRecipeSlotsView;
|
||||
import mezz.jei.api.recipe.IFocusGroup;
|
||||
import mezz.jei.api.recipe.RecipeIngredientRole;
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.minecraft.core.NonNullList;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
|
|
@ -13,7 +13,7 @@ import com.simibubi.create.compat.jei.category.animations.AnimatedKinetics;
|
|||
import com.simibubi.create.content.contraptions.processing.ProcessingOutput;
|
||||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipe;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
|
||||
import mezz.jei.api.gui.drawable.IDrawable;
|
||||
|
@ -38,7 +38,7 @@ public abstract class ProcessingViaFanCategory<T extends Recipe<?>> extends Crea
|
|||
|
||||
public static Supplier<ItemStack> getFan(String name) {
|
||||
return () -> AllBlocks.ENCASED_FAN.asStack()
|
||||
.setHoverName(Lang.translateDirect("recipe." + name + ".fan").withStyle(style -> style.withItalic(false)));
|
||||
.setHoverName(CreateLang.translateDirect("recipe." + name + ".fan").withStyle(style -> style.withItalic(false)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,7 +17,7 @@ import com.simibubi.create.content.contraptions.itemAssembly.SequencedAssemblyRe
|
|||
import com.simibubi.create.content.contraptions.itemAssembly.SequencedRecipe;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
import com.simibubi.create.foundation.gui.AllIcons;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
|
||||
import mezz.jei.api.gui.ingredient.IRecipeSlotsView;
|
||||
|
@ -63,7 +63,7 @@ public class SequencedAssemblyCategory extends CreateRecipeCategory<SequencedAss
|
|||
return;
|
||||
|
||||
float chance = recipe.getOutputChance();
|
||||
tooltip.add(1, Lang.translateDirect("recipe.processing.chance", chance < 0.01 ? "<1" : (int) (chance * 100))
|
||||
tooltip.add(1, CreateLang.translateDirect("recipe.processing.chance", chance < 0.01 ? "<1" : (int) (chance * 100))
|
||||
.withStyle(ChatFormatting.GOLD));
|
||||
});
|
||||
|
||||
|
@ -151,7 +151,7 @@ public class SequencedAssemblyCategory extends CreateRecipeCategory<SequencedAss
|
|||
public List<Component> getTooltipStrings(SequencedAssemblyRecipe recipe, IRecipeSlotsView iRecipeSlotsView, double mouseX, double mouseY) {
|
||||
List<Component> tooltip = new ArrayList<>();
|
||||
|
||||
TranslatableComponent junk = Lang.translateDirect("recipe.assembly.junk");
|
||||
TranslatableComponent junk = CreateLang.translateDirect("recipe.assembly.junk");
|
||||
|
||||
boolean singleOutput = recipe.getOutputChance() == 1;
|
||||
boolean willRepeat = recipe.getLoops() > 1;
|
||||
|
@ -164,7 +164,7 @@ public class SequencedAssemblyCategory extends CreateRecipeCategory<SequencedAss
|
|||
if (!singleOutput && mouseX >= minX && mouseX < maxX && mouseY >= minY && mouseY < maxY) {
|
||||
float chance = recipe.getOutputChance();
|
||||
tooltip.add(junk);
|
||||
tooltip.add(Lang.translateDirect("recipe.processing.chance", chance < 0.01 ? "<1" : 100 - (int) (chance * 100))
|
||||
tooltip.add(CreateLang.translateDirect("recipe.processing.chance", chance < 0.01 ? "<1" : 100 - (int) (chance * 100))
|
||||
.withStyle(ChatFormatting.GOLD));
|
||||
return tooltip;
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ public class SequencedAssemblyCategory extends CreateRecipeCategory<SequencedAss
|
|||
minY = 92;
|
||||
maxY = minY + 24;
|
||||
if (willRepeat && mouseX >= minX && mouseX < maxX && mouseY >= minY && mouseY < maxY) {
|
||||
tooltip.add(Lang.translateDirect("recipe.assembly.repeat", recipe.getLoops()));
|
||||
tooltip.add(CreateLang.translateDirect("recipe.assembly.repeat", recipe.getLoops()));
|
||||
return tooltip;
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ public class SequencedAssemblyCategory extends CreateRecipeCategory<SequencedAss
|
|||
SequencedRecipe<?> sequencedRecipe = sequence.get(i);
|
||||
SequencedAssemblySubCategory subCategory = getSubCategory(sequencedRecipe);
|
||||
if (relativeX >= 0 && relativeX < subCategory.getWidth()) {
|
||||
tooltip.add(Lang.translateDirect("recipe.assembly.step", i + 1));
|
||||
tooltip.add(CreateLang.translateDirect("recipe.assembly.step", i + 1));
|
||||
tooltip.add(sequencedRecipe.getAsAssemblyRecipe()
|
||||
.getDescriptionForAssembly()
|
||||
.plainCopy()
|
||||
|
|
|
@ -10,8 +10,9 @@ import com.simibubi.create.AllSpriteShifts;
|
|||
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel;
|
||||
import com.simibubi.create.foundation.block.render.SpriteShiftEntry;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.createmod.ponder.utility.WorldTickHolder;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
|
@ -71,7 +72,7 @@ public class AnimatedBlazeBurner extends AnimatedKinetics {
|
|||
- spriteShift.getTarget()
|
||||
.getV0();
|
||||
|
||||
float time = AnimationTickHolder.getRenderTime(Minecraft.getInstance().level);
|
||||
float time = WorldTickHolder.getRenderTime(Minecraft.getInstance().level);
|
||||
float speed = 1 / 32f + 1 / 64f * heatLevel.ordinal();
|
||||
|
||||
double vScroll = speed * time;
|
||||
|
|
|
@ -5,8 +5,8 @@ import com.mojang.math.Vector3f;
|
|||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.content.contraptions.components.deployer.DeployerBlock;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ import com.mojang.blaze3d.vertex.Tesselator;
|
|||
import com.mojang.math.Vector3f;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.foundation.fluid.FluidRenderer;
|
||||
import com.simibubi.create.foundation.gui.UIRenderHelper;
|
||||
|
||||
import net.createmod.catnip.gui.UIRenderHelper;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.MultiBufferSource.BufferSource;
|
||||
|
|
|
@ -4,17 +4,18 @@ import com.jozufozu.flywheel.core.PartialModel;
|
|||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.foundation.gui.CustomLightingSettings;
|
||||
import com.simibubi.create.foundation.gui.ILightingSettings;
|
||||
import com.simibubi.create.foundation.gui.element.GuiGameElement;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.gui.element.PartialModelGuiElement;
|
||||
|
||||
import mezz.jei.api.gui.drawable.IDrawable;
|
||||
import net.createmod.catnip.gui.ILightingSettings;
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
|
||||
public abstract class AnimatedKinetics implements IDrawable {
|
||||
|
||||
|
||||
public int offset = 0;
|
||||
|
||||
public static final ILightingSettings DEFAULT_LIGHTING = CustomLightingSettings.builder()
|
||||
|
@ -36,7 +37,7 @@ public abstract class AnimatedKinetics implements IDrawable {
|
|||
* Use {@link #blockElement(PartialModel)} if calling from inside a subclass.
|
||||
*/
|
||||
public static GuiGameElement.GuiRenderBuilder defaultBlockElement(PartialModel partial) {
|
||||
return GuiGameElement.of(partial)
|
||||
return PartialModelGuiElement.of(partial)
|
||||
.lighting(DEFAULT_LIGHTING);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import com.mojang.blaze3d.vertex.PoseStack;
|
|||
import com.mojang.math.Vector3f;
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
public class AnimatedMixer extends AnimatedKinetics {
|
||||
|
|
|
@ -4,8 +4,8 @@ import com.mojang.blaze3d.vertex.PoseStack;
|
|||
import com.mojang.math.Vector3f;
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
||||
public class AnimatedPress extends AnimatedKinetics {
|
||||
|
|
|
@ -9,9 +9,9 @@ import com.mojang.math.Vector3f;
|
|||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.foundation.fluid.FluidRenderer;
|
||||
import com.simibubi.create.foundation.gui.UIRenderHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.createmod.catnip.gui.UIRenderHelper;
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.MultiBufferSource.BufferSource;
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.simibubi.create.compat.jei.category.animations.AnimatedSpout;
|
|||
import com.simibubi.create.content.contraptions.components.deployer.DeployerApplicationRecipe;
|
||||
import com.simibubi.create.content.contraptions.itemAssembly.SequencedRecipe;
|
||||
import com.simibubi.create.foundation.fluid.FluidIngredient;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import mezz.jei.api.constants.VanillaTypes;
|
||||
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
|
||||
|
@ -111,7 +111,7 @@ public abstract class SequencedAssemblySubCategory {
|
|||
|
||||
if (recipe.getAsAssemblyRecipe() instanceof DeployerApplicationRecipe deployerRecipe && deployerRecipe.shouldKeepHeldItem()) {
|
||||
slot.addTooltipCallback(
|
||||
(recipeSlotView, tooltip) -> tooltip.add(1, Lang.translateDirect("recipe.deploying.not_consumed").withStyle(ChatFormatting.GOLD))
|
||||
(recipeSlotView, tooltip) -> tooltip.add(1, CreateLang.translateDirect("recipe.deploying.not_consumed").withStyle(ChatFormatting.GOLD))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,9 +5,10 @@ import com.simibubi.create.content.contraptions.base.IRotate;
|
|||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.utility.Color;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.CatnipClient;
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.createmod.catnip.utility.theme.Color;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -44,7 +45,7 @@ public class KineticDebugger {
|
|||
.getBlockSupportShape(world, toOutline);
|
||||
|
||||
if (te.getTheoreticalSpeed() != 0 && !shape.isEmpty())
|
||||
CreateClient.OUTLINER.chaseAABB("kineticSource", shape.bounds()
|
||||
CatnipClient.OUTLINER.chaseAABB("kineticSource", shape.bounds()
|
||||
.move(toOutline))
|
||||
.lineWidth(1 / 16f)
|
||||
.colored(te.hasSource() ? Color.generateFromLong(te.network).getRGB() : 0xffcc00);
|
||||
|
@ -54,7 +55,7 @@ public class KineticDebugger {
|
|||
Vec3 vec = Vec3.atLowerCornerOf(Direction.get(AxisDirection.POSITIVE, axis)
|
||||
.getNormal());
|
||||
Vec3 center = VecHelper.getCenterOf(te.getBlockPos());
|
||||
CreateClient.OUTLINER.showLine("rotationAxis", center.add(vec), center.subtract(vec))
|
||||
CatnipClient.OUTLINER.showLine("rotationAxis", center.add(vec), center.subtract(vec))
|
||||
.lineWidth(1 / 16f);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ import com.simibubi.create.content.contraptions.relays.encased.EncasedBeltBlock;
|
|||
import com.simibubi.create.content.contraptions.relays.encased.SplitShaftTileEntity;
|
||||
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxTileEntity;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
@ -36,7 +36,7 @@ public class RotationPropagator {
|
|||
* Determines the change in rotation between two attached kinetic entities. For
|
||||
* instance, an axis connection returns 1 while a 1-to-1 gear connection
|
||||
* reverses the rotation and therefore returns -1.
|
||||
*
|
||||
*
|
||||
* @param from
|
||||
* @param to
|
||||
* @return
|
||||
|
@ -201,7 +201,7 @@ public class RotationPropagator {
|
|||
|
||||
/**
|
||||
* Insert the added position to the kinetic network.
|
||||
*
|
||||
*
|
||||
* @param worldIn
|
||||
* @param pos
|
||||
*/
|
||||
|
@ -215,7 +215,7 @@ public class RotationPropagator {
|
|||
|
||||
/**
|
||||
* Search for sourceless networks attached to the given entity and update them.
|
||||
*
|
||||
*
|
||||
* @param currentTE
|
||||
*/
|
||||
private static void propagateNewSource(KineticTileEntity currentTE) {
|
||||
|
@ -230,7 +230,7 @@ public class RotationPropagator {
|
|||
|
||||
if (newSpeed == 0 && oppositeSpeed == 0)
|
||||
continue;
|
||||
|
||||
|
||||
boolean incompatible =
|
||||
Math.signum(newSpeed) != Math.signum(speedOfNeighbour) && (newSpeed != 0 && speedOfNeighbour != 0);
|
||||
|
||||
|
@ -300,7 +300,7 @@ public class RotationPropagator {
|
|||
|
||||
/**
|
||||
* Remove the given entity from the network.
|
||||
*
|
||||
*
|
||||
* @param worldIn
|
||||
* @param pos
|
||||
* @param removedTE
|
||||
|
@ -333,7 +333,7 @@ public class RotationPropagator {
|
|||
/**
|
||||
* Clear the entire subnetwork depending on the given entity and find a new
|
||||
* source
|
||||
*
|
||||
*
|
||||
* @param updateTE
|
||||
*/
|
||||
private static void propagateMissingSource(KineticTileEntity updateTE) {
|
||||
|
|
|
@ -5,8 +5,8 @@ import java.util.Map;
|
|||
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.foundation.utility.WorldHelper;
|
||||
|
||||
import net.createmod.catnip.utility.WorldHelper;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
|
||||
public class TorquePropagator {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package com.simibubi.create.content.contraptions.base;
|
||||
|
||||
import com.simibubi.create.foundation.utility.DirectionHelper;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
||||
import net.createmod.catnip.utility.DirectionHelper;
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.simibubi.create.content.contraptions.base;
|
||||
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
|||
import com.simibubi.create.content.contraptions.KineticNetwork;
|
||||
import com.simibubi.create.content.contraptions.base.IRotate.SpeedLevel;
|
||||
import com.simibubi.create.content.contraptions.base.IRotate.StressImpact;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -64,9 +64,9 @@ public abstract class GeneratingKineticTileEntity extends KineticTileEntity {
|
|||
if (Mth.equal(stressBase, 0))
|
||||
return added;
|
||||
|
||||
Lang.translate("gui.goggles.generator_stats")
|
||||
CreateLang.translate("gui.goggles.generator_stats")
|
||||
.forGoggles(tooltip);
|
||||
Lang.translate("tooltip.capacityProvided")
|
||||
CreateLang.translate("tooltip.capacityProvided")
|
||||
.style(ChatFormatting.GRAY)
|
||||
.forGoggles(tooltip);
|
||||
|
||||
|
@ -77,11 +77,11 @@ public abstract class GeneratingKineticTileEntity extends KineticTileEntity {
|
|||
|
||||
float stressTotal = stressBase * speed;
|
||||
|
||||
Lang.number(stressTotal)
|
||||
CreateLang.number(stressTotal)
|
||||
.translate("generic.unit.stress")
|
||||
.style(ChatFormatting.AQUA)
|
||||
.space()
|
||||
.add(Lang.translate("gui.goggles.at_current_speed")
|
||||
.add(CreateLang.translate("gui.goggles.at_current_speed")
|
||||
.style(ChatFormatting.DARK_GRAY))
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.simibubi.create.content.contraptions.base;
|
||||
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.simibubi.create.content.contraptions.base;
|
||||
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
|
|
@ -3,9 +3,10 @@ package com.simibubi.create.content.contraptions.base;
|
|||
import com.simibubi.create.content.contraptions.wrench.IWrenchable;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.item.ItemDescription;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.LangBuilder;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import net.createmod.catnip.utility.lang.Lang;
|
||||
import net.createmod.catnip.utility.lang.LangBuilder;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -73,12 +74,12 @@ public interface IRotate extends IWrenchable {
|
|||
|
||||
public static LangBuilder getFormattedSpeedText(float speed, boolean overstressed) {
|
||||
SpeedLevel speedLevel = of(speed);
|
||||
LangBuilder builder = Lang.text(ItemDescription.makeProgressBar(3, speedLevel.ordinal()));
|
||||
LangBuilder builder = CreateLang.text(ItemDescription.makeProgressBar(3, speedLevel.ordinal()));
|
||||
|
||||
builder.translate("tooltip.speedRequirement." + Lang.asId(speedLevel.name()))
|
||||
.space()
|
||||
.text("(")
|
||||
.add(Lang.number(Math.abs(speed)))
|
||||
.add(CreateLang.number(Math.abs(speed)))
|
||||
.space()
|
||||
.translate("generic.unit.rpm")
|
||||
.text(")")
|
||||
|
@ -133,7 +134,7 @@ public interface IRotate extends IWrenchable {
|
|||
|
||||
public static LangBuilder getFormattedStressText(double stressPercent) {
|
||||
StressImpact stressLevel = of(stressPercent);
|
||||
return Lang.text(ItemDescription.makeProgressBar(3, Math.min(stressLevel.ordinal() + 1, 3)))
|
||||
return CreateLang.text(ItemDescription.makeProgressBar(3, Math.min(stressLevel.ordinal() + 1, 3)))
|
||||
.translate("tooltip.stressImpact." + Lang.asId(stressLevel.name()))
|
||||
.text(String.format(" (%s%%) ", (int) (stressPercent * 100)))
|
||||
.style(stressLevel.getRelativeColor());
|
||||
|
|
|
@ -4,8 +4,8 @@ import java.util.Random;
|
|||
|
||||
import com.simibubi.create.content.contraptions.base.IRotate.SpeedLevel;
|
||||
import com.simibubi.create.content.contraptions.particle.RotationIndicatorParticleData;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
import net.minecraft.core.particles.ParticleOptions;
|
||||
|
|
|
@ -19,13 +19,13 @@ import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
|
|||
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxBlock;
|
||||
import com.simibubi.create.foundation.block.BlockStressValues;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||
import com.simibubi.create.foundation.sound.SoundScapes;
|
||||
import com.simibubi.create.foundation.sound.SoundScapes.AmbienceGroup;
|
||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import net.createmod.catnip.utility.FontHelper;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.resources.language.I18n;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -397,10 +397,10 @@ public class KineticTileEntity extends SmartTileEntity implements IHaveGoggleInf
|
|||
|
||||
if (overStressed && AllConfigs.CLIENT.enableOverstressedTooltip.get()) {
|
||||
tooltip.add(componentSpacing.plainCopy()
|
||||
.append(Lang.translateDirect("gui.stressometer.overstressed")
|
||||
.append(CreateLang.translateDirect("gui.stressometer.overstressed")
|
||||
.withStyle(GOLD)));
|
||||
Component hint = Lang.translateDirect("gui.contraptions.network_overstressed");
|
||||
List<Component> cutString = TooltipHelper.cutTextComponent(hint, GRAY, ChatFormatting.WHITE);
|
||||
Component hint = CreateLang.translateDirect("gui.contraptions.network_overstressed");
|
||||
List<Component> cutString = FontHelper.cutTextComponent(hint, GRAY, ChatFormatting.WHITE);
|
||||
for (int i = 0; i < cutString.size(); i++)
|
||||
tooltip.add(componentSpacing.plainCopy()
|
||||
.append(cutString.get(i)));
|
||||
|
@ -409,12 +409,12 @@ public class KineticTileEntity extends SmartTileEntity implements IHaveGoggleInf
|
|||
|
||||
if (notFastEnough) {
|
||||
tooltip.add(componentSpacing.plainCopy()
|
||||
.append(Lang.translateDirect("tooltip.speedRequirement")
|
||||
.append(CreateLang.translateDirect("tooltip.speedRequirement")
|
||||
.withStyle(GOLD)));
|
||||
Component hint =
|
||||
Lang.translateDirect("gui.contraptions.not_fast_enough", I18n.get(getBlockState().getBlock()
|
||||
CreateLang.translateDirect("gui.contraptions.not_fast_enough", I18n.get(getBlockState().getBlock()
|
||||
.getDescriptionId()));
|
||||
List<Component> cutString = TooltipHelper.cutTextComponent(hint, GRAY, ChatFormatting.WHITE);
|
||||
List<Component> cutString = FontHelper.cutTextComponent(hint, GRAY, ChatFormatting.WHITE);
|
||||
for (int i = 0; i < cutString.size(); i++)
|
||||
tooltip.add(componentSpacing.plainCopy()
|
||||
.append(cutString.get(i)));
|
||||
|
@ -434,19 +434,19 @@ public class KineticTileEntity extends SmartTileEntity implements IHaveGoggleInf
|
|||
if (Mth.equal(stressAtBase, 0))
|
||||
return added;
|
||||
|
||||
Lang.translate("gui.goggles.kinetic_stats")
|
||||
CreateLang.translate("gui.goggles.kinetic_stats")
|
||||
.forGoggles(tooltip);
|
||||
Lang.translate("tooltip.stressImpact")
|
||||
CreateLang.translate("tooltip.stressImpact")
|
||||
.style(GRAY)
|
||||
.forGoggles(tooltip);
|
||||
|
||||
float stressTotal = stressAtBase * Math.abs(getTheoreticalSpeed());
|
||||
|
||||
Lang.number(stressTotal)
|
||||
CreateLang.number(stressTotal)
|
||||
.translate("generic.unit.stress")
|
||||
.style(ChatFormatting.AQUA)
|
||||
.space()
|
||||
.add(Lang.translate("gui.goggles.at_current_speed")
|
||||
.add(CreateLang.translate("gui.goggles.at_current_speed")
|
||||
.style(ChatFormatting.DARK_GRAY))
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ import com.simibubi.create.foundation.render.CachedBufferer;
|
|||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBufferCache;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.Color;
|
||||
|
||||
import net.createmod.catnip.utility.theme.Color;
|
||||
import net.createmod.ponder.utility.WorldTickHolder;
|
||||
import net.minecraft.client.renderer.ItemBlockRenderTypes;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
|
@ -77,7 +77,7 @@ public class KineticTileEntityRenderer extends SafeTileEntityRenderer<KineticTil
|
|||
}
|
||||
|
||||
public static float getAngleForTe(KineticTileEntity te, final BlockPos pos, Axis axis) {
|
||||
float time = AnimationTickHolder.getRenderTime(te.getLevel());
|
||||
float time = WorldTickHolder.getRenderTime(te.getLevel());
|
||||
float offset = getRotationOffsetForPosition(te, pos, axis);
|
||||
float angle = ((time * te.getSpeed() * 3f / 10 + offset) % 360) / 180 * (float) Math.PI;
|
||||
return angle;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.simibubi.create.content.contraptions.base;
|
||||
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
|
|
|
@ -11,8 +11,8 @@ import com.mojang.math.Quaternion;
|
|||
import com.simibubi.create.content.contraptions.KineticDebugger;
|
||||
import com.simibubi.create.foundation.render.AllInstanceFormats;
|
||||
import com.simibubi.create.foundation.render.AllProgramSpecs;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
public class BeltType implements Instanced<BeltData>, Batched<BeltData> {
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.simibubi.create.content.contraptions.base.flwdata;
|
|||
import com.jozufozu.flywheel.core.materials.BasicData;
|
||||
import com.mojang.math.Vector3f;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.foundation.utility.Color;
|
||||
|
||||
import net.createmod.catnip.utility.theme.Color;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
public class KineticData extends BasicData {
|
||||
|
|
|
@ -11,8 +11,8 @@ import com.mojang.math.Vector3f;
|
|||
import com.simibubi.create.content.contraptions.KineticDebugger;
|
||||
import com.simibubi.create.foundation.render.AllInstanceFormats;
|
||||
import com.simibubi.create.foundation.render.AllProgramSpecs;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
public class RotatingType implements Instanced<RotatingData>, Batched<RotatingData> {
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.simibubi.create.content.contraptions.components.actors;
|
|||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.NbtUtils;
|
||||
|
@ -40,7 +40,7 @@ public abstract class BlockBreakingKineticTileEntity extends KineticTileEntity {
|
|||
if (destroyProgress == -1)
|
||||
destroyNextTick();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void lazyTick() {
|
||||
super.lazyTick();
|
||||
|
@ -93,9 +93,9 @@ public abstract class BlockBreakingKineticTileEntity extends KineticTileEntity {
|
|||
return;
|
||||
if (getSpeed() == 0)
|
||||
return;
|
||||
|
||||
|
||||
breakingPos = getBreakingPos();
|
||||
|
||||
|
||||
if (ticksUntilNextProgress < 0)
|
||||
return;
|
||||
if (ticksUntilNextProgress-- > 0)
|
||||
|
|
|
@ -9,9 +9,9 @@ import com.simibubi.create.content.contraptions.components.actors.flwdata.ActorD
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance;
|
||||
import com.simibubi.create.foundation.render.AllMaterialSpecs;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.createmod.catnip.utility.math.AngleHelper;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ import com.simibubi.create.content.contraptions.components.structureMovement.Mov
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
|
|
|
@ -9,10 +9,10 @@ import com.simibubi.create.content.contraptions.components.structureMovement.ren
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.createmod.catnip.utility.math.AngleHelper;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
|
|
|
@ -8,10 +8,10 @@ import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
|
|||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.createmod.catnip.utility.math.AngleHelper;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
|
@ -61,6 +61,8 @@ public class HarvesterActorInstance extends ActorInstance {
|
|||
|
||||
double radians = arcLength * oneOverRadius;
|
||||
|
||||
|
||||
|
||||
float deg = AngleHelper.deg(radians);
|
||||
|
||||
deg = (float) (((int) (deg * 3000)) / 3000);
|
||||
|
|
|
@ -13,8 +13,8 @@ import com.simibubi.create.content.contraptions.components.structureMovement.ren
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.utility.BlockHelper;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
|
|
|
@ -11,10 +11,10 @@ import com.simibubi.create.content.contraptions.components.structureMovement.ren
|
|||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.createmod.catnip.utility.math.AngleHelper;
|
||||
import net.createmod.ponder.utility.WorldTickHolder;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
|
@ -63,7 +63,7 @@ public class HarvesterRenderer extends SafeTileEntityRenderer<HarvesterTileEntit
|
|||
public static void transform(Level world, Direction facing, SuperByteBuffer superBuffer, float speed) {
|
||||
float originOffset = 1 / 16f;
|
||||
Vec3 rotOffset = new Vec3(0, -2 * originOffset, originOffset).add(VecHelper.getCenterOf(BlockPos.ZERO));
|
||||
float time = AnimationTickHolder.getRenderTime(world) / 20;
|
||||
float time = WorldTickHolder.getRenderTime(world) / 20;
|
||||
float angle = (time * speed) % 360;
|
||||
|
||||
superBuffer.rotateCentered(Direction.UP, AngleHelper.rad(AngleHelper.horizontalAngle(facing)))
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.simibubi.create.content.contraptions.components.actors;
|
|||
import com.jozufozu.flywheel.api.MaterialManager;
|
||||
import com.jozufozu.flywheel.core.Materials;
|
||||
import com.jozufozu.flywheel.core.materials.model.ModelData;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
|
||||
import net.createmod.catnip.utility.math.AngleHelper;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
|
|
@ -4,8 +4,9 @@ import com.jozufozu.flywheel.api.MaterialManager;
|
|||
import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.createmod.catnip.utility.animation.LerpedFloat;
|
||||
|
||||
public class PSIActorInstance extends ActorInstance {
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@ import com.jozufozu.flywheel.api.MaterialManager;
|
|||
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
||||
import com.jozufozu.flywheel.api.instance.TickableInstance;
|
||||
import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
|
||||
public class PSIInstance extends BlockEntityInstance<PortableStorageInterfaceTileEntity> implements DynamicInstance, TickableInstance {
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import com.simibubi.create.content.contraptions.components.actors.PloughBlock.Pl
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||
import com.simibubi.create.content.logistics.trains.track.FakeTrackBlock;
|
||||
import com.simibubi.create.foundation.advancement.AllAdvancements;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
|
|
|
@ -12,10 +12,10 @@ import com.simibubi.create.content.contraptions.components.structureMovement.ren
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
|
||||
import com.simibubi.create.content.logistics.trains.entity.CarriageContraption;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser;
|
||||
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.createmod.catnip.utility.animation.LerpedFloat;
|
||||
import net.createmod.catnip.utility.animation.LerpedFloat.Chaser;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
|
|
@ -15,10 +15,10 @@ import com.simibubi.create.content.contraptions.components.structureMovement.ren
|
|||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.createmod.catnip.utility.animation.LerpedFloat;
|
||||
import net.createmod.catnip.utility.math.AngleHelper;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
|
|
|
@ -8,8 +8,8 @@ import com.simibubi.create.foundation.advancement.AllAdvancements;
|
|||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
|
||||
import net.createmod.catnip.utility.animation.LerpedFloat;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.util.Mth;
|
||||
|
|
|
@ -10,8 +10,8 @@ import com.simibubi.create.content.contraptions.components.structureMovement.Mov
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionMatrices;
|
||||
import com.simibubi.create.foundation.utility.AbstractBlockBreakQueue;
|
||||
import com.simibubi.create.foundation.utility.TreeCutter;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
|
|
@ -6,8 +6,8 @@ import java.util.UUID;
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.block.SlabBlock;
|
||||
|
@ -28,7 +28,7 @@ public class SeatMovementBehaviour implements MovementBehaviour {
|
|||
@Override
|
||||
public void visitNewPosition(MovementContext context, BlockPos pos) {
|
||||
MovementBehaviour.super.visitNewPosition(context, pos);
|
||||
|
||||
|
||||
AbstractContraptionEntity contraptionEntity = context.contraption.entity;
|
||||
if (contraptionEntity == null)
|
||||
return;
|
||||
|
|
|
@ -9,8 +9,8 @@ import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
|||
import com.simibubi.create.content.contraptions.components.clock.CuckooClockTileEntity.Animation;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
|
||||
import net.createmod.catnip.utility.math.AngleHelper;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
|
|
|
@ -5,12 +5,12 @@ import java.util.List;
|
|||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.foundation.advancement.AllAdvancements;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.createmod.catnip.utility.NBTHelper;
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.createmod.catnip.utility.animation.LerpedFloat;
|
||||
import net.createmod.catnip.utility.animation.LerpedFloat.Chaser;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
@ -42,7 +42,7 @@ public class CuckooClockTileEntity extends KineticTileEntity {
|
|||
super(type, pos, state);
|
||||
animationType = Animation.NONE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
|
||||
super.addBehaviours(behaviours);
|
||||
|
|
|
@ -15,8 +15,8 @@ import java.util.function.Consumer;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
|
|
@ -11,11 +11,11 @@ import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
|
|||
import com.simibubi.create.foundation.block.ITE;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.inventory.InvManipulationBehaviour;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
import com.simibubi.create.foundation.utility.Pointing;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.createmod.catnip.utility.Pointing;
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.createmod.catnip.utility.math.AngleHelper;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
|
|
@ -16,10 +16,10 @@ import com.simibubi.create.content.contraptions.components.crafter.RecipeGridHan
|
|||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.Pointing;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.createmod.catnip.utility.Pointing;
|
||||
import net.createmod.catnip.utility.math.AngleHelper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
|
|
|
@ -21,10 +21,10 @@ import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
|||
import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.edgeInteraction.EdgeInteractionBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.inventory.InvManipulationBehaviour;
|
||||
import com.simibubi.create.foundation.utility.BlockFace;
|
||||
import com.simibubi.create.foundation.utility.Pointing;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.BlockFace;
|
||||
import net.createmod.catnip.utility.Pointing;
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.particles.ItemParticleOption;
|
||||
|
|
|
@ -17,9 +17,9 @@ import com.google.common.base.Predicates;
|
|||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.AllRecipeTypes;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
import com.simibubi.create.foundation.utility.Pointing;
|
||||
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.createmod.catnip.utility.Pointing;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
|
|
@ -8,8 +8,8 @@ import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
|
|||
import com.simibubi.create.foundation.advancement.AllAdvancements;
|
||||
import com.simibubi.create.foundation.block.ITE;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.utility.Couple;
|
||||
|
||||
import net.createmod.catnip.utility.Couple;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
@ -61,11 +61,11 @@ public class HandCrankBlock extends DirectionalKineticBlock implements ITE<HandC
|
|||
BlockHitResult hit) {
|
||||
withTileEntityDo(worldIn, pos, te -> te.turn(player.isShiftKeyDown()));
|
||||
player.causeFoodExhaustion(getRotationSpeed() * AllConfigs.SERVER.kinetics.crankHungerMultiplier.getF());
|
||||
|
||||
|
||||
if (player.getFoodData()
|
||||
.getFoodLevel() == 0)
|
||||
AllAdvancements.HAND_CRANK.awardTo(player);
|
||||
|
||||
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ public class HandCrankBlock extends DirectionalKineticBlock implements ITE<HandC
|
|||
public boolean isPathfindable(BlockState state, BlockGetter reader, BlockPos pos, PathComputationType type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static Couple<Integer> getSpeedRange() {
|
||||
return Couple.create(32, 32);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
|||
import com.jozufozu.flywheel.core.PartialModel;
|
||||
import com.jozufozu.flywheel.core.materials.model.ModelData;
|
||||
import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.simibubi.create.content.contraptions.components.crank;
|
|||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.AllSoundEvents;
|
||||
import com.simibubi.create.content.contraptions.base.GeneratingKineticTileEntity;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
|
|
@ -5,8 +5,8 @@ import javax.annotation.ParametersAreNonnullByDefault;
|
|||
import com.jozufozu.flywheel.core.PartialModel;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.foundation.utility.BlockHelper;
|
||||
import com.simibubi.create.foundation.utility.Couple;
|
||||
|
||||
import net.createmod.catnip.utility.Couple;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.NonNullList;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
|
@ -74,7 +74,7 @@ public class ValveHandleBlock extends HandCrankBlock {
|
|||
public int getRotationSpeed() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
|
||||
public static Couple<Integer> getSpeedRange() {
|
||||
return Couple.create(16, 16);
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@ import com.simibubi.create.AllShapes;
|
|||
import com.simibubi.create.AllTileEntities;
|
||||
import com.simibubi.create.content.contraptions.base.RotatedPillarKineticBlock;
|
||||
import com.simibubi.create.foundation.block.ITE;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
@ -189,7 +189,7 @@ public class CrushingWheelBlock extends RotatedPillarKineticBlock implements ITE
|
|||
public Class<CrushingWheelTileEntity> getTileEntityClass() {
|
||||
return CrushingWheelTileEntity.class;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockEntityType<? extends CrushingWheelTileEntity> getTileEntityType() {
|
||||
return AllTileEntities.CRUSHING_WHEEL.get();
|
||||
|
|
|
@ -8,8 +8,8 @@ import com.simibubi.create.AllTileEntities;
|
|||
import com.simibubi.create.foundation.advancement.AllAdvancements;
|
||||
import com.simibubi.create.foundation.block.ITE;
|
||||
import com.simibubi.create.foundation.item.ItemHelper;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
@ -150,11 +150,11 @@ public class CrushingWheelControllerBlock extends DirectionalBlock implements IT
|
|||
continue;
|
||||
te.crushingspeed = Math.abs(cwte.getSpeed() / 50f);
|
||||
te.sendData();
|
||||
|
||||
|
||||
cwte.award(AllAdvancements.CRUSHING_WHEEL);
|
||||
if (cwte.getSpeed() > 255)
|
||||
if (cwte.getSpeed() > 255)
|
||||
cwte.award(AllAdvancements.CRUSHER_MAXED);
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -16,9 +16,9 @@ import com.simibubi.create.foundation.sound.SoundScapes.AmbienceGroup;
|
|||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour;
|
||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.NBTHelper;
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
|
|
@ -5,8 +5,8 @@ import java.util.List;
|
|||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.foundation.advancement.AllAdvancements;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
|
@ -36,7 +36,7 @@ public class CrushingWheelTileEntity extends KineticTileEntity {
|
|||
super.addBehaviours(behaviours);
|
||||
registerAwardables(behaviours, AllAdvancements.CRUSHING_WHEEL, AllAdvancements.CRUSHER_MAXED);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onSpeedChanged(float prevSpeed) {
|
||||
super.onSpeedChanged(prevSpeed);
|
||||
|
|
|
@ -18,11 +18,11 @@ import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance;
|
||||
import com.simibubi.create.foundation.render.AllMaterialSpecs;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.createmod.catnip.utility.NBTHelper;
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.createmod.catnip.utility.math.AngleHelper;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.Mth;
|
||||
|
|
|
@ -12,7 +12,7 @@ import com.simibubi.create.content.contraptions.itemAssembly.IAssemblyRecipe;
|
|||
import com.simibubi.create.content.contraptions.processing.ItemApplicationRecipe;
|
||||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder;
|
||||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeParams;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
|
@ -60,7 +60,7 @@ public class DeployerApplicationRecipe extends ItemApplicationRecipe implements
|
|||
.getItems();
|
||||
if (matchingStacks.length == 0)
|
||||
return new TextComponent("Invalid");
|
||||
return Lang.translateDirect("recipe.assembly.deploying_item",
|
||||
return CreateLang.translateDirect("recipe.assembly.deploying_item",
|
||||
new TranslatableComponent(matchingStacks[0].getDescriptionId()).getString());
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import org.apache.commons.lang3.tuple.Pair;
|
|||
import com.mojang.authlib.GameProfile;
|
||||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.config.CKinetics;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import io.netty.util.concurrent.Future;
|
||||
import io.netty.util.concurrent.GenericFutureListener;
|
||||
|
@ -64,7 +64,7 @@ public class DeployerFakePlayer extends FakePlayer {
|
|||
|
||||
@Override
|
||||
public Component getDisplayName() {
|
||||
return Lang.translateDirect("block.deployer.damage_source_name");
|
||||
return CreateLang.translateDirect("block.deployer.damage_source_name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,9 +3,9 @@ package com.simibubi.create.content.contraptions.components.deployer;
|
|||
import com.jozufozu.flywheel.util.transform.TransformStack;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.createmod.catnip.utility.math.AngleHelper;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
|
|
@ -21,8 +21,8 @@ import com.simibubi.create.content.logistics.trains.ITrackBlock;
|
|||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour;
|
||||
import com.simibubi.create.foundation.utility.BlockHelper;
|
||||
import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld;
|
||||
|
||||
import net.createmod.catnip.utility.worldWrappers.WrappedWorld;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
|
|
@ -12,9 +12,9 @@ import com.mojang.math.Quaternion;
|
|||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.createmod.catnip.utility.math.AngleHelper;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Vec3i;
|
||||
|
|
|
@ -25,16 +25,16 @@ import com.simibubi.create.content.logistics.item.filter.FilterItem;
|
|||
import com.simibubi.create.content.logistics.trains.entity.CarriageContraption;
|
||||
import com.simibubi.create.content.logistics.trains.entity.CarriageContraptionEntity;
|
||||
import com.simibubi.create.content.schematics.ItemRequirement;
|
||||
import com.simibubi.create.content.schematics.SchematicWorld;
|
||||
import com.simibubi.create.content.schematics.filtering.SchematicInstances;
|
||||
import com.simibubi.create.foundation.advancement.AllAdvancements;
|
||||
import com.simibubi.create.foundation.item.ItemHelper;
|
||||
import com.simibubi.create.foundation.item.ItemHelper.ExtractionCountMode;
|
||||
import com.simibubi.create.foundation.utility.BlockHelper;
|
||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
import com.simibubi.create.foundation.utility.NBTProcessors;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.NBTHelper;
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.createmod.catnip.utility.worldWrappers.SchematicWorld;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
|
|
@ -6,8 +6,8 @@ import com.simibubi.create.AllItems;
|
|||
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovingInteractionBehaviour;
|
||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
|
||||
import net.createmod.catnip.utility.NBTHelper;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.Tag;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
|
|
|
@ -23,11 +23,12 @@ import com.simibubi.create.foundation.render.CachedBufferer;
|
|||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer;
|
||||
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.createmod.catnip.utility.NBTHelper;
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.createmod.catnip.utility.math.AngleHelper;
|
||||
import net.createmod.ponder.utility.WorldTickHolder;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
|
@ -98,7 +99,7 @@ public class DeployerRenderer extends SafeTileEntityRenderer<DeployerTileEntity>
|
|||
ms.translate(0, isBlockItem ? 9 / 16f : 11 / 16f, 0);
|
||||
ms.scale(scale, scale, scale);
|
||||
transform = TransformType.GROUND;
|
||||
ms.mulPose(Vector3f.YP.rotationDegrees(AnimationTickHolder.getRenderTime(te.getLevel())));
|
||||
ms.mulPose(Vector3f.YP.rotationDegrees(WorldTickHolder.getRenderTime(te.getLevel())));
|
||||
|
||||
} else {
|
||||
float scale = punching ? .75f : isBlockItem ? .75f - 1 / 64f : .5f;
|
||||
|
@ -194,7 +195,7 @@ public class DeployerRenderer extends SafeTileEntityRenderer<DeployerTileEntity>
|
|||
axis = def.getRotationAxis(context.state);
|
||||
}
|
||||
|
||||
float time = AnimationTickHolder.getRenderTime(context.world) / 20;
|
||||
float time = WorldTickHolder.getRenderTime(context.world) / 20;
|
||||
float angle = (time * speed) % 360;
|
||||
|
||||
TransformStack.cast(m)
|
||||
|
|
|
@ -22,10 +22,10 @@ import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
|||
import com.simibubi.create.foundation.tileEntity.behaviour.belt.BeltProcessingBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
|
||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
|
||||
import net.createmod.catnip.utility.NBTHelper;
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.createmod.catnip.utility.animation.LerpedFloat;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
|
|
@ -15,9 +15,9 @@ import com.simibubi.create.foundation.config.AllConfigs;
|
|||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour;
|
||||
import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour.TransportedResult;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
|
||||
import net.createmod.catnip.utility.Iterate;
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
|
|
@ -4,8 +4,8 @@ import com.simibubi.create.AllTileEntities;
|
|||
import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
|
||||
import com.simibubi.create.content.logistics.block.chute.AbstractChuteBlock;
|
||||
import com.simibubi.create.foundation.block.ITE;
|
||||
import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld;
|
||||
|
||||
import net.createmod.catnip.utility.worldWrappers.WrappedWorld;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
|
@ -102,7 +102,7 @@ public class EncasedFanBlock extends DirectionalKineticBlock implements ITE<Enca
|
|||
public Class<EncasedFanTileEntity> getTileEntityClass() {
|
||||
return EncasedFanTileEntity.class;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockEntityType<? extends EncasedFanTileEntity> getTileEntityType() {
|
||||
return AllTileEntities.ENCASED_FAN.get();
|
||||
|
|
|
@ -10,8 +10,8 @@ import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
|||
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.createmod.ponder.utility.WorldTickHolder;
|
||||
import net.minecraft.client.renderer.LevelRenderer;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
|
@ -42,7 +42,7 @@ public class EncasedFanRenderer extends KineticTileEntityRenderer {
|
|||
SuperByteBuffer fanInner =
|
||||
CachedBufferer.partialFacing(AllBlockPartials.ENCASED_FAN_INNER, te.getBlockState(), direction.getOpposite());
|
||||
|
||||
float time = AnimationTickHolder.getRenderTime(te.getLevel());
|
||||
float time = WorldTickHolder.getRenderTime(te.getLevel());
|
||||
float speed = te.getSpeed() * 5;
|
||||
if (speed > 0)
|
||||
speed = Mth.clamp(speed, 80, 64 * 20);
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.List;
|
|||
import com.simibubi.create.foundation.config.AllConfigs;
|
||||
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.utility.VecHelper;
|
||||
import net.createmod.catnip.utility.VecHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
|
|
|
@ -7,9 +7,9 @@ import com.jozufozu.flywheel.util.transform.TransformStack;
|
|||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileInstance;
|
||||
import com.simibubi.create.content.contraptions.base.flwdata.RotatingData;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.createmod.catnip.utility.AnimationTickHolder;
|
||||
import net.createmod.catnip.utility.math.AngleHelper;
|
||||
import net.minecraft.core.Direction;
|
||||
|
||||
public class FlyWheelInstance extends KineticTileInstance<FlywheelTileEntity> implements DynamicInstance {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue