mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-04 20:18:34 +01:00
Compare commits
3 commits
7a95edfcaa
...
e62fb634d1
Author | SHA1 | Date | |
---|---|---|---|
|
e62fb634d1 | ||
|
424427fd4c | ||
|
38d6404b62 |
10 changed files with 41 additions and 16 deletions
|
@ -5,6 +5,8 @@
|
||||||
* Add AIOT to the necessary tool related item tags (swords, pickaxes, axes, shovels)
|
* Add AIOT to the necessary tool related item tags (swords, pickaxes, axes, shovels)
|
||||||
* Fix the Engineer Goggles not rendering correctly
|
* Fix the Engineer Goggles not rendering correctly
|
||||||
* Added the ability for fluid collectors to collect water and lava from filled cauldrons.
|
* 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
|
# 1.3.10+mc1.21.1
|
||||||
* Fixed Fluid placer not being harvestable.
|
* Fixed Fluid placer not being harvestable.
|
||||||
|
|
|
@ -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
|
74628b34b75e1a2fa2ac1f6282b7d9d4e155c254 data/actuallyadditions/banner_pattern/book.json
|
||||||
899dfa1e0d0b15ffc090605543ec144bbfcacc4c data/actuallyadditions/banner_pattern/drill.json
|
899dfa1e0d0b15ffc090605543ec144bbfcacc4c data/actuallyadditions/banner_pattern/drill.json
|
||||||
7d9a33a9a151ad83de36e9af8822d08c86137adc data/actuallyadditions/banner_pattern/leaf_blo.json
|
7d9a33a9a151ad83de36e9af8822d08c86137adc data/actuallyadditions/banner_pattern/leaf_blo.json
|
||||||
|
@ -8,9 +8,9 @@
|
||||||
360756e7cd20afc4c6b2ad58b2fd4f37358f2ee6 data/actuallyadditions/neoforge/biome_modifier/add_canola.json
|
360756e7cd20afc4c6b2ad58b2fd4f37358f2ee6 data/actuallyadditions/neoforge/biome_modifier/add_canola.json
|
||||||
0f06d7aad676a45a4ca187552ac8c4bbd6f1b1b7 data/actuallyadditions/neoforge/biome_modifier/add_coffee.json
|
0f06d7aad676a45a4ca187552ac8c4bbd6f1b1b7 data/actuallyadditions/neoforge/biome_modifier/add_coffee.json
|
||||||
1401a66bbf2e1daaa459381103ffba9d02be352d data/actuallyadditions/neoforge/biome_modifier/add_flax.json
|
1401a66bbf2e1daaa459381103ffba9d02be352d data/actuallyadditions/neoforge/biome_modifier/add_flax.json
|
||||||
dceca4be717b43a4dfc945f62f5c09622604d7f4 data/actuallyadditions/worldgen/configured_feature/canola_patch.json
|
a9f260aa69d01d64a6332df904d1164e14990663 data/actuallyadditions/worldgen/configured_feature/canola_patch.json
|
||||||
d56ed72dde226d9ac5eb07fa701f7a3902f1dcf2 data/actuallyadditions/worldgen/configured_feature/coffee_patch.json
|
5dbbd50693c6463bf8b45997e3163fb5beb99b0a data/actuallyadditions/worldgen/configured_feature/coffee_patch.json
|
||||||
9a42d5943e40d102c5e9efee988527da3622d88d data/actuallyadditions/worldgen/configured_feature/flax_patch.json
|
7e6f0a47b395a141247d1fdfce0de2d9ef6abf36 data/actuallyadditions/worldgen/configured_feature/flax_patch.json
|
||||||
80765c24aa747df53139d14a9ac3293b4b3eab16 data/actuallyadditions/worldgen/configured_feature/ore_black_quartz.json
|
80765c24aa747df53139d14a9ac3293b4b3eab16 data/actuallyadditions/worldgen/configured_feature/ore_black_quartz.json
|
||||||
0401f9a4edd53ed76536a2c050364a6a442185bd data/actuallyadditions/worldgen/placed_feature/canola_patch.json
|
0401f9a4edd53ed76536a2c050364a6a442185bd data/actuallyadditions/worldgen/placed_feature/canola_patch.json
|
||||||
d7358c6519319ed3950dcdc34102504c53ccaf22 data/actuallyadditions/worldgen/placed_feature/coffee_patch.json
|
d7358c6519319ed3950dcdc34102504c53ccaf22 data/actuallyadditions/worldgen/placed_feature/coffee_patch.json
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
"state": {
|
"state": {
|
||||||
"Name": "actuallyadditions:canola",
|
"Name": "actuallyadditions:canola",
|
||||||
"Properties": {
|
"Properties": {
|
||||||
"age": "7"
|
"age": "7",
|
||||||
|
"persistent": "true"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
"state": {
|
"state": {
|
||||||
"Name": "actuallyadditions:coffee",
|
"Name": "actuallyadditions:coffee",
|
||||||
"Properties": {
|
"Properties": {
|
||||||
"age": "7"
|
"age": "7",
|
||||||
|
"persistent": "true"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
"state": {
|
"state": {
|
||||||
"Name": "actuallyadditions:flax",
|
"Name": "actuallyadditions:flax",
|
||||||
"Properties": {
|
"Properties": {
|
||||||
"age": "7"
|
"age": "7",
|
||||||
|
"persistent": "true"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,28 +6,50 @@ import net.minecraft.tags.BlockTags;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.level.BlockGetter;
|
import net.minecraft.world.level.BlockGetter;
|
||||||
import net.minecraft.world.level.ItemLike;
|
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.CropBlock;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
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;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
public class AACrops extends CropBlock {
|
public class AACrops extends CropBlock {
|
||||||
Supplier<? extends Item> itemSupplier;
|
Supplier<? extends Item> itemSupplier;
|
||||||
|
|
||||||
|
public static final BooleanProperty PERSISTENT = BooleanProperty.create("persistent");
|
||||||
public AACrops(Properties properties, Supplier<? extends Item> seedSupplier) {
|
public AACrops(Properties properties, Supplier<? extends Item> seedSupplier) {
|
||||||
super(properties);
|
super(properties);
|
||||||
this.itemSupplier = seedSupplier;
|
this.itemSupplier = seedSupplier;
|
||||||
|
|
||||||
|
this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0).setValue(PERSISTENT, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
protected ItemLike getBaseSeedId() {
|
protected ItemLike getBaseSeedId() {
|
||||||
return this.itemSupplier.get();
|
return this.itemSupplier.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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) {
|
if (level instanceof WorldGenRegion) {
|
||||||
return state.is(BlockTags.DIRT);
|
return state.is(BlockTags.DIRT);
|
||||||
}
|
}
|
||||||
return super.mayPlaceOn(state, level, pos);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class ActuallyConfiguredFeatures {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static RandomPatchConfiguration plantPatch(Block crop, int tries) {
|
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(
|
return FeatureUtils.simpleRandomPatchConfiguration(
|
||||||
tries, PlacementUtils.onlyWhenEmpty(Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(stateProvider))
|
tries, PlacementUtils.onlyWhenEmpty(Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(stateProvider))
|
||||||
);
|
);
|
||||||
|
|
|
@ -53,11 +53,7 @@ import net.neoforged.neoforge.items.IItemHandler;
|
||||||
import net.neoforged.neoforge.items.IItemHandlerModifiable;
|
import net.neoforged.neoforge.items.IItemHandlerModifiable;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
public class DrillItem extends ItemEnergy {
|
public class DrillItem extends ItemEnergy {
|
||||||
public static final int HARVEST_LEVEL = 4;
|
public static final int HARVEST_LEVEL = 4;
|
||||||
|
@ -70,6 +66,7 @@ public class DrillItem extends ItemEnergy {
|
||||||
public DrillItem() {
|
public DrillItem() {
|
||||||
super(ActuallyItems.defaultProps()
|
super(ActuallyItems.defaultProps()
|
||||||
.stacksTo(1)
|
.stacksTo(1)
|
||||||
|
.component(DataComponents.UNBREAKABLE, new Unbreakable(false))
|
||||||
.component(DataComponents.TOOL, Tiers.NETHERITE.createToolProperties(ActuallyTags.Blocks.MINEABLE_WITH_DRILL))
|
.component(DataComponents.TOOL, Tiers.NETHERITE.createToolProperties(ActuallyTags.Blocks.MINEABLE_WITH_DRILL))
|
||||||
, 250000, 1000);
|
, 250000, 1000);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue