Solar panels flattened.

This commit is contained in:
drcrazy 2018-09-20 16:42:32 +03:00
parent b7a0854cae
commit a5a0d03591
22 changed files with 291 additions and 92 deletions

View file

@ -153,6 +153,8 @@ public class TRContent {
block = new BlockSolarPanel(this);
this.generationRateD = generationRateD;
this.generationRateN = generationRateN;
// Buffer for 2 mins of work
internalCapacity = generationRateD * 2_400;
InitUtils.setup(block, "solar_panel_" + name);
}

View file

@ -27,6 +27,7 @@ package techreborn.tiles.generator;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.text.TextFormatting;
import reborncore.api.IToolDrop;
@ -130,6 +131,15 @@ public class TileSolarPanel extends TilePowerAcceptor implements IToolDrop {
info.add(TextFormatting.GRAY + "Tier: " + TextFormatting.GOLD
+ StringUtils.toFirstCapitalAllLowercase(getTier().toString()));
}
@Override
public void readFromNBT(NBTTagCompound tag) {
if (world == null) {
// We are in TileEntity.create method during chunk load.
this.checkOverfill = false;
}
super.readFromNBT(tag);
}
// TileMachineBase
@Override
@ -141,11 +151,10 @@ public class TileSolarPanel extends TilePowerAcceptor implements IToolDrop {
panel = solarPanelBlock.panelType;
}
}
// IToolDrop
@Override
public ItemStack getToolDrop(final EntityPlayer playerIn) {
// return new ItemStack(ModBlocks.SOLAR_PANEL, 1, panel.ordinal());
return null;
return new ItemStack(getBlockType());
}
}

View file

@ -1,30 +0,0 @@
{
"forge_marker": 1,
"defaults": {
"transform": "forge:default-block",
"model": "cube_bottom_top",
"textures": {
"particle": "techreborn:blocks/machines/generators/creative_panel_side",
"top": "techreborn:blocks/machines/generators/creative_panel_top",
"down": "techreborn:blocks/machines/generators/generator_bottom",
"side": "techreborn:blocks/machines/generators/creative_panel_side"
}
},
"variants": {
"inventory": {
"transform": "forge:default-block",
"model": "cube_bottom_top",
"textures": {
"side": "techreborn:blocks/machines/generators/creative_panel_side"
}
},
"normal": {
"transform": "forge:default-block",
"model": "cube_bottom_top",
"textures": {
"side": "techreborn:blocks/machines/generators/creative_panel_side"
}
}
}
}

View file

@ -1,58 +0,0 @@
{
"forge_marker": 1,
"defaults": {
"textures": {
"particle": "techreborn:blocks/machines/generators/generator_bottom",
"down": "techreborn:blocks/machines/generators/generator_bottom",
"side": "techreborn:blocks/machines/generators/solar_panel_side_off"
},
"transform": "forge:default-block",
"model": "cube_bottom_top"
},
"variants": {
"inventory": {
"transform": "forge:default-block",
"model": "orientable",
"textures": {}
},
"active": {
"true": {
"textures": {
"side": "techreborn:blocks/machines/generators/solar_panel_side_on"
}
},
"false": {
"textures": {
"side": "techreborn:blocks/machines/generators/solar_panel_side_off"
}
}
},
"type": {
"basic": {
"textures": {
"top": "techreborn:blocks/machines/generators/panels/basicsolar_panel_top"
}
},
"hybrid": {
"textures": {
"top": "techreborn:blocks/machines/generators/panels/hybridsolar_panel_top"
}
},
"advanced": {
"textures": {
"top": "techreborn:blocks/machines/generators/panels/advancedsolar_panel_top"
}
},
"ultimate": {
"textures": {
"top": "techreborn:blocks/machines/generators/panels/ultimatesolar_panel_top"
}
},
"quantum": {
"textures": {
"top": "techreborn:blocks/machines/generators/panels/quantumsolar_panel_top"
}
}
}
}
}

View file

@ -0,0 +1,46 @@
{
"forge_marker": 1,
"defaults": {
"textures": {
"top": "techreborn:blocks/machines/generators/panels/advanced_solar_panel_top",
"bottom": "techreborn:blocks/machines/generators/generator_bottom",
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_off"
},
"transform": "forge:default-block",
"model": "minecraft:cube_bottom_top"
},
"variants": {
"inventory": {
"model": "minecraft:cube_bottom_top",
"textures": {
}
},
"facing": {
"north": {
},
"east": {
"y": 90
},
"south": {
"y": 180
},
"west": {
"y": 270
}
},
"active": {
"true": {
"textures": {
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_on"
}
},
"false": {
"textures": {
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_off"
}
}
}
}
}

View file

@ -0,0 +1,46 @@
{
"forge_marker": 1,
"defaults": {
"textures": {
"top": "techreborn:blocks/machines/generators/panels/basic_solar_panel_top",
"bottom": "techreborn:blocks/machines/generators/generator_bottom",
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_off"
},
"transform": "forge:default-block",
"model": "minecraft:cube_bottom_top"
},
"variants": {
"inventory": {
"model": "minecraft:cube_bottom_top",
"textures": {
}
},
"facing": {
"north": {
},
"east": {
"y": 90
},
"south": {
"y": 180
},
"west": {
"y": 270
}
},
"active": {
"true": {
"textures": {
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_on"
}
},
"false": {
"textures": {
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_off"
}
}
}
}
}

View file

@ -0,0 +1,46 @@
{
"forge_marker": 1,
"defaults": {
"textures": {
"top": "techreborn:blocks/machines/generators/panels/creative_panel_top",
"bottom": "techreborn:blocks/machines/generators/generator_bottom",
"side": "techreborn:blocks/machines/generators/panels/creative_panel_side"
},
"transform": "forge:default-block",
"model": "minecraft:cube_bottom_top"
},
"variants": {
"inventory": {
"model": "minecraft:cube_bottom_top",
"textures": {
}
},
"facing": {
"north": {
},
"east": {
"y": 90
},
"south": {
"y": 180
},
"west": {
"y": 270
}
},
"active": {
"true": {
"textures": {
"side": "techreborn:blocks/machines/generators/panels/creative_panel_side"
}
},
"false": {
"textures": {
"side": "techreborn:blocks/machines/generators/panels/creative_panel_side"
}
}
}
}
}

View file

@ -0,0 +1,46 @@
{
"forge_marker": 1,
"defaults": {
"textures": {
"top": "techreborn:blocks/machines/generators/panels/industrial_solar_panel_top",
"bottom": "techreborn:blocks/machines/generators/generator_bottom",
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_off"
},
"transform": "forge:default-block",
"model": "minecraft:cube_bottom_top"
},
"variants": {
"inventory": {
"model": "minecraft:cube_bottom_top",
"textures": {
}
},
"facing": {
"north": {
},
"east": {
"y": 90
},
"south": {
"y": 180
},
"west": {
"y": 270
}
},
"active": {
"true": {
"textures": {
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_on"
}
},
"false": {
"textures": {
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_off"
}
}
}
}
}

View file

@ -0,0 +1,46 @@
{
"forge_marker": 1,
"defaults": {
"textures": {
"top": "techreborn:blocks/machines/generators/panels/quantum_solar_panel_top",
"bottom": "techreborn:blocks/machines/generators/generator_bottom",
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_off"
},
"transform": "forge:default-block",
"model": "minecraft:cube_bottom_top"
},
"variants": {
"inventory": {
"model": "minecraft:cube_bottom_top",
"textures": {
}
},
"facing": {
"north": {
},
"east": {
"y": 90
},
"south": {
"y": 180
},
"west": {
"y": 270
}
},
"active": {
"true": {
"textures": {
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_on"
}
},
"false": {
"textures": {
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_off"
}
}
}
}
}

View file

@ -0,0 +1,46 @@
{
"forge_marker": 1,
"defaults": {
"textures": {
"top": "techreborn:blocks/machines/generators/panels/ultimate_solar_panel_top",
"bottom": "techreborn:blocks/machines/generators/generator_bottom",
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_off"
},
"transform": "forge:default-block",
"model": "minecraft:cube_bottom_top"
},
"variants": {
"inventory": {
"model": "minecraft:cube_bottom_top",
"textures": {
}
},
"facing": {
"north": {
},
"east": {
"y": 90
},
"south": {
"y": 180
},
"west": {
"y": 270
}
},
"active": {
"true": {
"textures": {
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_on"
}
},
"false": {
"textures": {
"side": "techreborn:blocks/machines/generators/panels/solar_panel_side_off"
}
}
}
}
}

View file

@ -4,7 +4,7 @@
"transform": "forge:default-block",
"model": "orientable",
"textures": {
"particle": "techreborn:blocks/machines/generators/solar_panel_side_off",
"particle": "techreborn:blocks/machines/generators/panels/solar_panel_side_off",
"west": "techreborn:blocks/machines/generators/wind_mill_left",
"east": "techreborn:blocks/machines/generators/wind_mill_right",
"south": "techreborn:blocks/machines/generators/generator_bottom",