- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
-
Content Count
11 -
Joined
-
Last visited
Posts posted by NEO
-
-
You return null in createEnvironment() but you have the return a ManagedEnvironment.
The ManagedEnvironment also needs a Network Node with a component.
public class TeslaUpgrade extends li.cil.oc.api.prefab.ManagedEnvironment{ public TeslaUpgrade(){ this.setNode( Network.newNode(this, Visibility.Neighbors).withComponent("teslaUpgrade").create() ); } }
I do not know if you have seen the example on GitHub
If the upgrade is only for robots you should check in worksWith() if the host class is li.cil.oc.common.tileentity.Robot because there are also upgrade slots in drones, microcontrollers and in the adapter block
Already it is working, although for some reason the upgrade in the container does not want to lay down.
-
I am creating an addition to the operating system, namely Tesla update for the robot , but for some - I do not know the reasons why it does not work , when I change the map type , or other things work , but as soon as I put all Slot. Updating nothing works .
Driver
public class DriverTeslaUpgrade implements HostAware {
@Override
public boolean worksWith(ItemStack stack, Class<? extends EnvironmentHost> host) {
return true;
}
@Override
public boolean worksWith(ItemStack stack) {
return stack.getItem() == Items.tesla;
}
@Override
public ManagedEnvironment createEnvironment(ItemStack stack, EnvironmentHost host) {
return null;
}
@Override
public String slot(ItemStack stack) {
return Slot.Upgrade;
}
@Override
public int tier(ItemStack stack) {
return 0;
}
@Override
public NBTTagCompound dataTag(ItemStack stack) {
return null;
}
}
Register Driver
public class Drivers {
public static Item driverTeslaUpgrade;
public static void init(){
driverTeslaUpgrade = new DriverTeslaUpgrade();
Driver.add(driverTeslaUpgrade);
}
}
Item
public class ItemUpgradeTesla extends Item {
public ItemUpgradeTesla() {
setCreativeTab(OpenTechnology.tab);
}
}
I would be grateful if you helpP.SManagedEnvironment I came return , the result did not change.
I am creating an addition to the operating system, namely Tesla update for the robot , but for some - I do not know the reasons why it does not work , when I change the map type , or other things work , but as soon as I put all Slot. Updating nothing works .
-
So you made an add-on mod for OC but you need to enable OC to use power from the config file?
It should be addon that can be used as a mode of energy.
-
Hi people , I write addition that adds a power generator, how can I make OC use energy ?
-
I thought , do addon.
-
Hello, dear Sangar, I would like to offer you the idea for the OC, in the form of adding the block to teleport entity, well, or at least, the players how to work the block to teleportation will need at least 2 units, they must be connected to the same network, teleportation should that be buffer stored n-the amount of energy, the farther away the more energy, as there will be teleported to a code, we take proxy teleporter - it will be a starting point, and calls teleport into arguments pass the address of another teleporter, well, further work scala code, and need to add a function to calculate the amount of energy used to teleport between them, in an argument, too, is passed the address of the final teleporter like you the idea? I pushed the idea of ​​creating more comfortable lift. Sorry for the bad english.
-
Hi, how to change the font in the OC to another , such as DejaVu Sans Mono, tell me how ?
-
If I understand correctly, you want to be able to click the address in the analyzer output in the chat to copy it to the clipboard? If yes, neat idea, added it. If not, welp
Yes, you understood correctly.
-
Hello.
Good job.
Sangar: please don't double post.
-
Sorry for bad English, You can realize the quick receipt of the address component?
I can offer make the address as the url link to that when you click on it can be copied.
problem connecting node to a network.
in Programming
Posted
Did Chatbox , I know about Computronics , but would like to add a feature , namely the team that did not go to chat, that is, # hello, so that all chatboxs they will be push as an event , the problem is that in a single game and the server vanilla , it works , but in a thermos does not want to , I check computronics it works , apparently , I was wrong , debugging , I noticed that reachableNodes empty , all methods are implemented properly, and so if you try to take reachableNodes nodes Callback method annotated works , please help , not the first day of digging through the code .
Code:
https://github.com/Avaja/OpenTechnology/blob/master/src/main/java/OpenTechnology/tileentities/TileEntityAdminChatBox.java