Merge remote-tracking branch 'origin/mc1.16/dev' into mc1.16/chromatic-projector
This commit is contained in:
commit
15f4cd305e
37 changed files with 7795 additions and 2608 deletions
|
@ -413,12 +413,13 @@ b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
|||
62fcca040385405c7655ea6e4b524b2a5e652e4c assets/create/lang/unfinished/es_mx.json
|
||||
0f527cc6472caec6ec090985c5000e6f7f93208f assets/create/lang/unfinished/fr_fr.json
|
||||
812f7e66a1d5a06a7b81a41216ee2151e678db69 assets/create/lang/unfinished/it_it.json
|
||||
d5275e066511ce8e99db0d5504ed24e38d98a45f assets/create/lang/unfinished/ja_jp.json
|
||||
8122ad97eac98b1f549a08e623066be1ffd3a29e assets/create/lang/unfinished/ja_jp.json
|
||||
2c3a1bd28a6a08bec850cc36735204c59045b188 assets/create/lang/unfinished/ko_kr.json
|
||||
27559156601b57cc2e9fae07a92c7f79a7f4e473 assets/create/lang/unfinished/nl_nl.json
|
||||
f401f044ec0785b9399d29d2a82f0f998a2a4db7 assets/create/lang/unfinished/pl_pl.json
|
||||
fa22d8055979012a45a6648009ef0094be4560d8 assets/create/lang/unfinished/pt_br.json
|
||||
c3f6825459aa7153a6f65fe23d32c91290ff14f3 assets/create/lang/unfinished/ru_ru.json
|
||||
2bd50e62c0ed45c7fc109cf7e229207e324912d8 assets/create/lang/unfinished/zh_cn.json
|
||||
d1b6b069a4547c107c58af4f8837f3cc843e1613 assets/create/lang/unfinished/ru_ru.json
|
||||
b1650c7805cfe03c6b3b9d43f96964b695f55415 assets/create/lang/unfinished/zh_cn.json
|
||||
8052350b58969035d456f882fa5624ee16a0024c assets/create/lang/unfinished/zh_tw.json
|
||||
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
|
||||
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
|
||||
|
@ -1647,7 +1648,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear
|
|||
a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json
|
||||
b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json
|
||||
7b73f40a65af0c2288c886928c609ec783c0fc40 assets/create/sounds.json
|
||||
5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json
|
||||
0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json
|
||||
187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json
|
||||
0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json
|
||||
83c046bd200623933545c9e4326f782fb02c87fa data/create/advancements/arm_blaze_burner.json
|
||||
|
|
File diff suppressed because it is too large
Load diff
2103
src/generated/resources/assets/create/lang/unfinished/pl_pl.json
Normal file
2103
src/generated/resources/assets/create/lang/unfinished/pl_pl.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -506,7 +506,7 @@
|
|||
"advancement.create.shifting_gears": "Механизм переключения",
|
||||
"advancement.create.shifting_gears.desc": "Подсоедините большую шестерню к шестерне, что позволит изменить скорость вращения.",
|
||||
"advancement.create.overstressed": "Перегрузка",
|
||||
"advancement.create.overstressed.desc": "Испытайте предельную перегрузку из первых рук.",
|
||||
"advancement.create.overstressed.desc": "Столкнитесь с предельной перегрузкой лицом к лицу.",
|
||||
"advancement.create.belt": "Передайте за проезд!",
|
||||
"advancement.create.belt.desc": "Соедините два вала с помощью механического ремня.",
|
||||
"advancement.create.tunnel": "В укрытие!",
|
||||
|
@ -648,7 +648,7 @@
|
|||
"advancement.create.extendo_grip": "Кипение!",
|
||||
"advancement.create.extendo_grip.desc": "Возьмите в руки удлинённую руку",
|
||||
"advancement.create.dual_extendo_grip": "Окончательное выкипание",
|
||||
"advancement.create.dual_extendo_grip.desc": "Две удлинённой руки для сверхчеловеческого охвата.",
|
||||
"advancement.create.dual_extendo_grip.desc": "Две удлинённых руки для сверхчеловеческого охвата.",
|
||||
"advancement.create.eob": "Конец бета-версии",
|
||||
"advancement.create.eob.desc": "Ожидайте больше контента здесь в будущем. <3",
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,31 +3,19 @@ package com.simibubi.create.content.contraptions.fluids.recipe;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.resources.ReloadListener;
|
||||
import com.simibubi.create.foundation.utility.ISimpleReloadListener;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.profiler.IProfiler;
|
||||
import net.minecraft.resources.IResourceManager;
|
||||
|
||||
public class FluidTransferRecipes {
|
||||
|
||||
public static List<ItemStack> POTION_ITEMS = new ArrayList<>();
|
||||
public static List<Item> FILLED_BUCKETS = new ArrayList<>();
|
||||
|
||||
|
||||
|
||||
public static final ReloadListener<Object> LISTENER = new ReloadListener<Object>() {
|
||||
|
||||
@Override
|
||||
protected Object prepare(IResourceManager p_212854_1_, IProfiler p_212854_2_) {
|
||||
return new Object();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void apply(Object p_212853_1_, IResourceManager p_212853_2_, IProfiler p_212853_3_) {
|
||||
POTION_ITEMS.clear();
|
||||
FILLED_BUCKETS.clear();
|
||||
}
|
||||
|
||||
public static final ISimpleReloadListener LISTENER = (resourceManager, profiler) -> {
|
||||
POTION_ITEMS.clear();
|
||||
FILLED_BUCKETS.clear();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ import com.simibubi.create.content.contraptions.fluids.potion.PotionFluidHandler
|
|||
import com.simibubi.create.content.contraptions.processing.HeatCondition;
|
||||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder;
|
||||
import com.simibubi.create.foundation.fluid.FluidIngredient;
|
||||
import com.simibubi.create.foundation.utility.ISimpleReloadListener;
|
||||
|
||||
import net.minecraft.client.resources.ReloadListener;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
|
@ -24,8 +24,6 @@ import net.minecraft.potion.Potion;
|
|||
import net.minecraft.potion.PotionBrewing;
|
||||
import net.minecraft.potion.PotionUtils;
|
||||
import net.minecraft.potion.Potions;
|
||||
import net.minecraft.profiler.IProfiler;
|
||||
import net.minecraft.resources.IResourceManager;
|
||||
import net.minecraftforge.common.brewing.BrewingRecipeRegistry;
|
||||
import net.minecraftforge.common.brewing.IBrewingRecipe;
|
||||
import net.minecraftforge.common.brewing.VanillaBrewingRecipe;
|
||||
|
@ -133,27 +131,17 @@ public class PotionMixingRecipeManager {
|
|||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static final ReloadListener<Object> LISTENER = new ReloadListener<Object>() {
|
||||
|
||||
@Override
|
||||
protected Object prepare(IResourceManager p_212854_1_, IProfiler p_212854_2_) {
|
||||
return new Object();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void apply(Object p_212853_1_, IResourceManager p_212853_2_, IProfiler p_212853_3_) {
|
||||
ALL.clear();
|
||||
getAllBrewingRecipes().forEach(recipe -> {
|
||||
for (Ingredient ingredient : recipe.getIngredients()) {
|
||||
for (ItemStack itemStack : ingredient.getMatchingStacks()) {
|
||||
ALL.computeIfAbsent(itemStack.getItem(), t -> new ArrayList<>())
|
||||
.add(recipe);
|
||||
return;
|
||||
}
|
||||
public static final ISimpleReloadListener LISTENER = (resourceManager, profiler) -> {
|
||||
ALL.clear();
|
||||
getAllBrewingRecipes().forEach(recipe -> {
|
||||
for (Ingredient ingredient : recipe.getIngredients()) {
|
||||
for (ItemStack itemStack : ingredient.getMatchingStacks()) {
|
||||
ALL.computeIfAbsent(itemStack.getItem(), t -> new ArrayList<>())
|
||||
.add(recipe);
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -2,12 +2,12 @@ package com.simibubi.create.content.contraptions.goggles;
|
|||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.foundation.block.render.WrappedBakedModel;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
|
||||
import net.minecraftforge.client.model.BakedModelWrapper;
|
||||
|
||||
public class GogglesModel extends WrappedBakedModel {
|
||||
public class GogglesModel extends BakedModelWrapper<IBakedModel> {
|
||||
|
||||
public GogglesModel(IBakedModel template) {
|
||||
super(template);
|
||||
|
|
|
@ -3,12 +3,12 @@ package com.simibubi.create.content.contraptions.relays.belt;
|
|||
import static com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity.CASING_PROPERTY;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.simibubi.create.AllSpriteShifts;
|
||||
import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity.CasingType;
|
||||
import com.simibubi.create.foundation.block.render.QuadHelper;
|
||||
import com.simibubi.create.foundation.block.render.SpriteShiftEntry;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
|
||||
|
@ -30,14 +30,16 @@ public class BeltModel extends BakedModelWrapper<IBakedModel> {
|
|||
|
||||
@Override
|
||||
public List<BakedQuad> getQuads(BlockState state, Direction side, Random rand, IModelData extraData) {
|
||||
List<BakedQuad> quads = new ArrayList<>(super.getQuads(state, side, rand, extraData));
|
||||
List<BakedQuad> quads = super.getQuads(state, side, rand, extraData);
|
||||
if (!extraData.hasProperty(CASING_PROPERTY))
|
||||
return quads;
|
||||
CasingType type = extraData.getData(CASING_PROPERTY);
|
||||
if (type == CasingType.NONE || type == CasingType.BRASS)
|
||||
return quads;
|
||||
quads = new ArrayList<>(quads);
|
||||
|
||||
SpriteShiftEntry spriteShift = AllSpriteShifts.ANDESIDE_BELT_CASING;
|
||||
VertexFormat format = DefaultVertexFormats.BLOCK;
|
||||
|
||||
for (int i = 0; i < quads.size(); i++) {
|
||||
BakedQuad quad = quads.get(i);
|
||||
|
@ -48,10 +50,7 @@ public class BeltModel extends BakedModelWrapper<IBakedModel> {
|
|||
|
||||
TextureAtlasSprite original = quad.getSprite();
|
||||
TextureAtlasSprite target = spriteShift.getTarget();
|
||||
BakedQuad newQuad = new BakedQuad(Arrays.copyOf(quad.getVertexData(), quad.getVertexData().length),
|
||||
quad.getTintIndex(), quad.getFace(), target, quad.hasShade());
|
||||
|
||||
VertexFormat format = DefaultVertexFormats.BLOCK;
|
||||
BakedQuad newQuad = QuadHelper.clone(quad);
|
||||
int[] vertexData = newQuad.getVertexData();
|
||||
|
||||
for (int vertex = 0; vertex < vertexData.length; vertex += format.getIntegerSize()) {
|
||||
|
@ -61,9 +60,9 @@ public class BeltModel extends BakedModelWrapper<IBakedModel> {
|
|||
float u = Float.intBitsToFloat(vertexData[uIndex]);
|
||||
float v = Float.intBitsToFloat(vertexData[vIndex]);
|
||||
vertexData[uIndex] =
|
||||
Float.floatToRawIntBits(target.getInterpolatedU((SuperByteBuffer.getUnInterpolatedU(original, u))));
|
||||
Float.floatToRawIntBits(target.getInterpolatedU(SuperByteBuffer.getUnInterpolatedU(original, u)));
|
||||
vertexData[vIndex] =
|
||||
Float.floatToRawIntBits(target.getInterpolatedV((SuperByteBuffer.getUnInterpolatedV(original, v))));
|
||||
Float.floatToRawIntBits(target.getInterpolatedV(SuperByteBuffer.getUnInterpolatedV(original, v)));
|
||||
}
|
||||
|
||||
quads.set(i, newQuad);
|
||||
|
|
|
@ -495,7 +495,7 @@ public class BeltTileEntity extends KineticTileEntity implements LightUpdateList
|
|||
return empty;
|
||||
}
|
||||
|
||||
public static ModelProperty<CasingType> CASING_PROPERTY = new ModelProperty<>();
|
||||
public static final ModelProperty<CasingType> CASING_PROPERTY = new ModelProperty<>();
|
||||
|
||||
@Override
|
||||
public IModelData getModelData() {
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.simibubi.create.foundation.block.render.WrappedBakedModel;
|
||||
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
|
||||
import com.simibubi.create.foundation.utility.VirtualEmptyModelData;
|
||||
|
||||
|
@ -15,11 +14,12 @@ import net.minecraft.client.renderer.model.IBakedModel;
|
|||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockDisplayReader;
|
||||
import net.minecraftforge.client.model.BakedModelWrapper;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
import net.minecraftforge.client.model.data.ModelDataMap;
|
||||
import net.minecraftforge.client.model.data.ModelProperty;
|
||||
|
||||
public class BracketedKineticBlockModel extends WrappedBakedModel {
|
||||
public class BracketedKineticBlockModel extends BakedModelWrapper<IBakedModel> {
|
||||
|
||||
private static ModelProperty<BracketedModelData> BRACKET_PROPERTY = new ModelProperty<>();
|
||||
|
||||
|
|
|
@ -7,22 +7,23 @@ import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollVal
|
|||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.vector.Vector3f;
|
||||
|
||||
public class WrenchItemRenderer extends CustomRenderedItemModelRenderer<WrenchModel> {
|
||||
|
||||
@Override
|
||||
protected void render(ItemStack stack, WrenchModel model, PartialItemModelRenderer renderer, MatrixStack ms,
|
||||
IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
renderer.render(model.getBakedModel(), light);
|
||||
protected void render(ItemStack stack, WrenchModel model, PartialItemModelRenderer renderer, ItemCameraTransforms.TransformType transformType,
|
||||
MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
renderer.render(model.getOriginalModel(), light);
|
||||
|
||||
float xOffset = -1/16f;
|
||||
ms.translate(-xOffset, 0, 0);
|
||||
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(ScrollValueHandler.getScroll(AnimationTickHolder.getPartialTicks())));
|
||||
ms.translate(xOffset, 0, 0);
|
||||
|
||||
|
||||
renderer.render(model.getPartial("gear"), light);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.simibubi.create.foundation.item.PartialItemModelRenderer;
|
|||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.vector.Vector3f;
|
||||
|
@ -13,21 +14,21 @@ import net.minecraft.util.math.vector.Vector3f;
|
|||
public class SymmetryWandItemRenderer extends CustomRenderedItemModelRenderer<SymmetryWandModel> {
|
||||
|
||||
@Override
|
||||
protected void render(ItemStack stack, SymmetryWandModel model, PartialItemModelRenderer renderer, MatrixStack ms,
|
||||
IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
protected void render(ItemStack stack, SymmetryWandModel model, PartialItemModelRenderer renderer, ItemCameraTransforms.TransformType transformType,
|
||||
MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
float worldTime = AnimationTickHolder.getRenderTime() / 20;
|
||||
int maxLight = 0xF000F0;
|
||||
|
||||
renderer.render(model.getBakedModel(), light);
|
||||
renderer.render(model.getOriginalModel(), light);
|
||||
renderer.renderSolidGlowing(model.getPartial("core"), maxLight);
|
||||
renderer.renderGlowing(model.getPartial("core_glow"), maxLight);
|
||||
|
||||
float floating = MathHelper.sin(worldTime) * .05f;
|
||||
float angle = worldTime * -10 % 360;
|
||||
|
||||
|
||||
ms.translate(0, floating, 0);
|
||||
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(angle));
|
||||
|
||||
|
||||
renderer.renderGlowing(model.getPartial("bits"), maxLight);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,13 +19,12 @@ public class ExtendoGripItemRenderer extends CustomRenderedItemModelRenderer<Ext
|
|||
private static final Vector3d cogRotationOffset = new Vector3d(0, 1 / 16f, 0);
|
||||
|
||||
@Override
|
||||
protected void render(ItemStack stack, ExtendoGripModel model, PartialItemModelRenderer renderer, MatrixStack ms,
|
||||
IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
protected void render(ItemStack stack, ExtendoGripModel model, PartialItemModelRenderer renderer, TransformType transformType,
|
||||
MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
MatrixStacker stacker = MatrixStacker.of(ms);
|
||||
float animation = 0.25f;
|
||||
TransformType perspective = model.getCurrentPerspective();
|
||||
boolean leftHand = perspective == TransformType.FIRST_PERSON_LEFT_HAND;
|
||||
boolean rightHand = perspective == TransformType.FIRST_PERSON_RIGHT_HAND;
|
||||
boolean leftHand = transformType == TransformType.FIRST_PERSON_LEFT_HAND;
|
||||
boolean rightHand = transformType == TransformType.FIRST_PERSON_RIGHT_HAND;
|
||||
if (leftHand || rightHand)
|
||||
animation = MathHelper.lerp(AnimationTickHolder.getPartialTicks(),
|
||||
ExtendoGripRenderHandler.lastMainHandAnimation,
|
||||
|
@ -37,7 +36,7 @@ public class ExtendoGripItemRenderer extends CustomRenderedItemModelRenderer<Ext
|
|||
float oppositeAngle = 180 - extensionAngle;
|
||||
|
||||
// grip
|
||||
renderer.renderSolid(model.getBakedModel(), light);
|
||||
renderer.renderSolid(model.getOriginalModel(), light);
|
||||
|
||||
// bits
|
||||
ms.push();
|
||||
|
|
|
@ -35,12 +35,10 @@ public class ExtendoGripRenderHandler {
|
|||
lastMainHandAnimation = mainHandAnimation;
|
||||
mainHandAnimation *= MathHelper.clamp(mainHandAnimation, 0.8f, 0.99f);
|
||||
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
ClientPlayerEntity player = mc.player;
|
||||
pose = AllBlockPartials.DEPLOYER_HAND_PUNCHING;
|
||||
if (!AllItems.EXTENDO_GRIP.isIn(player.getHeldItemOffhand()))
|
||||
if (!AllItems.EXTENDO_GRIP.isIn(getRenderedOffHandStack()))
|
||||
return;
|
||||
ItemStack main = player.getHeldItemMainhand();
|
||||
ItemStack main = getRenderedMainHandStack();
|
||||
if (main.isEmpty())
|
||||
return;
|
||||
if (!(main.getItem() instanceof BlockItem))
|
||||
|
@ -60,7 +58,7 @@ public class ExtendoGripRenderHandler {
|
|||
ClientPlayerEntity player = mc.player;
|
||||
boolean rightHand = event.getHand() == Hand.MAIN_HAND ^ player.getPrimaryHand() == HandSide.LEFT;
|
||||
|
||||
ItemStack offhandItem = player.getHeldItemOffhand();
|
||||
ItemStack offhandItem = getRenderedOffHandStack();
|
||||
boolean notInOffhand = !AllItems.EXTENDO_GRIP.isIn(offhandItem);
|
||||
if (notInOffhand && !AllItems.EXTENDO_GRIP.isIn(heldItem))
|
||||
return;
|
||||
|
@ -138,4 +136,12 @@ public class ExtendoGripRenderHandler {
|
|||
event.setCanceled(true);
|
||||
}
|
||||
|
||||
private static ItemStack getRenderedMainHandStack() {
|
||||
return Minecraft.getInstance().getFirstPersonRenderer().itemStackMainHand;
|
||||
}
|
||||
|
||||
private static ItemStack getRenderedOffHandStack() {
|
||||
return Minecraft.getInstance().getFirstPersonRenderer().itemStackOffHand;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraft.client.entity.player.ClientPlayerEntity;
|
|||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
|
||||
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -20,15 +19,14 @@ import net.minecraft.util.math.vector.Vector3f;
|
|||
public class SandPaperItemRenderer extends ItemStackTileEntityRenderer {
|
||||
|
||||
@Override
|
||||
public void render(ItemStack stack, ItemCameraTransforms.TransformType p_239207_2_, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
public void render(ItemStack stack, TransformType transformType, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer();
|
||||
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||
SandPaperModel mainModel = (SandPaperModel) itemRenderer.getItemModelWithOverrides(stack, Minecraft.getInstance().world, null);
|
||||
TransformType perspective = mainModel.getCurrentPerspective();
|
||||
float partialTicks = AnimationTickHolder.getPartialTicks();
|
||||
|
||||
boolean leftHand = perspective == TransformType.FIRST_PERSON_LEFT_HAND;
|
||||
boolean firstPerson = leftHand || perspective == TransformType.FIRST_PERSON_RIGHT_HAND;
|
||||
boolean leftHand = transformType == TransformType.FIRST_PERSON_LEFT_HAND;
|
||||
boolean firstPerson = leftHand || transformType == TransformType.FIRST_PERSON_RIGHT_HAND;
|
||||
|
||||
ms.push();
|
||||
ms.translate(.5f, .5f, .5f);
|
||||
|
@ -39,7 +37,7 @@ public class SandPaperItemRenderer extends ItemStackTileEntityRenderer {
|
|||
if (tag.contains("Polishing")) {
|
||||
ms.push();
|
||||
|
||||
if (perspective == TransformType.GUI) {
|
||||
if (transformType == TransformType.GUI) {
|
||||
ms.translate(0.0F, .2f, 1.0F);
|
||||
ms.scale(.75f, .75f, .75f);
|
||||
} else {
|
||||
|
@ -53,7 +51,7 @@ public class SandPaperItemRenderer extends ItemStackTileEntityRenderer {
|
|||
if (time / (float) stack.getUseDuration() < 0.8F) {
|
||||
float bobbing = -MathHelper.abs(MathHelper.cos(time / 4.0F * (float) Math.PI) * 0.1F);
|
||||
|
||||
if (perspective == TransformType.GUI)
|
||||
if (transformType == TransformType.GUI)
|
||||
ms.translate(bobbing, bobbing, 0.0F);
|
||||
else
|
||||
ms.translate(0.0f, bobbing, 0.0F);
|
||||
|
@ -76,7 +74,7 @@ public class SandPaperItemRenderer extends ItemStackTileEntityRenderer {
|
|||
}
|
||||
}
|
||||
|
||||
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, light, overlay, mainModel.getBakedModel());
|
||||
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, light, overlay, mainModel.getOriginalModel());
|
||||
|
||||
ms.pop();
|
||||
}
|
||||
|
|
|
@ -18,10 +18,10 @@ import net.minecraft.util.math.MathHelper;
|
|||
public abstract class ZapperItemRenderer<M extends CustomRenderedItemModel> extends CustomRenderedItemModelRenderer<M> {
|
||||
|
||||
@Override
|
||||
protected void render(ItemStack stack, M model, PartialItemModelRenderer renderer, MatrixStack ms,
|
||||
IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
protected void render(ItemStack stack, M model, PartialItemModelRenderer renderer, TransformType transformType,
|
||||
MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
// Block indicator
|
||||
if (model.getCurrentPerspective() == TransformType.GUI && stack.hasTag() && stack.getTag()
|
||||
if (transformType == TransformType.GUI && stack.hasTag() && stack.getTag()
|
||||
.contains("BlockUsed"))
|
||||
renderBlockUsed(stack, ms, buffer, light, overlay);
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.entity.player.ClientPlayerEntity;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.HandSide;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
@ -20,14 +21,14 @@ import net.minecraft.util.math.vector.Vector3f;
|
|||
public class WorldshaperItemRenderer extends ZapperItemRenderer<WorldshaperModel> {
|
||||
|
||||
@Override
|
||||
protected void render(ItemStack stack, WorldshaperModel model, PartialItemModelRenderer renderer, MatrixStack ms,
|
||||
IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
super.render(stack, model, renderer, ms, buffer, light, overlay);
|
||||
protected void render(ItemStack stack, WorldshaperModel model, PartialItemModelRenderer renderer, ItemCameraTransforms.TransformType transformType,
|
||||
MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
super.render(stack, model, renderer, transformType, ms, buffer, light, overlay);
|
||||
|
||||
float pt = AnimationTickHolder.getPartialTicks();
|
||||
float worldTime = AnimationTickHolder.getRenderTime() / 20;
|
||||
|
||||
renderer.renderSolid(model.getBakedModel(), light);
|
||||
renderer.renderSolid(model.getOriginalModel(), light);
|
||||
|
||||
ClientPlayerEntity player = Minecraft.getInstance().player;
|
||||
boolean leftHanded = player.getPrimaryHand() == HandSide.LEFT;
|
||||
|
|
|
@ -3,20 +3,15 @@ package com.simibubi.create.foundation;
|
|||
import com.simibubi.create.CreateClient;
|
||||
import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation;
|
||||
import com.simibubi.create.foundation.block.render.SpriteShifter;
|
||||
import com.simibubi.create.foundation.utility.ISimpleReloadListener;
|
||||
|
||||
import net.minecraft.client.resources.ReloadListener;
|
||||
import net.minecraft.profiler.IProfiler;
|
||||
import net.minecraft.resources.IResourceManager;
|
||||
|
||||
public class ResourceReloadHandler extends ReloadListener<Object> {
|
||||
public class ResourceReloadHandler implements ISimpleReloadListener {
|
||||
|
||||
@Override
|
||||
protected Object prepare(IResourceManager resourceManagerIn, IProfiler profilerIn) {
|
||||
return new Object();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void apply(Object $, IResourceManager resourceManagerIn, IProfiler profilerIn) {
|
||||
public void onReload(IResourceManager resourceManagerIn, IProfiler profilerIn) {
|
||||
SpriteShifter.reloadUVs();
|
||||
CreateClient.invalidateRenderers();
|
||||
IHaveGoggleInformation.numberFormat.update();
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||
import java.util.Random;
|
||||
|
||||
import com.simibubi.create.foundation.block.connected.ConnectedTextureBehaviour.CTContext;
|
||||
import com.simibubi.create.foundation.block.render.QuadHelper;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -23,7 +24,7 @@ import net.minecraftforge.client.model.data.ModelProperty;
|
|||
|
||||
public class CTModel extends BakedModelWrapperWithData {
|
||||
|
||||
protected static ModelProperty<CTData> CT_PROPERTY = new ModelProperty<>();
|
||||
protected static final ModelProperty<CTData> CT_PROPERTY = new ModelProperty<>();
|
||||
private ConnectedTextureBehaviour behaviour;
|
||||
|
||||
private class CTData {
|
||||
|
@ -42,7 +43,7 @@ public class CTModel extends BakedModelWrapperWithData {
|
|||
return indices[face.getIndex()];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public CTModel(IBakedModel originalModel, ConnectedTextureBehaviour behaviour) {
|
||||
super(originalModel);
|
||||
this.behaviour = behaviour;
|
||||
|
@ -69,10 +70,13 @@ public class CTModel extends BakedModelWrapperWithData {
|
|||
|
||||
@Override
|
||||
public List<BakedQuad> getQuads(BlockState state, Direction side, Random rand, IModelData extraData) {
|
||||
List<BakedQuad> quads = new ArrayList<>(super.getQuads(state, side, rand, extraData));
|
||||
List<BakedQuad> quads = super.getQuads(state, side, rand, extraData);
|
||||
if (!extraData.hasProperty(CT_PROPERTY))
|
||||
return quads;
|
||||
CTData data = extraData.getData(CT_PROPERTY);
|
||||
quads = new ArrayList<>(quads);
|
||||
|
||||
VertexFormat format = DefaultVertexFormats.BLOCK;
|
||||
|
||||
for (int i = 0; i < quads.size(); i++) {
|
||||
BakedQuad quad = quads.get(i);
|
||||
|
@ -86,9 +90,7 @@ public class CTModel extends BakedModelWrapperWithData {
|
|||
if (index == -1)
|
||||
continue;
|
||||
|
||||
BakedQuad newQuad = new BakedQuad(Arrays.copyOf(quad.getVertexData(), quad.getVertexData().length),
|
||||
quad.getTintIndex(), quad.getFace(), quad.getSprite(), quad.hasShade());
|
||||
VertexFormat format = DefaultVertexFormats.BLOCK;
|
||||
BakedQuad newQuad = QuadHelper.clone(quad);
|
||||
int[] vertexData = newQuad.getVertexData();
|
||||
|
||||
for (int vertex = 0; vertex < vertexData.length; vertex += format.getIntegerSize()) {
|
||||
|
@ -100,6 +102,7 @@ public class CTModel extends BakedModelWrapperWithData {
|
|||
vertexData[uIndex] = Float.floatToRawIntBits(spriteShift.getTargetU(u, index));
|
||||
vertexData[vIndex] = Float.floatToRawIntBits(spriteShift.getTargetV(v, index));
|
||||
}
|
||||
|
||||
quads.set(i, newQuad);
|
||||
}
|
||||
return quads;
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
package com.simibubi.create.foundation.block.render;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
|
||||
public class BakedModelBuiltInRenderer extends WrappedBakedModel {
|
||||
|
||||
public BakedModelBuiltInRenderer(IBakedModel template) {
|
||||
super(template);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
package com.simibubi.create.foundation.block.render;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
|
@ -23,8 +22,8 @@ import net.minecraftforge.client.model.data.ModelProperty;
|
|||
|
||||
public class ColoredVertexModel extends BakedModelWrapper<IBakedModel> {
|
||||
|
||||
private static final ModelProperty<BlockPos> POSITION_PROPERTY = new ModelProperty<>();
|
||||
private IBlockVertexColor color;
|
||||
private static ModelProperty<BlockPos> POSITION_PROPERTY = new ModelProperty<>();
|
||||
|
||||
public ColoredVertexModel(IBakedModel originalModel, IBlockVertexColor color) {
|
||||
super(originalModel);
|
||||
|
@ -38,27 +37,28 @@ public class ColoredVertexModel extends BakedModelWrapper<IBakedModel> {
|
|||
|
||||
@Override
|
||||
public List<BakedQuad> getQuads(BlockState state, Direction side, Random rand, IModelData extraData) {
|
||||
List<BakedQuad> quads = new ArrayList<>(super.getQuads(state, side, rand, extraData));
|
||||
if (!extraData.hasProperty(POSITION_PROPERTY))
|
||||
return quads;
|
||||
List<BakedQuad> quads = super.getQuads(state, side, rand, extraData);
|
||||
if (quads.isEmpty())
|
||||
return quads;
|
||||
|
||||
if (!extraData.hasProperty(POSITION_PROPERTY))
|
||||
return quads;
|
||||
BlockPos data = extraData.getData(POSITION_PROPERTY);
|
||||
quads = new ArrayList<>(quads);
|
||||
|
||||
// Optifine might've rejigged vertex data
|
||||
VertexFormat format = DefaultVertexFormats.BLOCK;
|
||||
int colorIndex = 0;
|
||||
for (int j = 0; j < format.getElements().size(); j++) {
|
||||
VertexFormatElement e = format.getElements().get(j);
|
||||
if (e.getUsage() == VertexFormatElement.Usage.COLOR)
|
||||
colorIndex = j;
|
||||
for (int elementId = 0; elementId < format.getElements().size(); elementId++) {
|
||||
VertexFormatElement element = format.getElements().get(elementId);
|
||||
if (element.getUsage() == VertexFormatElement.Usage.COLOR)
|
||||
colorIndex = elementId;
|
||||
}
|
||||
int colorOffset = format.getOffset(colorIndex) / 4;
|
||||
BlockPos data = extraData.getData(POSITION_PROPERTY);
|
||||
|
||||
int colorOffset = format.getOffset(colorIndex) / 4;
|
||||
|
||||
for (int i = 0; i < quads.size(); i++) {
|
||||
BakedQuad quad = quads.get(i);
|
||||
BakedQuad newQuad = new BakedQuad(Arrays.copyOf(quad.getVertexData(), quad.getVertexData().length),
|
||||
quad.getTintIndex(), quad.getFace(), quad.getSprite(), quad.hasShade());
|
||||
|
||||
BakedQuad newQuad = QuadHelper.clone(quad);
|
||||
int[] vertexData = newQuad.getVertexData();
|
||||
|
||||
for (int vertex = 0; vertex < vertexData.length; vertex += format.getIntegerSize()) {
|
||||
|
|
|
@ -9,18 +9,18 @@ import com.mojang.blaze3d.matrix.MatrixStack;
|
|||
import com.simibubi.create.Create;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.model.ModelRotation;
|
||||
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.model.BakedModelWrapper;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public abstract class CustomRenderedItemModel extends WrappedBakedModel {
|
||||
public abstract class CustomRenderedItemModel extends BakedModelWrapper<IBakedModel> {
|
||||
|
||||
protected String basePath;
|
||||
protected Map<String, IBakedModel> partials = new HashMap<>();
|
||||
protected TransformType currentPerspective;
|
||||
protected ItemStackTileEntityRenderer renderer;
|
||||
|
||||
public CustomRenderedItemModel(IBakedModel template, String basePath) {
|
||||
|
@ -29,25 +29,30 @@ public abstract class CustomRenderedItemModel extends WrappedBakedModel {
|
|||
this.renderer = createRenderer();
|
||||
}
|
||||
|
||||
public final List<ResourceLocation> getModelLocations() {
|
||||
return partials.keySet().stream().map(this::getPartialModelLocation).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public ItemStackTileEntityRenderer getRenderer() {
|
||||
return renderer;
|
||||
}
|
||||
|
||||
public abstract ItemStackTileEntityRenderer createRenderer();
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel handlePerspective(TransformType cameraTransformType, MatrixStack mat) {
|
||||
currentPerspective = cameraTransformType;
|
||||
return super.handlePerspective(cameraTransformType, mat);
|
||||
public IBakedModel handlePerspective(ItemCameraTransforms.TransformType cameraTransformType, MatrixStack mat) {
|
||||
// Super call returns originalModel, but we want to return this, else ISTER won't be used.
|
||||
super.handlePerspective(cameraTransformType, mat);
|
||||
return this;
|
||||
}
|
||||
|
||||
public final IBakedModel getOriginalModel() {
|
||||
return originalModel;
|
||||
}
|
||||
|
||||
public ItemStackTileEntityRenderer getRenderer() {
|
||||
return renderer;
|
||||
}
|
||||
|
||||
public abstract ItemStackTileEntityRenderer createRenderer();
|
||||
|
||||
public final List<ResourceLocation> getModelLocations() {
|
||||
return partials.keySet().stream().map(this::getPartialModelLocation).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
protected void addPartials(String... partials) {
|
||||
|
@ -70,10 +75,6 @@ public abstract class CustomRenderedItemModel extends WrappedBakedModel {
|
|||
return new ResourceLocation(Create.ID, "item/" + basePath + "/" + name);
|
||||
}
|
||||
|
||||
public TransformType getCurrentPerspective() {
|
||||
return currentPerspective;
|
||||
}
|
||||
|
||||
public IBakedModel getPartial(String name) {
|
||||
return partials.get(name);
|
||||
}
|
||||
|
|
|
@ -9,25 +9,23 @@ import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
|||
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class CustomRenderedItemModelRenderer<M extends CustomRenderedItemModel> extends ItemStackTileEntityRenderer {
|
||||
public abstract class CustomRenderedItemModelRenderer<M extends CustomRenderedItemModel> extends ItemStackTileEntityRenderer {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void render(ItemStack stack, ItemCameraTransforms.TransformType p_239207_2_, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
public void render(ItemStack stack, ItemCameraTransforms.TransformType transformType, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
M mainModel = ((M) Minecraft.getInstance()
|
||||
.getItemRenderer()
|
||||
.getItemModelWithOverrides(stack, null, null));
|
||||
PartialItemModelRenderer renderer = PartialItemModelRenderer.of(stack, p_239207_2_, ms, buffer, overlay);
|
||||
PartialItemModelRenderer renderer = PartialItemModelRenderer.of(stack, transformType, ms, buffer, overlay);
|
||||
|
||||
ms.push();
|
||||
ms.translate(0.5F, 0.5F, 0.5F);
|
||||
render(stack, mainModel, renderer, ms, buffer, light, overlay);
|
||||
render(stack, mainModel, renderer, transformType, ms, buffer, light, overlay);
|
||||
ms.pop();
|
||||
}
|
||||
|
||||
protected void render(ItemStack stack, M model, PartialItemModelRenderer renderer, MatrixStack ms,
|
||||
IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
|
||||
}
|
||||
protected abstract void render(ItemStack stack, M model, PartialItemModelRenderer renderer, ItemCameraTransforms.TransformType transformType,
|
||||
MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay);
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package com.simibubi.create.foundation.block.render;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
|
||||
public final class QuadHelper {
|
||||
|
||||
private QuadHelper() {}
|
||||
|
||||
public static BakedQuad clone(BakedQuad quad) {
|
||||
return new BakedQuad(Arrays.copyOf(quad.getVertexData(), quad.getVertexData().length),
|
||||
quad.getTintIndex(), quad.getFace(), quad.getSprite(), quad.hasShade());
|
||||
}
|
||||
|
||||
}
|
|
@ -1,81 +0,0 @@
|
|||
package com.simibubi.create.foundation.block.render;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.client.model.data.EmptyModelData;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
|
||||
public class WrappedBakedModel implements IBakedModel {
|
||||
|
||||
protected IBakedModel template;
|
||||
|
||||
public WrappedBakedModel(IBakedModel template) {
|
||||
this.template = template;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel getBakedModel() {
|
||||
return template;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAmbientOcclusion() {
|
||||
return template.isAmbientOcclusion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGui3d() {
|
||||
return template.isGui3d();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer() {
|
||||
return template.isBuiltInRenderer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture(IModelData data) {
|
||||
return template.getParticleTexture(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemOverrideList getOverrides() {
|
||||
return template.getOverrides();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel handlePerspective(TransformType cameraTransformType, MatrixStack mat) {
|
||||
template.handlePerspective(cameraTransformType, mat);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BakedQuad> getQuads(BlockState state, Direction side, Random rand) {
|
||||
return getQuads(state, side, rand, EmptyModelData.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BakedQuad> getQuads(BlockState state, Direction side, Random rand, IModelData data) {
|
||||
return template.getQuads(state, side, rand, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture() {
|
||||
return getParticleTexture(EmptyModelData.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSideLit() {
|
||||
return template.isSideLit();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.simibubi.create.foundation.utility;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import net.minecraft.profiler.IProfiler;
|
||||
import net.minecraft.resources.IFutureReloadListener;
|
||||
import net.minecraft.resources.IResourceManager;
|
||||
import net.minecraft.util.Unit;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface ISimpleReloadListener extends IFutureReloadListener {
|
||||
|
||||
@Override
|
||||
default CompletableFuture<Void> reload(IFutureReloadListener.IStage stage, IResourceManager resourceManager, IProfiler prepareProfiler, IProfiler applyProfiler, Executor prepareExecutor, Executor applyExecutor) {
|
||||
return stage.markCompleteAwaitingOthers(Unit.INSTANCE).thenRunAsync(() -> {
|
||||
onReload(resourceManager, applyProfiler);
|
||||
}, applyExecutor);
|
||||
}
|
||||
|
||||
void onReload(IResourceManager resourceManager, IProfiler profiler);
|
||||
|
||||
}
|
|
@ -10,11 +10,9 @@ import javax.annotation.Nullable;
|
|||
|
||||
import com.google.common.cache.Cache;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.simibubi.create.foundation.utility.ISimpleReloadListener;
|
||||
|
||||
import net.minecraft.client.resources.ReloadListener;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.profiler.IProfiler;
|
||||
import net.minecraft.resources.IResourceManager;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
@ -58,19 +56,8 @@ public class RecipeFinder {
|
|||
return list;
|
||||
}
|
||||
|
||||
|
||||
public static final ReloadListener<Object> LISTENER = new ReloadListener<Object>() {
|
||||
|
||||
@Override
|
||||
protected Object prepare(IResourceManager p_212854_1_, IProfiler p_212854_2_) {
|
||||
return new Object();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void apply(Object p_212853_1_, IResourceManager p_212853_2_, IProfiler p_212853_3_) {
|
||||
cachedSearches.invalidateAll();
|
||||
}
|
||||
|
||||
public static final ISimpleReloadListener LISTENER = (resourceManager, profiler) -> {
|
||||
cachedSearches.invalidateAll();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -51,6 +51,10 @@ public com.mojang.blaze3d.platform.GlStateManager$BooleanState field_179201_b #f
|
|||
# GameRenderer
|
||||
public net.minecraft.client.renderer.GameRenderer func_215311_a(Lnet/minecraft/client/renderer/ActiveRenderInfo;FZ)D #getFOVModifier
|
||||
|
||||
# FirstPersonRenderer
|
||||
public net.minecraft.client.renderer.FirstPersonRenderer field_187467_d # itemStackMainHand
|
||||
public net.minecraft.client.renderer.FirstPersonRenderer field_187468_e # itemStackOffHand
|
||||
|
||||
# IResizeCallback
|
||||
public net.minecraft.util.palette.IResizeCallback
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
2117
src/main/resources/assets/create/lang/pl_pl.json
Normal file
2117
src/main/resources/assets/create/lang/pl_pl.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -506,7 +506,7 @@
|
|||
"advancement.create.shifting_gears": "Механизм переключения",
|
||||
"advancement.create.shifting_gears.desc": "Подсоедините большую шестерню к шестерне, что позволит изменить скорость вращения.",
|
||||
"advancement.create.overstressed": "Перегрузка",
|
||||
"advancement.create.overstressed.desc": "Испытайте предельную перегрузку из первых рук.",
|
||||
"advancement.create.overstressed.desc": "Столкнитесь с предельной перегрузкой лицом к лицу.",
|
||||
"advancement.create.belt": "Передайте за проезд!",
|
||||
"advancement.create.belt.desc": "Соедините два вала с помощью механического ремня.",
|
||||
"advancement.create.tunnel": "В укрытие!",
|
||||
|
@ -654,7 +654,7 @@
|
|||
"advancement.create.extendo_grip": "Кипение!",
|
||||
"advancement.create.extendo_grip.desc": "Возьмите в руки удлинённую руку",
|
||||
"advancement.create.dual_extendo_grip": "Окончательное выкипание",
|
||||
"advancement.create.dual_extendo_grip.desc": "Две удлинённой руки для сверхчеловеческого охвата.",
|
||||
"advancement.create.dual_extendo_grip.desc": "Две удлинённых руки для сверхчеловеческого охвата.",
|
||||
"advancement.create.eob": "Конец бета-версии",
|
||||
"advancement.create.eob.desc": "Ожидайте больше контента здесь в будущем. <3",
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"parent": "create:item/handheld_blockzapper/item",
|
||||
"parent": "create:item/handheld_worldshaper/item",
|
||||
"textures": {
|
||||
"2": "create:block/terrain_zapper_mesh"
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"parent": "create:item/handheld_blockzapper/item",
|
||||
"parent": "create:item/handheld_worldshaper/item",
|
||||
"textures": {
|
||||
"2": "block/white_concrete_powder"
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"parent": "create:item/handheld_blockzapper/item",
|
||||
"parent": "create:item/handheld_worldshaper/item",
|
||||
"textures": {
|
||||
"3": "block/white_stained_glass"
|
||||
},
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"parent": "create:item/handheld_blockzapper/item",
|
||||
"textures": {
|
||||
"0": "create:block/terrain_zapper_mesh",
|
||||
"1": "block/smooth_stone_slab_side",
|
||||
|
|
Loading…
Reference in a new issue