Okay fine I'll stop quoting Heaven Sent
This commit is contained in:
parent
48d214a0ee
commit
d23f20c0f8
18 changed files with 64 additions and 39 deletions
|
@ -1,11 +1,24 @@
|
|||
package su.a71.tardim_ic.tardim_ic;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class Constants {
|
||||
|
||||
public static final String MOD_ID = "tardim_ic";
|
||||
public static final String MOD_NAME = "TARDIM: In Control";
|
||||
public static final Logger LOG = LoggerFactory.getLogger(MOD_NAME);
|
||||
public static final String MOD_ID;
|
||||
public static final String MOD_NAME;
|
||||
public static final Logger LOG;
|
||||
public static final Gson GSON;
|
||||
|
||||
static {
|
||||
MOD_ID = "tardim_ic";
|
||||
MOD_NAME = "TARDIM: In Control";
|
||||
LOG = LoggerFactory.getLogger(MOD_NAME);
|
||||
GSON = (new GsonBuilder()).setPrettyPrinting().create();
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 437 B |
Binary file not shown.
After Width: | Height: | Size: 437 B |
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "tardim_ic:item/location_jammer"
|
||||
"layer0": "tardim_ic:item/personal_jammer"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
--[[
|
||||
This is source code of my personal TARDIM Navigation Dashboard (NavDash)
|
||||
]
|
|
@ -16,7 +16,7 @@ import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
|||
|
||||
import su.a71.tardim_ic.tardim_ic.blocks.food_machine.FoodMachineBlock;
|
||||
import su.a71.tardim_ic.tardim_ic.blocks.food_machine.FoodMachineTileEntity;
|
||||
import su.a71.tardim_ic.tardim_ic.jammer.LocationJammerMaterial;
|
||||
import su.a71.tardim_ic.tardim_ic.jammer.PersonalJammerMaterial;
|
||||
import su.a71.tardim_ic.tardim_ic.blocks.redstone_input.RedstoneInputBlock;
|
||||
import su.a71.tardim_ic.tardim_ic.blocks.redstone_input.RedstoneInputTileEntity;
|
||||
import su.a71.tardim_ic.tardim_ic.registration.CommandInit;
|
||||
|
@ -51,12 +51,12 @@ public class Registration {
|
|||
public static final ResourceLocation CLOISTER_SOUND = new ResourceLocation("tardim_ic:cloister");
|
||||
public static SoundEvent CLOISTER_SOUND_EVENT = new SoundEvent(CLOISTER_SOUND);
|
||||
|
||||
public static final ArmorMaterial LOCATION_JAMMER_MATERIAL = new LocationJammerMaterial();
|
||||
public static final Item LOCATION_JAMMER = new ArmorItem(LOCATION_JAMMER_MATERIAL, EquipmentSlot.CHEST, new Item.Properties().tab(TARDIM_IC_TAB));
|
||||
public static final ArmorMaterial PERSONAL_JAMMER_MATERIAL = new PersonalJammerMaterial();
|
||||
public static final Item PERSONAL_JAMMER = new ArmorItem(PERSONAL_JAMMER_MATERIAL, EquipmentSlot.CHEST, new Item.Properties().tab(TARDIM_IC_TAB));
|
||||
|
||||
// Register our stuff
|
||||
public static void register() {
|
||||
Registry.register(Registry.ITEM, new ResourceLocation(Constants.MOD_ID, "location_jammer"), LOCATION_JAMMER);
|
||||
Registry.register(Registry.ITEM, new ResourceLocation(Constants.MOD_ID, "personal_jammer"), PERSONAL_JAMMER);
|
||||
|
||||
if (FabricLoader.getInstance().isModLoaded("computercraft")) {
|
||||
ComputerCraftCompat.register(); // Register ComputerCraft-related features
|
||||
|
|
|
@ -2,6 +2,8 @@ package su.a71.tardim_ic.tardim_ic.blocks.food_machine;
|
|||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
@ -10,11 +12,11 @@ import su.a71.tardim_ic.tardim_ic.Registration;
|
|||
import java.util.UUID;
|
||||
|
||||
public class FoodMachineTileEntity extends BlockEntity {
|
||||
public boolean isPowered = false;
|
||||
public UUID lastPlayer = null;
|
||||
public int curr_food_index;
|
||||
|
||||
public FoodMachineTileEntity(BlockPos pos, BlockState state) {
|
||||
super(Registration.REDSTONE_TARDIM_INPUT_TILEENTITY, pos, state);
|
||||
super(Registration.FOOD_MACHINE_TILEENTITY, pos, state);
|
||||
this.curr_food_index = 0;
|
||||
}
|
||||
|
||||
public BlockPos getPos() {
|
||||
|
@ -24,17 +26,16 @@ public class FoodMachineTileEntity extends BlockEntity {
|
|||
|
||||
@Override
|
||||
public void saveAdditional(CompoundTag tag) {
|
||||
tag.putBoolean("is_powered", isPowered);
|
||||
if (lastPlayer != null) {
|
||||
tag.putUUID("last_player", lastPlayer);
|
||||
}
|
||||
tag.putInt("curr_food_index", curr_food_index);
|
||||
//tag.putBoolean("is_powered", isPowered);
|
||||
super.saveAdditional(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load(CompoundTag tag) {
|
||||
super.load(tag);
|
||||
isPowered = tag.getBoolean("is_powered");
|
||||
lastPlayer = tag.getUUID("last_player");
|
||||
curr_food_index = tag.getInt("curr_food_index");
|
||||
//lastPlayer = tag.getUUID("last_player");
|
||||
//event.addListener(new FuelMapReloadListener(GSON, "tardim_fuel"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ import net.minecraft.world.phys.Vec3;
|
|||
import su.a71.tardim_ic.tardim_ic.Registration;
|
||||
import su.a71.tardim_ic.tardim_ic.computercraft_compat.FakeTardimPeripheralTileEntity;
|
||||
import su.a71.tardim_ic.tardim_ic.utils.FakePlayer;
|
||||
import static su.a71.tardim_ic.tardim_ic.Registration.LOCATION_JAMMER;
|
||||
import static su.a71.tardim_ic.tardim_ic.Registration.PERSONAL_JAMMER;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.*;
|
||||
|
@ -326,7 +326,7 @@ public class DigitalInterfacePeripheral extends TardimPeripheral implements IPer
|
|||
}
|
||||
|
||||
for (ItemStack armour : player.getArmorSlots()) {
|
||||
if (armour.is(LOCATION_JAMMER)) {
|
||||
if (armour.is(PERSONAL_JAMMER)) {
|
||||
throw new LuaException("Player location jammed");
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.world.item.Items;
|
|||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class LocationJammerMaterial implements ArmorMaterial {
|
||||
public class PersonalJammerMaterial implements ArmorMaterial {
|
||||
private static final int[] BASE_DURABILITY = new int[] {13, 15, 16, 11};
|
||||
private static final int[] PROTECTION_VALUES = new int[] {1, 1, 1, 1};
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class LocationJammerMaterial implements ArmorMaterial {
|
|||
@Override
|
||||
public @NotNull String getName() {
|
||||
// Must be all lowercase
|
||||
return "location jammer";
|
||||
return "personal_jammer";
|
||||
}
|
||||
|
||||
@Override
|
|
@ -18,7 +18,7 @@ import su.a71.tardim_ic.tardim_ic.registration.CommandInit;
|
|||
|
||||
import static com.swdteam.tardim.common.command.tardim.CommandTardimBase.sendResponse;
|
||||
import static su.a71.tardim_ic.tardim_ic.Constants.LOG;
|
||||
import static su.a71.tardim_ic.tardim_ic.Registration.LOCATION_JAMMER;
|
||||
import static su.a71.tardim_ic.tardim_ic.Registration.PERSONAL_JAMMER;
|
||||
|
||||
@Mixin(value = CommandLocate.class, remap = false)
|
||||
public class JammerMixin {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"version": "${version}",
|
||||
|
||||
"name": "Tardim: In Control",
|
||||
"description": "All of time and space, now automated. Control your TARDIM using ComputerCraft: Tweaked.",
|
||||
"description": "All of time and space, now automated and improved. This mod aims to make TARDIM even better.",
|
||||
"authors": [
|
||||
"Andrew_7_1"
|
||||
],
|
||||
|
|
|
@ -5,12 +5,12 @@ license = "MIT"
|
|||
[[mods]] #mandatory
|
||||
# The modid of the mod
|
||||
modId = "tardim_ic" #mandatory
|
||||
version = "1.1" #mandatory
|
||||
version = "1.2" #mandatory
|
||||
# A display name for the mod
|
||||
displayName = "TARDIM: In Control" #mandatory
|
||||
# The description text for the mod (multi line!) (#mandatory)
|
||||
description = '''
|
||||
All of time and space, now automated. Control your TARDIM using ComputerCraft: Tweaked.
|
||||
All of time and space, now automated and improved. This mod aims to make TARDIM even better.
|
||||
'''
|
||||
logoFile = "icon.png"
|
||||
authors = "Andrew_7_1"
|
||||
|
|
26
README.md
26
README.md
|
@ -1,11 +1,12 @@
|
|||
# TARDIM: In Control 
|
||||
### All of time and space, *now automated*.
|
||||

|
||||
### All of time and space, *now automated and improved*.
|
||||
|
||||

|
||||
|
||||
This mod is an addon for the [TARDIM mod](https://www.curseforge.com/minecraft/mc-mods/tardim), and adds a way to control your time (but mostly space) machine with [ComputerCraft: Tweaked](https://tweaked.cc) computers and redstone using new blocks and peripherals.
|
||||
This mod is an addon for the [TARDIM mod](https://www.curseforge.com/minecraft/mc-mods/tardim),
|
||||
and adds a way to control your time (but mostly space) machine with new blocks, redstone,
|
||||
and even other mods like [ComputerCraft: Tweaked](https://tweaked.cc) computers or [Create](https://github.com/Creators-of-Create/Create)
|
||||
|
||||
### Features:
|
||||
TODO: Re-make this for 1.2
|
||||
* Digital TARDIM interface: ComputerCraft peripheral that lets you control a TARDIM using computers! Full list of methods is available in the [Javadoc](http://andrey71.me/TARDIM-ic-docs/su/a71/tardim_ic/tardim_ic/DigitalInterfacePeripheral.html) (Sorry for that, this is the best auto-generated docs I could find for now). The peripheral supports almost all commands that the TARDIM computer panel has.
|
||||
* Redstone TARDIM Input: New block that lets you execute a TARDIM command with the power of redstone! After saving a command, this block executes it every time it gets powered by redstone
|
||||
* *This is just the beginning, there are more features to come!*
|
||||
|
@ -15,7 +16,7 @@ This mod is an addon for the [TARDIM mod](https://www.curseforge.com/minecraft/m
|
|||
* Get refined control over your TARDIM, such as saving and loading locations, or setting a destination in a GUI.
|
||||
* Add visual effects that activate during flight e.g. note blocks or Create mod contraptions.
|
||||
|
||||
The possibilities are endless, the only limit is your imagination! (And coding skills)
|
||||
The possibilities are endless, the only limit is your imagination!
|
||||
|
||||
### Note
|
||||
Due to nature of the mod **anyone** inside your TARDIM with access to a computer and this mod's peripheral
|
||||
|
@ -31,13 +32,14 @@ And another thing: the method that sets destination dimension can't check if the
|
|||
**Can I use this in my modpack?**
|
||||
: Sure, as long as you don't claim the mod as your own. A link to this mod's page would be appreciated too.
|
||||
|
||||
**Will there be a 1.19.3 version and beyond?**
|
||||
: Right now my focus on 1.19.2, but I will try my best to update to later versions as soon as this mod is fully stable.
|
||||
**Will there be a 1.20 version and beyond?**
|
||||
: Right now my focus on 1.19.2, but I will try my best to move to later versions as soon as this mod is fully stable,
|
||||
and dependencies are out.
|
||||
|
||||
**I encountered a bug or have a suggestion. What do I do?**
|
||||
: If you have a problem or suggestion, the best way to get them to me is through the project's Discord server.
|
||||
|
||||
**I don't know ComputerCraft, will this always be a CC-only mod?**
|
||||
: Ok fine, nobody actually asked that. But in case you did, good news: No! The mod already adds things like Redstone TARDIM Input,
|
||||
which let you integrate your TARDIM into good old redstone. Going forward,
|
||||
I plan to add even more ways to control the TARDIM without computers for those who don't want to code their own implementation.
|
||||
**Do I need to install ComputerCraft or Create for this mod?**
|
||||
: Nope! While I highly suggest you do (because digital interface is in my opinion the star of the show),
|
||||
you can enjoy a lot of TARDIM: In Control's features with only TARDIM installed.
|
||||
If you ever decide to add other optional dependencies, the relevant blocks will become available!
|
6
TODO.txt
6
TODO.txt
|
@ -49,3 +49,9 @@ Achievements/Advancements:
|
|||
Crafting recipe for floppy with tardim tutorial installer
|
||||
|
||||
Power indicator for redstone interface
|
||||
|
||||
Treasure Disk with pre-installed code that users might enjoy
|
||||
|
||||
Datapack-driven way to control where a TARDIM can travel and at what price (For instance, for liftoff)
|
||||
|
||||
Possibly an enchantment that works same as personal jammer
|
|
@ -1,5 +1,5 @@
|
|||
# Project
|
||||
version=1.1
|
||||
version=1.2
|
||||
group=su.a71.tardim_ic
|
||||
|
||||
# Common
|
||||
|
|
BIN
media/banner.png
Normal file
BIN
media/banner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 465 KiB |
BIN
media/banner_narrow.png
Normal file
BIN
media/banner_narrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 421 KiB |
BIN
media/icon.png
Normal file
BIN
media/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
Loading…
Add table
Reference in a new issue