11th hour over now
This commit is contained in:
parent
fd68656000
commit
6d6de9f71a
9 changed files with 69 additions and 10 deletions
12
build.gradle
12
build.gradle
|
@ -10,9 +10,9 @@ buildscript {
|
|||
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
|
||||
group = 'su.a71.tardim_ic'
|
||||
version = '0.5'
|
||||
archivesBaseName = 'tardim_ic'
|
||||
group = project.group
|
||||
version = project.version
|
||||
archivesBaseName = project.archivesBaseName
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
|
||||
|
@ -82,6 +82,8 @@ sourceSets.main.resources { srcDir 'src/generated/resources' }
|
|||
|
||||
repositories {
|
||||
maven { url 'https://squiddev.cc/maven/' }
|
||||
|
||||
maven { url "https://cursemaven.com"}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -90,9 +92,7 @@ dependencies {
|
|||
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
|
||||
minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"
|
||||
|
||||
|
||||
implementation files("/home/andrew71/.local/share/multimc/instances/TardimInControl/.minecraft/mods/tardim-1.1.5.jar")
|
||||
|
||||
implementation fg.deobf("curse.maven:tardim-531315:3983700")
|
||||
implementation fg.deobf("org.squiddev:cc-tweaked-1.19.1:${cc_version}")
|
||||
|
||||
}
|
||||
|
|
|
@ -4,3 +4,7 @@ org.gradle.daemon=false
|
|||
cc_version=1.100.9
|
||||
mc_version=1.19.2
|
||||
forge_version=43.1.3
|
||||
|
||||
group = 'su.a71.tardim_ic'
|
||||
version = '0.6'
|
||||
archivesBaseName = 'tardim_ic'
|
|
@ -385,6 +385,20 @@ public class DigitalInterfacePeripheral implements IPeripheral {
|
|||
setTravelLocation(pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get online players. Useful for making a GUI for the locate function or just a nice dashboard.
|
||||
* @return ObjectLuaTable of the online players
|
||||
*/
|
||||
@LuaFunction(mainThread = true)
|
||||
public final ObjectLuaTable getOnlinePlayers() throws LuaException {
|
||||
PlayerList playerList = ServerLifecycleHooks.getCurrentServer().getPlayerList();
|
||||
ObjectLuaTable players = new ObjectLuaTable(Map.of());
|
||||
for (int i = 0; i < playerList.getPlayers().size(); i++) {
|
||||
players.put(i + 1, playerList.getPlayers().get(i).getGameProfile().getName());
|
||||
}
|
||||
return players;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the rotation of the TARDIM's door
|
||||
* @return String of the door rotation ("north", "south", "east", "west")
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.google.common.collect.Sets;
|
|||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
|
@ -20,12 +21,19 @@ public class Registration {
|
|||
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, TardimInControl.MODID);
|
||||
public static final DeferredRegister<BlockEntityType<?>> BLOCK_ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, TardimInControl.MODID);
|
||||
|
||||
public static final CreativeModeTab TARDIM_IC_TAB = new CreativeModeTab("tardim_ic") {
|
||||
@Override
|
||||
public ItemStack makeIcon() {
|
||||
return new ItemStack(Registration.DIGITAL_TARDIM_INTERFACE.get());
|
||||
}
|
||||
};
|
||||
|
||||
// Blocks
|
||||
public static final RegistryObject<Block> DIGITAL_TARDIM_INTERFACE = register("digital_tardim_interface", DigitalInterfaceBlock::new);
|
||||
|
||||
private static <T extends Block> RegistryObject<T> register(String name, Supplier<T> block) {
|
||||
RegistryObject<T> registryObject = BLOCKS.register(name, block);
|
||||
ITEMS.register(name, () -> new BlockItem(registryObject.get(), new Item.Properties().tab(CreativeModeTab.TAB_REDSTONE)));
|
||||
ITEMS.register(name, () -> new BlockItem(registryObject.get(), new Item.Properties().tab(TARDIM_IC_TAB)));
|
||||
return registryObject;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{
|
||||
"block.tardim_ic.digital_tardim_interface": "Digital TARDIM Interface"
|
||||
"block.tardim_ic.digital_tardim_interface": "Digital TARDIM Interface",
|
||||
"itemGroup.tardim_ic": "TARDIM: In Control"
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
{
|
||||
"block.tardim_ic.digital_tardim_interface": "Digital TARDIM Interface"
|
||||
"block.tardim_ic.digital_tardim_interface": "Digital TARDIM Interface",
|
||||
"itemGroup.tardim_ic": "TARDIM: In Control"
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
{
|
||||
"block.tardim_ic.digital_tardim_interface": "Циферный Интерфейсъ Хронобудки"
|
||||
"block.tardim_ic.digital_tardim_interface": "Циферный Интерфейсъ Хронобудки",
|
||||
"itemGroup.tardim_ic": "ТАРДИМЪ: Подъ Контрольемъ"
|
||||
}
|
4
src/main/resources/assets/tardim_ic/lang/ru_ru.json
Normal file
4
src/main/resources/assets/tardim_ic/lang/ru_ru.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"block.tardim_ic.digital_tardim_interface": "Цифровой интерфейс TARDIM",
|
||||
"itemGroup.tardim_ic": "TARDIM: In Control"
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"GGG",
|
||||
"R0R",
|
||||
"GRG"
|
||||
],
|
||||
"key": {
|
||||
"G": {
|
||||
"item": "minecraft:gold_ingot",
|
||||
"count": 1
|
||||
},
|
||||
"R": {
|
||||
"item": "minecraft:redstone",
|
||||
"count": 1
|
||||
},
|
||||
"0": {
|
||||
"item": "minecraft:ender_eye",
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "tardim_ic:digital_tardim_interface",
|
||||
"count": 1
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue