Compare commits
2 commits
1.16.5
...
0.9.8.2-pr
Author | SHA1 | Date | |
---|---|---|---|
|
ff3194fedf | ||
|
b0922d967f |
17 changed files with 43 additions and 12 deletions
|
@ -8,7 +8,7 @@ yarn_mappings=6
|
||||||
loader_version=0.11.3
|
loader_version=0.11.3
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 0.9.8-pre
|
mod_version = 0.9.8.2-pre
|
||||||
maven_group = ru.betterend
|
maven_group = ru.betterend
|
||||||
archives_base_name = better-end
|
archives_base_name = better-end
|
||||||
|
|
||||||
|
@ -17,5 +17,5 @@ archives_base_name = better-end
|
||||||
patchouli_version = 50-FABRIC
|
patchouli_version = 50-FABRIC
|
||||||
fabric_version = 0.32.9+1.16
|
fabric_version = 0.32.9+1.16
|
||||||
canvas_version = 1.0.+
|
canvas_version = 1.0.+
|
||||||
bclib_version = 0.1.38
|
bclib_version = 0.1.42
|
||||||
rei_version = 5.8.10
|
rei_version = 5.8.10
|
|
@ -7,6 +7,8 @@ import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||||
|
@ -57,6 +59,7 @@ public class BulbVineLanternBlock extends EndLanternBlock implements IRenderType
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||||
Map<String, String> textures = Maps.newHashMap();
|
Map<String, String> textures = Maps.newHashMap();
|
||||||
textures.put("%glow%", getGlowTexture());
|
textures.put("%glow%", getGlowTexture());
|
||||||
|
|
|
@ -8,6 +8,8 @@ import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||||
import net.minecraft.client.resources.model.BlockModelRotation;
|
import net.minecraft.client.resources.model.BlockModelRotation;
|
||||||
|
@ -46,11 +48,13 @@ public class ChandelierBlock extends BaseAttachedBlock implements IRenderTyped,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public BlockModel getItemModel(ResourceLocation blockId) {
|
public BlockModel getItemModel(ResourceLocation blockId) {
|
||||||
return ModelsHelper.createItemModel(blockId);
|
return ModelsHelper.createItemModel(blockId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||||
Optional<String> pattern;
|
Optional<String> pattern;
|
||||||
switch (blockState.getValue(FACING)) {
|
switch (blockState.getValue(FACING)) {
|
||||||
|
@ -67,6 +71,7 @@ public class ChandelierBlock extends BaseAttachedBlock implements IRenderTyped,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||||
String state = "_wall";
|
String state = "_wall";
|
||||||
BlockModelRotation rotation = BlockModelRotation.X0_Y0;
|
BlockModelRotation rotation = BlockModelRotation.X0_Y0;
|
||||||
|
|
|
@ -6,6 +6,8 @@ import java.util.Random;
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
@ -85,6 +87,7 @@ public class EmeraldIceBlock extends HalfTransparentBlock implements IRenderType
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
||||||
return getBlockModel(resourceLocation, defaultBlockState());
|
return getBlockModel(resourceLocation, defaultBlockState());
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,8 @@ import net.minecraft.world.level.material.Material;
|
||||||
import net.minecraft.world.level.storage.loot.LootContext;
|
import net.minecraft.world.level.storage.loot.LootContext;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
import ru.bclib.interfaces.ISpetialItem;
|
||||||
import ru.betterend.blocks.basis.EndPlantBlock;
|
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||||
import ru.betterend.interfaces.ISpetialItem;
|
|
||||||
|
|
||||||
public class FlamaeaBlock extends EndPlantBlock implements ISpetialItem {
|
public class FlamaeaBlock extends EndPlantBlock implements ISpetialItem {
|
||||||
private static final VoxelShape SHAPE = Block.box(0, 0, 0, 16, 1, 16);
|
private static final VoxelShape SHAPE = Block.box(0, 0, 0, 16, 1, 16);
|
||||||
|
|
|
@ -4,6 +4,8 @@ import java.util.Optional;
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
import net.minecraft.client.color.block.BlockColor;
|
import net.minecraft.client.color.block.BlockColor;
|
||||||
import net.minecraft.client.color.item.ItemColor;
|
import net.minecraft.client.color.item.ItemColor;
|
||||||
|
@ -31,6 +33,7 @@ public class HydraluxPetalColoredBlock extends HydraluxPetalBlock implements ICo
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||||
String path = "betterend:block/block_petal_colored";
|
String path = "betterend:block/block_petal_colored";
|
||||||
Optional<String> pattern = Patterns.createJson(Patterns.BLOCK_PETAL_COLORED, path, path);
|
Optional<String> pattern = Patterns.createJson(Patterns.BLOCK_PETAL_COLORED, path, path);
|
||||||
|
|
|
@ -7,6 +7,8 @@ import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
import net.minecraft.client.color.block.BlockColor;
|
import net.minecraft.client.color.block.BlockColor;
|
||||||
import net.minecraft.client.color.item.ItemColor;
|
import net.minecraft.client.color.item.ItemColor;
|
||||||
|
@ -71,11 +73,13 @@ public class JellyshroomCapBlock extends SlimeBlock implements IRenderTyped, Blo
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
||||||
return getBlockModel(resourceLocation, defaultBlockState());
|
return getBlockModel(resourceLocation, defaultBlockState());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||||
Optional<String> pattern = Patterns.createJson(Patterns.BLOCK_COLORED, "jellyshroom_cap");
|
Optional<String> pattern = Patterns.createJson(Patterns.BLOCK_COLORED, "jellyshroom_cap");
|
||||||
return ModelsHelper.fromPattern(pattern);
|
return ModelsHelper.fromPattern(pattern);
|
||||||
|
|
|
@ -81,6 +81,7 @@ public class UmbrellaTreeMembraneBlock extends SlimeBlock implements IRenderType
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
||||||
return getBlockModel(resourceLocation, defaultBlockState());
|
return getBlockModel(resourceLocation, defaultBlockState());
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ package ru.betterend.blocks.basis;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
import net.minecraft.client.resources.model.UnbakedModel;
|
import net.minecraft.client.resources.model.UnbakedModel;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
@ -125,6 +127,7 @@ public class EndLanternBlock extends BaseBlockNotFull implements SimpleWaterlogg
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||||
String floor = blockState.getValue(IS_FLOOR) ? "_floor" : "";
|
String floor = blockState.getValue(IS_FLOOR) ? "_floor" : "";
|
||||||
ResourceLocation modelId = new ResourceLocation(stateId.getNamespace(),
|
ResourceLocation modelId = new ResourceLocation(stateId.getNamespace(),
|
||||||
|
|
|
@ -10,6 +10,8 @@ import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||||
import net.minecraft.client.resources.model.UnbakedModel;
|
import net.minecraft.client.resources.model.UnbakedModel;
|
||||||
|
@ -370,11 +372,13 @@ public class PedestalBlock extends BaseBlockNotFull implements EntityBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public BlockModel getItemModel(ResourceLocation blockId) {
|
public BlockModel getItemModel(ResourceLocation blockId) {
|
||||||
return getBlockModel(blockId, defaultBlockState());
|
return getBlockModel(blockId, defaultBlockState());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||||
Map<String, String> textures = createTexturesMap();
|
Map<String, String> textures = createTexturesMap();
|
||||||
PedestalState state = blockState.getValue(STATE);
|
PedestalState state = blockState.getValue(STATE);
|
||||||
|
@ -401,6 +405,7 @@ public class PedestalBlock extends BaseBlockNotFull implements EntityBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||||
PedestalState state = blockState.getValue(STATE);
|
PedestalState state = blockState.getValue(STATE);
|
||||||
ResourceLocation modelId = new ResourceLocation(stateId.getNamespace(),
|
ResourceLocation modelId = new ResourceLocation(stateId.getNamespace(),
|
||||||
|
|
|
@ -4,6 +4,8 @@ import java.util.Optional;
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
import net.minecraft.client.color.block.BlockColor;
|
import net.minecraft.client.color.block.BlockColor;
|
||||||
import net.minecraft.client.color.item.ItemColor;
|
import net.minecraft.client.color.item.ItemColor;
|
||||||
|
@ -44,6 +46,7 @@ public class StoneLanternBlock extends EndLanternBlock implements IColorProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||||
String blockName = resourceLocation.getPath();
|
String blockName = resourceLocation.getPath();
|
||||||
Optional<String> pattern = blockState.getValue(IS_FLOOR) ?
|
Optional<String> pattern = blockState.getValue(IS_FLOOR) ?
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
package ru.betterend.interfaces;
|
|
||||||
|
|
||||||
public interface ISpetialItem {
|
|
||||||
public int getStackSize();
|
|
||||||
|
|
||||||
public boolean canPlaceOnWater();
|
|
||||||
}
|
|
|
@ -1,5 +1,7 @@
|
||||||
package ru.betterend.item;
|
package ru.betterend.item;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||||
import net.minecraft.core.Registry;
|
import net.minecraft.core.Registry;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
@ -25,6 +27,7 @@ public class EnchantedItem extends ModelProviderItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
||||||
ResourceLocation sourceId = Registry.ITEM.getKey(source);
|
ResourceLocation sourceId = Registry.ITEM.getKey(source);
|
||||||
return ModelsHelper.createItemModel(sourceId);
|
return ModelsHelper.createItemModel(sourceId);
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package ru.betterend.item;
|
package ru.betterend.item;
|
||||||
|
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||||
import net.minecraft.core.Registry;
|
import net.minecraft.core.Registry;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
@ -30,6 +32,7 @@ public class EndAnvilItem extends BaseAnvilItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
||||||
Block block = getBlock();
|
Block block = getBlock();
|
||||||
ResourceLocation blockId = Registry.BLOCK.getKey(block);
|
ResourceLocation blockId = Registry.BLOCK.getKey(block);
|
||||||
|
|
|
@ -8,6 +8,8 @@ import com.google.common.collect.Multimap;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
||||||
import io.netty.util.internal.ThreadLocalRandom;
|
import io.netty.util.internal.ThreadLocalRandom;
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
import net.fabricmc.fabric.api.tool.attribute.v1.DynamicAttributeTool;
|
import net.fabricmc.fabric.api.tool.attribute.v1.DynamicAttributeTool;
|
||||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
@ -133,6 +135,7 @@ public class EndHammerItem extends DiggerItem implements DynamicAttributeTool, I
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
||||||
return ModelsHelper.createHandheldItem(resourceLocation);
|
return ModelsHelper.createHandheldItem(resourceLocation);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.server.level.ServerLevel;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.world.Container;
|
import net.minecraft.world.Container;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.item.Item;
|
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
"fabricloader": ">=0.11.0",
|
"fabricloader": ">=0.11.0",
|
||||||
"fabric": ">=0.32.0",
|
"fabric": ">=0.32.0",
|
||||||
"minecraft": ">=1.16.4",
|
"minecraft": ">=1.16.4",
|
||||||
"bclib": ">=0.1.38"
|
"bclib": ">=0.1.42"
|
||||||
},
|
},
|
||||||
"suggests": {
|
"suggests": {
|
||||||
"byg": ">=1.1.3",
|
"byg": ">=1.1.3",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue