mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 12:33:57 +01:00
Mildly Experienced
- Players can now sneak while using exp nuggets to only consume one item at a time - Fixed brass funnels losing their filter when changing from or to a belt/depot funnel - Minecart contraption items can no longer be placed in container items like toolboxes or shulkers (configurable) - Implement #4436, #4419
This commit is contained in:
parent
1b2ca00c44
commit
af86a7366a
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -49,6 +49,7 @@ body:
|
||||
label: Mod Version
|
||||
description: The version of the mod you were using when the bug occured
|
||||
options:
|
||||
- "0.5.0j"
|
||||
- "0.5.0i"
|
||||
- "0.5.0h"
|
||||
- "0.5.0g"
|
||||
|
@ -25,10 +25,13 @@ public class Curios {
|
||||
.get("head");
|
||||
if (stacksHandler == null)
|
||||
return false;
|
||||
if (stacksHandler.getSlots() == 0)
|
||||
int slots = stacksHandler.getSlots();
|
||||
for (int slot = 0; slot < slots; slot++)
|
||||
if (AllItems.GOGGLES.isIn(stacksHandler.getStacks()
|
||||
.getStackInSlot(slot)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return AllItems.GOGGLES.isIn(stacksHandler.getStacks()
|
||||
.getStackInSlot(0));
|
||||
})
|
||||
.orElse(false));
|
||||
|
||||
|
@ -92,7 +92,7 @@ public abstract class GeneratingKineticTileEntity extends KineticTileEntity {
|
||||
float speed = getGeneratedSpeed();
|
||||
float prevSpeed = this.speed;
|
||||
|
||||
if (level.isClientSide)
|
||||
if (level == null || level.isClientSide)
|
||||
return;
|
||||
|
||||
if (prevSpeed != speed) {
|
||||
|
@ -68,6 +68,11 @@ public class MinecartContraptionItem extends Item {
|
||||
return new MinecartContraptionItem(Type.CHEST, builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canFitInsideContainerItems() {
|
||||
return AllConfigs.SERVER.kinetics.minecartContraptionInContainers.get();
|
||||
}
|
||||
|
||||
private MinecartContraptionItem(Type minecartTypeIn, Properties builder) {
|
||||
super(builder);
|
||||
this.minecartType = minecartTypeIn;
|
||||
|
@ -35,8 +35,9 @@ public class ExperienceNuggetItem extends Item {
|
||||
return InteractionResultHolder.consume(itemInHand);
|
||||
}
|
||||
|
||||
int total = Mth.ceil(3f * itemInHand.getCount());
|
||||
int maxOrbs = 5;
|
||||
int amountUsed = pPlayer.isSteppingCarefully() ? 1 : itemInHand.getCount();
|
||||
int total = Mth.ceil(3f * amountUsed);
|
||||
int maxOrbs = amountUsed == 1 ? 1 : 5;
|
||||
int valuePer = Math.max(1, 1 + total / maxOrbs);
|
||||
|
||||
for (int i = 0; i < maxOrbs; i++) {
|
||||
@ -61,6 +62,10 @@ public class ExperienceNuggetItem extends Item {
|
||||
pLevel.addFreshEntity(xp);
|
||||
}
|
||||
|
||||
itemInHand.shrink(amountUsed);
|
||||
if (!itemInHand.isEmpty())
|
||||
return InteractionResultHolder.success(itemInHand);
|
||||
|
||||
pPlayer.setItemInHand(pUsedHand, ItemStack.EMPTY);
|
||||
return InteractionResultHolder.consume(itemInHand);
|
||||
}
|
||||
|
@ -71,6 +71,17 @@ public class BeltFunnelBlock extends AbstractHorizontalFunnelBlock implements IS
|
||||
super.createBlockStateDefinition(p_206840_1_.add(SHAPE));
|
||||
}
|
||||
|
||||
public boolean isOfSameType(FunnelBlock otherFunnel) {
|
||||
return parent.get() == otherFunnel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||
if (newState.getBlock() instanceof FunnelBlock fb && isOfSameType(fb))
|
||||
return;
|
||||
super.onRemove(state, world, pos, newState, isMoving);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, BlockGetter p_220053_2_, BlockPos p_220053_3_,
|
||||
CollisionContext p_220053_4_) {
|
||||
|
@ -64,6 +64,13 @@ public abstract class FunnelBlock extends AbstractDirectionalFunnelBlock {
|
||||
super.createBlockStateDefinition(builder.add(EXTRACTING));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||
if (newState.getBlock() instanceof BeltFunnelBlock bfb && bfb.isOfSameType(this))
|
||||
return;
|
||||
super.onRemove(state, world, pos, newState, isMoving);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) {
|
||||
super.setPlacedBy(pLevel, pPos, pState, pPlacer, pStack);
|
||||
|
@ -47,6 +47,8 @@ public class CKinetics extends ConfigBase {
|
||||
public final ConfigBool moveItemsToStorage = b(true, "moveItemsToStorage", Comments.moveItemsToStorage);
|
||||
public final ConfigBool harvestPartiallyGrown = b(false, "harvestPartiallyGrown", Comments.harvestPartiallyGrown);
|
||||
public final ConfigBool harvesterReplants = b(true, "harvesterReplants", Comments.harvesterReplants);
|
||||
public final ConfigBool minecartContraptionInContainers =
|
||||
b(false, "minecartContraptionInContainers", Comments.minecartContraptionInContainers);
|
||||
|
||||
public final CStress stressValues = nested(1, CStress::new, Comments.stress);
|
||||
|
||||
@ -117,6 +119,7 @@ public class CKinetics extends ConfigBase {
|
||||
static String spawnerMovement = "Configure how Spawner blocks can be moved by contraptions.";
|
||||
static String amethystMovement = "Configure how Budding Amethyst can be moved by contraptions.";
|
||||
static String obsidianMovement = "Configure how Obsidian blocks can be moved by contraptions.";
|
||||
static String minecartContraptionInContainers = "Whether minecart contraptions can be placed into container items.";
|
||||
}
|
||||
|
||||
public enum DeployerAggroSetting {
|
||||
|
Loading…
Reference in New Issue
Block a user