Compare commits
2 Commits
0b9db5fd0e
...
595901802c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
595901802c | ||
|
|
ef0a496cc7 |
@@ -12,7 +12,7 @@ loader_version=0.18.4
|
||||
loom_version=1.14-SNAPSHOT
|
||||
|
||||
# Mod Properties
|
||||
mod_version=26.1.2
|
||||
mod_version=26.1.3
|
||||
maven_group=de.jottyfan.minecraft
|
||||
archives_base_name=quickly
|
||||
|
||||
|
||||
@@ -7,11 +7,15 @@ import net.minecraft.world.Containers;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.CropBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -24,11 +28,26 @@ public class BlockPlant extends CropBlock {
|
||||
private Identifier fruitName;
|
||||
|
||||
public BlockPlant(Properties properties, Identifier seedName, Identifier fruitName) {
|
||||
super(properties);
|
||||
super(properties.noOcclusion().dynamicShape());
|
||||
this.seedName = seedName;
|
||||
this.fruitName = fruitName;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) {
|
||||
return Block.box(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getShadeBrightness(BlockState state, BlockGetter level, BlockPos pos) {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean propagatesSkylightDown(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public ItemLike getSeed() {
|
||||
return QuicklyItems.of(seedName);
|
||||
}
|
||||
|
||||
@@ -1,20 +1,34 @@
|
||||
package de.jottyfan.minecraft.mixin;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import de.jottyfan.minecraft.block.QuicklyBlocks;
|
||||
import net.minecraft.client.renderer.ItemBlockRenderTypes;
|
||||
import net.minecraft.client.renderer.chunk.ChunkSectionLayer;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
@Mixin(MinecraftServer.class)
|
||||
@Mixin(ItemBlockRenderTypes.class)
|
||||
public class QuicklyMixin {
|
||||
@Inject(at = @At("HEAD"), method = "loadLevel")
|
||||
private void init(CallbackInfo info) {
|
||||
@Shadow
|
||||
@Final
|
||||
private static Map<Block, ChunkSectionLayer> TYPE_BY_BLOCK;
|
||||
|
||||
@Inject(method = "<clinit>", at = @At("RETURN"))
|
||||
private static void onStaticInit(CallbackInfo info) {
|
||||
ChunkSectionLayer cutout = ChunkSectionLayer.CUTOUT;
|
||||
TYPE_BY_BLOCK.put(QuicklyBlocks.CANOLAPLANT, cutout);
|
||||
TYPE_BY_BLOCK.put(QuicklyBlocks.COTTONPLANT, cutout);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent": "minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/canolaplant0"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/canolaplant1"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/canolaplant2"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/canolaplant3"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/canolaplant4"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/canolaplant5"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/canolaplant6"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/canolaplant7"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/cottonplant0"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/cottonplant1"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/cottonplant2"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/cottonplant3"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/cottonplant4"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/cottonplant5"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/cottonplant6"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent":"block/cross",
|
||||
"parent":"minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures":{
|
||||
"cross":"quickly:block/cottonplant7"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 255 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 324 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 403 B |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 463 B |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 513 B |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 527 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 645 B |