20w22a
This commit is contained in:
parent
17453d7edd
commit
ae1a26156a
5 changed files with 41 additions and 40 deletions
|
@ -69,12 +69,12 @@ license {
|
||||||
group = 'TechReborn'
|
group = 'TechReborn'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft "com.mojang:minecraft:20w21a"
|
minecraft "com.mojang:minecraft:20w22a"
|
||||||
mappings "net.fabricmc:yarn:20w21a+build.10:v2"
|
mappings "net.fabricmc:yarn:20w22a+build.6:v2"
|
||||||
modImplementation "net.fabricmc:fabric-loader:0.8.4+build.198"
|
modImplementation "net.fabricmc:fabric-loader:0.8.5+build.199"
|
||||||
|
|
||||||
//Fabric api
|
//Fabric api
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api:0.10.10+build.347-1.16"
|
modImplementation "net.fabricmc.fabric-api:fabric-api:0.11.2+build.351-1.16"
|
||||||
|
|
||||||
optionalDependency ("me.shedaniel:RoughlyEnoughItems:4.3.7-unstable")
|
optionalDependency ("me.shedaniel:RoughlyEnoughItems:4.3.7-unstable")
|
||||||
disabledOptionalDependency ('io.github.cottonmc:LibCD:2.3.0+1.15.2')
|
disabledOptionalDependency ('io.github.cottonmc:LibCD:2.3.0+1.15.2')
|
||||||
|
|
|
@ -30,7 +30,7 @@ import net.minecraft.item.ItemConvertible;
|
||||||
import net.minecraft.loot.LootPool;
|
import net.minecraft.loot.LootPool;
|
||||||
import net.minecraft.loot.UniformLootTableRange;
|
import net.minecraft.loot.UniformLootTableRange;
|
||||||
import net.minecraft.loot.entry.ItemEntry;
|
import net.minecraft.loot.entry.ItemEntry;
|
||||||
import net.minecraft.loot.entry.LootEntry;
|
import net.minecraft.loot.entry.LootPoolEntry;
|
||||||
import net.minecraft.loot.function.SetCountLootFunction;
|
import net.minecraft.loot.function.SetCountLootFunction;
|
||||||
import techreborn.config.TechRebornConfig;
|
import techreborn.config.TechRebornConfig;
|
||||||
import techreborn.init.TRContent.Ingots;
|
import techreborn.init.TRContent.Ingots;
|
||||||
|
@ -40,35 +40,35 @@ public class ModLoot {
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
|
|
||||||
LootEntry copperIngot = makeEntry(Ingots.COPPER);
|
LootPoolEntry copperIngot = makeEntry(Ingots.COPPER);
|
||||||
LootEntry tinIngot = makeEntry(Ingots.TIN);
|
LootPoolEntry tinIngot = makeEntry(Ingots.TIN);
|
||||||
LootEntry leadIngot = makeEntry(Ingots.LEAD);
|
LootPoolEntry leadIngot = makeEntry(Ingots.LEAD);
|
||||||
LootEntry silverIngot = makeEntry(Ingots.SILVER);
|
LootPoolEntry silverIngot = makeEntry(Ingots.SILVER);
|
||||||
LootEntry refinedronIngot = makeEntry(Ingots.REFINED_IRON);
|
LootPoolEntry refinedronIngot = makeEntry(Ingots.REFINED_IRON);
|
||||||
LootEntry advancedalloyIngot = makeEntry(Ingots.ADVANCED_ALLOY);
|
LootPoolEntry advancedalloyIngot = makeEntry(Ingots.ADVANCED_ALLOY);
|
||||||
LootEntry basicFrame = makeEntry(TRContent.MachineBlocks.BASIC.frame.asItem());
|
LootPoolEntry basicFrame = makeEntry(TRContent.MachineBlocks.BASIC.frame.asItem());
|
||||||
LootEntry basicCircuit = makeEntry(Parts.ELECTRONIC_CIRCUIT);
|
LootPoolEntry basicCircuit = makeEntry(Parts.ELECTRONIC_CIRCUIT);
|
||||||
LootEntry rubberSapling = makeEntry(TRContent.RUBBER_SAPLING, 25);
|
LootPoolEntry rubberSapling = makeEntry(TRContent.RUBBER_SAPLING, 25);
|
||||||
|
|
||||||
LootEntry aluminumIngot = makeEntry(Ingots.ALUMINUM);
|
LootPoolEntry aluminumIngot = makeEntry(Ingots.ALUMINUM);
|
||||||
LootEntry electrumIngot = makeEntry(Ingots.ELECTRUM);
|
LootPoolEntry electrumIngot = makeEntry(Ingots.ELECTRUM);
|
||||||
LootEntry invarIngot = makeEntry(Ingots.INVAR);
|
LootPoolEntry invarIngot = makeEntry(Ingots.INVAR);
|
||||||
LootEntry nickelIngot = makeEntry(Ingots.NICKEL);
|
LootPoolEntry nickelIngot = makeEntry(Ingots.NICKEL);
|
||||||
LootEntry steelIngot = makeEntry(Ingots.STEEL);
|
LootPoolEntry steelIngot = makeEntry(Ingots.STEEL);
|
||||||
LootEntry zincIngot = makeEntry(Ingots.ZINC);
|
LootPoolEntry zincIngot = makeEntry(Ingots.ZINC);
|
||||||
LootEntry advancedFrame = makeEntry(TRContent.MachineBlocks.ADVANCED.frame.asItem());
|
LootPoolEntry advancedFrame = makeEntry(TRContent.MachineBlocks.ADVANCED.frame.asItem());
|
||||||
LootEntry advancedCircuit = makeEntry(Parts.ADVANCED_CIRCUIT);
|
LootPoolEntry advancedCircuit = makeEntry(Parts.ADVANCED_CIRCUIT);
|
||||||
LootEntry dataStorageChip = makeEntry(Parts.DATA_STORAGE_CHIP);
|
LootPoolEntry dataStorageChip = makeEntry(Parts.DATA_STORAGE_CHIP);
|
||||||
|
|
||||||
LootEntry chromeIngot = makeEntry(Ingots.CHROME);
|
LootPoolEntry chromeIngot = makeEntry(Ingots.CHROME);
|
||||||
LootEntry iridiumIngot = makeEntry(Ingots.IRIDIUM);
|
LootPoolEntry iridiumIngot = makeEntry(Ingots.IRIDIUM);
|
||||||
LootEntry platinumIngot = makeEntry(Ingots.PLATINUM);
|
LootPoolEntry platinumIngot = makeEntry(Ingots.PLATINUM);
|
||||||
LootEntry titaniumIngot = makeEntry(Ingots.TITANIUM);
|
LootPoolEntry titaniumIngot = makeEntry(Ingots.TITANIUM);
|
||||||
LootEntry tungstenIngot = makeEntry(Ingots.TUNGSTEN);
|
LootPoolEntry tungstenIngot = makeEntry(Ingots.TUNGSTEN);
|
||||||
LootEntry tungstensteelIngot = makeEntry(Ingots.TUNGSTENSTEEL);
|
LootPoolEntry tungstensteelIngot = makeEntry(Ingots.TUNGSTENSTEEL);
|
||||||
LootEntry industrialFrame = makeEntry(TRContent.MachineBlocks.INDUSTRIAL.frame.asItem());
|
LootPoolEntry industrialFrame = makeEntry(TRContent.MachineBlocks.INDUSTRIAL.frame.asItem());
|
||||||
LootEntry industrialCircuit = makeEntry(Parts.INDUSTRIAL_CIRCUIT);
|
LootPoolEntry industrialCircuit = makeEntry(Parts.INDUSTRIAL_CIRCUIT);
|
||||||
LootEntry energyFlowChip = makeEntry(Parts.ENERGY_FLOW_CHIP);
|
LootPoolEntry energyFlowChip = makeEntry(Parts.ENERGY_FLOW_CHIP);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ public class ModLoot {
|
||||||
* @param item Item to include into LootEntry
|
* @param item Item to include into LootEntry
|
||||||
* @return LootEntry for item provided
|
* @return LootEntry for item provided
|
||||||
*/
|
*/
|
||||||
private static LootEntry makeEntry(ItemConvertible item) {
|
private static LootPoolEntry makeEntry(ItemConvertible item) {
|
||||||
return makeEntry(item, 5);
|
return makeEntry(item, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ public class ModLoot {
|
||||||
* @param weight Weight of that item
|
* @param weight Weight of that item
|
||||||
* @return LootEntry for item and weight provided
|
* @return LootEntry for item and weight provided
|
||||||
*/
|
*/
|
||||||
private static LootEntry makeEntry(ItemConvertible item, int weight){
|
private static LootPoolEntry makeEntry(ItemConvertible item, int weight){
|
||||||
return ItemEntry.builder(item).weight(weight)
|
return ItemEntry.builder(item).weight(weight)
|
||||||
.apply(SetCountLootFunction.builder(UniformLootTableRange.between(1.0f, 2.0f))).build();
|
.apply(SetCountLootFunction.builder(UniformLootTableRange.between(1.0f, 2.0f))).build();
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@ public class FrequencyTransmitterItem extends Item {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Identifier getDimName(RegistryKey<DimensionType> dimensionRegistryKey){
|
private static Identifier getDimName(RegistryKey<World> dimensionRegistryKey){
|
||||||
return dimensionRegistryKey.getValue();
|
return dimensionRegistryKey.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -174,8 +174,8 @@ public class NanosaberItem extends SwordItem implements EnergyHolder, ItemDurabi
|
||||||
attributes.removeAll(EntityAttributes.GENERIC_ATTACK_SPEED);
|
attributes.removeAll(EntityAttributes.GENERIC_ATTACK_SPEED);
|
||||||
|
|
||||||
if (slot== EquipmentSlot.MAINHAND && ItemUtils.isActive(stack)) {
|
if (slot== EquipmentSlot.MAINHAND && ItemUtils.isActive(stack)) {
|
||||||
attributes.put(EntityAttributes.GENERIC_ATTACK_DAMAGE, new EntityAttributeModifier(ATTACK_DAMAGE_MODIFIER_UUID, "Weapon modifier", TechRebornConfig.nanosaberDamage, EntityAttributeModifier.Operation.ADDITION));
|
attributes.put(EntityAttributes.GENERIC_ATTACK_DAMAGE, new EntityAttributeModifier(ATTACK_DAMAGE_MODIFIER_ID, "Weapon modifier", TechRebornConfig.nanosaberDamage, EntityAttributeModifier.Operation.ADDITION));
|
||||||
attributes.put(EntityAttributes.GENERIC_ATTACK_SPEED, new EntityAttributeModifier(ATTACK_SPEED_MODIFIER_UUID, "Weapon modifier", 3, EntityAttributeModifier.Operation.ADDITION));
|
attributes.put(EntityAttributes.GENERIC_ATTACK_SPEED, new EntityAttributeModifier(ATTACK_SPEED_MODIFIER_ID, "Weapon modifier", 3, EntityAttributeModifier.Operation.ADDITION));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ package techreborn.world;
|
||||||
|
|
||||||
import com.mojang.serialization.Codec;
|
import com.mojang.serialization.Codec;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.util.math.BlockBox;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.ModifiableTestableWorld;
|
import net.minecraft.world.ModifiableTestableWorld;
|
||||||
|
|
||||||
|
@ -55,8 +56,8 @@ public class RubberTreeFeature extends TreeFeature {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void generate(ModifiableTestableWorld world, Random random, TreeFeatureConfig config, int trunkHeight, TreeNode treeNode, int foliageHeight, int radius, Set<BlockPos> leaves, int i) {
|
protected void generate(ModifiableTestableWorld world, Random random, TreeFeatureConfig config, int trunkHeight, TreeNode treeNode, int foliageHeight, int radius, Set<BlockPos> leaves, int i, BlockBox blockBox) {
|
||||||
super.generate(world, random, config, trunkHeight, treeNode, foliageHeight, radius, leaves, i);
|
super.generate(world, random, config, trunkHeight, treeNode, foliageHeight, radius, leaves, i, blockBox);
|
||||||
|
|
||||||
spawnSpike(world, treeNode.getCenter());
|
spawnSpike(world, treeNode.getCenter());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue