You've redecorated. I like it!

This commit is contained in:
Andrey Nikitin 2023-01-29 00:15:31 +03:00
parent 6846d04a01
commit 79ad4777b3
21 changed files with 55 additions and 57 deletions

View file

@ -10,9 +10,9 @@ buildscript {
apply plugin: 'net.minecraftforge.gradle' apply plugin: 'net.minecraftforge.gradle'
group = 'de.srendi.cctutorial' group = 'su.a71.tardim_ic'
version = '1.0' version = '1.0'
archivesBaseName = 'cctutorial' archivesBaseName = 'tardim_ic'
java.toolchain.languageVersion = JavaLanguageVersion.of(17) java.toolchain.languageVersion = JavaLanguageVersion.of(17)
@ -66,10 +66,10 @@ minecraft {
property 'forge.logging.console.level', 'debug' property 'forge.logging.console.level', 'debug'
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
args '--mod', 'cctutorial', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') args '--mod', 'tardim_ic', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
mods { mods {
cctutorial { tardim_ic {
source sourceSets.main source sourceSets.main
} }
} }
@ -101,12 +101,12 @@ dependencies {
jar { jar {
manifest { manifest {
attributes([ attributes([
"Specification-Title" : "cctutorial", "Specification-Title" : "tardim_ic",
//"Specification-Vendor": "cctutorial authors", //"Specification-Vendor": "tardim_ic authors",
"Specification-Version" : "1", // We are version 1 of ourselves "Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name, "Implementation-Title" : project.name,
"Implementation-Version" : project.version, "Implementation-Version" : project.version,
//"Implementation-Vendor": "cctutorial authors", //"Implementation-Vendor": "tardim_ic authors",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
]) ])
} }

View file

@ -1 +1 @@
rootProject.name = 'cctutorial' rootProject.name = 'tardim_ic'

View file

@ -1,4 +1,4 @@
package de.srendi.cctutorial.cctutorial; package su.a71.tardim_ic.tardim_ic;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
@ -13,9 +13,9 @@ import javax.annotation.Nullable;
/** /**
* This is our block. To tell minecraft that this block has a block entity, we need to implement {@link EntityBlock} * This is our block. To tell minecraft that this block has a block entity, we need to implement {@link EntityBlock}
*/ */
public class CCBlock extends Block implements EntityBlock { public class DigitalInterfaceBlock extends Block implements EntityBlock {
public CCBlock() { public DigitalInterfaceBlock() {
super(Properties.of(Material.METAL).strength(5, 5).noOcclusion()); super(Properties.of(Material.METAL).strength(5, 5).noOcclusion());
} }

View file

@ -1,6 +1,5 @@
package de.srendi.cctutorial.cctutorial; package su.a71.tardim_ic.tardim_ic;
import com.swdteam.common.command.tardim.CommandTardimBase;
import com.swdteam.common.command.tardim.CommandTravel; import com.swdteam.common.command.tardim.CommandTravel;
import com.swdteam.common.data.DimensionMapReloadListener; import com.swdteam.common.data.DimensionMapReloadListener;
import dan200.computercraft.api.lua.LuaFunction; import dan200.computercraft.api.lua.LuaFunction;
@ -9,7 +8,6 @@ import dan200.computercraft.api.peripheral.IPeripheral;
import dan200.computercraft.api.lua.ObjectLuaTable; import dan200.computercraft.api.lua.ObjectLuaTable;
import dan200.computercraft.api.lua.LuaException; import dan200.computercraft.api.lua.LuaException;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry; import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
@ -33,15 +31,15 @@ import java.util.Map;
/** /**
* Our peripheral class, this is the class where we will register functions for our block. * Our peripheral class, this is the class where we will register functions for our block.
*/ */
public class CCPeripheral implements IPeripheral { public class DigitalInterfacePeripheral implements IPeripheral {
private final List<IComputerAccess> connectedComputers = new ArrayList<>(); // List of computers connected to the peripheral private final List<IComputerAccess> connectedComputers = new ArrayList<>(); // List of computers connected to the peripheral
private final CCTileEntity tileEntity; // Peripheral's BlockEntity, used for accessing coordinates private final DigitalInterfaceTileEntity tileEntity; // Peripheral's BlockEntity, used for accessing coordinates
/** /**
* @param tileEntity the tile entity of this peripheral * @param tileEntity the tile entity of this peripheral
*/ */
public CCPeripheral(CCTileEntity tileEntity) { public DigitalInterfacePeripheral(DigitalInterfaceTileEntity tileEntity) {
this.tileEntity = tileEntity; this.tileEntity = tileEntity;
} }
@ -63,7 +61,7 @@ public class CCPeripheral implements IPeripheral {
@Override @Override
public void attach(@Nonnull IComputerAccess computer) { connectedComputers.add(computer); } public void attach(@Nonnull IComputerAccess computer) { connectedComputers.add(computer); }
public CCTileEntity getTileEntity() { public DigitalInterfaceTileEntity getTileEntity() {
return tileEntity; return tileEntity;
} }

View file

@ -1,4 +1,4 @@
package de.srendi.cctutorial.cctutorial; package su.a71.tardim_ic.tardim_ic;
import dan200.computercraft.api.peripheral.IPeripheral; import dan200.computercraft.api.peripheral.IPeripheral;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@ -11,16 +11,16 @@ import org.jetbrains.annotations.NotNull;
import static dan200.computercraft.shared.Capabilities.CAPABILITY_PERIPHERAL; import static dan200.computercraft.shared.Capabilities.CAPABILITY_PERIPHERAL;
public class CCTileEntity extends BlockEntity { public class DigitalInterfaceTileEntity extends BlockEntity {
public CCTileEntity(BlockPos pos, BlockState state) { public DigitalInterfaceTileEntity(BlockPos pos, BlockState state) {
super(Registration.CC_TILEENTITY.get(), pos, state); super(Registration.CC_TILEENTITY.get(), pos, state);
} }
/** /**
* Our peripheral, we create a new peripheral for each new tile entity * Our peripheral, we create a new peripheral for each new tile entity
*/ */
protected CCPeripheral peripheral = new CCPeripheral(this); protected DigitalInterfacePeripheral peripheral = new DigitalInterfacePeripheral(this);
private LazyOptional<IPeripheral> peripheralCap; private LazyOptional<IPeripheral> peripheralCap;
public BlockPos getPos() { public BlockPos getPos() {
return this.worldPosition; return this.worldPosition;

View file

@ -1,4 +1,4 @@
package de.srendi.cctutorial.cctutorial; package su.a71.tardim_ic.tardim_ic;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.BlockItem;
@ -16,12 +16,12 @@ import java.util.function.Supplier;
public class Registration { public class Registration {
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, CCtutorial.MODID); public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, TardimInControl.MODID);
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, CCtutorial.MODID); 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, CCtutorial.MODID); public static final DeferredRegister<BlockEntityType<?>> BLOCK_ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, TardimInControl.MODID);
// Blocks // Blocks
public static final RegistryObject<Block> CC_BLOCK = register("digital_tardim_interface", CCBlock::new); public static final RegistryObject<Block> CC_BLOCK = register("digital_tardim_interface", DigitalInterfaceBlock::new);
private static <T extends Block> RegistryObject<T> register(String name, Supplier<T> block) { private static <T extends Block> RegistryObject<T> register(String name, Supplier<T> block) {
RegistryObject<T> registryObject = BLOCKS.register(name, block); RegistryObject<T> registryObject = BLOCKS.register(name, block);
@ -30,7 +30,7 @@ public class Registration {
} }
// Tile Entities // Tile Entities
public static final RegistryObject<BlockEntityType<CCTileEntity>> CC_TILEENTITY = Registration.BLOCK_ENTITIES.register("digital_tardim_interface", () -> new BlockEntityType<>(CCTileEntity::new, Sets.newHashSet(CC_BLOCK.get()), null)); public static final RegistryObject<BlockEntityType<DigitalInterfaceTileEntity>> CC_TILEENTITY = Registration.BLOCK_ENTITIES.register("digital_tardim_interface", () -> new BlockEntityType<>(DigitalInterfaceTileEntity::new, Sets.newHashSet(CC_BLOCK.get()), null));
// Register our stuff // Register our stuff
public static void register() { public static void register() {

View file

@ -1,16 +1,16 @@
package de.srendi.cctutorial.cctutorial; package su.a71.tardim_ic.tardim_ic;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod;
// The value here should match an entry in the META-INF/mods.toml file // The value here should match an entry in the META-INF/mods.toml file
@Mod("cctutorial") @Mod("tardim_ic")
public class CCtutorial { public class TardimInControl {
// Our mod id // Our mod id
public static final String MODID = "cctutorial"; public static final String MODID = "tardim_ic";
public CCtutorial() { public TardimInControl() {
Registration.register(); Registration.register();
// Register ourselves for server and other game events we are interested in. Currently, we do not use any events // Register ourselves for server and other game events we are interested in. Currently, we do not use any events
MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(this);

View file

@ -4,13 +4,13 @@ loaderVersion = "[36,)" #mandatory This is typically bumped every Minecraft vers
license = "All rights reserved" license = "All rights reserved"
[[mods]] #mandatory [[mods]] #mandatory
# The modid of the mod # The modid of the mod
modId = "cctutorial" #mandatory modId = "tardim_ic" #mandatory
version = "1.0" #mandatory version = "1.0" #mandatory
# A display name for the mod # A display name for the mod
displayName = "CCtutorial" #mandatory displayName = "TARDIM: In Control" #mandatory
# The description text for the mod (multi line!) (#mandatory) # The description text for the mod (multi line!) (#mandatory)
description = ''' description = '''
A mod to show you, how the magic of cc works. All of time and space, now automated. Control your TARDIM using ComputerCraft: Tweaked.
''' '''
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
[[dependencies.cctutorial]] #optional [[dependencies.cctutorial]] #optional

View file

@ -1,7 +0,0 @@
{
"variants": {
"": {
"model": "cctutorial:block/digital_tardim_interface"
}
}
}

View file

@ -1,3 +0,0 @@
{
"block.cctutorial.digital_tardim_interface": "Digital TARDIM Interface"
}

View file

@ -1,3 +0,0 @@
{
"block.cctutorial.digital_tardim_interface": "Digital TARDIM Interface"
}

View file

@ -1,3 +0,0 @@
{
"block.cctutorial.digital_tardim_interface": "Циферный Интерфейсъ Хрономашины"
}

View file

@ -1,3 +0,0 @@
{
"parent": "cctutorial:block/digital_tardim_interface"
}

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "tardim_ic:block/digital_tardim_interface"
}
}
}

View file

@ -0,0 +1,3 @@
{
"block.tardim_ic.digital_tardim_interface": "Digital TARDIM Interface"
}

View file

@ -0,0 +1,3 @@
{
"block.tardim_ic.digital_tardim_interface": "Digital TARDIM Interface"
}

View file

@ -0,0 +1,3 @@
{
"block.tardim_ic.digital_tardim_interface": "Циферный Интерфейсъ Хронобудки"
}

View file

@ -3,7 +3,7 @@
"parent": "digital_tardim_interface", "parent": "digital_tardim_interface",
"texture_size": [64, 64], "texture_size": [64, 64],
"textures": { "textures": {
"1": "cctutorial:blocks/digital_tardim_interface" "1": "tardim_ic:blocks/digital_tardim_interface"
}, },
"elements": [ "elements": [
{ {

View file

@ -0,0 +1,3 @@
{
"parent": "tardim_ic:block/digital_tardim_interface"
}

View file

@ -1,6 +1,6 @@
{ {
"pack": { "pack": {
"description": "cctutorial resources", "description": "TARDIM: In Control resources",
"pack_format": 6, "pack_format": 6,
"_comment": "A pack_format of 6 requires json lang files and some texture changes from 1.16.2. Note: we require v6 pack meta for all mods." "_comment": "A pack_format of 6 requires json lang files and some texture changes from 1.16.2. Note: we require v6 pack meta for all mods."
} }