Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanVonElectrum committed Jun 3, 2021
1 parent 341d4dc commit de00c25
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.command.CommandSource;
import net.minecraft.command.argument.BlockPosArgumentType;
import net.minecraft.server.command.ServerCommandSource;
import net.minecraft.text.LiteralText;
import net.minecraft.text.Text;
import net.minecraft.util.math.BlockPos;

Expand Down Expand Up @@ -50,14 +51,14 @@ private static Collection<String> getDefaultBases() {
}

private static int convert(ServerCommandSource source, int input, int base1, int base2) {
source.sendFeedback(Text.of("base" + base1 + ": " + input), false);
source.sendFeedback(Text.of("base" + base2 + ": " + Integer.toString(Integer.parseInt(input + "", base1), base2)), false);
source.sendFeedback(new LiteralText("base" + base1 + ": " + input), false);
source.sendFeedback(new LiteralText("base" + base2 + ": " + Integer.toString(Integer.parseInt(input + "", base1), base2)), false);

return 1;
}

private static int ftl(ServerCommandSource source, BlockPos position, BlockPos target) {
source.sendFeedback(Text.of("Not implemented yet!"), false);
source.sendFeedback(new LiteralText("Not implemented yet!"), false);

// BlockPos delta = target.subtract(target);
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ protected ItemFrameEntityMixin(EntityType<? extends AbstractDecorationEntity> en
public void tick() {
super.tick();
ItemFrameEntity itemFrame = (ItemFrameEntity) (Object) this;
if (removed >= JohanSettings.itemFrameDelay) {
itemFrame.setHeldItemStack(ItemStack.EMPTY);
removed = 0;
} else if (removed > 0) {
removed++;
if (JohanSettings.itemFrameDelay > 0) {
if (removed >= JohanSettings.itemFrameDelay) {
itemFrame.setHeldItemStack(ItemStack.EMPTY);
removed = 0;
} else if (removed > 0) {
removed++;
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"name": "Johan Carpet Addon",
"description": "A carpet extension made by JohanVonElectrum in 1.16.4",
"authors": [
"JohanVonElectrum",
"JohanVonElectrum"
],
"contributors": [
"FracturedCode"
],
"contact": {
Expand Down

0 comments on commit de00c25

Please sign in to comment.