mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Merge remote-tracking branch 'concealed/mc1.20.1/feature-dev' into mc1.20.1/dev
# Conflicts: # gradle.properties
This commit is contained in:
commit
4dcdc6c373
56 changed files with 249 additions and 149 deletions
11
build.gradle
11
build.gradle
|
@ -352,11 +352,12 @@ publishMods {
|
||||||
modLoaders.add("forge")
|
modLoaders.add("forge")
|
||||||
modLoaders.add("neoforge")
|
modLoaders.add("neoforge")
|
||||||
|
|
||||||
curseforge {
|
// TODO - Uncomment post update 6
|
||||||
accessToken = providers.environmentVariable("CURSEFORGE_TOKEN")
|
// curseforge {
|
||||||
projectId = "328085"
|
// accessToken = providers.environmentVariable("CURSEFORGE_TOKEN")
|
||||||
minecraftVersions.add(minecraft_version)
|
// projectId = "328085"
|
||||||
}
|
// minecraftVersions.add(minecraft_version)
|
||||||
|
// }
|
||||||
|
|
||||||
modrinth {
|
modrinth {
|
||||||
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
|
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
package com.simibubi.create;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
|
import com.simibubi.create.api.behaviour.spouting.BlockSpoutingBehaviour;
|
||||||
|
import com.simibubi.create.api.behaviour.spouting.CauldronSpoutingBehavior;
|
||||||
|
import com.simibubi.create.api.behaviour.spouting.StateChangingBehavior;
|
||||||
|
import com.simibubi.create.compat.Mods;
|
||||||
|
import com.simibubi.create.compat.tconstruct.SpoutCasting;
|
||||||
|
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
import net.minecraft.world.level.block.FarmBlock;
|
||||||
|
import net.minecraft.world.level.block.LayeredCauldronBlock;
|
||||||
|
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||||
|
import net.minecraft.world.level.material.Fluid;
|
||||||
|
import net.minecraft.world.level.material.Fluids;
|
||||||
|
|
||||||
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
|
||||||
|
public class AllBlockSpoutingBehaviours {
|
||||||
|
static void registerDefaults() {
|
||||||
|
Predicate<Fluid> isWater = fluid -> fluid.isSame(Fluids.WATER);
|
||||||
|
BlockSpoutingBehaviour toMud = StateChangingBehavior.setTo(250, isWater, Blocks.MUD);
|
||||||
|
|
||||||
|
for (Block dirt : List.of(Blocks.DIRT, Blocks.COARSE_DIRT, Blocks.ROOTED_DIRT)) {
|
||||||
|
BlockSpoutingBehaviour.BY_BLOCK.register(dirt, toMud);
|
||||||
|
}
|
||||||
|
|
||||||
|
BlockSpoutingBehaviour.BY_BLOCK.register(Blocks.FARMLAND, StateChangingBehavior.incrementingState(100, isWater, FarmBlock.MOISTURE));
|
||||||
|
BlockSpoutingBehaviour.BY_BLOCK.register(Blocks.WATER_CAULDRON, StateChangingBehavior.incrementingState(250, isWater, LayeredCauldronBlock.LEVEL));
|
||||||
|
BlockSpoutingBehaviour.BY_BLOCK.register(Blocks.CAULDRON, CauldronSpoutingBehavior.INSTANCE);
|
||||||
|
|
||||||
|
if (!Mods.TCONSTRUCT.isLoaded())
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (String name : List.of("table", "basin")) {
|
||||||
|
ResourceLocation id = Mods.TCONSTRUCT.rl(name);
|
||||||
|
if (ForgeRegistries.BLOCK_ENTITY_TYPES.containsKey(id)) {
|
||||||
|
BlockEntityType<?> table = ForgeRegistries.BLOCK_ENTITY_TYPES.getValue(id);
|
||||||
|
BlockSpoutingBehaviour.BY_BLOCK_ENTITY.register(table, SpoutCasting.INSTANCE);
|
||||||
|
} else {
|
||||||
|
Create.LOGGER.warn("Block entity {} wasn't found. Outdated compat?", id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -876,7 +876,7 @@ public class AllBlocks {
|
||||||
.properties(p -> p.forceSolidOff())
|
.properties(p -> p.forceSolidOff())
|
||||||
.transform(pickaxeOnly())
|
.transform(pickaxeOnly())
|
||||||
.blockstate(BlockStateGen.pipe())
|
.blockstate(BlockStateGen.pipe())
|
||||||
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
|
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
|
||||||
.item()
|
.item()
|
||||||
.transform(customItemModel())
|
.transform(customItemModel())
|
||||||
.register();
|
.register();
|
||||||
|
@ -915,7 +915,7 @@ public class AllBlocks {
|
||||||
.build();
|
.build();
|
||||||
}, BlockStateProperties.WATERLOGGED);
|
}, BlockStateProperties.WATERLOGGED);
|
||||||
})
|
})
|
||||||
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
|
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
|
||||||
.loot((p, b) -> p.dropOther(b, FLUID_PIPE.get()))
|
.loot((p, b) -> p.dropOther(b, FLUID_PIPE.get()))
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
|
@ -924,7 +924,7 @@ public class AllBlocks {
|
||||||
.properties(p -> p.mapColor(MapColor.STONE))
|
.properties(p -> p.mapColor(MapColor.STONE))
|
||||||
.transform(pickaxeOnly())
|
.transform(pickaxeOnly())
|
||||||
.blockstate(BlockStateGen.directionalBlockProviderIgnoresWaterlogged(true))
|
.blockstate(BlockStateGen.directionalBlockProviderIgnoresWaterlogged(true))
|
||||||
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
|
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
|
||||||
.transform(CStress.setImpact(4.0))
|
.transform(CStress.setImpact(4.0))
|
||||||
.item()
|
.item()
|
||||||
.transform(customItemModel())
|
.transform(customItemModel())
|
||||||
|
@ -936,7 +936,7 @@ public class AllBlocks {
|
||||||
.properties(p -> p.mapColor(MapColor.TERRACOTTA_YELLOW))
|
.properties(p -> p.mapColor(MapColor.TERRACOTTA_YELLOW))
|
||||||
.transform(pickaxeOnly())
|
.transform(pickaxeOnly())
|
||||||
.blockstate(new SmartFluidPipeGenerator()::generate)
|
.blockstate(new SmartFluidPipeGenerator()::generate)
|
||||||
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
|
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
|
||||||
.item()
|
.item()
|
||||||
.transform(customItemModel())
|
.transform(customItemModel())
|
||||||
.register();
|
.register();
|
||||||
|
@ -948,7 +948,7 @@ public class AllBlocks {
|
||||||
.blockstate((c, p) -> BlockStateGen.directionalAxisBlock(c, p,
|
.blockstate((c, p) -> BlockStateGen.directionalAxisBlock(c, p,
|
||||||
(state, vertical) -> AssetLookup.partialBaseModel(c, p, vertical ? "vertical" : "horizontal",
|
(state, vertical) -> AssetLookup.partialBaseModel(c, p, vertical ? "vertical" : "horizontal",
|
||||||
state.getValue(FluidValveBlock.ENABLED) ? "open" : "closed")))
|
state.getValue(FluidValveBlock.ENABLED) ? "open" : "closed")))
|
||||||
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
|
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
|
||||||
.item()
|
.item()
|
||||||
.transform(customItemModel())
|
.transform(customItemModel())
|
||||||
.register();
|
.register();
|
||||||
|
|
|
@ -7,7 +7,6 @@ import org.slf4j.Logger;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import com.mojang.logging.LogUtils;
|
import com.mojang.logging.LogUtils;
|
||||||
import com.simibubi.create.api.behaviour.spouting.BlockSpoutingBehaviour;
|
|
||||||
import com.simibubi.create.compat.Mods;
|
import com.simibubi.create.compat.Mods;
|
||||||
import com.simibubi.create.compat.computercraft.ComputerCraftProxy;
|
import com.simibubi.create.compat.computercraft.ComputerCraftProxy;
|
||||||
import com.simibubi.create.compat.curios.Curios;
|
import com.simibubi.create.compat.curios.Curios;
|
||||||
|
@ -169,7 +168,7 @@ public class Create {
|
||||||
// These registrations use Create's registered objects directly so they must run after registration has finished.
|
// These registrations use Create's registered objects directly so they must run after registration has finished.
|
||||||
BoilerHeaters.registerDefaults();
|
BoilerHeaters.registerDefaults();
|
||||||
AllPortalTracks.registerDefaults();
|
AllPortalTracks.registerDefaults();
|
||||||
BlockSpoutingBehaviour.registerDefaults();
|
AllBlockSpoutingBehaviours.registerDefaults();
|
||||||
AllMovementBehaviours.registerDefaults();
|
AllMovementBehaviours.registerDefaults();
|
||||||
AllInteractionBehaviours.registerDefaults();
|
AllInteractionBehaviours.registerDefaults();
|
||||||
AllContraptionMovementSettings.registerDefaults();
|
AllContraptionMovementSettings.registerDefaults();
|
||||||
|
|
|
@ -1,31 +1,18 @@
|
||||||
package com.simibubi.create.api.behaviour.spouting;
|
package com.simibubi.create.api.behaviour.spouting;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.function.Predicate;
|
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.simibubi.create.Create;
|
|
||||||
import com.simibubi.create.api.registry.SimpleRegistry;
|
import com.simibubi.create.api.registry.SimpleRegistry;
|
||||||
import com.simibubi.create.compat.Mods;
|
|
||||||
import com.simibubi.create.compat.tconstruct.SpoutCasting;
|
|
||||||
import com.simibubi.create.content.fluids.spout.SpoutBlockEntity;
|
import com.simibubi.create.content.fluids.spout.SpoutBlockEntity;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
|
||||||
import net.minecraft.world.level.block.FarmBlock;
|
|
||||||
import net.minecraft.world.level.block.LayeredCauldronBlock;
|
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.material.Fluid;
|
|
||||||
import net.minecraft.world.level.material.Fluids;
|
|
||||||
|
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.registries.ForgeRegistries;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for custom block-filling behavior for spouts.
|
* Interface for custom block-filling behavior for spouts.
|
||||||
|
@ -58,32 +45,6 @@ public interface BlockSpoutingBehaviour {
|
||||||
return BY_BLOCK_ENTITY.get(be.getType());
|
return BY_BLOCK_ENTITY.get(be.getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void registerDefaults() {
|
|
||||||
Predicate<Fluid> isWater = fluid -> fluid.isSame(Fluids.WATER);
|
|
||||||
BlockSpoutingBehaviour toMud = StateChangingBehavior.setTo(250, isWater, Blocks.MUD);
|
|
||||||
|
|
||||||
for (Block dirt : List.of(Blocks.DIRT, Blocks.COARSE_DIRT, Blocks.ROOTED_DIRT)) {
|
|
||||||
BY_BLOCK.register(dirt, toMud);
|
|
||||||
}
|
|
||||||
|
|
||||||
BY_BLOCK.register(Blocks.FARMLAND, StateChangingBehavior.incrementingState(100, isWater, FarmBlock.MOISTURE));
|
|
||||||
BY_BLOCK.register(Blocks.WATER_CAULDRON, StateChangingBehavior.incrementingState(250, isWater, LayeredCauldronBlock.LEVEL));
|
|
||||||
BY_BLOCK.register(Blocks.CAULDRON, CauldronSpoutingBehavior.INSTANCE);
|
|
||||||
|
|
||||||
if (!Mods.TCONSTRUCT.isLoaded())
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (String name : List.of("table", "basin")) {
|
|
||||||
ResourceLocation id = Mods.TCONSTRUCT.rl(name);
|
|
||||||
if (ForgeRegistries.BLOCK_ENTITY_TYPES.containsKey(id)) {
|
|
||||||
BlockEntityType<?> table = ForgeRegistries.BLOCK_ENTITY_TYPES.getValue(id);
|
|
||||||
BY_BLOCK_ENTITY.register(table, SpoutCasting.INSTANCE);
|
|
||||||
} else {
|
|
||||||
Create.LOGGER.warn("Block entity {} wasn't found. Outdated compat?", id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* While idle, spouts will query the behavior provided by the block below it.
|
* While idle, spouts will query the behavior provided by the block below it.
|
||||||
* If one is present, this method will be called every tick with simulate == true.
|
* If one is present, this method will be called every tick with simulate == true.
|
||||||
|
|
|
@ -992,7 +992,7 @@ public abstract class Contraption {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private static BlockEntity readBlockEntity(Level level, StructureBlockInfo info, CompoundTag tag) {
|
protected BlockEntity readBlockEntity(Level level, StructureBlockInfo info, CompoundTag tag) {
|
||||||
BlockState state = info.state();
|
BlockState state = info.state();
|
||||||
BlockPos pos = info.pos();
|
BlockPos pos = info.pos();
|
||||||
CompoundTag nbt = info.nbt();
|
CompoundTag nbt = info.nbt();
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class BearingContraption extends Contraption {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ContraptionType getType() {
|
public ContraptionType getType() {
|
||||||
return AllContraptionTypes.BEARING.get();
|
return AllContraptionTypes.BEARING.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class ClockworkContraption extends Contraption {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ContraptionType getType() {
|
public ContraptionType getType() {
|
||||||
return AllContraptionTypes.CLOCKWORK.get();
|
return AllContraptionTypes.CLOCKWORK.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ignoreBlocks(Set<BlockPos> blocks, BlockPos anchor) {
|
private void ignoreBlocks(Set<BlockPos> blocks, BlockPos anchor) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class StabilizedContraption extends Contraption {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ContraptionType getType() {
|
public ContraptionType getType() {
|
||||||
return AllContraptionTypes.STABILIZED.get();
|
return AllContraptionTypes.STABILIZED.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -174,7 +174,7 @@ public class ElevatorContraption extends PulleyContraption {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ContraptionType getType() {
|
public ContraptionType getType() {
|
||||||
return AllContraptionTypes.ELEVATOR.get();
|
return AllContraptionTypes.ELEVATOR.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setClientYTarget(int clientYTarget) {
|
public void setClientYTarget(int clientYTarget) {
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class GantryContraption extends TranslatingContraption {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ContraptionType getType() {
|
public ContraptionType getType() {
|
||||||
return AllContraptionTypes.GANTRY.get();
|
return AllContraptionTypes.GANTRY.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Direction getFacing() {
|
public Direction getFacing() {
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class MountedContraption extends Contraption {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ContraptionType getType() {
|
public ContraptionType getType() {
|
||||||
return AllContraptionTypes.MOUNTED.get();
|
return AllContraptionTypes.MOUNTED.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class PistonContraption extends TranslatingContraption {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ContraptionType getType() {
|
public ContraptionType getType() {
|
||||||
return AllContraptionTypes.PISTON.get();
|
return AllContraptionTypes.PISTON.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
public PistonContraption() {
|
public PistonContraption() {
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class PulleyContraption extends TranslatingContraption {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ContraptionType getType() {
|
public ContraptionType getType() {
|
||||||
return AllContraptionTypes.PULLEY.get();
|
return AllContraptionTypes.PULLEY.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
public PulleyContraption() {}
|
public PulleyContraption() {}
|
||||||
|
|
|
@ -138,7 +138,7 @@ public class WhistleBlock extends Block implements IBE<WhistleBlockEntity>, IWre
|
||||||
for (int i = 1; i <= 6; i++) {
|
for (int i = 1; i <= 6; i++) {
|
||||||
BlockState blockState = pLevel.getBlockState(currentPos);
|
BlockState blockState = pLevel.getBlockState(currentPos);
|
||||||
float pVolume = (soundtype.getVolume() + 1.0F) / 2.0F;
|
float pVolume = (soundtype.getVolume() + 1.0F) / 2.0F;
|
||||||
SoundEvent growSound = SoundEvents.NOTE_BLOCK_XYLOPHONE.get();
|
SoundEvent growSound = SoundEvents.NOTE_BLOCK_XYLOPHONE.value();
|
||||||
SoundEvent hitSound = soundtype.getHitSound();
|
SoundEvent hitSound = soundtype.getHitSound();
|
||||||
|
|
||||||
if (AllBlocks.STEAM_WHISTLE_EXTENSION.has(blockState)) {
|
if (AllBlocks.STEAM_WHISTLE_EXTENSION.has(blockState)) {
|
||||||
|
|
|
@ -61,12 +61,12 @@ public class AllPotatoProjectileBlockHitActions {
|
||||||
if (!level.getBlockState(placePos)
|
if (!level.getBlockState(placePos)
|
||||||
.canBeReplaced())
|
.canBeReplaced())
|
||||||
return false;
|
return false;
|
||||||
if (!(cropBlock.get() instanceof IPlantable))
|
if (!(cropBlock.value() instanceof IPlantable))
|
||||||
return false;
|
return false;
|
||||||
BlockState blockState = level.getBlockState(hitPos);
|
BlockState blockState = level.getBlockState(hitPos);
|
||||||
if (!blockState.canSustainPlant(level, hitPos, face, (IPlantable) cropBlock.get()))
|
if (!blockState.canSustainPlant(level, hitPos, face, (IPlantable) cropBlock.value()))
|
||||||
return false;
|
return false;
|
||||||
level.setBlock(placePos, cropBlock.get()
|
level.setBlock(placePos, cropBlock.value()
|
||||||
.defaultBlockState(), 3);
|
.defaultBlockState(), 3);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ public class AllPotatoProjectileBlockHitActions {
|
||||||
y = Math.max(y, placePos.getY());
|
y = Math.max(y, placePos.getY());
|
||||||
|
|
||||||
FallingBlockEntity falling = FallingBlockEntityAccessor.create$callInit(level, placePos.getX() + 0.5, y,
|
FallingBlockEntity falling = FallingBlockEntityAccessor.create$callInit(level, placePos.getX() + 0.5, y,
|
||||||
placePos.getZ() + 0.5, block.get().defaultBlockState());
|
placePos.getZ() + 0.5, block.value().defaultBlockState());
|
||||||
falling.time = 1;
|
falling.time = 1;
|
||||||
level.addFreshEntity(falling);
|
level.addFreshEntity(falling);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class PotatoCannonItem extends ProjectileWeaponItem implements CustomArmP
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Ammo(ammoStack, optionalType.get().get());
|
return new Ammo(ammoStack, optionalType.get().value());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -21,6 +21,7 @@ import net.minecraft.world.item.alchemy.Potion;
|
||||||
import net.minecraft.world.item.alchemy.PotionBrewing;
|
import net.minecraft.world.item.alchemy.PotionBrewing;
|
||||||
import net.minecraft.world.item.alchemy.Potions;
|
import net.minecraft.world.item.alchemy.Potions;
|
||||||
import net.minecraft.world.item.crafting.Ingredient;
|
import net.minecraft.world.item.crafting.Ingredient;
|
||||||
|
|
||||||
import net.minecraftforge.common.brewing.BrewingRecipe;
|
import net.minecraftforge.common.brewing.BrewingRecipe;
|
||||||
import net.minecraftforge.common.brewing.BrewingRecipeRegistry;
|
import net.minecraftforge.common.brewing.BrewingRecipeRegistry;
|
||||||
import net.minecraftforge.common.brewing.IBrewingRecipe;
|
import net.minecraftforge.common.brewing.IBrewingRecipe;
|
||||||
|
@ -52,19 +53,19 @@ public class PotionMixingRecipes {
|
||||||
for (Item container : allowedSupportedContainers) {
|
for (Item container : allowedSupportedContainers) {
|
||||||
BottleType bottleType = PotionFluidHandler.bottleTypeFromItem(container);
|
BottleType bottleType = PotionFluidHandler.bottleTypeFromItem(container);
|
||||||
for (PotionBrewing.Mix<Potion> mix : PotionBrewing.POTION_MIXES) {
|
for (PotionBrewing.Mix<Potion> mix : PotionBrewing.POTION_MIXES) {
|
||||||
FluidStack fromFluid = PotionFluidHandler.getFluidFromPotion(mix.from.get(), bottleType, 1000);
|
FluidStack fromFluid = PotionFluidHandler.getFluidFromPotion(mix.from.value(), bottleType, 1000);
|
||||||
FluidStack toFluid = PotionFluidHandler.getFluidFromPotion(mix.to.get(), bottleType, 1000);
|
FluidStack toFluid = PotionFluidHandler.getFluidFromPotion(mix.to.value(), bottleType, 1000);
|
||||||
|
|
||||||
mixingRecipes.add(createRecipe("potion_mixing_vanilla_" + recipeIndex++, mix.ingredient, fromFluid, toFluid));
|
mixingRecipes.add(createRecipe("potion_mixing_vanilla_" + recipeIndex++, mix.ingredient, fromFluid, toFluid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (PotionBrewing.Mix<Item> mix : PotionBrewing.CONTAINER_MIXES) {
|
for (PotionBrewing.Mix<Item> mix : PotionBrewing.CONTAINER_MIXES) {
|
||||||
Item from = mix.from.get();
|
Item from = mix.from.value();
|
||||||
if (!allowedSupportedContainers.contains(from)) {
|
if (!allowedSupportedContainers.contains(from)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Item to = mix.to.get();
|
Item to = mix.to.value();
|
||||||
if (!allowedSupportedContainers.contains(to)) {
|
if (!allowedSupportedContainers.contains(to)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,10 @@ import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
|
||||||
import com.simibubi.create.foundation.damageTypes.CreateDamageSources;
|
import com.simibubi.create.foundation.damageTypes.CreateDamageSources;
|
||||||
|
|
||||||
import net.createmod.catnip.animation.AnimationTickHolder;
|
import net.createmod.catnip.animation.AnimationTickHolder;
|
||||||
import net.createmod.catnip.nbt.NBTHelper;
|
|
||||||
import net.createmod.catnip.math.VecHelper;
|
|
||||||
import net.createmod.catnip.animation.LerpedFloat;
|
import net.createmod.catnip.animation.LerpedFloat;
|
||||||
import net.createmod.catnip.animation.LerpedFloat.Chaser;
|
import net.createmod.catnip.animation.LerpedFloat.Chaser;
|
||||||
|
import net.createmod.catnip.math.VecHelper;
|
||||||
|
import net.createmod.catnip.nbt.NBTHelper;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.particles.ParticleTypes;
|
import net.minecraft.core.particles.ParticleTypes;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
@ -82,9 +82,9 @@ public class CuckooClockBlockEntity extends KineticBlockEntity {
|
||||||
moveHands(hours, minutes);
|
moveHands(hours, minutes);
|
||||||
|
|
||||||
if (AnimationTickHolder.getTicks() % 6 == 0)
|
if (AnimationTickHolder.getTicks() % 6 == 0)
|
||||||
playSound(SoundEvents.NOTE_BLOCK_HAT.get(), 1 / 16f, 2f);
|
playSound(SoundEvents.NOTE_BLOCK_HAT.value(), 1 / 16f, 2f);
|
||||||
else if (AnimationTickHolder.getTicks() % 3 == 0)
|
else if (AnimationTickHolder.getTicks() % 3 == 0)
|
||||||
playSound(SoundEvents.NOTE_BLOCK_HAT.get(), 1 / 16f, 1.5f);
|
playSound(SoundEvents.NOTE_BLOCK_HAT.value(), 1 / 16f, 1.5f);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -117,9 +117,9 @@ public class CuckooClockBlockEntity extends KineticBlockEntity {
|
||||||
|
|
||||||
if (animationType == Animation.NONE) {
|
if (animationType == Animation.NONE) {
|
||||||
if (AnimationTickHolder.getTicks() % 32 == 0)
|
if (AnimationTickHolder.getTicks() % 32 == 0)
|
||||||
playSound(SoundEvents.NOTE_BLOCK_HAT.get(), 1 / 16f, 2f);
|
playSound(SoundEvents.NOTE_BLOCK_HAT.value(), 1 / 16f, 2f);
|
||||||
else if (AnimationTickHolder.getTicks() % 16 == 0)
|
else if (AnimationTickHolder.getTicks() % 16 == 0)
|
||||||
playSound(SoundEvents.NOTE_BLOCK_HAT.get(), 1 / 16f, 1.5f);
|
playSound(SoundEvents.NOTE_BLOCK_HAT.value(), 1 / 16f, 1.5f);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
boolean isSurprise = animationType == Animation.SURPRISE;
|
boolean isSurprise = animationType == Animation.SURPRISE;
|
||||||
|
@ -131,9 +131,9 @@ public class CuckooClockBlockEntity extends KineticBlockEntity {
|
||||||
// sounds
|
// sounds
|
||||||
|
|
||||||
if (value == 1)
|
if (value == 1)
|
||||||
playSound(SoundEvents.NOTE_BLOCK_CHIME.get(), 2, .5f);
|
playSound(SoundEvents.NOTE_BLOCK_CHIME.value(), 2, .5f);
|
||||||
if (value == 21)
|
if (value == 21)
|
||||||
playSound(SoundEvents.NOTE_BLOCK_CHIME.get(), 2, 0.793701f);
|
playSound(SoundEvents.NOTE_BLOCK_CHIME.value(), 2, 0.793701f);
|
||||||
|
|
||||||
if (value > 30 && isSurprise) {
|
if (value > 30 && isSurprise) {
|
||||||
Vec3 pos = VecHelper.offsetRandomly(VecHelper.getCenterOf(this.worldPosition), level.random, .5f);
|
Vec3 pos = VecHelper.offsetRandomly(VecHelper.getCenterOf(this.worldPosition), level.random, .5f);
|
||||||
|
|
|
@ -46,6 +46,7 @@ import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.crafting.CraftingRecipe;
|
import net.minecraft.world.item.crafting.CraftingRecipe;
|
||||||
import net.minecraft.world.item.crafting.Ingredient;
|
import net.minecraft.world.item.crafting.Ingredient;
|
||||||
import net.minecraft.world.item.crafting.RecipeType;
|
import net.minecraft.world.item.crafting.RecipeType;
|
||||||
|
|
||||||
import net.minecraftforge.common.crafting.IShapedRecipe;
|
import net.minecraftforge.common.crafting.IShapedRecipe;
|
||||||
import net.minecraftforge.items.ItemHandlerHelper;
|
import net.minecraftforge.items.ItemHandlerHelper;
|
||||||
|
|
||||||
|
@ -583,7 +584,7 @@ public class FactoryPanelScreen extends AbstractSimiScreen {
|
||||||
public void playButtonSound() {
|
public void playButtonSound() {
|
||||||
Minecraft.getInstance()
|
Minecraft.getInstance()
|
||||||
.getSoundManager()
|
.getSoundManager()
|
||||||
.play(SimpleSoundInstance.forUI(SoundEvents.UI_BUTTON_CLICK.get(), 1.0f, 0.25f));
|
.play(SimpleSoundInstance.forUI(SoundEvents.UI_BUTTON_CLICK.value(), 1.0f, 0.25f));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class StockKeeperCategoryScreen extends AbstractSimiContainerScreen<Stock
|
||||||
if (editingItem == null)
|
if (editingItem == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
playUiSound(SoundEvents.UI_BUTTON_CLICK.get(), 1, 1);
|
playUiSound(SoundEvents.UI_BUTTON_CLICK.value(), 1, 1);
|
||||||
|
|
||||||
removeWidget(editorConfirm);
|
removeWidget(editorConfirm);
|
||||||
removeWidget(editorEditBox);
|
removeWidget(editorEditBox);
|
||||||
|
@ -348,7 +348,7 @@ public class StockKeeperCategoryScreen extends AbstractSimiContainerScreen<Stock
|
||||||
renderActionTooltip(graphics, ImmutableList.of(CreateLang.translate("gui.stock_ticker.new_category")
|
renderActionTooltip(graphics, ImmutableList.of(CreateLang.translate("gui.stock_ticker.new_category")
|
||||||
.component()), mx, my);
|
.component()), mx, my);
|
||||||
if (click == 0) {
|
if (click == 0) {
|
||||||
playUiSound(SoundEvents.UI_BUTTON_CLICK.get(), 1f, 1f);
|
playUiSound(SoundEvents.UI_BUTTON_CLICK.value(), 1f, 1f);
|
||||||
startEditing(-1);
|
startEditing(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -368,7 +368,7 @@ public class StockKeeperCategoryScreen extends AbstractSimiContainerScreen<Stock
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (action(null, pMouseX, pMouseY, pButton)) {
|
if (action(null, pMouseX, pMouseY, pButton)) {
|
||||||
playUiSound(SoundEvents.UI_BUTTON_CLICK.get(), 1f, 1f);
|
playUiSound(SoundEvents.UI_BUTTON_CLICK.value(), 1f, 1f);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,7 @@ import net.minecraft.world.item.TooltipFlag;
|
||||||
import net.minecraft.world.item.crafting.CraftingRecipe;
|
import net.minecraft.world.item.crafting.CraftingRecipe;
|
||||||
import net.minecraft.world.item.crafting.Ingredient;
|
import net.minecraft.world.item.crafting.Ingredient;
|
||||||
import net.minecraft.world.phys.AABB;
|
import net.minecraft.world.phys.AABB;
|
||||||
|
|
||||||
import net.minecraftforge.items.ItemHandlerHelper;
|
import net.minecraftforge.items.ItemHandlerHelper;
|
||||||
import net.minecraftforge.network.simple.SimpleChannel;
|
import net.minecraftforge.network.simple.SimpleChannel;
|
||||||
import net.minecraftforge.registries.ForgeRegistries;
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
@ -1051,14 +1052,14 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
||||||
isLocked = !isLocked;
|
isLocked = !isLocked;
|
||||||
AllPackets.getChannel()
|
AllPackets.getChannel()
|
||||||
.sendToServer(new StockKeeperLockPacket(blockEntity.getBlockPos(), isLocked));
|
.sendToServer(new StockKeeperLockPacket(blockEntity.getBlockPos(), isLocked));
|
||||||
playUiSound(SoundEvents.UI_BUTTON_CLICK.get(), 1, 1);
|
playUiSound(SoundEvents.UI_BUTTON_CLICK.value(), 1, 1);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Confirm
|
// Confirm
|
||||||
if (lmb && isConfirmHovered((int) pMouseX, (int) pMouseY)) {
|
if (lmb && isConfirmHovered((int) pMouseX, (int) pMouseY)) {
|
||||||
sendIt();
|
sendIt();
|
||||||
playUiSound(SoundEvents.UI_BUTTON_CLICK.get(), 1, 1);
|
playUiSound(SoundEvents.UI_BUTTON_CLICK.value(), 1, 1);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1080,12 +1081,12 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
||||||
|
|
||||||
if (!entry.hidden) {
|
if (!entry.hidden) {
|
||||||
hiddenCategories.add(indexOf);
|
hiddenCategories.add(indexOf);
|
||||||
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 0.75f, 1.5f);
|
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 1f, 1.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
hiddenCategories.remove(indexOf);
|
hiddenCategories.remove(indexOf);
|
||||||
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 0.75f, 0.675f);
|
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 1f, 0.675f);
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshSearchNextTick = true;
|
refreshSearchNextTick = true;
|
||||||
|
@ -1122,8 +1123,8 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
||||||
if (itemsToOrder.size() >= cols || rmb)
|
if (itemsToOrder.size() >= cols || rmb)
|
||||||
return true;
|
return true;
|
||||||
itemsToOrder.add(existingOrder = new BigItemStack(itemStack.copyWithCount(1), 0));
|
itemsToOrder.add(existingOrder = new BigItemStack(itemStack.copyWithCount(1), 0));
|
||||||
playUiSound(SoundEvents.WOOL_STEP, 0.5f, 1.2f);
|
playUiSound(SoundEvents.WOOL_STEP, 0.75f, 1.2f);
|
||||||
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.5f, 0.8f);
|
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.75f, 0.8f);
|
||||||
}
|
}
|
||||||
|
|
||||||
int current = existingOrder.count;
|
int current = existingOrder.count;
|
||||||
|
@ -1132,8 +1133,8 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
||||||
existingOrder.count = current - transfer;
|
existingOrder.count = current - transfer;
|
||||||
if (existingOrder.count <= 0) {
|
if (existingOrder.count <= 0) {
|
||||||
itemsToOrder.remove(existingOrder);
|
itemsToOrder.remove(existingOrder);
|
||||||
playUiSound(SoundEvents.WOOL_STEP, 0.5f, 1.8f);
|
playUiSound(SoundEvents.WOOL_STEP, 0.75f, 1.8f);
|
||||||
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.5f, 1.8f);
|
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.75f, 1.8f);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1189,8 +1190,8 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
||||||
if (itemsToOrder.size() >= cols || remove)
|
if (itemsToOrder.size() >= cols || remove)
|
||||||
return true;
|
return true;
|
||||||
itemsToOrder.add(existingOrder = new BigItemStack(entry.stack.copyWithCount(1), 0));
|
itemsToOrder.add(existingOrder = new BigItemStack(entry.stack.copyWithCount(1), 0));
|
||||||
playUiSound(SoundEvents.WOOL_STEP, 0.5f, 1.2f);
|
playUiSound(SoundEvents.WOOL_STEP, 0.75f, 1.2f);
|
||||||
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.5f, 0.8f);
|
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.75f, 0.8f);
|
||||||
}
|
}
|
||||||
|
|
||||||
int current = existingOrder.count;
|
int current = existingOrder.count;
|
||||||
|
@ -1199,8 +1200,8 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
|
||||||
existingOrder.count = current - transfer;
|
existingOrder.count = current - transfer;
|
||||||
if (existingOrder.count <= 0) {
|
if (existingOrder.count <= 0) {
|
||||||
itemsToOrder.remove(existingOrder);
|
itemsToOrder.remove(existingOrder);
|
||||||
playUiSound(SoundEvents.WOOL_STEP, 0.5f, 1.8f);
|
playUiSound(SoundEvents.WOOL_STEP, 0.75f, 1.8f);
|
||||||
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.5f, 1.8f);
|
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.75f, 1.8f);
|
||||||
} else if (existingOrder.count != current)
|
} else if (existingOrder.count != current)
|
||||||
playUiSound(AllSoundEvents.SCROLL_VALUE.getMainEvent(), 0.25f, 1.2f);
|
playUiSound(AllSoundEvents.SCROLL_VALUE.getMainEvent(), 0.25f, 1.2f);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -13,8 +13,8 @@ import com.simibubi.create.content.contraptions.Contraption;
|
||||||
import com.simibubi.create.content.decoration.steamWhistle.WhistleBlock;
|
import com.simibubi.create.content.decoration.steamWhistle.WhistleBlock;
|
||||||
import com.simibubi.create.content.decoration.steamWhistle.WhistleBlock.WhistleSize;
|
import com.simibubi.create.content.decoration.steamWhistle.WhistleBlock.WhistleSize;
|
||||||
|
|
||||||
import net.createmod.catnip.nbt.NBTHelper;
|
|
||||||
import net.createmod.catnip.data.Pair;
|
import net.createmod.catnip.data.Pair;
|
||||||
|
import net.createmod.catnip.nbt.NBTHelper;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.nbt.NbtUtils;
|
import net.minecraft.nbt.NbtUtils;
|
||||||
|
@ -135,8 +135,7 @@ public class ArrivalSoundQueue {
|
||||||
if (state.getBlock() instanceof NoteBlock nb) {
|
if (state.getBlock() instanceof NoteBlock nb) {
|
||||||
float f = (float) Math.pow(2, (state.getValue(NoteBlock.NOTE) - 12) / 12.0);
|
float f = (float) Math.pow(2, (state.getValue(NoteBlock.NOTE) - 12) / 12.0);
|
||||||
playSimple(entity, state.getValue(NoteBlock.INSTRUMENT)
|
playSimple(entity, state.getValue(NoteBlock.INSTRUMENT)
|
||||||
.getSoundEvent()
|
.getSoundEvent().value(), 1, f);
|
||||||
.get(), 1, f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.getBlock() instanceof WhistleBlock && info.nbt() != null) {
|
if (state.getBlock() instanceof WhistleBlock && info.nbt() != null) {
|
||||||
|
|
|
@ -157,13 +157,10 @@ public class CarriageContraption extends Contraption {
|
||||||
.getStep(), toLocalPos(pos));
|
.getStep(), toLocalPos(pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (blockState.getBlock() instanceof AbstractBogeyBlock<?> bogey) {
|
if (blockState.getBlock() instanceof AbstractBogeyBlock<?>) {
|
||||||
boolean captureBE = bogey.captureBlockEntityForTrain();
|
|
||||||
bogeys++;
|
bogeys++;
|
||||||
if (bogeys == 2)
|
if (bogeys == 2)
|
||||||
secondBogeyPos = pos;
|
secondBogeyPos = pos;
|
||||||
return Pair.of(new StructureBlockInfo(pos, blockState, captureBE ? getBlockEntityNBT(world, pos) : null),
|
|
||||||
captureBE ? world.getBlockEntity(pos) : null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MovingInteractionBehaviour behaviour = MovingInteractionBehaviour.REGISTRY.get(blockState);
|
MovingInteractionBehaviour behaviour = MovingInteractionBehaviour.REGISTRY.get(blockState);
|
||||||
|
@ -187,6 +184,14 @@ public class CarriageContraption extends Contraption {
|
||||||
return super.capture(world, pos);
|
return super.capture(world, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected BlockEntity readBlockEntity(Level level, StructureBlockInfo info, CompoundTag tag) {
|
||||||
|
if (info.state().getBlock() instanceof AbstractBogeyBlock<?> bogey && !bogey.captureBlockEntityForTrain())
|
||||||
|
return null; // Bogeys are typically rendered by the carriage contraption, not the BE
|
||||||
|
|
||||||
|
return super.readBlockEntity(level, info, tag);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CompoundTag writeNBT(boolean spawnPacket) {
|
public CompoundTag writeNBT(boolean spawnPacket) {
|
||||||
CompoundTag tag = super.writeNBT(spawnPacket);
|
CompoundTag tag = super.writeNBT(spawnPacket);
|
||||||
|
@ -231,7 +236,7 @@ public class CarriageContraption extends Contraption {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ContraptionType getType() {
|
public ContraptionType getType() {
|
||||||
return AllContraptionTypes.CARRIAGE.get();
|
return AllContraptionTypes.CARRIAGE.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Direction getAssemblyDirection() {
|
public Direction getAssemblyDirection() {
|
||||||
|
|
|
@ -146,8 +146,7 @@ public class ValueBox extends ChasingAABBOutline {
|
||||||
ItemRenderer itemRenderer = Minecraft.getInstance()
|
ItemRenderer itemRenderer = Minecraft.getInstance()
|
||||||
.getItemRenderer();
|
.getItemRenderer();
|
||||||
BakedModel modelWithOverrides = itemRenderer.getModel(stack, null, null, 0);
|
BakedModel modelWithOverrides = itemRenderer.getModel(stack, null, null, 0);
|
||||||
boolean blockItem = modelWithOverrides.isGui3d() && modelWithOverrides.getRenderPasses(stack, false)
|
boolean blockItem = modelWithOverrides.isGui3d();
|
||||||
.size() <= 1;
|
|
||||||
|
|
||||||
float scale = 1.5f;
|
float scale = 1.5f;
|
||||||
ms.translate(-font.width(count), 0, 0);
|
ms.translate(-font.width(count), 0, 0);
|
||||||
|
|
|
@ -28,8 +28,7 @@ public class ValueBoxRenderer {
|
||||||
Minecraft mc = Minecraft.getInstance();
|
Minecraft mc = Minecraft.getInstance();
|
||||||
ItemRenderer itemRenderer = mc.getItemRenderer();
|
ItemRenderer itemRenderer = mc.getItemRenderer();
|
||||||
BakedModel modelWithOverrides = itemRenderer.getModel(filter, null, null, 0);
|
BakedModel modelWithOverrides = itemRenderer.getModel(filter, null, null, 0);
|
||||||
boolean blockItem =
|
boolean blockItem = modelWithOverrides.isGui3d();
|
||||||
modelWithOverrides.isGui3d() && modelWithOverrides.getRenderPasses(filter, false).size() <= 1;
|
|
||||||
float scale = (!blockItem ? .5f : 1f) + 1 / 64f;
|
float scale = (!blockItem ? .5f : 1f) + 1 / 64f;
|
||||||
float zOffset = (!blockItem ? -.15f : 0) + customZOffset(filter.getItem());
|
float zOffset = (!blockItem ? -.15f : 0) + customZOffset(filter.getItem());
|
||||||
ms.scale(scale, scale, scale);
|
ms.scale(scale, scale, scale);
|
||||||
|
|
|
@ -78,7 +78,7 @@ public interface ValueSettingsBehaviour extends ClipboardCloneable {
|
||||||
origin.getWorld()
|
origin.getWorld()
|
||||||
.playSound(null, origin.getPos(), SoundEvents.ITEM_FRAME_ADD_ITEM, SoundSource.BLOCKS, 0.25f, 2f);
|
.playSound(null, origin.getPos(), SoundEvents.ITEM_FRAME_ADD_ITEM, SoundSource.BLOCKS, 0.25f, 2f);
|
||||||
origin.getWorld()
|
origin.getWorld()
|
||||||
.playSound(null, origin.getPos(), SoundEvents.NOTE_BLOCK_IRON_XYLOPHONE.get(), SoundSource.BLOCKS, 0.03f,
|
.playSound(null, origin.getPos(), SoundEvents.NOTE_BLOCK_IRON_XYLOPHONE.value(), SoundSource.BLOCKS, 0.03f,
|
||||||
1.125f);
|
1.125f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
"scale":[ 0.4, 0.4, 0.4 ]
|
"scale":[ 0.4, 0.4, 0.4 ]
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"rotation": [ 90, 0, 0 ],
|
"rotation": [ 270, 180, 0 ],
|
||||||
"translation": [ 0, 0, 0],
|
"translation": [ 0, 0, 0],
|
||||||
"scale":[ 0.5, 0.5, 0.5 ]
|
"scale":[ 0.375, 0.375, 0.375 ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -61,6 +61,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"display": {
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [0, 90, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
}
|
||||||
|
},
|
||||||
"groups": [
|
"groups": [
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"rotation": [ 270, 0, 0 ],
|
"rotation": [ 270, 0, 0 ],
|
||||||
"translation": [ 0, 0, -3],
|
"translation": [ 0, 0, -5],
|
||||||
"scale":[ 0.5, 0.5, 0.5 ]
|
"scale":[ 0.5, 0.5, 0.5 ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"rotation": [ 270, 0, 0 ],
|
"rotation": [ 270, 0, 0 ],
|
||||||
"translation": [ 0, 0, -3],
|
"translation": [ 0, 0, -5],
|
||||||
"scale":[ 0.5, 0.5, 0.5 ]
|
"scale":[ 0.5, 0.5, 0.5 ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"rotation": [270, 0, 0],
|
"rotation": [270, 0, 0],
|
||||||
"translation": [0, 0, -3],
|
"translation": [0, 0, -5],
|
||||||
"scale": [0.5, 0.5, 0.5]
|
"scale": [0.5, 0.5, 0.5]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"rotation": [270, 0, 0],
|
"rotation": [270, 0, 0],
|
||||||
"translation": [0, 0, -3],
|
"translation": [0, 0, -5],
|
||||||
"scale": [0.5, 0.5, 0.5]
|
"scale": [0.5, 0.5, 0.5]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"rotation": [270, 0, 0],
|
"rotation": [270, 0, 0],
|
||||||
"translation": [0, 0, -3],
|
"translation": [0, 0, -5],
|
||||||
"scale": [0.5, 0.5, 0.5]
|
"scale": [0.5, 0.5, 0.5]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,6 +136,8 @@
|
||||||
"scale": [0.625, 0.625, 0.625]
|
"scale": [0.625, 0.625, 0.625]
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
|
"rotation": [270, 0, 0],
|
||||||
|
"translation": [0, 0, -4],
|
||||||
"scale": [0.5, 0.5, 0.5]
|
"scale": [0.5, 0.5, 0.5]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,6 +214,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"display": {
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [0, 90, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
}
|
||||||
|
},
|
||||||
"groups": [
|
"groups": [
|
||||||
{
|
{
|
||||||
"name": "Frame",
|
"name": "Frame",
|
||||||
|
|
|
@ -80,6 +80,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"display": {
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [0, 90, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
}
|
||||||
|
},
|
||||||
"groups": [
|
"groups": [
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
|
|
|
@ -112,7 +112,9 @@
|
||||||
"translation": [0, 14.25, 0]
|
"translation": [0, 14.25, 0]
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"scale": [0.5, 0.5, 0.5]
|
"rotation": [-90, 0, 0],
|
||||||
|
"translation": [0, 0, -6.5],
|
||||||
|
"scale": [0.75, 0.75, 0.75]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"groups": [
|
"groups": [
|
||||||
|
|
|
@ -128,6 +128,7 @@
|
||||||
"scale": [0.625, 0.625, 0.625]
|
"scale": [0.625, 0.625, 0.625]
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
|
"rotation": [90, 0, 0],
|
||||||
"scale": [0.5, 0.5, 0.5]
|
"scale": [0.5, 0.5, 0.5]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"rotation": [ 90, 0, 0 ],
|
"rotation": [ 90, 0, 0 ],
|
||||||
"translation": [ 0, 0, 0],
|
"translation": [ 0, 0, -1],
|
||||||
"scale":[ 0.4, 0.4, 0.4 ]
|
"scale":[ 0.375, 0.375, 0.375 ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -80,6 +80,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"display": {
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [0, 90, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
}
|
||||||
|
},
|
||||||
"groups": [
|
"groups": [
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
|
|
|
@ -92,5 +92,12 @@
|
||||||
"color": 0,
|
"color": 0,
|
||||||
"children": [0, 1, 2, 3, 4, 5, 6]
|
"children": [0, 1, 2, 3, 4, 5, 6]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"display": {
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [0, 0, 0],
|
||||||
|
"translation": [0, 0, -1],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -264,7 +264,7 @@
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"rotation": [0, 90, 0],
|
"rotation": [0, 90, 0],
|
||||||
"translation": [0, 2.25, -0.75],
|
"translation": [0, 4.25, -0.75],
|
||||||
"scale": [0.45, 0.45, 0.45]
|
"scale": [0.45, 0.45, 0.45]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -77,5 +77,11 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"display": {
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [0, 90, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -90,5 +90,12 @@
|
||||||
"color": 0,
|
"color": 0,
|
||||||
"children": [0, 1, 2, 3, 4, 5, 6]
|
"children": [0, 1, 2, 3, 4, 5, 6]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"display": {
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [0, 0, 0],
|
||||||
|
"translation": [0, 0, -1],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -102,7 +102,7 @@
|
||||||
"translation": [0, 22.25, 0]
|
"translation": [0, 22.25, 0]
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"translation": [0, -1.25, 0],
|
"translation": [0, 0, 0],
|
||||||
"scale": [0.5, 0.5, 0.5]
|
"scale": [0.5, 0.5, 0.5]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -210,7 +210,7 @@
|
||||||
"translation": [0, 22.25, 0]
|
"translation": [0, 22.25, 0]
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"translation": [0, -1.25, 0],
|
"translation": [0, 0, 0],
|
||||||
"scale": [0.5, 0.5, 0.5]
|
"scale": [0.5, 0.5, 0.5]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -99,6 +99,8 @@
|
||||||
"scale": [0.625, 0.625, 0.625]
|
"scale": [0.625, 0.625, 0.625]
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
|
"rotation": [270, 90, 0],
|
||||||
|
"translation": [0, 0, -4],
|
||||||
"scale": [0.5, 0.5, 0.5]
|
"scale": [0.5, 0.5, 0.5]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"display": {
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [0, 90, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
|
}
|
||||||
|
},
|
||||||
"groups": [
|
"groups": [
|
||||||
{
|
{
|
||||||
"name": "encased_shaft",
|
"name": "encased_shaft",
|
||||||
|
|
|
@ -112,6 +112,7 @@
|
||||||
"scale": [0.625, 0.625, 0.625]
|
"scale": [0.625, 0.625, 0.625]
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
|
"rotation": [0, 90, 0],
|
||||||
"scale": [0.5, 0.5, 0.5]
|
"scale": [0.5, 0.5, 0.5]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,6 +148,8 @@
|
||||||
"scale": [0.625, 0.625, 0.625]
|
"scale": [0.625, 0.625, 0.625]
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
|
"rotation": [270, 0, 0],
|
||||||
|
"translation": [0, 0, -4],
|
||||||
"scale": [0.5, 0.5, 0.5]
|
"scale": [0.5, 0.5, 0.5]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,7 +202,8 @@
|
||||||
"scale": [0.625, 0.625, 0.625]
|
"scale": [0.625, 0.625, 0.625]
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"translation": [0, 5.75, 0],
|
"rotation": [270, 0, 0],
|
||||||
|
"translation": [0, 0, -6],
|
||||||
"scale": [0.5, 0.5, 0.5]
|
"scale": [0.5, 0.5, 0.5]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -37,6 +37,10 @@
|
||||||
"gui": {
|
"gui": {
|
||||||
"rotation": [30, -135, 0],
|
"rotation": [30, -135, 0],
|
||||||
"scale": [0.625, 0.625, 0.625]
|
"scale": [0.625, 0.625, 0.625]
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [0, 90, 0],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -6,5 +6,24 @@
|
||||||
"textures": {
|
"textures": {
|
||||||
"3": "create:block/valve_handle/valve_handle_copper",
|
"3": "create:block/valve_handle/valve_handle_copper",
|
||||||
"particle": "#3"
|
"particle": "#3"
|
||||||
|
},
|
||||||
|
"display": {
|
||||||
|
"fixed": {
|
||||||
|
"rotation": [
|
||||||
|
270,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"translation": [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
-2
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0.5,
|
||||||
|
0.5,
|
||||||
|
0.5
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -122,7 +122,8 @@
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"rotation": [0, 90, 0],
|
"rotation": [0, 90, 0],
|
||||||
"translation": [0, -5, 0]
|
"translation": [0, -2.5, -0.75],
|
||||||
|
"scale": [0.5, 0.5, 0.5]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,8 +134,8 @@
|
||||||
"scale": [1.09453, 1.09453, 1.09453]
|
"scale": [1.09453, 1.09453, 1.09453]
|
||||||
},
|
},
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"rotation": [0, 160.5, 0],
|
"rotation": [0, 180, 0],
|
||||||
"translation": [0.5, 0.5, 0]
|
"translation": [0.5, 0.5, -0.75]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"groups": [
|
"groups": [
|
||||||
|
|
Loading…
Add table
Reference in a new issue