Fix minor bugs
This commit is contained in:
parent
0f7b1616e1
commit
3114d9a3e1
7 changed files with 28 additions and 19 deletions
15
CHANGELOG
15
CHANGELOG
|
@ -1,4 +1,6 @@
|
||||||
### Changelog 0.1 -> 0.2
|
# Changelog
|
||||||
|
|
||||||
|
## Changelog 0.1 -> 0.2
|
||||||
|
|
||||||
* Added new "Dirt Road" block
|
* Added new "Dirt Road" block
|
||||||
* Made by tilling coarse dirt with a rake. Right now you get 1 flint out of the process as a placeholder drop
|
* Made by tilling coarse dirt with a rake. Right now you get 1 flint out of the process as a placeholder drop
|
||||||
|
@ -27,7 +29,7 @@
|
||||||
* Updated one of authors' nicks in credits
|
* Updated one of authors' nicks in credits
|
||||||
* Moved to newer versions of Yarn, Loom, Fabric loader & API
|
* Moved to newer versions of Yarn, Loom, Fabric loader & API
|
||||||
|
|
||||||
### Changelog 0.2 -> 0.3
|
## Changelog 0.2 -> 0.3
|
||||||
This version focuses on QOL and bug fixes
|
This version focuses on QOL and bug fixes
|
||||||
|
|
||||||
* Added Russian (ru_ru) and pre-reform Russian (ru_rpr) translations
|
* Added Russian (ru_ru) and pre-reform Russian (ru_rpr) translations
|
||||||
|
@ -50,7 +52,7 @@ This version focuses on QOL and bug fixes
|
||||||
* Deleted various unused files - code, textures and models
|
* Deleted various unused files - code, textures and models
|
||||||
* Bumped Fabric API, loader and mappings versions
|
* Bumped Fabric API, loader and mappings versions
|
||||||
|
|
||||||
### Changelog 0.3 -> 0.4.0
|
## Changelog 0.3 -> 0.4.0
|
||||||
Due to sheer amount of changes, many may be undocumented. We hope you enjoy this update! :D
|
Due to sheer amount of changes, many may be undocumented. We hope you enjoy this update! :D
|
||||||
|
|
||||||
* Added dozens of new blocks
|
* Added dozens of new blocks
|
||||||
|
@ -85,6 +87,7 @@ Due to sheer amount of changes, many may be undocumented. We hope you enjoy this
|
||||||
* Stone-cutting recipe for slabs now gives 2 blocks
|
* Stone-cutting recipe for slabs now gives 2 blocks
|
||||||
* Fixed typos in Russian translation
|
* Fixed typos in Russian translation
|
||||||
* Cigarettes are now less broken (and more numerous)
|
* Cigarettes are now less broken (and more numerous)
|
||||||
|
* TVs now stay broken when picked up as items (use glass pane to repair)
|
||||||
* Fixed a few missing drops/tags/recipes related to concrete
|
* Fixed a few missing drops/tags/recipes related to concrete
|
||||||
* Concrete with bars is now pickaxe mine-able
|
* Concrete with bars is now pickaxe mine-able
|
||||||
* Fixed some concrete blocks missing drops
|
* Fixed some concrete blocks missing drops
|
||||||
|
@ -94,3 +97,9 @@ Due to sheer amount of changes, many may be undocumented. We hope you enjoy this
|
||||||
* Removed some unused textures intended for later updates
|
* Removed some unused textures intended for later updates
|
||||||
* Moved to newer Fabric, Loom etc. versions. Took a while to figure out how to update Gradle :D
|
* Moved to newer Fabric, Loom etc. versions. Took a while to figure out how to update Gradle :D
|
||||||
* Source-sets main and client have been merged to fix mixins
|
* Source-sets main and client have been merged to fix mixins
|
||||||
|
|
||||||
|
## Changelog 0.4.0 -> 0.4.1
|
||||||
|
This is a *minor* update fixing some bugs
|
||||||
|
|
||||||
|
* Barbed wire now damages foxes and bees
|
||||||
|
* Purple goo now slows down properly
|
8
TODO.md
8
TODO.md
|
@ -8,3 +8,11 @@
|
||||||
* Rusty blue iron bars - missing
|
* Rusty blue iron bars - missing
|
||||||
* Nutrient block - missing by design
|
* Nutrient block - missing by design
|
||||||
* Chess & Checkers figurines - missing
|
* Chess & Checkers figurines - missing
|
||||||
|
|
||||||
|
## 0.4.1 aims
|
||||||
|
|
||||||
|
* Fix WindowBlock class!!!
|
||||||
|
* Boundary markers should keep and display their dye as items
|
||||||
|
* Overall clean-up code where possible
|
||||||
|
* Paintings/Posters?
|
||||||
|
* Whitewashing should be done like a proper tool
|
|
@ -4,7 +4,6 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityType;
|
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
@ -16,7 +15,7 @@ public class BarbedWireBlock extends Block {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
|
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
|
||||||
if (entity instanceof LivingEntity && entity.getType() != EntityType.FOX && entity.getType() != EntityType.BEE) {
|
if (entity instanceof LivingEntity) {
|
||||||
entity.slowMovement(state, new Vec3d(0.200000011920929, 0.25, 0.200000011920929));
|
entity.slowMovement(state, new Vec3d(0.200000011920929, 0.25, 0.200000011920929));
|
||||||
if (!world.isClient && (entity.lastRenderX != entity.getX() || entity.lastRenderZ != entity.getZ())) {
|
if (!world.isClient && (entity.lastRenderX != entity.getX() || entity.lastRenderZ != entity.getZ())) {
|
||||||
double d = Math.abs(entity.getX() - entity.lastRenderX);
|
double d = Math.abs(entity.getX() - entity.lastRenderX);
|
||||||
|
|
|
@ -9,10 +9,8 @@ import su.a71.new_soviet.registration.NSE_Sounds;
|
||||||
|
|
||||||
|
|
||||||
public class GooBlock extends SnowBlock {
|
public class GooBlock extends SnowBlock {
|
||||||
private final double entity_speed;
|
public GooBlock(Settings settings) {
|
||||||
public GooBlock(Settings settings, double entity_speed) {
|
|
||||||
super(settings.sounds(NSE_Sounds.GOO_SOUNDS).pistonBehavior(PistonBehavior.DESTROY));
|
super(settings.sounds(NSE_Sounds.GOO_SOUNDS).pistonBehavior(PistonBehavior.DESTROY));
|
||||||
this.entity_speed = entity_speed;
|
|
||||||
this.setDefaultState(this.stateManager.getDefaultState().with(LAYERS, 1));
|
this.setDefaultState(this.stateManager.getDefaultState().with(LAYERS, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,17 +31,14 @@ public class WallpaperBlock extends Block {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify) {
|
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify) {
|
||||||
|
|
||||||
BlockState updatedBlockState = state.with(HAS_BASEBOARD, isFullBlock(world, pos));
|
BlockState updatedBlockState = state.with(HAS_BASEBOARD, isFullBlock(world, pos));
|
||||||
world.setBlockState(pos, updatedBlockState);
|
world.setBlockState(pos, updatedBlockState);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isFullBlock(WorldAccess world, BlockPos pos) {
|
private boolean isFullBlock(WorldAccess world, BlockPos pos) {
|
||||||
pos = pos.down();
|
pos = pos.down();
|
||||||
BlockState state = world.getBlockState(pos);
|
BlockState state = world.getBlockState(pos);
|
||||||
Block block = state.getBlock();
|
Block block = state.getBlock();
|
||||||
//return (!state.getCollisionShape(world, pos).getFace(Direction.UP).isEmpty() || state.isSideSolidFullSquare(world, pos, Direction.UP)) && !(block instanceof WallpaperBlock);
|
return state.isFullCube(world, pos) && !(block instanceof WallpaperBlock) && (!block.isTransparent(state, world, pos));
|
||||||
return block.isShapeFullCube(state, world, pos) && !(block instanceof WallpaperBlock) && (!block.isTransparent(state, world, pos));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -39,6 +39,7 @@ import su.a71.new_soviet.util.Shapes;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
// FIXME: This whole class is horrifying, and has bugs!!! -Andrew71 30.04.2024
|
||||||
public class WindowBlock extends HorizontalFacingBlock {
|
public class WindowBlock extends HorizontalFacingBlock {
|
||||||
public static final IntProperty WINDOW_TYPE = IntProperty.of("window_type", 0, 3);
|
public static final IntProperty WINDOW_TYPE = IntProperty.of("window_type", 0, 3);
|
||||||
public static final BooleanProperty BROKEN = Properties.CRACKED;
|
public static final BooleanProperty BROKEN = Properties.CRACKED;
|
||||||
|
@ -54,9 +55,6 @@ public class WindowBlock extends HorizontalFacingBlock {
|
||||||
public static final Shapes.HorizontalShape PANE_FRAME_SHAPE;
|
public static final Shapes.HorizontalShape PANE_FRAME_SHAPE;
|
||||||
private final boolean pane;
|
private final boolean pane;
|
||||||
|
|
||||||
@Nullable
|
|
||||||
private Item cachedItem;
|
|
||||||
|
|
||||||
public WindowBlock(Settings settings, boolean pane) {
|
public WindowBlock(Settings settings, boolean pane) {
|
||||||
super(settings);
|
super(settings);
|
||||||
this.pane = pane;
|
this.pane = pane;
|
||||||
|
@ -355,7 +353,7 @@ public class WindowBlock extends HorizontalFacingBlock {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BlockState updatedBlockState = state;
|
BlockState updatedBlockState;
|
||||||
if (!state.get(CLOSED)) {
|
if (!state.get(CLOSED)) {
|
||||||
updatedBlockState = state
|
updatedBlockState = state
|
||||||
.with(WINDOW_TYPE, window_type)
|
.with(WINDOW_TYPE, window_type)
|
||||||
|
|
|
@ -591,7 +591,7 @@ public class NSE_Blocks extends NSE_BaseRegistration {
|
||||||
public static final Block MEAT = new Block(FabricBlockSettings.create().velocityMultiplier(0.8f).sounds(NSE_Sounds.MEAT_SOUNDS).mapColor(MapColor.DARK_RED).hardness(8f));
|
public static final Block MEAT = new Block(FabricBlockSettings.create().velocityMultiplier(0.8f).sounds(NSE_Sounds.MEAT_SOUNDS).mapColor(MapColor.DARK_RED).hardness(8f));
|
||||||
public static final Block MEAT_EYE = new Block(FabricBlockSettings.copy(MEAT));
|
public static final Block MEAT_EYE = new Block(FabricBlockSettings.copy(MEAT));
|
||||||
public static final Block MEAT_TEETH = new Block(FabricBlockSettings.copy(MEAT));
|
public static final Block MEAT_TEETH = new Block(FabricBlockSettings.copy(MEAT));
|
||||||
public static final GooBlock PURPLE_GOO = new GooBlock(FabricBlockSettings.copy(MEAT).mapColor(MapColor.PURPLE).hardness(1.2f), 0.5f);
|
public static final GooBlock PURPLE_GOO = new GooBlock(FabricBlockSettings.copy(MEAT).mapColor(MapColor.PURPLE).hardness(1.2f).velocityMultiplier(0.5f));
|
||||||
|
|
||||||
public static final Block ACACIA_WINDOW = new WindowBlock(FabricBlockSettings.copy(Blocks.OAK_DOOR), false);
|
public static final Block ACACIA_WINDOW = new WindowBlock(FabricBlockSettings.copy(Blocks.OAK_DOOR), false);
|
||||||
public static final Block ACACIA_PANE_WINDOW = new WindowBlock(FabricBlockSettings.copy(NSE_Blocks.ACACIA_WINDOW), true);
|
public static final Block ACACIA_PANE_WINDOW = new WindowBlock(FabricBlockSettings.copy(NSE_Blocks.ACACIA_WINDOW), true);
|
||||||
|
|
Loading…
Reference in a new issue