Compare commits

...

4 commits

Author SHA1 Message Date
スティーブ
ac4bced09b
Merge c44720f8be into e62fb634d1 2024-11-29 19:28:10 +09:00
Flanks255
e62fb634d1 CHANGELOG.md 2024-11-28 17:31:56 -06:00
Flanks255
424427fd4c Explicitly made the Drill unbreakable. 2024-11-28 17:30:55 -06:00
Flanks255
38d6404b62 Fixed worldgenned plants popping off when blockupdated. 2024-11-28 17:08:33 -06:00
10 changed files with 41 additions and 16 deletions

View file

@ -5,6 +5,8 @@
* Add AIOT to the necessary tool related item tags (swords, pickaxes, axes, shovels)
* Fix the Engineer Goggles not rendering correctly
* Added the ability for fluid collectors to collect water and lava from filled cauldrons.
* Explicitly made the Drills unbreakable.
* Fixed worldgenned AA plants breaking on block update.
# 1.3.10+mc1.21.1
* Fixed Fluid placer not being harvestable.

View file

@ -1,4 +1,4 @@
// 1.21.1 2024-10-22T22:13:28.2925645 Registries
// 1.21.1 2024-11-28T16:44:16.4483104 Registries
74628b34b75e1a2fa2ac1f6282b7d9d4e155c254 data/actuallyadditions/banner_pattern/book.json
899dfa1e0d0b15ffc090605543ec144bbfcacc4c data/actuallyadditions/banner_pattern/drill.json
7d9a33a9a151ad83de36e9af8822d08c86137adc data/actuallyadditions/banner_pattern/leaf_blo.json
@ -8,9 +8,9 @@
360756e7cd20afc4c6b2ad58b2fd4f37358f2ee6 data/actuallyadditions/neoforge/biome_modifier/add_canola.json
0f06d7aad676a45a4ca187552ac8c4bbd6f1b1b7 data/actuallyadditions/neoforge/biome_modifier/add_coffee.json
1401a66bbf2e1daaa459381103ffba9d02be352d data/actuallyadditions/neoforge/biome_modifier/add_flax.json
dceca4be717b43a4dfc945f62f5c09622604d7f4 data/actuallyadditions/worldgen/configured_feature/canola_patch.json
d56ed72dde226d9ac5eb07fa701f7a3902f1dcf2 data/actuallyadditions/worldgen/configured_feature/coffee_patch.json
9a42d5943e40d102c5e9efee988527da3622d88d data/actuallyadditions/worldgen/configured_feature/flax_patch.json
a9f260aa69d01d64a6332df904d1164e14990663 data/actuallyadditions/worldgen/configured_feature/canola_patch.json
5dbbd50693c6463bf8b45997e3163fb5beb99b0a data/actuallyadditions/worldgen/configured_feature/coffee_patch.json
7e6f0a47b395a141247d1fdfce0de2d9ef6abf36 data/actuallyadditions/worldgen/configured_feature/flax_patch.json
80765c24aa747df53139d14a9ac3293b4b3eab16 data/actuallyadditions/worldgen/configured_feature/ore_black_quartz.json
0401f9a4edd53ed76536a2c050364a6a442185bd data/actuallyadditions/worldgen/placed_feature/canola_patch.json
d7358c6519319ed3950dcdc34102504c53ccaf22 data/actuallyadditions/worldgen/placed_feature/coffee_patch.json

View file

@ -1 +1,2 @@
// 1.21.1 2024-10-22T20:41:07.9123026 Update structure files in /structure/
// 1.21.1 2024-11-28T16:44:16.4503165 Update structure files in /structure/
be1261b16ca6da9123934a123abb191d64ed46b8 data/actuallyadditions/structure/andrew_period_house.nbt

View file

@ -10,7 +10,8 @@
"state": {
"Name": "actuallyadditions:canola",
"Properties": {
"age": "7"
"age": "7",
"persistent": "true"
}
}
}

View file

@ -10,7 +10,8 @@
"state": {
"Name": "actuallyadditions:coffee",
"Properties": {
"age": "7"
"age": "7",
"persistent": "true"
}
}
}

View file

@ -10,7 +10,8 @@
"state": {
"Name": "actuallyadditions:flax",
"Properties": {
"age": "7"
"age": "7",
"persistent": "true"
}
}
}

View file

@ -6,28 +6,50 @@ import net.minecraft.tags.BlockTags;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.ItemLike;
import net.minecraft.world.level.LevelReader;
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.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import javax.annotation.Nonnull;
import java.util.function.Supplier;
public class AACrops extends CropBlock {
Supplier<? extends Item> itemSupplier;
public static final BooleanProperty PERSISTENT = BooleanProperty.create("persistent");
public AACrops(Properties properties, Supplier<? extends Item> seedSupplier) {
super(properties);
this.itemSupplier = seedSupplier;
this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0).setValue(PERSISTENT, false));
}
@Nonnull
@Override
protected ItemLike getBaseSeedId() {
return this.itemSupplier.get();
}
@Override
protected boolean mayPlaceOn(BlockState state, BlockGetter level, BlockPos pos) {
protected boolean mayPlaceOn(@Nonnull BlockState state, @Nonnull BlockGetter level, @Nonnull BlockPos pos) {
if (level instanceof WorldGenRegion) {
return state.is(BlockTags.DIRT);
}
return super.mayPlaceOn(state, level, pos);
}
@Override
protected boolean canSurvive(@Nonnull BlockState state, @Nonnull LevelReader level, @Nonnull BlockPos pos) {
if (!(level instanceof WorldGenRegion) && state.getValue(PERSISTENT) && !level.getBlockState(pos.below()).isAir())
return true;
return super.canSurvive(state, level, pos);
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
builder.add(AGE, PERSISTENT);
}
}

View file

@ -41,7 +41,7 @@ public class ActuallyConfiguredFeatures {
}
private static RandomPatchConfiguration plantPatch(Block crop, int tries) {
BlockStateProvider stateProvider = BlockStateProvider.simple(crop.defaultBlockState().setValue(AACrops.AGE, AACrops.MAX_AGE));
BlockStateProvider stateProvider = BlockStateProvider.simple(crop.defaultBlockState().setValue(AACrops.AGE, AACrops.MAX_AGE).setValue(AACrops.PERSISTENT, true));
return FeatureUtils.simpleRandomPatchConfiguration(
tries, PlacementUtils.onlyWhenEmpty(Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(stateProvider))
);

View file

@ -53,11 +53,7 @@ import net.neoforged.neoforge.items.IItemHandler;
import net.neoforged.neoforge.items.IItemHandlerModifiable;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import java.util.*;
public class DrillItem extends ItemEnergy {
public static final int HARVEST_LEVEL = 4;
@ -70,6 +66,7 @@ public class DrillItem extends ItemEnergy {
public DrillItem() {
super(ActuallyItems.defaultProps()
.stacksTo(1)
.component(DataComponents.UNBREAKABLE, new Unbreakable(false))
.component(DataComponents.TOOL, Tiers.NETHERITE.createToolProperties(ActuallyTags.Blocks.MINEABLE_WITH_DRILL))
, 250000, 1000);