mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Playtest bugs
- Display links on 'combine item names' now read a packages' address rather than their name - Fixed goggles in curio slot not rotating correctly when riding chain conveyors - Fixed incorrect yaw of package visuals - Fixed entity name display source not working for players on signs - Fixed price tag not working when table cloth is not on a full block - Redstone Requesters no longer have wooden material properties
This commit is contained in:
parent
77c8dfa6d2
commit
9ab45928eb
9 changed files with 420 additions and 435 deletions
File diff suppressed because it is too large
Load diff
|
@ -107,7 +107,6 @@
|
|||
"create:red_postbox",
|
||||
"create:black_postbox",
|
||||
"create:stock_ticker",
|
||||
"create:redstone_requester",
|
||||
"create:display_link",
|
||||
"create:redstone_link",
|
||||
"create:analog_lever",
|
||||
|
|
|
@ -1943,9 +1943,9 @@ public class AllBlocks {
|
|||
public static final BlockEntry<RedstoneRequesterBlock> REDSTONE_REQUESTER =
|
||||
REGISTRATE.block("redstone_requester", RedstoneRequesterBlock::new)
|
||||
.initialProperties(SharedProperties::stone)
|
||||
.properties(p -> p.sound(SoundType.WOOD))
|
||||
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
|
||||
.properties(p -> p.noOcclusion())
|
||||
.transform(axeOrPickaxe())
|
||||
.transform(pickaxeOnly())
|
||||
.blockstate((c, p) -> BlockStateGen.horizontalAxisBlock(c, p, AssetLookup.forPowered(c, p)))
|
||||
.item(RedstoneRequesterBlockItem::new)
|
||||
.transform(customItemModel("_", "block"))
|
||||
|
|
|
@ -45,6 +45,7 @@ public class GogglesCurioRenderer implements ICurioRenderer {
|
|||
// Translate and rotate with our head
|
||||
matrixStack.pushPose();
|
||||
matrixStack.translate(model.head.x / 16.0, model.head.y / 16.0, model.head.z / 16.0);
|
||||
matrixStack.mulPose(Axis.ZP.rotation(model.head.zRot));
|
||||
matrixStack.mulPose(Axis.YP.rotation(model.head.yRot));
|
||||
matrixStack.mulPose(Axis.XP.rotation(model.head.xRot));
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ public class PackageVisual extends AbstractEntityVisual<PackageEntity> implement
|
|||
|
||||
instance.setIdentityTransform()
|
||||
.translate(x - 0.5 + xNudge, y + yNudge, z - 0.5 + zNudge)
|
||||
.rotateYCenteredDegrees(yaw)
|
||||
.rotateYCenteredDegrees(-yaw - 90)
|
||||
.light(computePackedLight(partialTick))
|
||||
.setChanged();
|
||||
}
|
||||
|
|
|
@ -104,8 +104,6 @@ public class TableClothBlockEntity extends SmartBlockEntity {
|
|||
public InteractionResult use(Player player, BlockHitResult ray) {
|
||||
if (isShop())
|
||||
return useShop(player);
|
||||
if (level.isClientSide())
|
||||
return InteractionResult.SUCCESS;
|
||||
|
||||
ItemStack heldItem = player.getItemInHand(InteractionHand.MAIN_HAND);
|
||||
|
||||
|
@ -149,7 +147,6 @@ public class TableClothBlockEntity extends SmartBlockEntity {
|
|||
ItemStack itemInHand = player.getItemInHand(InteractionHand.MAIN_HAND);
|
||||
ItemStack prevListItem = ItemStack.EMPTY;
|
||||
boolean addOntoList = false;
|
||||
boolean clientSide = level.isClientSide();
|
||||
|
||||
// Remove other lists from inventory
|
||||
for (int i = 0; i < 9; i++) {
|
||||
|
@ -159,9 +156,8 @@ public class TableClothBlockEntity extends SmartBlockEntity {
|
|||
continue;
|
||||
prevListItem = item;
|
||||
addOntoList = true;
|
||||
if (!clientSide)
|
||||
player.getInventory()
|
||||
.setItem(i, ItemStack.EMPTY);
|
||||
player.getInventory()
|
||||
.setItem(i, ItemStack.EMPTY);
|
||||
}
|
||||
|
||||
// add onto existing list if in hand
|
||||
|
@ -171,20 +167,16 @@ public class TableClothBlockEntity extends SmartBlockEntity {
|
|||
}
|
||||
|
||||
if (!itemInHand.isEmpty() && !addOntoList) {
|
||||
if (clientSide) {
|
||||
CreateLang.translate("stock_keeper.shopping_list_empty_hand")
|
||||
.sendStatus(player);
|
||||
AllSoundEvents.DENY.playAt(level, worldPosition, 1, 1, false);
|
||||
}
|
||||
CreateLang.translate("stock_keeper.shopping_list_empty_hand")
|
||||
.sendStatus(player);
|
||||
AllSoundEvents.DENY.playOnServer(level, worldPosition, 0.5f, 1);
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
if (getPaymentItem().isEmpty()) {
|
||||
if (clientSide) {
|
||||
CreateLang.translate("stock_keeper.no_price_set")
|
||||
.sendStatus(player);
|
||||
AllSoundEvents.DENY.playAt(level, worldPosition, 1, 1, false);
|
||||
}
|
||||
CreateLang.translate("stock_keeper.no_price_set")
|
||||
.sendStatus(player);
|
||||
AllSoundEvents.DENY.playOnServer(level, worldPosition, 0.5f, 1);
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -196,30 +188,25 @@ public class TableClothBlockEntity extends SmartBlockEntity {
|
|||
int stockLevel = getStockLevelForTrade(ShoppingListItem.getList(prevListItem));
|
||||
|
||||
if (tickerID == null) {
|
||||
if (clientSide) {
|
||||
CreateLang.translate("stock_keeper.keeper_missing")
|
||||
.style(ChatFormatting.RED)
|
||||
.sendStatus(player);
|
||||
AllSoundEvents.DENY.playAt(level, worldPosition, 1, 1, false);
|
||||
}
|
||||
CreateLang.translate("stock_keeper.keeper_missing")
|
||||
.style(ChatFormatting.RED)
|
||||
.sendStatus(player);
|
||||
AllSoundEvents.DENY.playOnServer(level, worldPosition, 0.5f, 1);
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
if (stockLevel == 0) {
|
||||
if (clientSide) {
|
||||
CreateLang.translate("stock_keeper.out_of_stock")
|
||||
.style(ChatFormatting.RED)
|
||||
.sendStatus(player);
|
||||
AllSoundEvents.DENY.playAt(level, worldPosition, 1, 1, false);
|
||||
} else {
|
||||
if (!prevListItem.isEmpty()) {
|
||||
if (player.getItemInHand(InteractionHand.MAIN_HAND)
|
||||
.isEmpty())
|
||||
player.setItemInHand(InteractionHand.MAIN_HAND, prevListItem);
|
||||
else
|
||||
player.getInventory()
|
||||
.placeItemBackInInventory(prevListItem);
|
||||
}
|
||||
CreateLang.translate("stock_keeper.out_of_stock")
|
||||
.style(ChatFormatting.RED)
|
||||
.sendStatus(player);
|
||||
AllSoundEvents.DENY.playOnServer(level, worldPosition, 0.5f, 1);
|
||||
if (!prevListItem.isEmpty()) {
|
||||
if (player.getItemInHand(InteractionHand.MAIN_HAND)
|
||||
.isEmpty())
|
||||
player.setItemInHand(InteractionHand.MAIN_HAND, prevListItem);
|
||||
else
|
||||
player.getInventory()
|
||||
.placeItemBackInInventory(prevListItem);
|
||||
}
|
||||
|
||||
return InteractionResult.SUCCESS;
|
||||
|
@ -240,17 +227,12 @@ public class TableClothBlockEntity extends SmartBlockEntity {
|
|||
if (worldPosition.equals(entry.getValue()))
|
||||
entry.setFirst(Math.min(stockLevel, entry.getFirst()));
|
||||
|
||||
if (clientSide)
|
||||
CreateLang.translate("stock_keeper.limited_stock")
|
||||
.style(ChatFormatting.RED)
|
||||
.sendStatus(player);
|
||||
CreateLang.translate("stock_keeper.limited_stock")
|
||||
.style(ChatFormatting.RED)
|
||||
.sendStatus(player);
|
||||
|
||||
} else {
|
||||
if (clientSide) {
|
||||
AllSoundEvents.CONFIRM_2.playAt(level, worldPosition, 0.5f, 1, false);
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
AllSoundEvents.CONFIRM_2.playOnServer(level, worldPosition, 0.5f, 1.0f);
|
||||
list.addPurchases(worldPosition, 1);
|
||||
if (!addOntoList)
|
||||
CreateLang.translate("stock_keeper.use_list_to_add_purchases")
|
||||
|
@ -260,9 +242,6 @@ public class TableClothBlockEntity extends SmartBlockEntity {
|
|||
level.playSound(null, worldPosition, SoundEvents.BOOK_PAGE_TURN, SoundSource.BLOCKS, 1, 1.5f);
|
||||
}
|
||||
|
||||
if (clientSide)
|
||||
return InteractionResult.SUCCESS;
|
||||
|
||||
ItemStack newListItem =
|
||||
ShoppingListItem.saveList(AllItems.SHOPPING_LIST.asStack(), list, requestData.encodedTargetAdress);
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.simibubi.create.content.contraptions.actors.seat.SeatEntity;
|
|||
import com.simibubi.create.content.redstone.displayLink.DisplayLinkContext;
|
||||
import com.simibubi.create.content.redstone.displayLink.target.DisplayTargetStats;
|
||||
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
|
@ -24,7 +25,7 @@ public class EntityNameDisplaySource extends SingleLineDisplaySource {
|
|||
if (passengers.isEmpty())
|
||||
return EMPTY_LINE;
|
||||
|
||||
return passengers.get(0).getDisplayName().copy();
|
||||
return Component.literal(passengers.get(0).getDisplayName().getString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -4,6 +4,7 @@ import org.apache.commons.lang3.mutable.MutableObject;
|
|||
|
||||
import com.simibubi.create.content.kinetics.belt.behaviour.TransportedItemStackHandlerBehaviour;
|
||||
import com.simibubi.create.content.kinetics.belt.behaviour.TransportedItemStackHandlerBehaviour.TransportedResult;
|
||||
import com.simibubi.create.content.logistics.box.PackageItem;
|
||||
import com.simibubi.create.content.redstone.displayLink.DisplayLinkBlockEntity;
|
||||
import com.simibubi.create.content.redstone.displayLink.DisplayLinkContext;
|
||||
import com.simibubi.create.content.redstone.displayLink.target.DisplayTargetStats;
|
||||
|
@ -11,6 +12,7 @@ import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
|
|||
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
|
@ -40,8 +42,12 @@ public class ItemNameDisplaySource extends SingleLineDisplaySource {
|
|||
});
|
||||
|
||||
ItemStack stack = stackHolder.getValue();
|
||||
if (stack != null && !stack.isEmpty())
|
||||
combined = combined.append(stack.getHoverName());
|
||||
if (stack != null && !stack.isEmpty()) {
|
||||
Component hoverName = stack.getHoverName();
|
||||
if (PackageItem.isPackage(stack))
|
||||
hoverName = Component.literal(PackageItem.getAddress(stack));
|
||||
combined = combined.append(hoverName);
|
||||
}
|
||||
}
|
||||
|
||||
return combined;
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.simibubi.create.AllTags.AllItemTags;
|
|||
import com.simibubi.create.CreateClient;
|
||||
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.filtering.SidedFilteringBehaviour;
|
||||
import com.simibubi.create.foundation.utility.RaycastHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
|
@ -53,7 +52,7 @@ public class ValueSettingsInputHandler {
|
|||
if (!valueSettingsBehaviour.mayInteract(player))
|
||||
continue;
|
||||
|
||||
BlockHitResult ray = RaycastHelper.rayTraceRange(world, player, 10);
|
||||
BlockHitResult ray = event.getHitVec();
|
||||
if (ray == null)
|
||||
return;
|
||||
if (behaviour instanceof SidedFilteringBehaviour) {
|
||||
|
|
Loading…
Add table
Reference in a new issue